diff --git a/bcm68620_release/release/host_driver/api/Makefile b/bcm68620_release/release/host_driver/api/Makefile
new file mode 100644
index 0000000..fc035d1
--- /dev/null
+++ b/bcm68620_release/release/host_driver/api/Makefile
@@ -0,0 +1,13 @@
+# Common API
+#
+MOD_NAME = common_api
+MOD_TYPE = lib
+MOD_DEPS = utils dev_log
+
+srcs = bcmolt_msg.c
+
+MOD_INC_DIRS = $(SRC_DIR) $(MODEL_OUT_DIR)
+ifeq ("$(RELEASE_BUILD)", "y")
+    MOD_INC_DIRS += $(SRC_DIR)/../transport
+    srcs += bcmolt_api.c
+endif
diff --git a/bcm68620_release/release/host_driver/api/bcmolt_api.c b/bcm68620_release/release/host_driver/api/bcmolt_api.c
new file mode 100644
index 0000000..f15f7e5
--- /dev/null
+++ b/bcm68620_release/release/host_driver/api/bcmolt_api.c
@@ -0,0 +1,291 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#include <bcmtr_interface.h>
+#include "bcmolt_api.h"
+#include "bcmolt_msg_pack.h"
+
+system_mode_change_cb sm_change_cb;
+
+/** Set configuration
+ *
+ * \param[in]   dev     Device id
+ * \param[in]   cfg     Configuration
+ * \returns error code
+ */
+bcmos_errno bcmolt_cfg_set(bcmolt_devid dev, bcmolt_cfg *cfg)
+{
+    bcmos_errno err;
+    bcmolt_presence_mask ro_mask;
+
+    cfg->hdr.type = BCMOLT_MSG_TYPE_SET;
+    /* Make sure that no attemp is made to set read-only property */
+    err = bcmolt_get_prop_readonly_mask(cfg->hdr.obj_type, &ro_mask);
+    if (err)
+    {
+        return err;
+    }
+    if ((ro_mask & cfg->hdr.presence_mask))
+    {
+        cfg->hdr.dir = BCMOLT_MSG_DIR_RESPONSE;
+        cfg->hdr.err = BCM_ERR_READ_ONLY;
+        strncpy(cfg->hdr.err_text, "Read-only fields cannot be set", BCMOLT_MAX_ERR_TEXT_LENGTH);
+        return cfg->hdr.err;
+    }
+    err = bcmtr_call(dev, &cfg->hdr);
+    if ((cfg->hdr.err == BCM_ERR_OK) &&
+        (cfg->hdr.obj_type == BCMOLT_OBJ_ID_DEVICE) &&
+        (BCMOLT_CFG_PROP_IS_SET((bcmolt_device_cfg*)cfg, device, system_mode)))
+    {
+        bcmolt_system_mode_set(dev, ((bcmolt_device_cfg*)cfg)->data.system_mode);
+        if (NULL != sm_change_cb)
+        {
+            sm_change_cb(dev);
+        }
+    }
+    return err;
+}
+
+/** Get configuration
+ *
+ * \param[in]   dev     Device id
+ * \param[in]   cfg     Configuration
+ * \returns error code
+ * The error code can indicate local or remote failure
+ */
+bcmos_errno bcmolt_cfg_get(bcmolt_devid dev, bcmolt_cfg *cfg)
+{
+    cfg->hdr.type = BCMOLT_MSG_TYPE_GET;
+    return bcmtr_call(dev, &cfg->hdr);
+}
+
+/** Clear configuration
+ *
+ * \param[in]   dev     Device id
+ * \param[in]   cfg     Configuration
+ * \returns error code
+ * The error code can indicate local or remote failure
+ */
+bcmos_errno bcmolt_cfg_clear(bcmolt_devid dev, bcmolt_cfg *cfg)
+{
+    cfg->hdr.presence_mask = BCMOLT_PRESENCE_MASK_ALL; /* clear is always object-wide */
+    cfg->hdr.type = BCMOLT_MSG_TYPE_CLEAR;
+    return bcmtr_call(dev, &cfg->hdr);
+}
+
+/** Get statistics
+ *
+ * \param[in]   dev     Device id
+ * \param[in]   stat    Configuration
+ * \param[in]   flags   Flags
+ * \returns error code
+ * The error code can indicate local or remote failure
+ */
+bcmos_errno bcmolt_stat_get(bcmolt_devid dev, bcmolt_stat *stat, bcmolt_stat_flags flags)
+{
+    stat->hdr.type = BCMOLT_MSG_TYPE_GET;
+    if ((flags & BCMOLT_STAT_FLAGS_CLEAR_ON_READ))
+    {
+        stat->hdr.type |= BCMOLT_MSG_TYPE_CLEAR;
+    }
+    return bcmtr_call(dev, &stat->hdr);
+}
+
+/** Get statistics configuration
+ *
+ * \param[in]   dev     Device id
+ * \param[in]   cfg     Configuration
+ * \returns error code
+ * The error code can indicate local or remote failure
+ */
+bcmos_errno bcmolt_stat_cfg_get(bcmolt_devid dev, bcmolt_stat_cfg *cfg)
+{
+    cfg->hdr.type = BCMOLT_MSG_TYPE_GET;
+    cfg->hdr.presence_mask = BCMOLT_PRESENCE_MASK_ALL;
+    return bcmtr_call(dev, &cfg->hdr);
+}
+
+/** Set statistics configuration
+ *
+ * \param[in]   dev     Device id
+ * \param[in]   cfg     Configuration
+ * \returns error code
+ * The error code can indicate local or remote failure
+ */
+bcmos_errno bcmolt_stat_cfg_set(bcmolt_devid dev, bcmolt_stat_cfg *cfg)
+{
+    cfg->hdr.type = BCMOLT_MSG_TYPE_SET;
+    cfg->hdr.presence_mask = BCMOLT_PRESENCE_MASK_ALL;
+    return bcmtr_call(dev, &cfg->hdr);
+}
+
+/** Get indication configuration
+ *
+ * \param[in]   dev     Device id
+ * \param[in]   cfg     Configuration
+ * \returns error code
+ * The error code can indicate local or remote failure
+ */
+bcmos_errno bcmolt_auto_cfg_get(bcmolt_devid dev, bcmolt_auto_cfg *cfg)
+{
+    cfg->hdr.type = BCMOLT_MSG_TYPE_GET;
+    if (cfg->hdr.presence_mask == 0)
+    {
+        cfg->hdr.presence_mask = BCMOLT_PRESENCE_MASK_ALL;
+    }
+    return bcmtr_call(dev, &cfg->hdr);
+}
+
+/** Set indication configuration
+ *
+ * \param[in]   dev     Device id
+ * \param[in]   cfg     Configuration
+ * \returns error code
+ * The error code can indicate local or remote failure
+ */
+bcmos_errno bcmolt_auto_cfg_set(bcmolt_devid dev, bcmolt_auto_cfg *cfg)
+{
+    cfg->hdr.type = BCMOLT_MSG_TYPE_SET;
+    return bcmtr_call(dev, &cfg->hdr);
+}
+
+/** Invoke operation
+ *
+ * \param[in]   dev     Device id
+ * \param[in]   oper    Operation
+ * \returns error code
+ */
+bcmos_errno bcmolt_oper_submit(bcmolt_devid dev, bcmolt_oper *oper)
+{
+    oper->hdr.type = BCMOLT_MSG_TYPE_SET;
+    return bcmtr_call(dev, &oper->hdr);
+}
+
+/** Send message to ONU
+ *
+ * \param[in]   dev     Device id
+ * \param[in]   msg     Message to be sent
+ * \returns error code
+ */
+bcmos_errno bcmolt_proxy_send(bcmolt_devid dev, bcmolt_proxy *msg)
+{
+    msg->hdr.type = BCMOLT_MSG_TYPE_SET;
+    return bcmtr_call(dev, &msg->hdr);
+}
+
+
+/* (Un)Register auto/proxy message */
+static bcmos_errno bcmolt_rx_cb_set(bcmolt_devid device, bcmolt_mgt_group group, bcmolt_rx_cfg *rx_cfg)
+{
+    bcmtr_handler_parm tparm = {
+        .group = group,
+        .subgroup = BCMOLT_SUBGROUP_ANY,
+    };
+    bcmos_errno rc = BCM_ERR_OK;
+    int i;
+
+    if (!rx_cfg)
+        return BCM_ERR_PARM;
+
+    tparm.object = rx_cfg->obj_type;
+    tparm.app_cb = rx_cfg->rx_cb;
+    tparm.flags = rx_cfg->flags;
+    if (rx_cfg->flags == BCMOLT_AUTO_FLAGS_DISPATCH)
+        tparm.module = rx_cfg->module;
+
+    for (i = 0; i < BCMTR_MAX_INSTANCES && !rc; i++)
+    {
+        /* Skip interfaces that are not present in the default mask */
+        if (rx_cfg->pon_ni_mask && 0 == (rx_cfg->pon_ni_mask & (1 << i)))
+            continue;
+
+        tparm.instance = i;
+        if (rx_cfg->rx_cb)
+        {
+            /* If registration of specific object - unregister the old handler first */
+            if (rx_cfg->obj_type != BCMOLT_OBJECT_ANY)
+                bcmtr_msg_handler_unregister(device, &tparm);
+            rc = bcmtr_msg_handler_register(device, &tparm);
+        }
+        else
+        {
+            rc = bcmtr_msg_handler_unregister(device, &tparm);
+        }
+    }
+    return rc;
+}
+
+/* (Un)Register autonomous indication message handler
+ *
+ * \param[in]   dev             Device id
+ * \param[in]   rx_cfg          Receive handler configuration
+ * \returns error code
+ */
+bcmos_errno bcmolt_auto_rx_cb_set(bcmolt_devid device, bcmolt_rx_cfg *rx_cfg)
+{
+    return bcmolt_rx_cb_set(device, BCMOLT_MGT_GROUP_AUTO, rx_cfg);
+}
+
+/* (Un)Register proxy message handler
+ *
+ * \param[in]   dev             Device id
+ * \param[in]   rx_cfg          Receive handler configuration
+ * \returns error code
+ */
+bcmos_errno bcmolt_proxy_rx_cb_set(bcmolt_devid device, bcmolt_rx_cfg *rx_cfg)
+{
+    return bcmolt_rx_cb_set(device, BCMOLT_MGT_GROUP_PROXY_RX, rx_cfg);
+}
+
+/* Get configuration of multiple objects */
+bcmos_errno bcmolt_cfg_get_multi(bcmolt_devid dev, bcmolt_cfg *filter,
+    bcmolt_filter_flags filter_flags, bcmolt_msg_set *msg_set)
+{
+    int i;
+
+    /* If message set already includes messages received on previous iteration - release them */
+    for (i=0; i < msg_set->num_instances; i++)
+    {
+        if (msg_set->msg[i])
+        {
+            bcmolt_msg_free(msg_set->msg[i]);
+            msg_set->msg[i] = NULL;
+        }
+    }
+
+    msg_set->filter_flags = filter_flags;
+    msg_set->num_instances = 0;
+    msg_set->more = BCMOS_FALSE;
+
+    /* Set msg_set in filter message and submit request*/
+    filter->hdr.msg_set = msg_set;
+    filter->hdr.type = BCMOLT_MSG_TYPE_GET_MULTI;
+
+    return bcmtr_call(dev, &filter->hdr);
+}
diff --git a/bcm68620_release/release/host_driver/api/bcmolt_api.h b/bcm68620_release/release/host_driver/api/bcmolt_api.h
new file mode 100644
index 0000000..f18bac9
--- /dev/null
+++ b/bcm68620_release/release/host_driver/api/bcmolt_api.h
@@ -0,0 +1,521 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#ifndef BCMOLT_API_H_
+#define BCMOLT_API_H_
+
+#include <bcmos_system.h>
+#include <bcmolt_msg.h>
+
+/** \defgroup api BCM6862x Host API
+ *
+ * Data Types, functions and macros that should be used for BCM6862x device management.
+ * @{
+ */
+
+/** \defgroup api_macros Message Access Macros
+ * @{
+ */
+
+/*
+ * Message Initialization Macros
+ */
+
+/* Initialize request. Internal macro
+ * \param[in]   _h      Message header
+ * \param[in]   _obj    Object type
+ * \param[in]   _grp    message type
+ * \param[in]   _subgrp message subgroup
+ */
+#define _BCMOLT_REQ_INIT(_h, _obj, _grp, _subgrp) \
+    (_h)->hdr.dir = BCMOLT_MSG_DIR_REQUEST;\
+    (_h)->hdr.err = BCM_ERR_OK;\
+    (_h)->hdr.presence_mask = 0;\
+    (_h)->hdr.obj_type = bcmolt_obj_id_ ## _obj;\
+    (_h)->hdr.group = _grp;\
+    (_h)->hdr.subgroup = (uint16_t)_subgrp;\
+    (_h)->hdr.corr_tag = 0
+
+/** Initialize configuration structure
+ * \param[in]   _s      Configuration structure
+ * \param[in]   _obj    Object type
+ * \param[in]   _key    Object key
+ */
+#define BCMOLT_CFG_INIT(_s, _obj, _key) \
+    do {\
+        bcmolt_ ## _obj ## _cfg *_x_ = _s;\
+        memset(_x_, 0, sizeof(*_x_));\
+        _BCMOLT_REQ_INIT(&((_x_)->hdr), _obj, BCMOLT_MGT_GROUP_CFG, 0);\
+        (_x_)->key = _key;\
+    } while (0)
+
+/** Initialize statistics structure
+ * \param[in]   _s      Statistics structure
+ * \param[in]   _obj    Object type
+ * \param[in]   _key    Object key
+ */
+#define BCMOLT_STAT_INIT(_s, _obj, _key) \
+    do {\
+        bcmolt_ ## _obj ## _stat *_x_ = _s;\
+        memset(_x_, 0, sizeof(*_x_));\
+        _BCMOLT_REQ_INIT(&((_x_)->hdr), _obj, BCMOLT_MGT_GROUP_STAT, 0);\
+        (_x_)->key = _key;\
+    } while (0)
+
+/** Initialize statistic configuration structure
+ * \param[in]   _s      Statistics configuration structure
+ * \param[in]   _obj    Object type
+ * \param[in]   _stat   Statistic counter name
+ * \param[in]   _key    Object key
+ */
+#define BCMOLT_STAT_CFG_INIT(_s, _obj, _stat, _key) \
+    do {\
+        bcmolt_ ## _obj ## _stat_cfg *_x_ = _s;\
+        memset(_x_, 0, sizeof(*_x_));\
+        _BCMOLT_REQ_INIT(&((_x_)->hdr), _obj, BCMOLT_MGT_GROUP_STAT_CFG, bcmolt_ ## _obj ## _stat_id_ ## _stat);\
+        (_x_)->key = _key;\
+    } while (0)
+
+/** Initialize indication configuration structure
+ * \param[in]   _s      Indication configuration structure
+ * \param[in]   _obj    Object type
+ * \param[in]   _key    Object key
+ */
+#define BCMOLT_AUTO_CFG_INIT(_s, _obj, _key) \
+    do {\
+        bcmolt_ ## _obj ## _auto_cfg *_x_ = _s;\
+        memset(_x_, 0, sizeof(*_x_));\
+        _BCMOLT_REQ_INIT(&((_x_)->hdr), _obj, BCMOLT_MGT_GROUP_AUTO_CFG, 0);\
+        (_x_)->key = _key;\
+    } while (0)
+
+/** Initialize operation structure
+ * \param[in]   _s      Operation structure
+ * \param[in]   _obj    Object type
+ * \param[in]   _op     Operation type
+ * \param[in]   _key    Object key
+ */
+#define BCMOLT_OPER_INIT(_s, _obj, _op, _key) \
+    do {\
+        bcmolt_ ## _obj ## _ ## _op *_x_ = _s;\
+        memset(_x_, 0, sizeof(*_x_));\
+        _BCMOLT_REQ_INIT(&((_x_)->hdr), _obj, BCMOLT_MGT_GROUP_OPER, bcmolt_ ## _obj ## _oper_id_ ## _op);\
+        (_x_)->key = _key;\
+    } while (0)
+
+/** Initialize proxy message structure
+ * \param[in]   _s      Operation structure
+ * \param[in]   _obj    Object type
+ * \param[in]   _m      Proxy message type
+ * \param[in]   _key    Object key
+ */
+#define BCMOLT_PROXY_INIT(_s, _obj, _m, _key) \
+    do {\
+        bcmolt_ ## _obj ## _ ## _m *_x_ = _s;\
+        memset(_x_, 0, sizeof(*_x_));\
+        _BCMOLT_REQ_INIT(&((_x_)->hdr), _obj, BCMOLT_MGT_GROUP_PROXY, bcmolt_ ## _obj ## _proxy_id_ ## _m);\
+        (_x_)->key = _key;\
+    } while (0)
+
+/** Initialize autonomous indication structure
+ * \param[in]   _s      Autonomous indication structure
+ * \param[in]   _obj    Object type
+ * \param[in]   _au     Autonomous indication type
+ */
+#define BCMOLT_AUTO_INIT(_s, _obj, _au) \
+    do {\
+        bcmolt_ ## _obj ## _ ## _au *_x_ = _s;\
+        _BCMOLT_REQ_INIT(&((_x_)->hdr), _obj, BCMOLT_MGT_GROUP_AUTO, bcmolt_ ## _obj ## _auto_id_ ## _au);\
+        _x_->hdr.hdr.subch = 0;\
+        _x_->hdr.hdr.presence_mask = (1ULL << (uint64_t)bcmolt_ ## _obj ## _ ## _au ## _id_all_properties) - 1;\
+    } while (0)
+
+/** Initialize proxy_rx structure
+ * \param[in]   _s      Proxy rx message structure
+ * \param[in]   _obj    Object type
+ * \param[in]   _pr     Proxy message type
+ */
+#define BCMOLT_PROXY_RX_INIT(_s, _obj, _pr) \
+    do {\
+        bcmolt_ ## _obj ## _ ## _pr *_x_ = _s;\
+        _BCMOLT_REQ_INIT(&((_x_)->hdr), _obj, BCMOLT_MGT_GROUP_PROXY_RX, bcmolt_ ## _obj ## _proxy_rx_id_ ## _pr);\
+        _x_->hdr.hdr.subch = 0;\
+        _x_->hdr.hdr.presence_mask = (1ULL << (uint64_t)bcmolt_ ## _obj ## _ ## _pr ## _id_all_properties) - 1;\
+    } while (0)
+
+/** Set the memory buffer to use for variable-sized lists within a cfg get
+* \param[in]   _s      Configuration structure
+* \param[in]   _obj    Object type
+* \param[in]   _buf    Pointer to a location in memory in which to store the lists
+* \param[in]   _len    Length of the buffer pointed to by _buf
+*/
+#define BCMOLT_CFG_LIST_BUF_SET(_s, _obj, _buf, _len) \
+    do {\
+        bcmolt_ ## _obj ## _cfg *_x_ = _s;\
+        _x_->hdr.hdr.list_buf = _buf;\
+        _x_->hdr.hdr.list_buf_size = _len;\
+    } while (0)
+
+/* Internal macro: Get a bitmask given a property ID enum */
+#define BCMOLT_PROP_MASK_GET(_obj, _grp, _p) \
+    (bcmolt_ ## _obj ## _grp ## _id_ ## _p == bcmolt_ ## _obj ## _grp ## _id_all_properties ? \
+        ((1ULL << (uint64_t)bcmolt_ ## _obj ## _grp ## _id_ ## _p) - 1) : \
+        (1ULL << (uint64_t)bcmolt_ ## _obj ## _grp ## _id_ ## _p))
+
+/* Internal macro: Indicate that configuration property is present */
+#define _BCMOLT_PROP_SET_PRESENT(_m, _obj, _grp, _p) \
+    do { \
+        (_m)->hdr.hdr.presence_mask |= BCMOLT_PROP_MASK_GET(_obj, _grp, _p);\
+    } while (0)
+
+/* Internal macro: check if property is present */
+#define _BCMOLT_PROP_IS_PRESENT(_m, _obj, _grp, _p) \
+    (((_m)->hdr.hdr.presence_mask & BCMOLT_PROP_MASK_GET(_obj, _grp, _p)) ? \
+        BCMOS_TRUE : BCMOS_FALSE)
+
+/** Set configuration property in message structure
+ * \param[in]   _m      Configuration structure
+ * \param[in]   _obj    Object type
+ * \param[in]   _p      Property name
+ * \param[in]   _v      Property value
+ */
+#define BCMOLT_CFG_PROP_SET(_m, _obj, _p, _v) \
+    do { \
+        _BCMOLT_PROP_SET_PRESENT(_m, _obj, _cfg, _p);\
+        (_m)->data._p = (_v);\
+    } while (0)
+
+/** Indicate that configuration property should be read
+ * \param[in]   _m      Configuration structure
+ * \param[in]   _obj    Object type
+ * \param[in]   _p      Property name
+ */
+#define BCMOLT_CFG_PROP_GET(_m, _obj, _p) _BCMOLT_PROP_SET_PRESENT(_m, _obj, _cfg, _p)
+
+/** Check if configuration property is set in message structure
+ * \param[in]   _m      Configuration structure
+ * \param[in]   _obj    Object type
+ * \param[in]   _p      Property name
+ */
+#define BCMOLT_CFG_PROP_IS_SET(_m, _obj, _p)    _BCMOLT_PROP_IS_PRESENT(_m, _obj, _cfg, _p)
+
+/** Indicate that statistic property should be read
+ * \param[in]   _m      Configuration structure
+ * \param[in]   _obj    Object type
+ * \param[in]   _p      Property name
+ */
+#define BCMOLT_STAT_PROP_GET(_m, _obj, _p) _BCMOLT_PROP_SET_PRESENT(_m, _obj, _stat, _p)
+
+/** Check if statistic property is set in message structure
+ * \param[in]   _m      Statistic structure
+ * \param[in]   _obj    Object type
+ * \param[in]   _p      Property name
+ */
+#define BCMOLT_STAT_PROP_IS_SET(_m, _obj, _p)    _BCMOLT_PROP_IS_PRESENT(_m, _obj, _stat, _p)
+
+/** Set operation property in message structure
+ * \param[in]   _m      Operation structure
+ * \param[in]   _obj    Object type
+ * \param[in]   _op     Operation
+ * \param[in]   _p      Property name
+ * \param[in]   _v      Property value
+ */
+#define BCMOLT_OPER_PROP_SET(_m, _obj, _op, _p, _v) \
+    do { \
+        _BCMOLT_PROP_SET_PRESENT(_m, _obj, _ ## _op, _p);\
+        (_m)->data._p = (_v);\
+    } while (0)
+
+/** Check if operation property is set in message structure
+* \param[in]   _m      Operation structure
+* \param[in]   _obj    Object type
+* \param[in]   _op     Operation
+* \param[in]   _p      Property name
+*/
+#define BCMOLT_OPER_PROP_IS_SET(_m, _obj, _op, _p)    _BCMOLT_PROP_IS_PRESENT(_m, _obj, _op, _p)
+
+/** Indicate that autonomous message configuration property should be read
+ * \param[in]   _m      Configuration structure
+ * \param[in]   _obj    Object type
+ * \param[in]   _p      Property name
+ */
+#define BCMOLT_AUTO_CFG_PROP_GET(_m, _obj, _p) _BCMOLT_PROP_SET_PRESENT(_m, _obj, _auto_cfg, _p)
+
+/** Set autonomous message configuration property in message structure
+ * \param[in]   _m      Operation structure
+ * \param[in]   _obj    Object type
+ * \param[in]   _p      Property name
+ * \param[in]   _v      Property value
+ */
+#define BCMOLT_AUTO_CFG_PROP_SET(_m, _obj, _p, _v) \
+    do { \
+        _BCMOLT_PROP_SET_PRESENT(_m, _obj, _auto_cfg, _p);\
+        (_m)->data._p = (_v);\
+    } while (0)
+
+/** Check if autonomous message configuration property is set in message structure
+* \param[in]   _m      Configuration structure
+* \param[in]   _obj    Object type
+* \param[in]   _p      Property name
+*/
+#define BCMOLT_AUTO_CFG_PROP_IS_SET(_m, _obj, _p) _BCMOLT_PROP_IS_PRESENT(_m, _obj, _auto_cfg, _p)
+
+/** Set statistic configuration property in message structure
+* \param[in]   _m      Configuration structure
+* \param[in]   _obj    Object type
+* \param[in]   _p      Property name
+* \param[in]   _v      Property value
+*/
+#define BCMOLT_STAT_CFG_PROP_SET(_m, _obj, _p, _v) \
+    do { \
+        _BCMOLT_PROP_SET_PRESENT(_m, _obj, _stat_cfg, _p);\
+        (_m)->data._p = (_v);\
+    } while (0)
+
+/** Check if statistic configuration property is set in message structure
+* \param[in]   _m      Configuration structure
+* \param[in]   _obj    Object type
+* \param[in]   _p      Property name
+*/
+#define BCMOLT_STAT_CFG_PROP_IS_SET(_m, _obj, _p) _BCMOLT_PROP_IS_PRESENT(_m, _obj, _stat_cfg, _p)
+
+/** Set proxy message property in message structure
+ * \param[in]   _m      Configuration structure
+ * \param[in]   _obj    Object type
+ * \param[in]   _grp    Proxy message type
+ * \param[in]   _p      Property name
+ * \param[in]   _v      Property value
+ */
+#define BCMOLT_PROXY_PROP_SET(_m, _obj, _grp, _p, _v) \
+    do { \
+        _BCMOLT_PROP_SET_PRESENT(_m, _obj, _ ## _grp, _p);\
+        (_m)->data._p = (_v);\
+    } while (0)
+
+/** \defgroup multi_api_func Multi-object property access macros
+ * @{
+ */
+
+/*
+ * Macros for multi-object configuration and statistics retrieval
+ */
+
+/* Internal macro: Indicate that configuration property is present */
+#define _BCMOLT_MSGSET_PROP_SET_PRESENT(_set, _obj, _grp, _p) \
+    do { \
+        (_set)->presence_mask |= BCMOLT_PROP_MASK_GET(_obj, _grp, _p);\
+    } while (0)
+
+/* Internal macro: check if property is present */
+#define _BCMOLT_MSGSET_PROP_IS_PRESENT(_set, _obj, _grp, _p) \
+    (((_set)->presence_mask & BCMOLT_PROP_MASK_GET(_obj, _grp, _p)) ? \
+        BCMOS_TRUE : BCMOS_FALSE)
+
+/** Indicate that configuration property should be read
+ * \param[in]   _set    Message set
+ * \param[in]   _obj    Object type
+ * \param[in]   _p      Property name
+ */
+#define BCMOLT_MSGSET_CFG_PROP_GET(_set, _obj, _p)  _BCMOLT_MSGSET_PROP_SET_PRESENT(_set, _obj, _cfg, _p)
+
+/** Check if configuration property is set in message set
+ * \param[in]   _set    Message set
+ * \param[in]   _obj    Object type
+ * \param[in]   _p      Property name
+ */
+#define BCMOLT_MSGSET_CFG_PROP_IS_SET(_set, _obj, _p) _BCMOLT_MSGSET_PROP_IS_PRESENT(_set, _obj, _cfg, _p)
+
+/** Indicate that statistic should be read
+ * \param[in]   _set    Message set
+ * \param[in]   _obj    Object type
+ * \param[in]   _p      Property name
+ */
+#define BCMOLT_MSGSET_STAT_PROP_GET(_set, _obj, _p)  _BCMOLT_MSGSET_PROP_SET_PRESENT(_set, _obj, _stat, _p)
+
+/** Check if statistic property is set in message set
+ * \param[in]   _set    Message set
+ * \param[in]   _obj    Object type
+ * \param[in]   _p      Property name
+ */
+#define BCMOLT_MSGSET_STAT_PROP_IS_SET(_set, _obj, _p) _BCMOLT_MSGSET_PROP_IS_PRESENT(_m, _obj, _stat, _p)
+
+/** @} */
+
+/** @} */
+
+/** \defgroup api_func API Functions
+ * @{
+ */
+
+/*
+ * API
+ */
+
+typedef void (*system_mode_change_cb)(bcmolt_devid dev);
+
+extern system_mode_change_cb sm_change_cb;
+
+/** Set Configuration
+ *
+ * \param[in]   dev     Device id
+ * \param[in]   cfg     Configuration
+ * \returns error code
+ */
+bcmos_errno bcmolt_cfg_set(bcmolt_devid dev, bcmolt_cfg *cfg);
+
+/** Get Configuration
+ *
+ * \param[in]   dev     Device id
+ * \param[in]   cfg     Configuration
+ * \returns error code
+ * The error code can indicate local or remote failure
+ */
+bcmos_errno bcmolt_cfg_get(bcmolt_devid dev, bcmolt_cfg *cfg);
+
+/** Clear Configuration
+ *
+ * \param[in]   dev     Device id
+ * \param[in]   cfg     Configuration
+ * \returns error code
+ * The error code can indicate local or remote failure
+ */
+bcmos_errno bcmolt_cfg_clear(bcmolt_devid dev, bcmolt_cfg *cfg);
+
+/** Get Statistics
+ *
+ * \param[in]   dev     Device id
+ * \param[in]   stat    Configuration
+ * \param[in]   flags   Flags
+ * \returns error code
+ * The error code can indicate local or remote failure
+ */
+bcmos_errno bcmolt_stat_get(bcmolt_devid dev, bcmolt_stat *stat, bcmolt_stat_flags flags);
+
+/** Get Statistics Configuration
+ *
+ * \param[in]   dev     Device id
+ * \param[in]   cfg     Configuration
+ * \returns error code
+ * The error code can indicate local or remote failure
+ */
+bcmos_errno bcmolt_stat_cfg_get(bcmolt_devid dev, bcmolt_stat_cfg *cfg);
+
+/** Set Statistics Configuration
+ *
+ * \param[in]   dev     Device id
+ * \param[in]   cfg     Configuration
+ * \returns error code
+ * The error code can indicate local or remote failure
+ */
+bcmos_errno bcmolt_stat_cfg_set(bcmolt_devid dev, bcmolt_stat_cfg *cfg);
+
+/** Get Indication Configuration
+ *
+ * \param[in]   dev     Device id
+ * \param[in]   cfg     Configuration
+ * \returns error code
+ * The error code can indicate local or remote failure
+ */
+bcmos_errno bcmolt_auto_cfg_get(bcmolt_devid dev, bcmolt_auto_cfg *cfg);
+
+/** Set Indication Configuration
+ *
+ * \param[in]   dev     Device id
+ * \param[in]   cfg     Configuration
+ * \returns error code
+ * The error code can indicate local or remote failure
+ */
+bcmos_errno bcmolt_auto_cfg_set(bcmolt_devid dev, bcmolt_auto_cfg *cfg);
+
+/** Submit Operation
+ *
+ * \param[in]   dev     Device id
+ * \param[in]   oper    Operation
+ * \returns error code
+ */
+bcmos_errno bcmolt_oper_submit(bcmolt_devid dev, bcmolt_oper *oper);
+
+/** Send Message to ONU
+ *
+ * \param[in]   dev     Device id
+ * \param[in]   msg     Message to be sent
+ * \returns error code
+ */
+bcmos_errno bcmolt_proxy_send(bcmolt_devid dev, bcmolt_proxy *msg);
+
+/** Receive callback registration parameters */
+typedef struct bcmolt_rx_cfg
+{
+    bcmolt_obj_id obj_type;     /**< Object type. Can be \ref BCMOLT_OBJECT_ANY */
+    f_bcmolt_msg_handler rx_cb; /**< Receive callback. NULL=unregister */
+    bcmolt_auto_flags flags;    /**< Dispatch flags. Receive callback function can be called
+                                     in the context of rx task or application task,
+                                     depending on the flags */
+    bcmos_module_id module;     /**< Target module id.
+                                     Relevant only if flags == BCMOLT_AUTO_FLAGS_DISPATCH */
+    uint32_t pon_ni_mask;       /**< Bitmask of pon_ni interfaces the registration applies to.
+                                     0=all interfaces. Each interface is identified by (1 << pon_ni) bit */
+} bcmolt_rx_cfg;
+
+/* (Un)Register Autonomous Indication Message Handler
+ *
+ * \param[in]   dev             Device id
+ * \param[in]   rx_cfg          Receive handler configuration
+ * \returns error code
+ */
+bcmos_errno bcmolt_auto_rx_cb_set(bcmolt_devid device, bcmolt_rx_cfg *rx_cfg);
+
+/* (Un)Register Proxy Message Handler
+ *
+ * \param[in]   dev             Device id
+ * \param[in]   rx_cfg          Receive handler configuration
+ * \returns error code
+ */
+bcmos_errno bcmolt_proxy_rx_cb_set(bcmolt_devid device, bcmolt_rx_cfg *rx_cfg);
+
+/** \defgroup multi_api_func Multi-object API Functions
+ * @{
+ */
+
+/* Get configuration of multiple objects
+ * \param[in]           olt             Device id
+ * \param[in]           filter          Object filter. Header of generated bcmolt_xx_cfg structure
+ * \param[in]           filter_flags    Optional filtering flags
+ * \param[in,out]       msg_set         Message set
+ */
+bcmos_errno bcmolt_cfg_get_multi(bcmolt_devid olt, bcmolt_cfg *filter,
+    bcmolt_filter_flags filter_flags, bcmolt_msg_set *msg_set);
+
+/** @} */
+
+/** @} */
+
+/** @} */
+
+#endif /* BCMOLT_API_H_ */
diff --git a/bcm68620_release/release/host_driver/api/bcmolt_msg.c b/bcm68620_release/release/host_driver/api/bcmolt_msg.c
new file mode 100644
index 0000000..56e3961
--- /dev/null
+++ b/bcm68620_release/release/host_driver/api/bcmolt_msg.c
@@ -0,0 +1,55 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+#include <bcmos_system.h>
+#include <bcm_dev_log.h>
+#include "bcmolt_msg.h"
+
+bcmos_errno bcmolt_msg_err(bcmolt_msg *msg, dev_log_id log_id, bcmos_errno err, uint16_t err_field_idx, const char *fmt, ...)
+{
+    msg->err = err;
+    msg->err_field_idx = err_field_idx;
+    if (fmt)
+    {
+        va_list args;
+
+        va_start(args, fmt);
+        vsnprintf(msg->err_text, sizeof(msg->err_text) - 1, fmt, args);
+        va_end(args);
+        strncat(msg->err_text, "\n", 1);
+#ifdef ENABLE_LOG
+        if (log_id && log_id != DEV_LOG_INVALID_ID)
+            bcm_dev_log_log(log_id, DEV_LOG_LEVEL_ERROR, BCM_LOG_FLAG_CALLER_FMT, "%s", msg->err_text);
+#endif
+    }
+    else
+    {
+        msg->err_text[0] = 0;
+    }
+    return err;
+}
diff --git a/bcm68620_release/release/host_driver/api/bcmolt_msg.h b/bcm68620_release/release/host_driver/api/bcmolt_msg.h
new file mode 100644
index 0000000..5f24b26
--- /dev/null
+++ b/bcm68620_release/release/host_driver/api/bcmolt_msg.h
@@ -0,0 +1,385 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#ifndef BCMOLT_MSG_H_
+#define BCMOLT_MSG_H_
+
+#include "bcmos_system.h"
+#include "bcmolt_buf.h"
+#include "bcmolt_model_ids.h"
+#include "bcm_dev_log_task.h"
+
+/** \defgroup \api_data_types Data Types
+ * \ingroup api
+ * @{
+ */
+
+/** Device ID */
+typedef uint8_t bcmolt_devid;
+
+/** Bitmask of fields that are present in a message */
+typedef uint64_t bcmolt_presence_mask;
+
+/** Presence mask indicating all fields present */
+#define BCMOLT_PRESENCE_MASK_ALL ((bcmolt_presence_mask)0xFFFFFFFFFFFFFFFF)
+
+/** Message direction - request or response */
+typedef enum bcmolt_msg_dir
+{
+    BCMOLT_MSG_DIR_REQUEST,
+    BCMOLT_MSG_DIR_RESPONSE
+} bcmolt_msg_dir;
+
+/** Message type. Can be a combination of flags */
+typedef enum bcmolt_msg_type
+{
+    BCMOLT_MSG_TYPE_GET  = 0x01,        /**< Get: configuration or statistics */
+    BCMOLT_MSG_TYPE_SET  = 0x02,        /**< Set: Configuration, Statistics, Auto, Proxy */
+    BCMOLT_MSG_TYPE_CLEAR= 0x04,        /**< Clear: configuration */
+    BCMOLT_MSG_TYPE_MULTI= 0x08,        /**< Multi-object: configuration, statistics */
+
+    BCMOLT_MSG_TYPE_GET_MULTI = BCMOLT_MSG_TYPE_GET | BCMOLT_MSG_TYPE_MULTI,
+} bcmolt_msg_type;
+
+/** Management group - key, config, operation, etc */
+typedef enum bcmolt_mgt_group
+{
+    BCMOLT_MGT_GROUP_KEY,               /**< key that uniquely identifies object instance */
+    BCMOLT_MGT_GROUP_CFG,               /**< Configuration */
+    BCMOLT_MGT_GROUP_STAT,              /**< Statistics */
+    BCMOLT_MGT_GROUP_STAT_CFG,          /**< Statistics threshold configuration */
+    BCMOLT_MGT_GROUP_AUTO,              /**< Autonomous indications */
+    BCMOLT_MGT_GROUP_AUTO_CFG,          /**< Autonomous indication configuration */
+    BCMOLT_MGT_GROUP_OPER,              /**< Operations */
+    BCMOLT_MGT_GROUP_PROXY,             /**< Messages to ONU */
+    BCMOLT_MGT_GROUP_PROXY_RX,          /**< Messages from ONU */
+    BCMOLT_MGT_GROUP__NUM_OF
+} bcmolt_mgt_group;
+
+/** Any object */
+#define BCMOLT_OBJECT_ANY       (bcmolt_obj_id)0xffff
+
+/** Any group */
+#define BCMOLT_MGT_GROUP_ANY    (bcmolt_mgt_group)0xffff
+
+/** Any subgroup */
+#define BCMOLT_SUBGROUP_ANY     0xffff
+
+/** Indicator that no fields contained errors */
+#define BCMOLT_ERR_FIELD_NONE   0xffff
+
+/** Max error text length */
+#define BCMOLT_MAX_ERR_TEXT_LENGTH      256
+
+/* Transport sub-channel handle */
+typedef uint16_t bcmolt_subchannel;
+
+/** Message set - for multi-instance APIs */
+typedef struct bcmolt_msg_set bcmolt_msg_set;
+
+/** Common message header */
+typedef struct bcmolt_msg
+{
+    bcmolt_obj_id        obj_type;      /**< Object type */
+    bcmolt_mgt_group     group;         /**< Management group */
+    uint16_t             subgroup;      /**< Subgroup: for operations, autonomous messages, proxy */
+    bcmolt_msg_type      type;          /**< Set, Get, Clear */
+    bcmolt_msg_dir       dir;           /**< Request/autonomous or Response */
+    bcmos_errno          err;           /**< Remote error code */
+    uint16_t             err_field_idx; /**< If not BCMOLT_ERR_FIELD_NONE, index of erroneous field within struct */
+    uint16_t             corr_tag;      /**< Correlation tag */
+    bcmolt_presence_mask presence_mask; /**< Indicates which parameters are present */
+    char                 err_text[BCMOLT_MAX_ERR_TEXT_LENGTH];  /**< Error text - if err != 0 */
+    /* The following fields are internal. They are not sent on the line */
+    bcmolt_subchannel    subch;         /*   Transport sub-channel via which the message arrived */
+    bcmos_msg            os_msg;        /*   Internal OS message for easy task routing */
+    void                *list_buf;      /*   Memory buffer in which to store variable-sized lists when unpacking */
+    uint32_t             list_buf_size; /*   Number of bytes in the variable-sized list buffer */
+    bcmolt_msg_set      *msg_set;       /* Message set the message belongs to */
+} bcmolt_msg;
+
+/** Configuration group message header */
+typedef struct bcmolt_cfg
+{
+    bcmolt_msg hdr;             /** Common header */
+} bcmolt_cfg;
+
+/** Statistic flags */
+typedef enum
+{
+    BCMOLT_STAT_FLAGS_NONE          = 0x0000, /**< No statistics options set (no clear on read, etc) */
+    BCMOLT_STAT_FLAGS_CLEAR_ON_READ = 0x0001, /**< Clear the requested statistics as part of the read operation */
+} bcmolt_stat_flags;
+
+/** Statistics group message header */
+typedef struct bcmolt_stat
+{
+    bcmolt_msg hdr;             /** Common header */
+} bcmolt_stat;
+
+/** Statistics configuration message header */
+typedef struct bcmolt_stat_cfg
+{
+    bcmolt_msg hdr;             /** Common header */
+} bcmolt_stat_cfg;
+
+/** Operation group message header */
+typedef struct bcmolt_oper
+{
+    bcmolt_msg hdr;             /** Common header */
+} bcmolt_oper;
+
+/** Autonomous message header */
+typedef struct bcmolt_auto
+{
+    bcmolt_msg hdr;             /** Common header */
+} bcmolt_auto;
+
+/** Autonomous message configuration header */
+typedef struct bcmolt_auto_cfg
+{
+    bcmolt_msg hdr;             /** Common header */
+} bcmolt_auto_cfg;
+
+/** Message handler */
+typedef void (*f_bcmolt_msg_handler)(bcmolt_devid olt, bcmolt_msg *msg);
+
+/** Autonomous message flags */
+typedef enum
+{
+    BCMOLT_AUTO_FLAGS_NONE      = 0,            /**< Invoke callback in context of RX task */
+    BCMOLT_AUTO_FLAGS_DISPATCH  = 0x0001,       /**< Dispatch message to application module */
+} bcmolt_auto_flags;
+
+/** Proxy message header */
+typedef struct bcmolt_proxy
+{
+    bcmolt_msg hdr;             /** Common header */
+} bcmolt_proxy;
+
+/** Proxy RX message header */
+typedef struct bcmolt_proxy_rx
+{
+    bcmolt_msg hdr;             /** Common header */
+} bcmolt_proxy_rx;
+
+/** Filter flags */
+typedef enum
+{
+    BCMOLT_FILTER_FLAGS_NONE = 0,
+    BCMOLT_FILTER_FLAGS_INVERT_SELECTION = 0x00000001    /** Return objects NOT selected by filter */
+} bcmolt_filter_flags;
+
+/* Message set */
+struct bcmolt_msg_set
+{
+    uint16_t max_instances;     /**< Max number of instances in the set. Set when set is created and doesn't change */
+    bcmolt_mgt_group group;     /**< Management group */
+    bcmolt_presence_mask presence_mask; /**< Indicates which parameters should be fetched */
+    bcmolt_filter_flags filter_flags;   /**< Filter flags */
+
+    /* Multi-msg API output */
+    uint16_t num_instances;     /**< Number of instances in the set. */
+    bcmos_bool more;            /**< BCMOS_TRUE if not all instances have been retrieved by the last
+                                     bcmolt_get_multi() call. */
+    void *next_key;             /**< Key of the next object instance after those that were returned.  Only valid if
+                                     'more' is BCMOS_FALSE.  Treat this as a pointer to the object's key struct.  This
+                                     can be used for subsequent invocations of bcmolt_cfg_get_multiple() by copying this
+                                     into the filter's key field. */
+#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /**< Check whether C99 is supported */
+    bcmolt_msg *msg[];          /**< Set of API objects returned by bcmolt_cfg_get_multiple(). */
+#else
+    bcmolt_msg *msg[0];          /**< Set of API objects returned by bcmolt_cfg_get_multiple(). */
+#endif
+};
+
+/** @} */
+
+
+/*lint -ecall(633, bcmolt_msg_err) - 4th argument will be a specific enum type, but must be treated as a uint16. */
+/** Set message error. Cannot be static inline, as it uses variable argument list. */
+bcmos_errno bcmolt_msg_err(bcmolt_msg *msg, dev_log_id log_id, bcmos_errno err, uint16_t err_field_idx, const char *fmt, ...)__attribute__((format(__printf__, 5, 6)));
+
+/** Whether we pack the entire structure of a message */
+static inline bcmos_bool bcmolt_msg_should_pack_data(const bcmolt_msg *msg)
+{
+    switch (msg->group)
+    {
+        case BCMOLT_MGT_GROUP_CFG:
+        case BCMOLT_MGT_GROUP_STAT:
+        case BCMOLT_MGT_GROUP_STAT_CFG:
+        case BCMOLT_MGT_GROUP_AUTO_CFG:
+            if ((msg->type & BCMOLT_MSG_TYPE_GET))
+            {
+                bcmos_bool should_pack = (msg->dir == BCMOLT_MSG_DIR_RESPONSE);
+                /* For multi-message get request should_pack must be inverted because the 1st part
+                 * of multi-object request is filter
+                 */
+                return (msg->type & BCMOLT_MSG_TYPE_MULTI) ? !should_pack : should_pack;
+            }
+            else if ((msg->type & BCMOLT_MSG_TYPE_SET))
+            {
+                return (msg->dir == BCMOLT_MSG_DIR_REQUEST);
+            }
+            else
+            {
+                return BCMOS_FALSE;
+            }
+
+        case BCMOLT_MGT_GROUP_OPER:
+        case BCMOLT_MGT_GROUP_PROXY:
+            return (msg->dir == BCMOLT_MSG_DIR_REQUEST);
+
+        default:
+            return BCMOS_TRUE;
+    }
+}
+
+/** Get the length of the header portion of a message */
+static inline int32_t bcmolt_msg_hdr_get_packed_length(const bcmolt_msg *msg)
+{
+    return 18 + (msg->err ? strlen(msg->err_text) + 2 : 0);
+}
+
+/** Pack a message header to a byte stream */
+static inline bcmos_errno bcmolt_msg_hdr_pack(const bcmolt_msg *msg, bcmolt_buf *buf)
+{
+    bcmos_bool ret;
+
+    ret =        bcmolt_buf_write_u8(buf, (uint8_t)msg->obj_type);
+    ret = ret && bcmolt_buf_write_u8(buf, (uint8_t)msg->group);
+    ret = ret && bcmolt_buf_write_u16(buf, msg->subgroup);
+    ret = ret && bcmolt_buf_write_u8(buf, (uint8_t)msg->type);
+    ret = ret && bcmolt_buf_write_u8(buf, (uint8_t)msg->dir);
+    ret = ret && bcmolt_buf_write_s16(buf, (int16_t)msg->err);
+    ret = ret && bcmolt_buf_write_u64(buf, (uint64_t)msg->presence_mask);
+    ret = ret && bcmolt_buf_write_u16(buf, msg->err_field_idx);
+    if (msg->err)
+    {
+        uint16_t len = strlen(msg->err_text);
+        ret = ret && bcmolt_buf_write_u16(buf, len);
+        ret = ret && bcmolt_buf_write(buf, msg->err_text, len);
+    }
+
+    return ret ? BCM_ERR_OK : BCM_ERR_OVERFLOW;
+}
+
+/** Unpack a message header from a byte stream */
+static inline bcmos_errno bcmolt_msg_hdr_unpack(bcmolt_msg *msg, bcmolt_buf *buf)
+{
+    uint8_t    obj_type;
+    uint8_t    group;
+    uint16_t   subgroup;
+    uint8_t    type;
+    uint8_t    dir;
+    int16_t    err = 0;
+    uint64_t   presence_mask;
+    uint16_t   err_field_idx;
+    bcmos_bool ret;
+
+    ret =        bcmolt_buf_read_u8(buf, &obj_type);
+    ret = ret && bcmolt_buf_read_u8(buf, &group);
+    ret = ret && bcmolt_buf_read_u16(buf, &subgroup);
+    ret = ret && bcmolt_buf_read_u8(buf, &type);
+    ret = ret && bcmolt_buf_read_u8(buf, &dir);
+    ret = ret && bcmolt_buf_read_s16(buf, &err);
+    ret = ret && bcmolt_buf_read_u64(buf, &presence_mask);
+    ret = ret && bcmolt_buf_read_u16(buf, &err_field_idx);
+    if (err)
+    {
+        uint16_t len = 0;
+        ret = ret && bcmolt_buf_read_u16(buf, &len);
+        if (len >= sizeof(msg->err_text))
+            len = sizeof(msg->err_text) - 1;
+        ret = ret && bcmolt_buf_read(buf, msg->err_text, len);
+        msg->err_text[len] = 0;
+    }
+    else
+    {
+        msg->err_text[0] = 0;
+    }
+
+    if (ret)
+    {
+        msg->obj_type = (bcmolt_obj_id)obj_type;
+        msg->group = (bcmolt_mgt_group)group;
+        msg->subgroup = subgroup;
+        msg->type = (bcmolt_msg_type)type;
+        msg->dir = (bcmolt_msg_dir)dir;
+        msg->err = (bcmos_errno)err;
+        msg->presence_mask = (bcmolt_presence_mask)presence_mask;
+        msg->err_field_idx = err_field_idx;
+        msg->msg_set = NULL;
+    }
+
+    return ret ? BCM_ERR_OK : BCM_ERR_OVERFLOW;
+}
+
+/* Create message set
+ *
+ * \param[in]   obj             Object id
+ * \param[in]   group           Management group
+ * \param[in]   max_instances   Max number of objects returned by a single API call
+ * \param[out]  msg_set         Message set
+ * \returns error code
+ */
+bcmos_errno bcmolt_msg_set_alloc(bcmolt_obj_id obj, bcmolt_mgt_group group,
+    uint32_t max_instances, bcmolt_msg_set **msg_set);
+
+/* Release message set
+ * \param[in]   msg_set
+ */
+void bcmolt_msg_set_free(bcmolt_msg_set *msg_set);
+
+/* Release dynamically allocated message.
+ */
+static inline void bcmolt_msg_free(bcmolt_msg *msg)
+{
+    if (msg->msg_set)
+    {
+        bcmolt_msg_set_free(msg->msg_set);
+    }
+    bcmos_free(msg);
+}
+
+static inline void bcmolt_os_msg_release_cb(bcmos_msg *os_msg)
+{
+    bcmolt_msg *msg = os_msg->data;
+
+    /* We can be here if target module or transport queue overflows.
+       Release the message
+    */
+    bcmolt_msg_free(msg);
+}
+
+static inline bcmos_module_id bcmos_module_id_for_device(bcmos_module_id module, bcmolt_devid devid)
+{
+    return module + (bcmos_module_id)devid;
+}
+#endif
diff --git a/bcm68620_release/release/host_driver/common_gpon/Makefile b/bcm68620_release/release/host_driver/common_gpon/Makefile
new file mode 100644
index 0000000..9a4e5a0
--- /dev/null
+++ b/bcm68620_release/release/host_driver/common_gpon/Makefile
@@ -0,0 +1,11 @@
+# GPON General
+
+MOD_NAME = common_gpon
+MOD_TYPE = lib
+MOD_DEPS = model cli
+
+EXTRA_CFLAGS += -I$(TOP_DIR)/common/model/maple \
+-I$(TOP_DIR)/common/transport/driver/maple/pcie_sw_queue \
+-I$(TOP_DIR)/common/drivers/maple/pcie
+
+srcs = bcm_common_gpon.c
diff --git a/bcm68620_release/release/host_driver/common_gpon/bcm_common_gpon.c b/bcm68620_release/release/host_driver/common_gpon/bcm_common_gpon.c
new file mode 100644
index 0000000..94e3a1b
--- /dev/null
+++ b/bcm68620_release/release/host_driver/common_gpon/bcm_common_gpon.c
@@ -0,0 +1,262 @@
+/*
+<:copyright-BRCM:2014:proprietary:standard
+
+   Copyright (c) 2014 Broadcom Corporation
+   All Rights Reserved
+
+This program is the proprietary software of Broadcom Corporation and/or its
+licensors, and may only be used, duplicated, modified or distributed pursuant
+to the terms and conditions of a separate, written license agreement executed
+between you and Broadcom (an "Authorized License").  Except as set forth in
+an Authorized License, Broadcom grants no license (express or implied), right
+to use, or waiver of any kind with respect to the Software, and Broadcom
+expressly reserves all rights in and to the Software and all intellectual
+property rights therein.  IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE
+NO RIGHT TO USE THIS SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY
+BROADCOM AND DISCONTINUE ALL USE OF THE SOFTWARE.
+
+Except as expressly set forth in the Authorized License,
+
+1. This program, including its structure, sequence and organization,
+    constitutes the valuable trade secrets of Broadcom, and you shall use
+    all reasonable efforts to protect the confidentiality thereof, and to
+    use this information only in connection with your use of Broadcom
+    integrated circuit products.
+
+2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
+    AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, REPRESENTATIONS OR
+    WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH
+    RESPECT TO THE SOFTWARE.  BROADCOM SPECIFICALLY DISCLAIMS ANY AND
+    ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, NONINFRINGEMENT,
+    FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, ACCURACY OR
+    COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR CORRESPONDENCE
+    TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT OF USE OR
+    PERFORMANCE OF THE SOFTWARE.
+
+3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR
+    ITS LICENSORS BE LIABLE FOR (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL,
+    INDIRECT, OR EXEMPLARY DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY
+    WAY RELATING TO YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN
+    IF BROADCOM HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES;
+    OR (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE
+    SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE LIMITATIONS
+    SHALL APPLY NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF ANY
+    LIMITED REMEDY.
+:>
+*/
+#include "bcm_common_gpon.h"
+
+static pon_mode_db db_gpon =
+{
+    .pon_mode = BCMOLT_PON_MODE_GPON,
+    .api_type = BCMOLT_PON_API_TYPE_GPON,
+    .num_of_onus = GPON_NUM_OF_ONUS,
+    .num_of_alloc_ids = GPON_NUM_OF_ALLOC_IDS,
+    .num_of_dynamic_alloc_indices = GPON_NUM_OF_DYNAMIC_ALLOC_INDICES,
+    .num_of_gem_ports = GPON_NUM_OF_GEM_PORT_IDS_PER_PON,
+    .num_of_alloc_ids_per_onu = GPON_NUM_OF_ALLOC_IDS_PER_ONU,
+    .onu_id_broadcast = GPON_ONU_ID_BROADCAST,
+    .onu_id_unassigned = GPON_ONU_ID_UNASSIGNED,
+    .alloc_id_broadcast = GPON_ALLOC_ID_BROADCAST,
+    .alloc_id_invalid = BCMOLT_GPON_ALLOC_ID_INVALID,
+    .alloc_id_unassigned = GPON_ALLOC_ID_UNASSIGNED,
+    .us_rate = BCMOLT_PON_US_RATE_1G,
+};
+
+static pon_mode_db db_xgpon =
+{
+    .pon_mode = BCMOLT_PON_MODE_XGPON,
+    .api_type = BCMOLT_PON_API_TYPE_XGPON,
+    .num_of_onus = XGPON_NUM_OF_ONUS,
+    .num_of_alloc_ids = XGPON_NUM_OF_ALLOC_IDS,
+    .num_of_dynamic_alloc_indices = XGPON_NUM_OF_DYNAMIC_ALLOC_INDICES,
+    .num_of_gem_ports = XGPON_NUM_OF_GEM_PORT_IDS_PER_PON,
+    .num_of_alloc_ids_per_onu = XGPON_NUM_OF_ALLOC_IDS_PER_ONU,
+    .onu_id_broadcast = XGPON_ONU_ID_BROADCAST,
+    .onu_id_unassigned = XGPON_ONU_ID_UNASSIGNED,
+    .alloc_id_broadcast = XGPON_ALLOC_ID_BROADCAST,
+    .alloc_id_invalid = BCMOLT_XGPON_ALLOC_ID_INVALID,
+    .alloc_id_unassigned = XGPON_ALLOC_ID_UNASSIGNED,
+    .us_rate = BCMOLT_PON_US_RATE_2P5G,
+};
+
+static pon_mode_db db_xgs =
+{
+    .pon_mode = BCMOLT_PON_MODE_XGS,
+    .api_type = BCMOLT_PON_API_TYPE_XGPON,
+    .num_of_onus = XGPON_NUM_OF_ONUS,
+    .num_of_alloc_ids = XGPON_NUM_OF_ALLOC_IDS,
+    .num_of_dynamic_alloc_indices = XGPON_NUM_OF_DYNAMIC_ALLOC_INDICES,
+    .num_of_gem_ports = XGPON_NUM_OF_GEM_PORT_IDS_PER_PON,
+    .num_of_alloc_ids_per_onu = XGPON_NUM_OF_ALLOC_IDS_PER_ONU,
+    .onu_id_broadcast = XGPON_ONU_ID_BROADCAST,
+    .onu_id_unassigned = XGPON_ONU_ID_UNASSIGNED,
+    .alloc_id_broadcast = TEN_GIG_ALLOC_ID_BROADCAST,
+    .alloc_id_invalid = BCMOLT_XGPON_ALLOC_ID_INVALID,
+    .alloc_id_unassigned = XGPON_ALLOC_ID_UNASSIGNED,
+    .us_rate = BCMOLT_PON_US_RATE_10G,
+};
+
+static pon_mode_db db_ngpon2 =
+{
+    .pon_mode = BCMOLT_PON_MODE_NGPON2,
+    .api_type = BCMOLT_PON_API_TYPE_XGPON,
+    .num_of_onus = XGPON_NUM_OF_ONUS,
+    .num_of_alloc_ids = XGPON_NUM_OF_ALLOC_IDS,
+    .num_of_dynamic_alloc_indices = XGPON_NUM_OF_DYNAMIC_ALLOC_INDICES,
+    .num_of_gem_ports = XGPON_NUM_OF_GEM_PORT_IDS_PER_PON,
+    .num_of_alloc_ids_per_onu = XGPON_NUM_OF_ALLOC_IDS_PER_ONU,
+    .onu_id_broadcast = XGPON_ONU_ID_BROADCAST,
+    .onu_id_unassigned = XGPON_ONU_ID_UNASSIGNED,
+    .alloc_id_broadcast = TEN_GIG_ALLOC_ID_BROADCAST,
+    .alloc_id_invalid = BCMOLT_XGPON_ALLOC_ID_INVALID,
+    .alloc_id_unassigned = XGPON_ALLOC_ID_UNASSIGNED,
+    .us_rate = BCMOLT_PON_US_RATE_10G,
+};
+
+static pon_mode_db db_ngpon2_2_5_g =
+{
+    .pon_mode = BCMOLT_PON_MODE_NGPON2,
+    .api_type = BCMOLT_PON_API_TYPE_XGPON,
+    .num_of_onus = XGPON_NUM_OF_ONUS,
+    .num_of_alloc_ids = XGPON_NUM_OF_ALLOC_IDS,
+    .num_of_dynamic_alloc_indices = XGPON_NUM_OF_DYNAMIC_ALLOC_INDICES,
+    .num_of_gem_ports = XGPON_NUM_OF_GEM_PORT_IDS_PER_PON,
+    .num_of_alloc_ids_per_onu = XGPON_NUM_OF_ALLOC_IDS_PER_ONU,
+    .onu_id_broadcast = XGPON_ONU_ID_BROADCAST,
+    .onu_id_unassigned = XGPON_ONU_ID_UNASSIGNED,
+    .alloc_id_broadcast = XGPON_ALLOC_ID_BROADCAST,
+    .alloc_id_invalid = BCMOLT_XGPON_ALLOC_ID_INVALID,
+    .alloc_id_unassigned = XGPON_ALLOC_ID_UNASSIGNED,
+    .us_rate = BCMOLT_PON_US_RATE_2P5G,
+};
+
+static sys_mode_db db_sys = {};
+sys_mode_db *smdbg = &db_sys;
+
+void bcm_common_gpon_init(bcmolt_system_mode system_mode)
+{
+    uint8_t i;
+    bcmolt_xgpon_num_of_onus xgpon_num_of_onus;
+    /* need to check for XGPON XGS NGPON2 modes, the supported number of onus */
+    bcmolt_xgpon_num_of_onus_get(0, &xgpon_num_of_onus);
+
+    switch (system_mode)
+    {
+    case BCMOLT_SYSTEM_MODE_GPON__16_X:
+        smdbg->num_of_pons = GPON_MAX_NUM_OF_PONS;
+        for (i=0; i<smdbg->num_of_pons; i++)
+        {
+            smdbg->pons[i] = db_gpon;
+        }
+        break;
+    case BCMOLT_SYSTEM_MODE_GPON__8_X:
+        smdbg->num_of_pons = GPON_MAX_NUM_OF_PONS / 2;
+        for (i=0; i<smdbg->num_of_pons; i++)
+        {
+            smdbg->pons[i] = db_gpon;
+        }
+        break;
+    case BCMOLT_SYSTEM_MODE_GPON__4_X:
+        smdbg->num_of_pons = GPON_MAX_NUM_OF_PONS / 4;
+        for (i=0; i<smdbg->num_of_pons; i++)
+        {
+            smdbg->pons[i] = db_gpon;
+        }
+        break;
+    case BCMOLT_SYSTEM_MODE_XGPON_1__8_X:
+        smdbg->num_of_pons = XGPON_MAX_NUM_OF_PONS;
+        for (i=0; i<smdbg->num_of_pons; i++)
+        {
+        	smdbg->pons[i] = db_xgpon;
+        	if (xgpon_num_of_onus == BCMOLT_XGPON_NUM_OF_ONUS_XGPON_SUPPORT_510_ONUS)
+        	{
+        		smdbg->pons[i].num_of_onus = XGPON_MAX_NUM_OF_ONUS;
+        	}
+        }
+        break;
+    case BCMOLT_SYSTEM_MODE_XGPON_1__4_X:
+        smdbg->num_of_pons = XGPON_MAX_NUM_OF_PONS / 2;
+        for (i=0; i<smdbg->num_of_pons; i++)
+        {
+        	smdbg->pons[i] = db_xgpon;
+        	if (xgpon_num_of_onus == BCMOLT_XGPON_NUM_OF_ONUS_XGPON_SUPPORT_510_ONUS)
+        	{
+        		smdbg->pons[i].num_of_onus = XGPON_MAX_NUM_OF_ONUS;
+        	}
+        }
+        break;
+    case BCMOLT_SYSTEM_MODE_GPON_8_XGPON_4_X_COEXISTENCE:
+        smdbg->num_of_pons = GPON_MAX_NUM_OF_PONS;
+        /* Initialize first half chip as XGPON */
+        for (i=0; i<XGPON_MAX_NUM_OF_PONS; i++)
+        {
+        	smdbg->pons[i] = db_xgpon;
+        	if (xgpon_num_of_onus == BCMOLT_XGPON_NUM_OF_ONUS_XGPON_SUPPORT_510_ONUS)
+        	{
+        		smdbg->pons[i].num_of_onus = XGPON_MAX_NUM_OF_ONUS;
+        	}
+        }
+        /* Initialize second half chip as GPON */
+        for (; i<smdbg->num_of_pons; i++)
+        {
+            smdbg->pons[i] = db_gpon;
+        }
+        break;
+    case BCMOLT_SYSTEM_MODE_XGS__2_X_10_G:
+        smdbg->num_of_pons = XGS_2X_NUM_OF_PONS;
+        for (i=0; i<smdbg->num_of_pons; i++)
+        {
+        	smdbg->pons[i] = db_xgs;
+        	if (xgpon_num_of_onus == BCMOLT_XGPON_NUM_OF_ONUS_XGPON_SUPPORT_510_ONUS)
+        	{
+        		smdbg->pons[i].num_of_onus = XGPON_MAX_NUM_OF_ONUS;
+        	}
+        }
+        break;
+    case BCMOLT_SYSTEM_MODE_NGPON2__2_X_10_G:
+        smdbg->num_of_pons = NGPON2_2X_NUM_OF_PONS;
+        for (i=0; i<smdbg->num_of_pons; i++)
+        {
+        	smdbg->pons[i] = db_ngpon2;
+        	if (xgpon_num_of_onus == BCMOLT_XGPON_NUM_OF_ONUS_XGPON_SUPPORT_510_ONUS)
+        	{
+        		smdbg->pons[i].num_of_onus = XGPON_MAX_NUM_OF_ONUS;
+        	}
+        }
+        break;
+    case BCMOLT_SYSTEM_MODE_NGPON2__8_X_2_P_5_G:
+           smdbg->num_of_pons = NGPON2_8X_NUM_OF_PONS;
+           for (i=0; i<smdbg->num_of_pons; i++)
+           {
+        	   smdbg->pons[i] = db_ngpon2_2_5_g;
+        	   if (xgpon_num_of_onus == BCMOLT_XGPON_NUM_OF_ONUS_XGPON_SUPPORT_510_ONUS)
+        	   {
+        		   smdbg->pons[i].num_of_onus = XGPON_MAX_NUM_OF_ONUS;
+        	   }
+           }
+           break;
+    default:
+        smdbg->num_of_pons = 0;
+        break;
+    }
+
+}
+
+bcmolt_system_mode bcm_common_gpon_get_system_mode(void)
+{
+    bcmolt_system_mode system_mode;
+
+    /* ToDo: XXX: it requires work. JIRA SWMAPLE-3724 */
+    bcmolt_system_mode_get(0, &system_mode);
+    return system_mode;
+}
+
+bcmolt_pon_mode2str_t bcmolt_pon_mode2str[] =
+{
+    {BCMOLT_PON_MODE_GPON, "gpon"},
+    {BCMOLT_PON_MODE_XGPON, "xgpon"},
+    {BCMOLT_PON_MODE_XGS, "xgs"},
+    {BCMOLT_PON_MODE_NGPON2, "ngpon2"},
+    {-1}
+};
diff --git a/bcm68620_release/release/host_driver/common_gpon/bcm_common_gpon.h b/bcm68620_release/release/host_driver/common_gpon/bcm_common_gpon.h
new file mode 100644
index 0000000..464d661
--- /dev/null
+++ b/bcm68620_release/release/host_driver/common_gpon/bcm_common_gpon.h
@@ -0,0 +1,144 @@
+/*
+<:copyright-BRCM:2016:proprietary:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+This program is the proprietary software of Broadcom Corporation and/or its
+licensors, and may only be used, duplicated, modified or distributed pursuant
+to the terms and conditions of a separate, written license agreement executed
+between you and Broadcom (an "Authorized License").  Except as set forth in
+an Authorized License, Broadcom grants no license (express or implied), right
+to use, or waiver of any kind with respect to the Software, and Broadcom
+expressly reserves all rights in and to the Software and all intellectual
+property rights therein.  IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE
+NO RIGHT TO USE THIS SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY
+BROADCOM AND DISCONTINUE ALL USE OF THE SOFTWARE.
+
+Except as expressly set forth in the Authorized License,
+
+1. This program, including its structure, sequence and organization,
+    constitutes the valuable trade secrets of Broadcom, and you shall use
+    all reasonable efforts to protect the confidentiality thereof, and to
+    use this information only in connection with your use of Broadcom
+    integrated circuit products.
+
+2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
+    AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, REPRESENTATIONS OR
+    WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH
+    RESPECT TO THE SOFTWARE.  BROADCOM SPECIFICALLY DISCLAIMS ANY AND
+    ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, NONINFRINGEMENT,
+    FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, ACCURACY OR
+    COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR CORRESPONDENCE
+    TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT OF USE OR
+    PERFORMANCE OF THE SOFTWARE.
+
+3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR
+    ITS LICENSORS BE LIABLE FOR (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL,
+    INDIRECT, OR EXEMPLARY DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY
+    WAY RELATING TO YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN
+    IF BROADCOM HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES;
+    OR (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE
+    SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE LIMITATIONS
+    SHALL APPLY NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF ANY
+    LIMITED REMEDY.
+:>
+*/
+#ifndef _BCM_COMMON_GPON_H_
+#define _BCM_COMMON_GPON_H_
+
+#include "bcm_dev_log.h"
+#include "bcmcli.h"
+#include "bcmolt_model_types.h"
+#include "bcmolt_math.h"
+#include "bcmolt_conv.h"
+#include "bcm_common_gpon_constants.h"
+
+typedef struct
+{
+    bcmolt_pon_mode pon_mode;
+    bcmolt_pon_api_type api_type;
+    uint16_t num_of_onus;
+    uint16_t num_of_alloc_ids;
+    uint16_t num_of_dynamic_alloc_indices;
+    uint16_t num_of_gem_ports;
+    uint16_t num_of_alloc_ids_per_onu;
+    bcmolt_pon_onu_id onu_id_broadcast;
+    bcmolt_pon_onu_id onu_id_unassigned;
+    bcmolt_pon_alloc_id alloc_id_broadcast;
+    bcmolt_pon_alloc_id alloc_id_invalid;
+    bcmolt_pon_alloc_id alloc_id_unassigned;
+    bcmolt_pon_us_rate us_rate;
+} pon_mode_db;
+
+typedef struct
+{
+    uint8_t num_of_pons;
+    pon_mode_db pons[MAX_NUM_OF_PONS];
+} sys_mode_db;
+
+/* System mode database, initialized at system start.
+ * Used for constants that change based on PON mode, chip type, etc. */
+extern sys_mode_db *smdbg;
+
+/* Get the PON mode database handle for a given PON index (shortcut for smdbg->pons[pon_id]). */
+#define PMDB(pon_id) ((const pon_mode_db *)&smdbg->pons[pon_id])
+
+/* Get the PON mode for a given PON index (shortcut for PMDB(pon_id)->pon_mode). */
+#define PON_MODE(pon_id) (PMDB(pon_id)->pon_mode)
+BCMOLT_TYPE2STR(bcmolt_pon_mode, extern)
+
+/* Generic function that can be used to raise a software error for unsupported PON modes. */
+static inline bcmos_errno error_pon_mode_not_supported(bcmolt_pon_ni pon_ni)
+{
+    bcmolt_pon_mode mode = PON_MODE(pon_ni);
+    BCMOS_TRACE_ERR("PON mode not supported for PON NI-%d: %s (%u)\n", pon_ni, bcmolt_pon_mode2str_conv(mode), mode);
+    return BCM_ERR_INTERNAL;
+}
+
+/* Get a module ID with a base module + instance (PON, cluster, etc.) offset in a type-safe way */
+#define MODULE_INSTANCE(base_module_id, instance) (bcmos_module_id)((uint32_t)(base_module_id) + (uint32_t)(instance))
+
+/* Same as MODULE_INSTANCE, but for events. */
+#define EVENT_INSTANCE(base_event_id, instance) (bcmos_event_id)((uint32_t)(base_event_id) + (uint32_t)(instance))
+
+#define FOR_EACH_ONU(pon_id, onu_id) \
+    for (onu_id = (bcmolt_pon_onu_id)0; onu_id < (bcmolt_pon_onu_id)PMDB(pon_id)->num_of_onus; onu_id++)
+
+#define FOR_EACH_ALLOC_INDEX(pon_id, alloc_index) \
+    for (alloc_index = (bcmolt_pon_alloc_index)0; alloc_index < (bcmolt_pon_alloc_index)PMDB(pon_id)->num_of_alloc_ids; alloc_index++)
+
+#define FOR_EACH_GEM_INDEX(pon_id, gem_port_index) \
+    for (gem_port_index = 0; (bcmolt_pon_gem_port_index)gem_port_index < (bcmolt_pon_gem_port_index)PMDB(pon_id)->num_of_gem_ports; gem_port_index++)
+
+#define ALLOC_INDEX_IS_VALID(pon_id, alloc_index) ((alloc_index) < (bcmolt_pon_alloc_index)PMDB(pon_id)->num_of_alloc_ids)
+#define GEM_PORT_INDEX_IS_VALID(pon_id, gem_port_index) \
+    ((gem_port_index) < (bcmolt_pon_gem_port_index)PMDB(pon_id)->num_of_gem_ports)
+
+#define ALLOC_ID_LAST_DEFAULT(pon_id) ((bcmolt_pon_alloc_id)(PMDB(pon_id)->num_of_onus - 1))
+#define ALLOC_ID_LAST_DATA(pon_id, first_data_alloc_id) \
+    ((first_data_alloc_id) + (bcmolt_pon_alloc_id)(PMDB(pon_id)->num_of_alloc_ids - PMDB(pon_id)->num_of_onus - 1))
+#define ALLOC_ID_IS_VALID_DATA(pon_id, alloc_id, first_data_alloc_id) ( \
+    ((alloc_id) >= (first_data_alloc_id) && (alloc_id) <= ALLOC_ID_LAST_DATA(pon_id, first_data_alloc_id)))
+#define ALLOC_ID_IS_VALID(pon_id, alloc_id, first_data_alloc_id) ( \
+    ((alloc_id) <= ALLOC_ID_LAST_DEFAULT(pon_id)) || \
+    ALLOC_ID_IS_VALID_DATA(pon_id, alloc_id, first_data_alloc_id))
+
+#define GEM_PORT_ID_LAST_DEFAULT(pon_id) ((bcmolt_pon_gem_port_id)(PMDB(pon_id)->num_of_onus - 1))
+#define GEM_PORT_ID_LAST_DATA(pon_id, first_data_port_id) \
+    ((first_data_port_id) + (bcmolt_pon_gem_port_id)(PMDB(pon_id)->num_of_gem_ports - PMDB(pon_id)->num_of_onus - 1))
+#define GEM_PORT_ID_IS_VALID_DATA(pon_id, gem_port_id, first_data_port_id) ( \
+    ((gem_port_id) >= (first_data_port_id) && (gem_port_id) <= GEM_PORT_ID_LAST_DATA(pon_id, first_data_port_id)))
+#define GEM_PORT_ID_IS_VALID(pon_id, gem_port_id, first_data_port_id) ( \
+    ((gem_port_id) <= GEM_PORT_ID_LAST_DEFAULT(pon_id)) || \
+    GEM_PORT_ID_IS_VALID_DATA(pon_id, gem_port_id, first_data_port_id))
+
+#define PON_ID_IS_VALID(system_mode, pon_id) ( \
+    ((uint8_t)pon_id < smdbg->num_of_pons) && \
+    (system_mode != BCMOLT_SYSTEM_MODE_GPON_8_XGPON_4_X_COEXISTENCE || pon_id < XGPON_HALF_CHIP_MAX_NUM_OF_PONS || pon_id >= XGPON_MAX_NUM_OF_PONS))
+
+void bcm_common_gpon_init(bcmolt_system_mode system_mode);
+bcmolt_system_mode bcm_common_gpon_get_system_mode(void);
+
+#endif
+
diff --git a/bcm68620_release/release/host_driver/common_gpon/bcm_common_gpon_constants.h b/bcm68620_release/release/host_driver/common_gpon/bcm_common_gpon_constants.h
new file mode 100644
index 0000000..60308e4
--- /dev/null
+++ b/bcm68620_release/release/host_driver/common_gpon/bcm_common_gpon_constants.h
@@ -0,0 +1,138 @@
+/*
+<:copyright-BRCM:2016:proprietary:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+This program is the proprietary software of Broadcom Corporation and/or its
+licensors, and may only be used, duplicated, modified or distributed pursuant
+to the terms and conditions of a separate, written license agreement executed
+between you and Broadcom (an "Authorized License").  Except as set forth in
+an Authorized License, Broadcom grants no license (express or implied), right
+to use, or waiver of any kind with respect to the Software, and Broadcom
+expressly reserves all rights in and to the Software and all intellectual
+property rights therein.  IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE
+NO RIGHT TO USE THIS SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY
+BROADCOM AND DISCONTINUE ALL USE OF THE SOFTWARE.
+
+Except as expressly set forth in the Authorized License,
+
+1. This program, including its structure, sequence and organization,
+    constitutes the valuable trade secrets of Broadcom, and you shall use
+    all reasonable efforts to protect the confidentiality thereof, and to
+    use this information only in connection with your use of Broadcom
+    integrated circuit products.
+
+2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
+    AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, REPRESENTATIONS OR
+    WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH
+    RESPECT TO THE SOFTWARE.  BROADCOM SPECIFICALLY DISCLAIMS ANY AND
+    ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, NONINFRINGEMENT,
+    FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, ACCURACY OR
+    COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR CORRESPONDENCE
+    TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT OF USE OR
+    PERFORMANCE OF THE SOFTWARE.
+
+3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR
+    ITS LICENSORS BE LIABLE FOR (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL,
+    INDIRECT, OR EXEMPLARY DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY
+    WAY RELATING TO YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN
+    IF BROADCOM HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES;
+    OR (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE
+    SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE LIMITATIONS
+    SHALL APPLY NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF ANY
+    LIMITED REMEDY.
+:>
+*/
+#ifndef _BCM_COMMON_GPON_CONSTANTS_H_
+#define _BCM_COMMON_GPON_CONSTANTS_H_
+
+#include "bcmolt_model_data.h"
+
+/* maximum number of PONs for any supported PON mode */
+#define MAX_NUM_OF_PONS 16
+
+/** Generic "PON mode" used to simplify logic when specific "system mode" is too complex. */
+typedef enum
+{
+    BCMOLT_PON_MODE_GPON,
+    BCMOLT_PON_MODE_XGPON,
+    BCMOLT_PON_MODE_XGS,
+    BCMOLT_PON_MODE_NGPON2,
+} bcmolt_pon_mode;
+
+/** Object type used by the API layer for provisioning each PON mode. */
+typedef enum
+{
+    BCMOLT_PON_API_TYPE_GPON,
+    BCMOLT_PON_API_TYPE_XGPON,
+} bcmolt_pon_api_type;
+
+typedef enum
+{
+    BCMOLT_PON_US_RATE_1G,
+    BCMOLT_PON_US_RATE_2P5G,
+    BCMOLT_PON_US_RATE_10G,
+} bcmolt_pon_us_rate;
+
+/* Number of PON NIs per PON mode */
+#define GPON_MAX_NUM_OF_PONS 16
+#define XGPON_MAX_NUM_OF_PONS 8
+#define XGPON_HALF_CHIP_MAX_NUM_OF_PONS 4
+#define XGS_2X_NUM_OF_PONS 2
+#define NGPON2_2X_NUM_OF_PONS 2
+#define NGPON2_8X_NUM_OF_PONS 8
+
+/* ONU's per PON */
+#define GPON_NUM_OF_ONUS 128
+#define XGPON_NUM_OF_ONUS 256
+#define XGPON_MAX_NUM_OF_ONUS 510
+
+/* Alloc ID's per PON */
+#define GPON_NUM_OF_DYNAMIC_ALLOC_INDICES 640
+#define GPON_NUM_OF_ALLOC_IDS 1024
+#define XGPON_NUM_OF_DYNAMIC_ALLOC_INDICES 1280
+#define XGPON_NUM_OF_ALLOC_IDS 2048
+
+/* Alloc ID's per ONU */
+#define GPON_NUM_OF_ALLOC_IDS_PER_ONU 32
+#define XGPON_NUM_OF_ALLOC_IDS_PER_ONU 32
+#define NUM_OF_ALLOC_IDS_PER_ONU (MAX(GPON_NUM_OF_ALLOC_IDS_PER_ONU, XGPON_NUM_OF_ALLOC_IDS_PER_ONU))
+
+#define GPON_ONU_ID_BROADCAST ((bcmolt_pon_onu_id)0xFF)
+#define XGPON_ONU_ID_BROADCAST ((bcmolt_pon_onu_id)0x3FF)
+#define GPON_ONU_ID_UNASSIGNED GPON_ONU_ID_BROADCAST
+#define XGPON_ONU_ID_UNASSIGNED XGPON_ONU_ID_BROADCAST
+#define XGPON_DUMMY_ONU_ID ((bcmolt_pon_onu_id)511)
+
+#define GPON_ALLOC_ID_BROADCAST ((bcmolt_pon_alloc_id)0xFE)
+#define XGPON_ALLOC_ID_BROADCAST ((bcmolt_pon_alloc_id)0x3FF) /* Used for 2.5G upstream in XGPON/XGS/NGPON2 */
+#define TEN_GIG_ALLOC_ID_BROADCAST ((bcmolt_pon_alloc_id)0x3FE) /* Used for 10G upstream in XGS/NGPON2 */
+#define TEN_OR_2P5_GIG_ALLOC_ID_BROADCAST ((bcmolt_pon_alloc_id)0x3FD) /* Used for either 2.5G/10G upstream in XGS/NGPON2 */
+#define GPON_ALLOC_ID_UNASSIGNED ((bcmolt_pon_alloc_id)0xFF)
+#define XGPON_ALLOC_ID_UNASSIGNED ((bcmolt_pon_alloc_id)512) /* In XGPON we have up to 512 ONU's, and alloc ID is unused for sure. */
+#define XGPON_DUMMY_ALLOC_ID ((bcmolt_pon_alloc_id)511)
+
+/* GEM PORT ID's per PON */
+#define GPON_NUM_OF_GEM_PORT_IDS_PER_PON 4096
+#define XGPON_NUM_OF_GEM_PORT_IDS_PER_PON 8192
+/* GEM PORT ID's per ONU */
+#define MAX_NUM_OF_GEM_PORT_IDS_PER_ONU 256
+
+/* OMCI/CPU packets */
+#define OMCI_CRC_LEN 4
+
+/* Packet sizes - all values in bytes resolution */
+#define OMCI_MIN_PKT_SIZE_WITH_CRC 14
+#define OMCI_MIN_PKT_SIZE_WO_CRC 10
+#define OMCI_MAX_PKT_SIZE_WITH_CRC 1980
+#define OMCI_MAX_PKT_SIZE_WO_CRC 1976
+#define OMCI_BASELINE_PKT_SIZE_WO_CRC 44
+#define OMCI_EXTENDED_PKT_SIZE_WO_CRC OMCI_MAX_PKT_SIZE_WO_CRC
+#define CPU_MIN_PKT_SIZE_WITH_CRC 64
+#define CPU_MIN_PKT_SIZE_WO_CRC 60
+#define CPU_MAX_PKT_SIZE_WITH_CRC 2048
+#define CPU_MAX_PKT_SIZE_WO_CRC 2044
+
+#endif
+
diff --git a/bcm68620_release/release/host_driver/common_gpon/bcm_common_gpon_fast.h b/bcm68620_release/release/host_driver/common_gpon/bcm_common_gpon_fast.h
new file mode 100644
index 0000000..6dac5c5
--- /dev/null
+++ b/bcm68620_release/release/host_driver/common_gpon/bcm_common_gpon_fast.h
@@ -0,0 +1,129 @@
+/*
+<:copyright-BRCM:2016:proprietary:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+This program is the proprietary software of Broadcom Corporation and/or its
+licensors, and may only be used, duplicated, modified or distributed pursuant
+to the terms and conditions of a separate, written license agreement executed
+between you and Broadcom (an "Authorized License").  Except as set forth in
+an Authorized License, Broadcom grants no license (express or implied), right
+to use, or waiver of any kind with respect to the Software, and Broadcom
+expressly reserves all rights in and to the Software and all intellectual
+property rights therein.  IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE
+NO RIGHT TO USE THIS SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY
+BROADCOM AND DISCONTINUE ALL USE OF THE SOFTWARE.
+
+Except as expressly set forth in the Authorized License,
+
+1. This program, including its structure, sequence and organization,
+    constitutes the valuable trade secrets of Broadcom, and you shall use
+    all reasonable efforts to protect the confidentiality thereof, and to
+    use this information only in connection with your use of Broadcom
+    integrated circuit products.
+
+2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
+    AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, REPRESENTATIONS OR
+    WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH
+    RESPECT TO THE SOFTWARE.  BROADCOM SPECIFICALLY DISCLAIMS ANY AND
+    ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, NONINFRINGEMENT,
+    FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, ACCURACY OR
+    COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR CORRESPONDENCE
+    TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT OF USE OR
+    PERFORMANCE OF THE SOFTWARE.
+
+3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR
+    ITS LICENSORS BE LIABLE FOR (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL,
+    INDIRECT, OR EXEMPLARY DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY
+    WAY RELATING TO YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN
+    IF BROADCOM HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES;
+    OR (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE
+    SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE LIMITATIONS
+    SHALL APPLY NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF ANY
+    LIMITED REMEDY.
+:>
+*/
+#ifndef _BCM_COMMON_GPON_FAST_H_
+#define _BCM_COMMON_GPON_FAST_H_
+
+#ifndef SIMULATION_BUILD
+#include <bcmtr_pcie_sw_queue.h>
+#endif
+
+#define BCM_COMMON_GPON_FAST_API_LIST_SIZE 1280
+#define BCM_COMMON_GPON_FAST_API_ACCESS_LIST_SIZE 2048
+#define URGENT_CHANNEL BCMTR_SWQ_FIRST_URGENT_CHANNEL
+
+typedef enum
+{
+	BCM_COMMON_FAST_MSG_TYPE_GET_ALLOC_STATS,
+	BCM_COMMON_FAST_MSG_TYPE_SET_ALLOCS,
+	BCM_COMMON_FAST_MSG_TYPE_SET_BW_ALLOCS
+} bcm_common_fast_msg_type;
+
+typedef struct __PACKED_ATTR_START__
+{
+	uint16_t alloc_id;
+	uint32_t allocated;
+	uint32_t used;
+	uint32_t status_report;
+} __PACKED_ATTR_END__ bcm_common_fast_get_alloc_stats;
+
+typedef struct __PACKED_ATTR_START__
+{
+	uint8_t pon_ni;
+	uint32_t cycle_num;
+	uint32_t available_bw;
+	uint32_t num_of_allocs;
+} __PACKED_ATTR_END__ bcm_common_fast_get_stats_ind_hdr;
+
+typedef struct __PACKED_ATTR_START__
+{
+	bcm_common_fast_get_stats_ind_hdr hdr;
+	bcm_common_fast_get_alloc_stats alloc_stats_list[BCM_COMMON_GPON_FAST_API_LIST_SIZE];
+} __PACKED_ATTR_END__ bcm_common_fast_get_stats_ind;
+
+typedef struct __PACKED_ATTR_START__
+{
+	uint16_t alloc_id;
+	uint32_t allocation_blocks;
+	/* uint8_t access_num;  - Will be added in the 2nd phase */
+} __PACKED_ATTR_END__ bcm_common_fast_set_alloc;
+
+typedef struct __PACKED_ATTR_START__
+{
+	uint32_t cycle_num;
+	uint32_t num_of_allocs;
+} __PACKED_ATTR_END__ bcm_common_fast_msg_hdr;
+
+typedef struct __PACKED_ATTR_START__
+{
+	bcm_common_fast_msg_hdr hdr;
+	bcm_common_fast_set_alloc set_alloc_list[BCM_COMMON_GPON_FAST_API_LIST_SIZE];
+} __PACKED_ATTR_END__ bcm_common_fast_set_allocs_msg;
+
+typedef struct __PACKED_ATTR_START__
+{
+	uint16_t alloc_id;
+	uint16_t allocation_size;
+	uint16_t start_time;
+	uint8_t burst_profile;
+    struct __PACKED_ATTR_START__
+    {
+		bcmos_bool ploam_flag			:1;
+		bcmos_bool dbru_flag			:1;
+		bcmos_bool end_of_frame			:1;
+		bcmos_bool end_of_map			:1;
+		bcmos_bool fwi					:1;
+        uint8_t                      	:3;
+    } __PACKED_ATTR_END__ alloc_flags;
+} __PACKED_ATTR_END__ bcm_common_fast_set_access;
+
+typedef struct __PACKED_ATTR_START__
+{
+	bcm_common_fast_msg_hdr hdr;
+	bcm_common_fast_set_access set_access_list[BCM_COMMON_GPON_FAST_API_ACCESS_LIST_SIZE];
+} __PACKED_ATTR_END__ bcm_common_fast_set_accesses_msg;
+
+#endif
diff --git a/bcm68620_release/release/host_driver/config/bcm_config.h b/bcm68620_release/release/host_driver/config/bcm_config.h
new file mode 100644
index 0000000..4d02fe3
--- /dev/null
+++ b/bcm68620_release/release/host_driver/config/bcm_config.h
@@ -0,0 +1,75 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#ifndef BCMOLT_CONFIG_H_
+#define BCMOLT_CONFIG_H_
+
+/** \defgroup config Configuration Constants
+ * Configuration constants that must be revised by customer
+ * @{
+ */
+
+/** CPU Endianness. Must be set to BCMOS_ENDIAN_BIG or BCMOS_ENDIAN_LITTLE. */
+#ifndef BCM_CPU_ENDIAN
+
+#error BCM_CPU_ENDIAN must be set BCMOS_ENDIAN_BIG or BCMOS_ENDIAN_LITTLE
+
+#endif /* #ifndef BCM_CPU_ENDIAN */
+
+/** Transport layer configuration defaults */
+#define BCMTR_TR_TYPE              BCMTR_TYPE_UDP       /**< Transport type: raw/udp */
+#define BCMTR_TR_UDP_HOST_IP       0x7f000001
+#define BCMTR_TR_UDP_OLT_IP        0x7f000001
+#define BCMTR_TR_UDP_HOST_PORT     0x4000
+#define BCMTR_TR_UDP_OLT_PORT      0x4010
+
+#define BCMTR_MAX_OLTS             2      /**< Max number of OLTs */
+#define BCMTR_MAX_INSTANCES        16     /**< Max number of message handler instances - typically a number of PON's */
+#define BCMTR_MAX_RETRIES          0      /**< Max number of request retransmissions */
+#define BCMTR_MSG_TIMEOUT          500    /**< Max time to wait for response or next message part (ms) */
+#define BCMTR_MAX_REQUESTS         64     /**< Max number of outstanding requests per application per OLT */
+#define BCMTR_MAX_AUTOS            256    /**< Maximum number of simultaneous multi-part autonomous messages */
+#define BCMTR_MAX_FRAGMENTS        500    /**< Maximum number of fragments per message */
+#define BCMTR_MSG_WAIT_MS          5      /**< length of time to wait on conn read */
+#define BCMTR_MSG_READY_MS         50     /**< Time to wait for application to peak up response */
+#define BCMTR_MAX_MTU_SIZE         4096   /**< max MTU size */
+#define BCMTR_RX_THREAD_STACK      0      /**< Rx thread stack size */
+
+/** Debug output configuration */
+#define BCM_DBG_MAX_MSG_SIZE       128    /**< Max number of message bytes to include in message dump */
+
+#define BCMTR_BUF_EXTRA_HEADROOM   0      /**< Extra headroom to reserve is system buffer */
+
+#define BCMTR_PCIE_START_TIMEOUT   15000  /**< Application start timeout (ms) */
+#define BCMTR_PCIE_CONNECT_TIMEOUT 15000  /**< Connect timeout (ms) */
+/** @} */
+
+#define BCMTR_MAX_RXQ_SIZE         256
+
+#endif /* BCMOLT_CONFIG_H_ */
diff --git a/bcm68620_release/release/host_driver/coop_dba/Makefile b/bcm68620_release/release/host_driver/coop_dba/Makefile
new file mode 100644
index 0000000..fb20a25
--- /dev/null
+++ b/bcm68620_release/release/host_driver/coop_dba/Makefile
@@ -0,0 +1,38 @@
+# Coop DBA
+MOD_NAME = coop_dba
+
+ifeq ("$(OS_KERNEL)", "linux")
+MOD_TYPE = linux_lib
+else
+MOD_TYPE = lib
+endif
+
+ifeq ("$(RELEASE_BUILD)", "y")
+	EXTRA_CFLAGS += -I$(TOP_DIR)/host_driver/api \
+-I$(TOP_DIR)/host_driver/utils \
+-I$(TOP_DIR)/host_reference/dev_log \
+-I$(TOP_DIR)/host_driver/common_gpon \
+-I$(TOP_DIR)/host_driver/transport/mux \
+-I$(TOP_DIR)/host_driver/transport/pcie_sw_queue \
+-I$(TOP_DIR)/host_driver/pcie \
+-I$(TOP_DIR)/host_driver/transport
+else
+	EXTRA_CFLAGS += -I$(TOP_DIR)/common/gpon \
+-I$(TOP_DIR)/common/model/maple \
+-I$(TOP_DIR)/common/transport/driver/maple/pcie_sw_queue \
+-I$(TOP_DIR)/common/drivers/maple/pcie \
+-I$(TOP_DIR)/common/api \
+-I$(TOP_DIR)/common/utils \
+-I$(TOP_DIR)/common/dev_log \
+-I$(TOP_DIR)/host/transport/driver/maple/mux
+endif
+				
+srcs = bcmolt_coop_dba.c
+
+MOD_INC_DIRS = $(SRC_DIR) $(MODEL_OUT_DIR)
+
+# If called by linux kernel builder - add include paths manually.
+# It is not elegant, but we'll not have many linux modules
+ifneq ("$(KBUILD_SRC)", "")
+	-include $(OUT_DIR_BASE)/Makefile.config.$(MOD_NAME)
+endif
diff --git a/bcm68620_release/release/host_driver/coop_dba/bcmolt_coop_dba.c b/bcm68620_release/release/host_driver/coop_dba/bcmolt_coop_dba.c
new file mode 100644
index 0000000..add7ae5
--- /dev/null
+++ b/bcm68620_release/release/host_driver/coop_dba/bcmolt_coop_dba.c
@@ -0,0 +1,223 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#include "bcmolt_coop_dba.h"
+
+/* this is the host application callback that will be called to handle the indications sent from
+ * the embedded side to the host during DBA cycle
+ */
+static bcmolt_coop_dba_host_handler_cb host_handler_array[BCMTR_MAX_OLTS];
+
+/* An API to implement Partial-External DBA type */
+bcmos_errno bcmolt_fast_oper_set_allocs(bcmolt_devid device, uint8_t pon_ni, bcm_common_fast_set_allocs_msg *msg)
+{
+	bcmos_errno rc = BCM_ERR_OK;
+	bcmos_buf *buf;
+	unsigned char *buf_data;
+	bcm_common_fast_set_allocs_msg *msg_p;
+	uint32_t len = sizeof(bcm_common_fast_msg_type) + sizeof(pon_ni) +
+		sizeof(msg->hdr) + sizeof(bcm_common_fast_set_alloc) * msg->hdr.num_of_allocs;
+	uint32_t i;
+
+    buf = bcmos_buf_alloc(len);
+
+    if (!buf)
+    {
+        BCMOS_TRACE_ERR("Can't allocate packet buffer\n");
+        return BCM_ERR_NOMEM;
+    }
+    bcmos_buf_length_set(buf, len);
+    buf_data = bcmos_buf_data(buf);
+
+	/* change endianness from host to embedded */
+
+    /* fixing header endianness and packing */
+    *buf_data++ = (uint8_t)BCM_COMMON_FAST_MSG_TYPE_SET_ALLOCS; /* msg type */
+    *buf_data++ = pon_ni; /* pon_ni is U8 */
+
+    msg_p = (bcm_common_fast_set_allocs_msg *)buf_data;
+
+    msg_p->hdr.cycle_num = BCMOLT_BUF_ENDIAN_CPU_TO_BUF(U32, msg->hdr.cycle_num);
+
+    msg_p->hdr.num_of_allocs = BCMOLT_BUF_ENDIAN_CPU_TO_BUF(U32, msg->hdr.num_of_allocs);
+
+    for (i = 0; i < sizeof(msg->hdr.num_of_allocs); i++)
+    {
+    	/* going over the list parts and fixing their endianity and packing into buf */
+    	msg_p->set_alloc_list[i].alloc_id = BCMOLT_BUF_ENDIAN_CPU_TO_BUF(U16, msg->set_alloc_list[i].alloc_id);
+    	msg_p->set_alloc_list[i].allocation_blocks = BCMOLT_BUF_ENDIAN_CPU_TO_BUF(U32, msg->set_alloc_list[i].allocation_blocks);
+    }
+
+	/* send directly to PCIe driver on the dedicated channel for fast API */
+    rc = bcmtr_swq_send(device, URGENT_CHANNEL, buf);
+
+    if (rc)
+    {
+        BCMOS_TRACE_ERR("bcmtr_pcie_send failed. Error %s (%d)\n", bcmos_strerror(rc), rc);
+        bcmos_buf_free(buf);
+        return BCM_ERR_PARM;
+    }
+    /* buffer will be freed automatically once it is transmitted */
+    return BCM_ERR_OK;
+}
+
+bcmos_errno bcmolt_fast_oper_set_accesses(bcmolt_devid device, uint8_t pon_ni, bcm_common_fast_set_accesses_msg *msg)
+{
+	bcmos_errno rc = BCM_ERR_OK;
+	bcmos_buf* buf;
+	bcm_common_fast_set_accesses_msg *msg_p;
+	unsigned char* buf_data;
+	uint32_t len = sizeof(bcm_common_fast_msg_type) + sizeof(pon_ni) +
+		sizeof (msg->hdr) + sizeof(bcm_common_fast_set_access) * msg->hdr.num_of_allocs;
+	uint32_t i;
+
+    buf = bcmos_buf_alloc(len);
+
+    if (!buf)
+    {
+        BCMOS_TRACE_ERR("Can't allocate packet buffer\n");
+        return BCM_ERR_NOMEM;
+    }
+    bcmos_buf_length_set(buf, len);
+    buf_data = bcmos_buf_data(buf);
+
+	/* change endianess from host to embedded */
+    /* fixing header endianness and packing */
+    *buf_data++ = (uint8_t)BCM_COMMON_FAST_MSG_TYPE_SET_BW_ALLOCS;
+    *buf_data++ = pon_ni; /* pon_ni is U8 */
+
+    msg_p = (bcm_common_fast_set_accesses_msg *)buf_data;
+
+    msg_p->hdr.cycle_num = BCMOLT_BUF_ENDIAN_CPU_TO_BUF(U32, msg->hdr.cycle_num);
+    msg_p->hdr.num_of_allocs = BCMOLT_BUF_ENDIAN_CPU_TO_BUF(U32, msg->hdr.num_of_allocs);
+
+    for (i = 0; i < sizeof(msg->hdr.num_of_allocs); i++)
+    {
+    	/* going over the list parts and fixing their endianity and packing into buf */
+    	msg_p->set_access_list[i].alloc_id = BCMOLT_BUF_ENDIAN_CPU_TO_BUF(U16, msg->set_access_list[i].alloc_id);
+    	msg_p->set_access_list[i].allocation_size = BCMOLT_BUF_ENDIAN_CPU_TO_BUF(U16, msg->set_access_list[i].allocation_size);
+    	msg_p->set_access_list[i].start_time = BCMOLT_BUF_ENDIAN_CPU_TO_BUF(U16, msg->set_access_list[i].start_time);
+    	msg_p->set_access_list[i].burst_profile = msg->set_access_list[i].burst_profile; /* burst profile is U8 */
+    	msg_p->set_access_list[i].alloc_flags = msg->set_access_list[i].alloc_flags; /* ploam_flag, dbru_flag, end_of_frame, end_of_map and fwi are boolean and are represented as a bitmap (U8) */
+    }
+
+	/* send directly to PCIe driver on the dedicated channel for fast API */
+	rc = bcmtr_swq_send(device, URGENT_CHANNEL, buf);
+
+    if (rc)
+    {
+        BCMOS_TRACE_ERR("bcmtr_pcie_send failed. Error %s (%d)\n", bcmos_strerror(rc), rc);
+        bcmos_buf_free(buf);
+        return BCM_ERR_PARM;
+    }
+    /* buffer will be freed automatically once it is transmitted */
+    return BCM_ERR_OK;
+}
+
+/* RX callback to handle messages from embedded -> host */
+void bcmolt_coop_dba_rx(bcmolt_devid device, bcmos_buf *sysb, bcmtrmux_channel channel, void *data)
+{
+    bcmos_errno err;
+    bcm_common_fast_get_stats_ind *msg_p;
+
+    unsigned char *buf_data = bcmos_buf_data(sysb);
+    uint32_t i;
+
+    /* calling host application callback to handle the statistics message from the embedded */
+
+    /* the host is expecting a message of type:
+     * typedef struct
+		{
+			bcmolt_xgpon_ni_fast_get_stats_ind_hdr hdr;
+			bws_dba_get_alloc_stat alloc_stats_list[BCM_COMMON_GPON_FAST_API_LIST_SIZE];
+		}bcmolt_xgpon_ni_fast_get_stats_ind;
+     */
+
+    msg_p = (bcm_common_fast_get_stats_ind *)buf_data;
+    /* Fixing endianness and  creating a message. */
+    /* pon_ni us uint8 no need to fix endianness */
+    msg_p->hdr.cycle_num = BCMOLT_BUF_ENDIAN_BUF_TO_CPU(U32, msg_p->hdr.cycle_num);
+    msg_p->hdr.available_bw = BCMOLT_BUF_ENDIAN_BUF_TO_CPU(U32, msg_p->hdr.available_bw);
+    msg_p->hdr.num_of_allocs = BCMOLT_BUF_ENDIAN_BUF_TO_CPU(U32, msg_p->hdr.num_of_allocs);
+    for (i = 0; i < msg_p->hdr.num_of_allocs; i++)
+    {
+    	msg_p->alloc_stats_list[i].alloc_id = BCMOLT_BUF_ENDIAN_BUF_TO_CPU(U16, msg_p->alloc_stats_list[i].alloc_id);
+    	msg_p->alloc_stats_list[i].allocated = BCMOLT_BUF_ENDIAN_BUF_TO_CPU(U32, msg_p->alloc_stats_list[i].allocated);
+    	msg_p->alloc_stats_list[i].used = BCMOLT_BUF_ENDIAN_BUF_TO_CPU(U32, msg_p->alloc_stats_list[i].used);
+    	msg_p->alloc_stats_list[i].status_report = BCMOLT_BUF_ENDIAN_BUF_TO_CPU(U32, msg_p->alloc_stats_list[i].status_report);
+    }
+    if (host_handler_array[device])
+    {
+    	err = host_handler_array[device](device, msg_p);
+    	BUG_ON(err);
+    }
+    else
+    {
+    	bcmos_free(sysb);
+    }
+}
+
+bcmos_errno bcmolt_coop_dba_init(bcmolt_devid devid, bcmtrmux_channel *channel, f_bcmtr_rx_handler rx_handler, void *data)
+{
+	bcmos_errno rc;
+
+	rc = bcmtrmux_channel_register(devid, channel, rx_handler, data);
+    if (rc != BCM_ERR_OK)
+    {
+        bcmos_printf("%s: can't register channel %d for device %u. rc=%d\n", __FUNCTION__, *channel, devid, (int)rc);
+        goto exit;
+    }
+	rc = bcmtr_swq_tx_queue_cfg(devid, BCMTR_PCIE_PRTY_NORMAL, BCMOLT_COOP_DBA_HARDQ_SIZE, BCMOLT_COOP_DBA_SOFTQ_SIZE);
+	if (rc != BCM_ERR_OK)
+	{
+		bcmos_printf("%s: can't configure tx queue channel %d for device %u. rc=%d\n", __FUNCTION__, devid, (int)rc);
+		goto exit;
+
+	}
+	return rc;
+
+exit:
+	bcmolt_coop_dba_exit(devid, *channel);
+	return rc;
+}
+
+void bcmolt_coop_dba_exit(bcmolt_devid devid, bcmtrmux_channel channel)
+{
+	bcmtrmux_channel_unregister(devid, channel);
+}
+
+void bcmolt_coop_dba_host_handler_register(bcmolt_devid devid, bcmolt_coop_dba_host_handler_cb host_handler)
+{
+	host_handler_array[devid] = host_handler;
+}
+
+void bcmolt_coop_dba_host_handler_unregister(bcmolt_devid devid)
+{
+	host_handler_array[devid] = NULL;
+}
diff --git a/bcm68620_release/release/host_driver/coop_dba/bcmolt_coop_dba.h b/bcm68620_release/release/host_driver/coop_dba/bcmolt_coop_dba.h
new file mode 100644
index 0000000..83ca4ec
--- /dev/null
+++ b/bcm68620_release/release/host_driver/coop_dba/bcmolt_coop_dba.h
@@ -0,0 +1,49 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#ifndef _BCMOLT_COOP_DBA_H_
+#define _BCMOLT_COOP_DBA_H_
+
+#include <bcmolt_msg.h>
+#include <bcm_common_gpon_fast.h>
+#include <bcmolt_tr_mux.h>
+
+#define BCMOLT_COOP_DBA_HARDQ_SIZE 4
+#define BCMOLT_COOP_DBA_SOFTQ_SIZE 0
+
+typedef bcmos_errno (*bcmolt_coop_dba_host_handler_cb)(bcmolt_devid device, bcm_common_fast_get_stats_ind *data);
+
+bcmos_errno bcmolt_fast_oper_set_allocs(bcmolt_devid device, uint8_t pon_ni, bcm_common_fast_set_allocs_msg *msg);
+bcmos_errno bcmolt_fast_oper_set_accesses(bcmolt_devid device, uint8_t pon_ni, bcm_common_fast_set_accesses_msg *msg);
+void bcmolt_coop_dba_exit(bcmolt_devid devid, bcmtrmux_channel channel);
+bcmos_errno bcmolt_coop_dba_init(bcmolt_devid devid, bcmtrmux_channel *channel, f_bcmtr_rx_handler rx_handler, void *data);
+void bcmolt_coop_dba_host_handler_register(bcmolt_devid devid, bcmolt_coop_dba_host_handler_cb host_handler);
+void bcmolt_coop_dba_host_handler_unregister(bcmolt_devid devid);
+void bcmolt_coop_dba_rx(bcmolt_devid device, bcmos_buf *sysb, bcmtrmux_channel channel, void *data);
+#endif
diff --git a/bcm68620_release/release/host_driver/debug/Makefile b/bcm68620_release/release/host_driver/debug/Makefile
new file mode 100644
index 0000000..0e6e3e6
--- /dev/null
+++ b/bcm68620_release/release/host_driver/debug/Makefile
@@ -0,0 +1,10 @@
+# Common debug API
+#
+MOD_NAME = debug_common
+MOD_DEPS = os dev_log utils model transport common_api
+MOD_TYPE = lib
+
+srcs = bcmolt_debug_api_common.c
+
+USE_LINT=yes
+
diff --git a/bcm68620_release/release/host_driver/debug/bcmolt_debug_api_common.c b/bcm68620_release/release/host_driver/debug/bcmolt_debug_api_common.c
new file mode 100644
index 0000000..4fb6bcf
--- /dev/null
+++ b/bcm68620_release/release/host_driver/debug/bcmolt_debug_api_common.c
@@ -0,0 +1,327 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#include "bcmos_system.h"
+#include "bcmolt_math.h"
+#include "bcmtr_debug.h"
+#include "bcmolt_msg.h"
+#include "bcmolt_debug_api_common.h"
+
+#define API_CFG_PROP_EXISTS(mask, prop)  (((mask) & (1ULL << (prop))) != 0)
+
+static void bcmolt_debug_api_common_capture_stats_update(bcmolt_devid device, bcmolt_debug_api_db *db)
+{
+    bcmos_errno err;
+    bcmtr_capture_info info;
+
+    err = bcmtr_capture_info_get(device, &info);
+    BUG_ON(BCM_ERR_OK != err);
+
+    db->cfg.api_capture_stats.buffer_used_bytes = info.used;
+    db->cfg.api_capture_stats.events_recorded = info.msgs;
+    db->cfg.api_capture_stats.events_dropped = info.lost;
+    db->cfg.api_capture_stats.buffer_wrap_count = info.wa;
+
+    err = bcmtr_capture_size_get(device, &db->cfg.api_capture_stats.readable_bytes);
+    BUG_ON(BCM_ERR_OK != err);
+}
+
+static bcmos_errno bcmolt_debug_api_common_capture_init(bcmolt_devid device, bcmolt_debug_api_db *db)
+{
+    bcmos_errno err;
+    bcmtr_capture_parm cap_parm = {};
+
+    cap_parm.size = db->cfg.api_capture_cfg.buffer_size_bytes;
+    cap_parm.ptr = db->capture_buffer;
+    cap_parm.stop_on_full = db->cfg.api_capture_cfg.buffer_mode == BCMOLT_API_CAPTURE_BUFFER_MODE_OVERFLOW;
+    cap_parm.activate = BCMOS_FALSE;
+
+    err = bcmtr_capture_init(device, &cap_parm);
+    BCMOS_CHECK_RETURN_ERROR(BCM_ERR_OK != err, err);
+
+    bcmolt_debug_api_common_capture_stats_update(device, db);
+    return BCM_ERR_OK;
+}
+
+bcmos_errno bcmolt_debug_api_common_get(bcmolt_devid device, bcmolt_msg *msg, bcmolt_debug_api_db *db)
+{
+    if (API_CFG_PROP_EXISTS(msg->presence_mask, BCMOLT_DEBUG_CFG_ID_API_CAPTURE_BUFFER))
+    {
+        uint32_t to_read = 0;
+
+        if (bcmtr_capture_is_active(device))
+        {
+            return bcmolt_msg_err(
+                msg,
+                DEV_LOG_INVALID_ID,
+                BCM_ERR_STATE,
+                BCMOLT_DEBUG_CFG_ID_API_CAPTURE_BUFFER,
+                "Cannot read capture buffer while capture is in progress");
+        }
+
+        if (db->cfg.api_capture_buffer_read.offset < db->cfg.api_capture_stats.readable_bytes)
+        {
+            to_read = MIN(
+                db->cfg.api_capture_buffer.len,
+                db->cfg.api_capture_stats.readable_bytes - db->cfg.api_capture_buffer_read.offset);
+        }
+        if ((db->cfg.api_capture_buffer.val != NULL) && (db->cfg.api_capture_buffer.len > 0))
+        {
+            bcmtr_capture_read(
+                device,
+                db->cfg.api_capture_buffer.val,
+                db->cfg.api_capture_buffer_read.offset,
+                &to_read);
+            memset(db->cfg.api_capture_buffer.val + (db->cfg.api_capture_buffer.len - to_read), 0, to_read);
+        }
+    }
+
+    return BCM_ERR_OK;
+}
+
+debug_trans_handle *bcmolt_debug_api_common_cfg_trans_start(bcmolt_debug_api_db *db)
+{
+    debug_trans_handle *handle = bcmos_calloc(sizeof(*handle));
+    handle->old_db = *db;
+    handle->new_db = db;
+    return handle;
+}
+
+void bcmolt_debug_api_common_cfg_trans_fail(bcmolt_debug_api_db *db, debug_trans_handle *handle)
+{
+    if (handle->old_db.capture_buffer != handle->new_db->capture_buffer)
+    {
+        bcmos_free(handle->new_db->capture_buffer);
+    }
+    if (handle->old_db.cfg.api_capture_buffer.val != handle->new_db->cfg.api_capture_buffer.val)
+    {
+        bcmos_free(handle->new_db->cfg.api_capture_buffer.val);
+    }
+    *db = handle->old_db;
+    bcmos_free(handle);
+}
+
+void bcmolt_debug_api_common_cfg_trans_succeed(bcmolt_devid device, debug_trans_handle *handle)
+{
+    bcmos_errno err;
+
+    if (handle->old_db.capture_buffer != handle->new_db->capture_buffer)
+    {
+        bcmos_free(handle->old_db.capture_buffer);
+        bcmtr_capture_destroy(device);
+        err = bcmolt_debug_api_common_capture_init(device, handle->new_db);
+        if (BCM_ERR_OK != err) /* cfg_set should have validated that this won't fail */
+        {
+            BCMOS_TRACE_ERR("Capture init failed (%s)!\n", bcmos_strerror(err));
+        }
+    }
+    if (handle->old_db.cfg.api_capture_buffer.val != handle->new_db->cfg.api_capture_buffer.val)
+    {
+        bcmos_free(handle->old_db.cfg.api_capture_buffer.val);
+    }
+    bcmos_free(handle);
+}
+
+bcmos_errno bcmolt_debug_api_common_set(
+    bcmolt_devid device,
+    bcmolt_msg *msg,
+    const bcmolt_debug_cfg_data *data,
+    debug_trans_handle *handle,
+    bcmolt_api_capture_location local)
+{
+    if (API_CFG_PROP_EXISTS(msg->presence_mask, BCMOLT_DEBUG_CFG_ID_API_CAPTURE_CFG))
+    {
+        if (bcmtr_capture_is_active(device))
+        {
+            return bcmolt_msg_err(
+                msg,
+                DEV_LOG_INVALID_ID,
+                BCM_ERR_STATE,
+                BCMOLT_DEBUG_CFG_ID_API_CAPTURE_CFG,
+                "Cannot change capture configuration while capture is in progress");
+        }
+        handle->new_db->cfg.api_capture_cfg = data->api_capture_cfg;
+    }
+
+    if (API_CFG_PROP_EXISTS(msg->presence_mask, BCMOLT_DEBUG_CFG_ID_API_CAPTURE_BUFFER_READ))
+    {
+        handle->new_db->cfg.api_capture_buffer_read = data->api_capture_buffer_read;
+    }
+
+    /* Once all the properties are handled, we need to take care of a few things that could depend on multiple
+       properties */
+    if ((handle->new_db->cfg.api_capture_cfg.location == local) &&
+        /* If we just switched to the device ... */
+        ((handle->new_db->cfg.api_capture_cfg.location != handle->old_db.cfg.api_capture_cfg.location) ||
+         /* ... or either the buffer size ... */
+        (handle->new_db->cfg.api_capture_cfg.buffer_size_bytes !=
+         handle->old_db.cfg.api_capture_cfg.buffer_size_bytes) ||
+         /* ... or the buffer mode have changed */
+        (handle->new_db->cfg.api_capture_cfg.buffer_mode != handle->old_db.cfg.api_capture_cfg.buffer_mode)))
+    {
+        handle->new_db->capture_buffer = bcmos_alloc(handle->new_db->cfg.api_capture_cfg.buffer_size_bytes);
+        if (handle->new_db->capture_buffer == NULL)
+        {
+            return bcmolt_msg_err(
+                msg,
+                DEV_LOG_INVALID_ID,
+                BCM_ERR_NOMEM,
+                BCMOLT_DEBUG_CFG_ID_API_CAPTURE_BUFFER_READ,
+                "Failed to allocate new capture buffer");
+        }
+    }
+
+    if ((handle->new_db->cfg.api_capture_cfg.location == local) &&
+        /* If we just switched to the device ... */
+        ((handle->new_db->cfg.api_capture_cfg.location != handle->old_db.cfg.api_capture_cfg.location) ||
+         /* ... or the read size has changed */
+        (handle->old_db.cfg.api_capture_buffer_read.size != handle->new_db->cfg.api_capture_buffer_read.size)))
+    {
+        handle->new_db->cfg.api_capture_buffer.len = handle->new_db->cfg.api_capture_buffer_read.size;
+        if (handle->new_db->cfg.api_capture_buffer.len != 0)
+        {
+            handle->new_db->cfg.api_capture_buffer.val = bcmos_alloc(handle->new_db->cfg.api_capture_buffer_read.size);
+            if (handle->new_db->cfg.api_capture_buffer.val == NULL)
+            {
+                return bcmolt_msg_err(
+                    msg,
+                    DEV_LOG_INVALID_ID,
+                    BCM_ERR_NOMEM,
+                    BCMOLT_DEBUG_CFG_ID_API_CAPTURE_BUFFER_READ,
+                    "Failed to allocate new read buffer");
+            }
+        }
+        else
+        {
+            handle->new_db->cfg.api_capture_buffer.val = NULL;
+        }
+    }
+
+    return BCM_ERR_OK;
+}
+
+bcmos_errno bcmolt_debug_api_common_oper_start_api_capture(bcmolt_devid device, bcmolt_msg *msg)
+{
+    bcmos_errno err;
+    bcmtr_cld_filter filter;
+
+    if (bcmtr_capture_is_active(device))
+    {
+        return bcmolt_msg_err(
+            msg,
+            DEV_LOG_INVALID_ID,
+            BCM_ERR_ALREADY,
+            BCMOLT_ERR_FIELD_NONE,
+            "Capture already in progress");
+    }
+
+    /* capture everything */
+    filter.object = BCMOLT_OBJECT_ANY;
+    filter.group = BCMOLT_MGT_GROUP_ANY;
+    filter.subgroup = BCMOLT_SUBGROUP_ANY;
+    err = bcmtr_cld_level_set(device, &filter, BCMTR_CLD_CAPTURE);
+    BCMOS_CHECK_RETURN_ERROR(BCM_ERR_OK != err, err);
+    /* for now filter out start/stop operations and keep-alives */
+    filter.object = BCMOLT_OBJ_ID_DEBUG;
+    filter.group = BCMOLT_MGT_GROUP_OPER;
+    filter.subgroup = BCMOLT_DEBUG_OPER_ID_START_API_CAPTURE; /*lint !e633 */
+    err = bcmtr_cld_level_set(device, &filter, BCMTR_CLD_NONE);
+    BCMOS_CHECK_RETURN_ERROR(BCM_ERR_OK != err, err);
+    filter.subgroup = BCMOLT_DEBUG_OPER_ID_STOP_API_CAPTURE;  /*lint !e633 */
+    err = bcmtr_cld_level_set(device, &filter, BCMTR_CLD_NONE);
+    BCMOS_CHECK_RETURN_ERROR(BCM_ERR_OK != err, err);
+    filter.object = BCMOLT_OBJ_ID_DEVICE;
+    filter.group = BCMOLT_MGT_GROUP_OPER;
+    filter.subgroup = BCMOLT_DEVICE_OPER_ID_HOST_KEEP_ALIVE;  /*lint !e633 */
+    err = bcmtr_cld_level_set(device, &filter, BCMTR_CLD_NONE);
+    BCMOS_CHECK_RETURN_ERROR(BCM_ERR_OK != err, err);
+    filter.group = BCMOLT_MGT_GROUP_AUTO;
+    filter.subgroup = BCMOLT_DEVICE_AUTO_ID_DEVICE_KEEP_ALIVE;  /*lint !e633 */
+    err = bcmtr_cld_level_set(device, &filter, BCMTR_CLD_NONE);
+    BCMOS_CHECK_RETURN_ERROR(BCM_ERR_OK != err, err);
+
+    return bcmtr_capture_start_stop(device, BCMOS_TRUE);
+}
+
+bcmos_errno bcmolt_debug_api_common_oper_stop_api_capture(bcmolt_devid device, bcmolt_msg *msg, bcmolt_debug_api_db *db)
+{
+    bcmos_errno err;
+
+    if (!bcmtr_capture_is_active(device))
+    {
+        return bcmolt_msg_err(
+            msg,
+            DEV_LOG_INVALID_ID,
+            BCM_ERR_ALREADY,
+            BCMOLT_ERR_FIELD_NONE,
+            "No capture in progress");
+    }
+
+    err = bcmtr_capture_start_stop(device, BCMOS_FALSE);
+    BCMOS_CHECK_RETURN_ERROR(BCM_ERR_OK != err, err);
+
+    bcmolt_debug_api_common_capture_stats_update(device, db);
+
+    return BCM_ERR_OK;
+}
+
+bcmos_errno bcmolt_debug_api_common_oper_reset_api_capture(bcmolt_devid device, bcmolt_msg *msg, bcmolt_debug_api_db *db)
+{
+    bcmos_errno err;
+
+    if (bcmtr_capture_is_active(device))
+    {
+        return bcmolt_msg_err(
+            msg,
+            DEV_LOG_INVALID_ID,
+            BCM_ERR_STATE,
+            BCMOLT_ERR_FIELD_NONE,
+            "Cannot reset capture while capture is running");
+    }
+
+    bcmtr_capture_destroy(device);
+    err = bcmolt_debug_api_common_capture_init(device, db);
+
+    return err;
+}
+
+void bcmolt_debug_api_common_init(bcmolt_devid device, bcmolt_debug_api_db *db)
+{
+    bcmos_errno err;
+
+#if ENABLE_LOG
+    db->log_id = bcm_dev_log_id_register("mh_debug", DEV_LOG_LEVEL_INFO, DEV_LOG_ID_TYPE_BOTH);
+#endif
+
+    bcmolt_debug_cfg_data_set_default(&db->cfg, BCMOLT_PRESENCE_MASK_ALL);
+    db->capture_buffer = bcmos_alloc(db->cfg.api_capture_cfg.buffer_size_bytes);
+    err = bcmolt_debug_api_common_capture_init(device, db);
+    BUG_ON(BCM_ERR_OK != err);
+}
+
diff --git a/bcm68620_release/release/host_driver/debug/bcmolt_debug_api_common.h b/bcm68620_release/release/host_driver/debug/bcmolt_debug_api_common.h
new file mode 100644
index 0000000..a1f28ab
--- /dev/null
+++ b/bcm68620_release/release/host_driver/debug/bcmolt_debug_api_common.h
@@ -0,0 +1,73 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#ifndef BCMOLT_DEBUG_API_COMMON_H_
+#define BCMOLT_DEBUG_API_COMMON_H_
+
+#include "bcmolt_model_types.h"
+#include "bcm_dev_log.h"
+
+typedef struct
+{
+    bcmolt_debug_cfg_data cfg;
+    uint8_t *capture_buffer;
+    dev_log_id log_id;
+} bcmolt_debug_api_db;
+
+typedef struct
+{
+    bcmolt_debug_api_db old_db;
+    bcmolt_debug_api_db *new_db;
+} debug_trans_handle;
+
+bcmos_errno bcmolt_debug_api_common_get(bcmolt_devid device, bcmolt_msg *msg, bcmolt_debug_api_db *db);
+
+debug_trans_handle *bcmolt_debug_api_common_cfg_trans_start(bcmolt_debug_api_db *db);
+
+void bcmolt_debug_api_common_cfg_trans_fail(bcmolt_debug_api_db *db, debug_trans_handle *handle);
+
+void bcmolt_debug_api_common_cfg_trans_succeed(bcmolt_devid device, debug_trans_handle *handle);
+
+bcmos_errno bcmolt_debug_api_common_set(
+    bcmolt_devid device,
+    bcmolt_msg *msg,
+    const bcmolt_debug_cfg_data *data,
+    debug_trans_handle *handle,
+    bcmolt_api_capture_location local);
+
+bcmos_errno bcmolt_debug_api_common_oper_start_api_capture(bcmolt_devid device, bcmolt_msg *msg);
+
+bcmos_errno bcmolt_debug_api_common_oper_stop_api_capture(bcmolt_devid device, bcmolt_msg *msg, bcmolt_debug_api_db *db);
+
+bcmos_errno bcmolt_debug_api_common_oper_reset_api_capture(bcmolt_devid device, bcmolt_msg *msg, bcmolt_debug_api_db *db);
+
+void bcmolt_debug_api_common_init(bcmolt_devid device, bcmolt_debug_api_db *db);
+
+#endif /* BCMOLT_DEBUG_API_COMMON_H_ */
+
diff --git a/bcm68620_release/release/host_driver/dev_ctrl/Makefile b/bcm68620_release/release/host_driver/dev_ctrl/Makefile
new file mode 100644
index 0000000..24f149b
--- /dev/null
+++ b/bcm68620_release/release/host_driver/dev_ctrl/Makefile
@@ -0,0 +1,24 @@
+# Device control driver
+MOD_NAME = dev_ctrl
+MOD_DEPS = trmux keep_alive fld ll_pcie debug_common
+MOD_INC_DIRS = $(SRC_DIR)
+
+ifeq ("$(RELEASE_BUILD)", "y")
+    MOD_INC_DIRS += host_driver/sw_version host_driver/sw_error host_driver/mh_utils
+else
+    MOD_INC_DIRS += host/sw_version $(TOP_DIR)/common/sw_error $(TOP_DIR)/common/mh_utils
+endif
+
+ifeq ("$(OS_KERNEL)", "linux")
+MOD_TYPE = linux_lib
+else
+MOD_TYPE = lib
+endif
+
+srcs = bcmolt_dev_ctrl.c bcmolt_debug_ctrl.c
+
+# If called by linux kernel builder - add include paths manually.
+# It is not elegant, but we'll not have many linux modules
+ifneq ("$(KBUILD_SRC)", "")
+	-include $(OUT_DIR_BASE)/Makefile.config.$(MOD_NAME)
+endif
diff --git a/bcm68620_release/release/host_driver/dev_ctrl/bcmolt_debug_ctrl.c b/bcm68620_release/release/host_driver/dev_ctrl/bcmolt_debug_ctrl.c
new file mode 100644
index 0000000..45764cb
--- /dev/null
+++ b/bcm68620_release/release/host_driver/dev_ctrl/bcmolt_debug_ctrl.c
@@ -0,0 +1,469 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#define HOST_API_CAPTURE 0
+
+#include "bcmos_system.h"
+#include "bcmolt_api.h"
+#include "bcmolt_msg.h"
+#include "bcmolt_tr_mux.h"
+#if HOST_API_CAPTURE
+#include "bcmolt_debug_api_common.h"
+#endif
+#include "bcmolt_dev_ctrl.h"
+#include "bcmolt_debug_ctrl.h"
+
+#define API_CAPTURE_PROP_MASK\
+    ((1ULL << BCMOLT_DEBUG_CFG_ID_API_CAPTURE_CFG) |\
+     (1ULL << BCMOLT_DEBUG_CFG_ID_API_CAPTURE_STATS) |\
+     (1ULL << BCMOLT_DEBUG_CFG_ID_API_CAPTURE_BUFFER_READ) |\
+     (1ULL << BCMOLT_DEBUG_CFG_ID_API_CAPTURE_BUFFER))
+
+typedef struct
+{
+    bcmos_bool waiting_for_ack;
+    bcmolt_msg *last_message;
+    bcmos_timer ack_timeout;
+#if HOST_API_CAPTURE
+    bcmolt_debug_api_db db;
+    debug_trans_handle *handle;
+#endif
+} debug_ctrl_ctxt;
+
+static debug_ctrl_ctxt debug_ctrl[BCMTR_MAX_OLTS];
+
+static void send_to_host(bcmolt_devid device, bcmolt_msg *msg)
+{
+    msg->dir = BCMOLT_MSG_DIR_RESPONSE;
+    bcmtrmux_control_to_host(device, msg);
+    bcmolt_msg_free(msg);
+}
+
+static void send_to_device(bcmolt_devid device, bcmolt_msg *msg)
+{
+    debug_ctrl[device].waiting_for_ack = BCMOS_TRUE;
+    debug_ctrl[device].last_message = msg;
+    bcmtrmux_control_to_line(device, msg);
+    bcmos_timer_start(&debug_ctrl[device].ack_timeout, DEVICE_RESPONSE_TIMEOUT_LENGTH);
+}
+
+static bcmos_bool bcmolt_debug_ctrl_cfg_requires_connection(bcmolt_msg *msg, const bcmolt_debug_cfg_data *cfg)
+{
+    return (((msg->presence_mask & ~API_CAPTURE_PROP_MASK) != 0) || /* includes non-API capture elements, or ... */
+            (((msg->presence_mask & API_CAPTURE_PROP_MASK) != 0) && /* includes API captue elements and ... */
+             (cfg->api_capture_cfg.location == BCMOLT_API_CAPTURE_LOCATION_DEVICE))); /* capture location is device */
+}
+
+static void bcmolt_debug_ctrl_send_cfg_get_response(bcmolt_devid device, bcmolt_msg *msg)
+{
+#if HOST_API_CAPTURE
+    if (debug_ctrl[device].db.cfg.api_capture_cfg.location == BCMOLT_API_CAPTURE_LOCATION_HOST)
+    {
+        bcmolt_debug_api_common_get(device, msg, &debug_ctrl[device].db);
+    }
+#endif
+    send_to_host(device, msg);
+}
+
+static void bcmolt_debug_ctrl_handle_cfg_get(bcmolt_devid device, bcmolt_msg *msg, bcmos_bool connected)
+{
+#if HOST_API_CAPTURE
+    if (bcmolt_debug_ctrl_cfg_requires_connection(msg, &debug_ctrl[device].db.cfg))
+#endif
+    {
+        if (connected)
+        {
+            send_to_device(device, msg);
+            return;
+        }
+
+        bcmolt_msg_err(
+            msg,
+            DEV_LOG_INVALID_ID,
+            BCM_ERR_NOT_CONNECTED,
+            BCMOLT_ERR_FIELD_NONE,
+            "Cannot access embedded parameters while disconnected");
+    }
+
+    bcmolt_debug_ctrl_send_cfg_get_response(device, msg);
+}
+
+static void bcmolt_debug_ctrl_send_cfg_set_response(bcmolt_devid device, bcmolt_msg *msg)
+{
+#if HOST_API_CAPTURE
+    if (msg->err == BCM_ERR_OK)
+    {
+        bcmolt_debug_api_common_cfg_trans_succeed(device, debug_ctrl[device].handle);
+    }
+    else
+    {
+        bcmolt_debug_api_common_cfg_trans_fail(&debug_ctrl[device].db, debug_ctrl[device].handle);
+    }
+#endif
+
+    send_to_host(device, msg);
+}
+
+static void bcmolt_debug_ctrl_handle_cfg_set(bcmolt_devid device, bcmolt_msg *msg, bcmos_bool connected)
+{
+    bcmolt_debug_cfg *cfg = (bcmolt_debug_cfg*)msg;
+    bcmolt_debug_cfg_id prop_id;
+    bcmos_errno err;
+
+    if (!bcmolt_debug_cfg_data_bounds_check(&cfg->data, msg->presence_mask, &prop_id))
+    {
+        err = BCM_ERR_RANGE;
+        msg->err_field_idx = (uint16_t)prop_id;
+        send_to_host(device, msg);
+        return;
+    }
+
+#if HOST_API_CAPTURE
+    debug_ctrl[device].handle = bcmolt_debug_api_common_cfg_trans_start(&debug_ctrl[device].db);
+    err = bcmolt_debug_api_common_set(device, msg, &cfg->data, debug_ctrl[device].handle, BCMOLT_API_CAPTURE_LOCATION_HOST);
+#else
+    if (BCMOLT_CFG_PROP_IS_SET(cfg, debug, api_capture_cfg) &&
+        (cfg->data.api_capture_cfg.location == BCMOLT_API_CAPTURE_LOCATION_HOST))
+    {
+        err = bcmolt_msg_err(
+            msg,
+            DEV_LOG_INVALID_ID,
+            BCM_ERR_NOT_SUPPORTED,
+            BCMOLT_ERR_FIELD_NONE,
+            "Host API capture not supported yet");
+    }
+    else
+    {
+        err = BCM_ERR_OK;
+    }
+#endif
+    if (err == BCM_ERR_OK)
+    {
+        if (bcmolt_debug_ctrl_cfg_requires_connection(msg, &cfg->data))
+        {
+            if (connected)
+            {
+                send_to_device(device, msg);
+                return;
+            }
+
+            bcmolt_msg_err(
+                msg,
+                DEV_LOG_INVALID_ID,
+                BCM_ERR_NOT_CONNECTED,
+                BCMOLT_ERR_FIELD_NONE,
+                "Cannot access embedded parameters while disconnected");
+        }
+    }
+
+    bcmolt_debug_ctrl_send_cfg_set_response(device, msg);
+}
+
+static void bcmolt_debug_ctrl_handle_cfg_clear(bcmolt_devid device, bcmolt_msg *msg, bcmos_bool connected)
+{
+#if HOST_API_CAPTURE
+    bcmolt_debug_cfg *cfg = (bcmolt_debug_cfg*)msg;
+#endif
+    bcmos_errno err;
+
+    if (!connected)
+    {
+        bcmolt_msg_err(
+            msg,
+            DEV_LOG_INVALID_ID,
+            BCM_ERR_NOT_CONNECTED,
+            BCMOLT_ERR_FIELD_NONE,
+            "Cannot access embedded parameters while disconnected");
+        send_to_host(device, msg);
+        return;
+    }
+
+#if HOST_API_CAPTURE
+    debug_ctrl[device].handle = bcmolt_debug_api_common_cfg_trans_start(&debug_ctrl[device].db);
+    bcmolt_debug_cfg_data_set_default(&debug_ctrl[device].db.cfg, BCMOLT_PRESENCE_MASK_ALL);
+    msg->presence_mask = BCMOLT_PRESENCE_MASK_ALL;
+    err = bcmolt_debug_api_common_set(device, msg, &cfg->data, debug_ctrl[device].handle, BCMOLT_API_CAPTURE_LOCATION_HOST);
+#else
+    err = BCM_ERR_OK;
+#endif
+    if (err == BCM_ERR_OK)
+    {
+        send_to_device(device, msg);
+    }
+    else
+    {
+        bcmolt_debug_ctrl_send_cfg_set_response(device, msg);
+    }
+}
+
+static void bcmolt_debug_ctrl_handle_cfg(bcmolt_devid device, bcmolt_msg *msg, bcmos_bool connected)
+{
+    switch (msg->type)
+    {
+        case BCMOLT_MSG_TYPE_GET:
+            bcmolt_debug_ctrl_handle_cfg_get(device, msg, connected);
+            break;
+        case BCMOLT_MSG_TYPE_SET:
+            bcmolt_debug_ctrl_handle_cfg_set(device, msg, connected);
+            break;
+        case BCMOLT_MSG_TYPE_CLEAR:
+            bcmolt_debug_ctrl_handle_cfg_clear(device, msg, connected);
+            break;
+        default:
+            bcmolt_msg_err(
+                msg,
+                DEV_LOG_INVALID_ID,
+                BCM_ERR_NOT_SUPPORTED,
+                BCMOLT_ERR_FIELD_NONE,
+                "Unsupported message type (%u)",
+                msg->type);
+            send_to_host(device, msg);
+            break;
+    }
+}
+
+static void bcmolt_debug_ctrl_handle_oper(bcmolt_devid device, bcmolt_msg *msg, bcmos_bool connected)
+{
+#if HOST_API_CAPTURE
+    bcmos_bool host_api_capture =
+        (debug_ctrl[device].db.cfg.api_capture_cfg.location == BCMOLT_API_CAPTURE_LOCATION_HOST);
+
+    switch (msg->subgroup)
+    {
+        case BCMOLT_DEBUG_OPER_ID_START_API_CAPTURE:
+            if (host_api_capture)
+            {
+                msg->err = bcmolt_debug_api_common_oper_start_api_capture(device, msg);
+                send_to_host(device, msg);
+                return;
+            }
+            break;
+        case BCMOLT_DEBUG_OPER_ID_STOP_API_CAPTURE:
+            if (host_api_capture)
+            {
+                msg->err = bcmolt_debug_api_common_oper_stop_api_capture(device, msg, &debug_ctrl[device].db);
+                send_to_host(device, msg);
+                return;
+            }
+            break;
+        case BCMOLT_DEBUG_OPER_ID_RESET_API_CAPTURE:
+            if (host_api_capture)
+            {
+                msg->err = bcmolt_debug_api_common_oper_reset_api_capture(device, msg, &debug_ctrl[device].db);
+                send_to_host(device, msg);
+                return;
+            }
+            break;
+        default:
+            break;
+    }
+#endif
+
+    if (!connected)
+    {
+        bcmolt_msg_err(
+            msg,
+            DEV_LOG_INVALID_ID,
+            BCM_ERR_NOT_CONNECTED,
+            BCMOLT_ERR_FIELD_NONE,
+            "Cannot perform embedded operations while disconnected");
+        send_to_host(device, msg);
+        return;
+    }
+
+    send_to_device(device, msg);
+}
+
+static void bcmolt_debug_ctrl_handle_auto_cfg(bcmolt_devid device, bcmolt_msg *msg, bcmos_bool connected)
+{
+    if (!connected)
+    {
+        bcmolt_msg_err(
+            msg,
+            DEV_LOG_INVALID_ID,
+            BCM_ERR_NOT_CONNECTED,
+            BCMOLT_ERR_FIELD_NONE,
+            "Cannot access embedded parameters while disconnected");
+        send_to_host(device, msg);
+        return;
+    }
+
+    send_to_device(device, msg);
+}
+
+static void bcmolt_debug_ctrl_handle_request(bcmolt_devid device, bcmolt_msg *msg, bcmos_bool connected)
+{
+    if (debug_ctrl[device].waiting_for_ack)
+    {
+        bcmolt_msg_err(
+            msg,
+            DEV_LOG_INVALID_ID,
+            BCM_ERR_TOO_MANY_REQS,
+            BCMOLT_ERR_FIELD_NONE,
+            "Transaction in progress on debug object");
+        send_to_host(device, msg);
+        return;
+    }
+
+    switch (msg->group)
+    {
+        case BCMOLT_MGT_GROUP_CFG:
+            bcmolt_debug_ctrl_handle_cfg(device, msg, connected);
+            break;
+        case BCMOLT_MGT_GROUP_OPER:
+            bcmolt_debug_ctrl_handle_oper(device, msg, connected);
+            break;
+        case BCMOLT_MGT_GROUP_AUTO_CFG:
+            bcmolt_debug_ctrl_handle_auto_cfg(device, msg, connected);
+            break;
+        default:
+            bcmolt_msg_err(
+                msg,
+                DEV_LOG_INVALID_ID,
+                BCM_ERR_NOT_SUPPORTED,
+                BCMOLT_ERR_FIELD_NONE,
+                "Unsupported group (%u)",
+                msg->group);
+            send_to_host(device, msg);
+            break;
+    }
+}
+
+static void bcmolt_debug_ctrl_handle_response(bcmolt_devid device, bcmolt_msg *msg)
+{
+    if (!debug_ctrl[device].waiting_for_ack || (msg->corr_tag != debug_ctrl[device].last_message->corr_tag))
+    {
+        msg->subch = BCMTRMUX_CHANNEL_AUTO_PROXY;
+        send_to_host(device, msg);
+        return;
+    }
+
+    msg->subch = debug_ctrl[device].last_message->subch;
+    bcmos_timer_stop(&debug_ctrl[device].ack_timeout);
+    debug_ctrl[device].waiting_for_ack = BCMOS_FALSE;
+    bcmolt_msg_free(debug_ctrl[device].last_message);
+
+    if (msg->err != BCM_ERR_OK)
+    {
+        send_to_host(device, msg);
+        return;
+    }
+
+    switch (msg->group)
+    {
+        case BCMOLT_MGT_GROUP_CFG:
+            switch (msg->type)
+            {
+                case BCMOLT_MSG_TYPE_GET:
+                    bcmolt_debug_ctrl_send_cfg_get_response(device, msg);
+                    break;
+                case BCMOLT_MSG_TYPE_SET:
+                    bcmolt_debug_ctrl_send_cfg_set_response(device, msg);
+                    break;
+                case BCMOLT_MSG_TYPE_CLEAR:
+                    bcmolt_debug_ctrl_send_cfg_set_response(device, msg);
+                    break;
+                default:
+                    BCMOS_TRACE_ERR("Got unexpected response type (%u) from embedded\n", msg->group);
+                    send_to_host(device, msg);
+                    break;
+            }
+            break;
+        case BCMOLT_MGT_GROUP_OPER:
+        case BCMOLT_MGT_GROUP_AUTO_CFG:
+            send_to_host(device, msg);
+            break;
+        default:
+            BCMOS_TRACE_ERR("Got unexpected response group (%u) from embedded\n", msg->group);
+            send_to_host(device, msg);
+            break;
+    }
+}
+
+static bcmos_timer_rc bcmolt_debug_ctrl_handle_ack_timeout(bcmos_timer *timer, long data)
+{
+    bcmolt_devid device = (bcmolt_devid)data;
+
+    if (debug_ctrl[device].last_message == NULL)
+    {
+        BCMOS_TRACE_ERR("Waiting with no message!\n");
+        return BCMOS_TIMER_OK;
+    }
+
+    bcmolt_msg_err(
+        debug_ctrl[device].last_message,
+        DEV_LOG_INVALID_ID,
+        BCM_ERR_INTERNAL,
+        BCMOLT_ERR_FIELD_NONE,
+        "Did not receive response from embedded");
+    send_to_host(device, debug_ctrl [device].last_message);
+
+    return BCMOS_TIMER_OK;
+}
+
+void bcmolt_debug_ctrl_process_msg(bcmolt_devid device, bcmolt_msg *msg, bcmos_bool connected)
+{
+    switch (msg->dir)
+    {
+        case BCMOLT_MSG_DIR_REQUEST:
+            bcmolt_debug_ctrl_handle_request(device, msg, connected);
+            break;
+        case BCMOLT_MSG_DIR_RESPONSE:
+            bcmolt_debug_ctrl_handle_response(device, msg);
+            break;
+        default:
+            BCMOS_TRACE_ERR("Unsupported direction: %u\n", msg->dir);
+            bcmolt_msg_free(msg);
+            break;
+    }
+}
+
+void bcmolt_debug_ctrl_init(void)
+{
+    bcmolt_devid i;
+
+    for (i = 0; i < BCMTR_MAX_OLTS; i++)
+    {
+        bcmos_timer_parm tp =
+        {
+            .name = "debug_ctrl_ack_timeout",
+            .owner = BCMOS_MODULE_ID_DEV_CTRL_DEV0 + i,
+            .periodic = BCMOS_FALSE,
+            .handler = bcmolt_debug_ctrl_handle_ack_timeout,
+            .data = (long)i,
+            .flags = BCMOS_TIMER_PARM_FLAGS_URGENT,
+        };
+
+        debug_ctrl[i].waiting_for_ack = BCMOS_FALSE;
+        bcmos_timer_create(&debug_ctrl[i].ack_timeout, &tp);
+#if HOST_API_CAPTURE
+        bcmolt_debug_api_common_init(i, &debug_ctrl[i].db);
+#endif
+    }
+}
diff --git a/bcm68620_release/release/host_driver/dev_ctrl/bcmolt_debug_ctrl.h b/bcm68620_release/release/host_driver/dev_ctrl/bcmolt_debug_ctrl.h
new file mode 100644
index 0000000..43991e9
--- /dev/null
+++ b/bcm68620_release/release/host_driver/dev_ctrl/bcmolt_debug_ctrl.h
@@ -0,0 +1,41 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#ifndef _BCMOLT_DEBUG_CTRL_H_
+#define _BCMOLT_DEBUG_CTRL_H_
+
+#include "bcmos_system.h"
+#include "bcmolt_msg.h"
+
+void bcmolt_debug_ctrl_process_msg(bcmolt_devid device, bcmolt_msg *msg, bcmos_bool connected);
+
+void bcmolt_debug_ctrl_init(void);
+
+#endif /* _BCMOLT_DEBUG_CTRL_H_ */
+
diff --git a/bcm68620_release/release/host_driver/dev_ctrl/bcmolt_dev_ctrl.c b/bcm68620_release/release/host_driver/dev_ctrl/bcmolt_dev_ctrl.c
new file mode 100644
index 0000000..2ddfa8d
--- /dev/null
+++ b/bcm68620_release/release/host_driver/dev_ctrl/bcmolt_dev_ctrl.c
@@ -0,0 +1,3158 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#include <bcmos_system.h>
+#include <bcm_config.h>
+#include <bcmolt_msg.h>
+#include <bcmolt_tr_mux.h>
+#include <bcmolt_api.h>
+#include <bcmolt_model_types.h>
+#include <bcmolt_model_ids.h>
+#include <bcmolt_host_sw_version.h>
+#include <bcmolt_model_revision.h>
+#include "bcmolt_dev_ctrl.h"
+#include "bcmtr_pcie.h"
+#include "bcmolt_llpcie.h"
+#include "bcm_dev_log.h"
+#include "bcmolt_utils.h"
+#include "bcmolt_firmware_envelope.h"
+#include "bcmolt_msg_pack.h"
+#include "bcmolt_mh_utils.h"
+#include "bcmolt_debug_ctrl.h"
+
+static bcmolt_dev_ctrl_params dev_ctrl_params;
+static dev_ctrl_database dev_ctrl_db[BCMTR_MAX_OLTS];
+static uint8_t *image_buf[BCMTR_MAX_OLTS];
+static uint8_t *rd_image_buf[BCMTR_MAX_OLTS];
+
+#define BCM_DEV_CTRL_RETURN_ON_ERROR(device, rc, fmt, args...)\
+    do\
+    {\
+        if (BCM_ERR_OK != rc)\
+        {\
+            BCM_LOG(ERROR, dev_ctrl_db[device].log_id, "%s: "fmt, bcmos_strerror(rc), ## args);\
+            return rc;\
+        }\
+    } while (0)
+
+#ifndef IN_BAND
+static bcmos_timer_rc dev_ctrl_boot_seq_timer_handler(bcmos_timer *timer, long data);
+static bcmos_timer_rc dev_ctrl_ddr_test_timer_handler(bcmos_timer *timer, long data);
+#endif
+
+const char *bcm_str_device_state(bcmolt_device_state device_state)
+{
+    static const char *strings[] =
+    {
+        [BCMOLT_DEVICE_STATE_DISCONNECTED] = "DISCONNECTED",
+        [BCMOLT_DEVICE_STATE_CONNECTING] = "CONNECTING",
+        [BCMOLT_DEVICE_STATE_READY] = "READY",
+        [BCMOLT_DEVICE_STATE_WAITING_FOR_DEVICE] = "WAITING_FOR_DEVICE",
+        [BCMOLT_DEVICE_STATE__NUM_OF] = "UNKNOWN"
+    };
+    return strings[device_state > BCMOLT_DEVICE_STATE__NUM_OF ? BCMOLT_DEVICE_STATE__NUM_OF : device_state];
+}
+
+const char *bcm_str_device_event(dev_ctrl_event device_event)
+{
+    static const char *strings[] =
+    {
+        [DEVICE_CONTROL_EVENT_DEVICE_CLEAR] = "DEVICE_CLEAR",
+        [DEVICE_CONTROL_EVENT_DEVICE_CONFIG_SET] = "DEVICE_CONFIG_SET",
+        [DEVICE_CONTROL_EVENT_DEVICE_CONFIG_GET] = "DEVICE_CONFIG_GET",
+        [DEVICE_CONTROL_EVENT_DEVICE_DISCONNECT] = "DEVICE_DISCONNECT",
+        [DEVICE_CONTROL_EVENT_DEVICE_TIMER_TIMEOUT] = "TIMER_TIMEOUT",
+        [DEVICE_CONTROL_EVENT_DEVICE_RECEIVED_ACK] = "RECEIVED_ACK",
+        [DEVICE_CONTROL_EVENT_DEVICE_CONNECT] = "DEVICE_CONNECT",
+        [DEVICE_CONTROL_EVENT_DEVICE_RESET] = "DEVICE_RESET",
+        [DEVICE_CONTROL_EVENT_CONNECTION_FAILURE] = "CONNECTION_FAILURE",
+        [DEVICE_CONTROL_EVENT_CONNECTION_ESTABLISHED] = "CONNECTION_ESTABLISHED",
+        [DEVICE_CONTROL_EVENT_DEVICE_READY] = "DEVICE_READY",
+        [DEVICE_CONTROL_EVENT_RUN_DDR_TEST] = "RUN_DDR_TEST",
+        [DEVICE_CONTROL_EVENT_DDR_TEST_COMPLETED] = "DDR_TEST_COMPLETED",
+        [DEVICE_CONTROL_EVENT_DDR_TEST_TIMEOUT] = "DDR_TEST_TIMEOUT",
+        [DEVICE_CONTROL_EVENT__NUM_OF] = "UNKNOWN"
+    };
+    return strings[device_event > DEVICE_CONTROL_EVENT__NUM_OF ? DEVICE_CONTROL_EVENT__NUM_OF : device_event];
+}
+
+#ifdef ENABLE_LOG
+static const char *bcm_str_auto_id(bcmolt_device_auto_id auto_id)
+{
+    static const char *strings[] =
+    {
+        [BCMOLT_DEVICE_AUTO_ID_DEVICE_READY] = "DEVICE_READY",
+        [BCMOLT_DEVICE_AUTO_ID_CONNECTION_ESTABLISHED] = "CONNECTION_ESTABLISHED",
+        [BCMOLT_DEVICE_AUTO_ID_DEVICE_KEEP_ALIVE] = "DEVICE_KEEP_ALIVE",
+        [BCMOLT_DEVICE_AUTO_ID_CONNECTION_FAILURE] = "CONNECTION_FAILURE",
+        [BCMOLT_DEVICE_AUTO_ID_CONNECTION_COMPLETE] = "CONNECTION_COMPLETE",
+        [BCMOLT_DEVICE_AUTO_ID_DISCONNECTION_COMPLETE] = "DISCONNECTION_COMPLETE",
+        [BCMOLT_DEVICE_AUTO_ID_SW_ERROR] = "SW_ERROR",
+        [BCMOLT_DEVICE_AUTO_ID__NUM_OF] = "UNKNOWN"
+    };
+    return strings[auto_id > BCMOLT_DEVICE_AUTO_ID__NUM_OF ? BCMOLT_DEVICE_AUTO_ID__NUM_OF : auto_id];
+}
+#endif
+
+const char *bcm_str_host_connection_fail_reason(bcmolt_host_connection_fail_reason reason)
+{
+    static const char *strings[] =
+    {
+        [BCMOLT_HOST_CONNECTION_FAIL_REASON_TIMEOUT] = "TIMEOUT",
+        [BCMOLT_HOST_CONNECTION_FAIL_REASON_KEEPALIVE] = "KEEPALIVE",
+        [BCMOLT_HOST_CONNECTION_FAIL_REASON_USER_CALLBACK_ERROR] = "USER_CALLBACK_ERROR",
+        [BCMOLT_HOST_CONNECTION_FAIL_REASON_SOFTWARE_VERSION_MISMATCH] = "SOFTWARE_VERSION_MISMATCH",
+        [BCMOLT_HOST_CONNECTION_FAIL_REASON_SYSTEM_MODE_MISMATCH] = "SYSTEM_MODE_MISMATCH",
+        [BCMOLT_HOST_CONNECTION_FAIL_REASON_NNI_SPEED_MISMATCH] = "NNI_SPEED_MISMATCH",
+        [BCMOLT_HOST_CONNECTION_FAIL_REASON_RECONNECT_TIMEOUT] = "RECONNECT_TIMEOUT",
+        [BCMOLT_HOST_CONNECTION_FAIL_REASON_INTERNAL_ERROR] = "INTERNAL_ERROR",
+        [BCMOLT_HOST_CONNECTION_FAIL_REASON_SYSTEM_MODE_NOT_SUPPORTED] = "SYSTEM_MODE_NOT_SUPPORTED",
+        [BCMOLT_HOST_CONNECTION_FAIL_REASON_PARAMETER] = "PARAMETER",
+        [BCMOLT_HOST_CONNECTION_FAIL_REASON__NUM_OF] = "UNKNOWN"
+    };
+    return strings[
+        reason > BCMOLT_HOST_CONNECTION_FAIL_REASON__NUM_OF ? BCMOLT_HOST_CONNECTION_FAIL_REASON__NUM_OF : reason];
+}
+
+const char *bcm_str_host_connecting_state(dev_ctrl_connecting_state state)
+{
+    static const char *strings[] =
+    {
+        [DEV_CTRL_CONNECTING_STATE_ESTABLISHING] = "ESTABLISHING",
+        [DEV_CTRL_CONNECTING_STATE_CONFIGURING] = "CONFIGURING",
+        [DEV_CTRL_CONNECTING_STATE_STANDALONE] = "STANDALONE"
+    };
+    return (state > DEV_CTRL_CONNECTING_STATE_STANDALONE) ? "UNKNOWN" : strings[state];
+}
+
+static inline bcmos_bool dev_ctrl_is_connected(bcmolt_device_state state)
+{
+    return (state == BCMOLT_DEVICE_STATE_READY || state == BCMOLT_DEVICE_STATE_WAITING_FOR_DEVICE);
+}
+
+void dev_ctrl_read_db(bcmolt_devid device, dev_ctrl_database *db)
+{
+    *db = dev_ctrl_db[device];
+}
+
+#ifndef IN_BAND
+#ifdef ENABLE_LOG
+static bcmos_errno dev_ctrl_get_dev_log(bcmolt_devid device, bcmolt_logger_cfg *msg)
+{
+    char *log_buf;
+    char *log_buf_copy;
+    int log_len;
+    int msg_len;
+    int i;
+    bcmos_errno rc;
+    bcm_dev_log_file log_file;
+    uint32_t msg_buf_offset;
+
+    if (msg->key.file_id != BCMOLT_LOG_FILE_ID_SRAM)
+    {
+        return bcmolt_msg_err(
+            &msg->hdr.hdr,
+            DEV_LOG_INVALID_ID,
+            BCM_ERR_KEY_RANGE,
+            BCMOLT_LOGGER_KEY_ID_FILE_ID,
+            "While disconnected, only the SRAM logger may be read");
+    }
+
+    if (BCMOLT_CFG_PROP_IS_SET(msg, logger, wrap_around))
+    {
+        return bcmolt_msg_err(
+            &msg->hdr.hdr,
+            DEV_LOG_INVALID_ID,
+            BCM_ERR_RANGE,
+            BCMOLT_LOGGER_CFG_ID_WRAP_AROUND,
+            "wrap_around cannot be retrieved while disconnected");
+    }
+
+    if (BCMOLT_CFG_PROP_IS_SET(msg, logger, enable_log))
+    {
+        return bcmolt_msg_err(
+            &msg->hdr.hdr,
+            DEV_LOG_INVALID_ID,
+            BCM_ERR_RANGE,
+            BCMOLT_LOGGER_CFG_ID_ENABLE_LOG,
+            "enable_log cannot be retrieved while disconnected");
+    }
+
+    if (BCMOLT_CFG_PROP_IS_SET(msg, logger, log_names))
+    {
+        return bcmolt_msg_err(
+            &msg->hdr.hdr,
+            DEV_LOG_INVALID_ID,
+            BCM_ERR_RANGE,
+            BCMOLT_LOGGER_CFG_ID_LOG_NAMES,
+            "log_names cannot be retrieved while disconnected");
+    }
+
+    if (!BCMOLT_CFG_PROP_IS_SET(msg, logger, buffer))
+    {
+        return BCM_ERR_OK; /* nothing to do */
+    }
+
+    if (dev_ctrl_db[device].fld_info.soc_sram_base == 0)
+    {
+        return bcmolt_msg_err(
+            &msg->hdr.hdr,
+            DEV_LOG_INVALID_ID,
+            BCM_ERR_STATE,
+            BCMOLT_LOGGER_CFG_ID_BUFFER,
+            "log buffer can only be retreived after initial device connection");
+    }
+
+    rc = bcm_fld_get_logs(device, &log_buf, &log_len);
+    BCM_DEV_CTRL_RETURN_ON_ERROR(device, rc, "bcm_fld_get_logs\n");
+
+    if (!log_len)
+        return BCM_ERR_OK;
+
+    /* Make a copy to avoid working over PCIe. Otherwise, the behavior can be unpredictable
+     * based on PCIe transaction size and controller configuration */
+    log_buf_copy = bcmos_alloc(log_len);
+    if (!log_buf_copy)
+        return BCM_ERR_NOMEM;
+
+    /* Copy byte by byte. Slow but works for any PCIe configuration */
+    for (i = 0; i < log_len; i++)
+        log_buf_copy[i] = log_buf[i];
+
+    msg->hdr.hdr.presence_mask |= (1 << BCMOLT_LOGGER_CFG_ID_BUFFER);
+
+    /* Attach log file to the buffer and read from the file */
+    rc = bcm_dev_log_file_attach(log_buf_copy, log_len, &log_file);
+
+    if (rc != BCM_ERR_OK || bcm_dev_log_get_num_of_messages(&log_file) == 0)
+    {
+        bcmos_free(log_buf_copy);
+        BCM_LOG(INFO, dev_ctrl_db[device].log_id, "SRAM log buffer is empty\n");
+        return BCM_ERR_OK;
+    }
+
+    /* copy all messages from SRAM to the API message buffer (stopping when buffer is full) */
+    msg_buf_offset = 0;
+    do
+    {
+        msg_len = bcm_dev_log_file_read(&log_file, &dev_ctrl_db[device].sram_log_offset,
+            &msg->data.buffer.buff[msg_buf_offset], sizeof(msg->data.buffer.buff)- msg_buf_offset - 1);
+        if (msg_len <= 0)
+            break;
+        ++dev_ctrl_db[device].msgs_read;
+        /* The last character is 0-terminator. Take it out */
+        msg_buf_offset += msg_len - 1;
+    } while (msg_buf_offset < sizeof(msg->data.buffer.buff) - 1);
+
+    /* terminate the string with a null character */
+    msg->data.buffer.buff[msg_buf_offset] = '\0';
+    if (msg_len == BCM_ERR_OVERFLOW)
+    {
+        /* More records to read */
+        msg->data.buffer.msg_to_read = bcm_dev_log_get_num_of_messages(&log_file) - dev_ctrl_db[device].msgs_read;
+    }
+    else
+    {
+        /* all done */
+        msg->data.buffer.msg_to_read = 0;
+        dev_ctrl_db[device].sram_log_offset = 0;
+        dev_ctrl_db[device].msgs_read = 0;
+    }
+
+    /* Detach file from buffer */
+    bcm_dev_log_file_detach(&log_file);
+
+    bcmos_free(log_buf_copy);
+
+    return BCM_ERR_OK;
+}
+#endif
+
+static bcmos_errno dev_ctrl_get_sw_error_table(bcmolt_devid device)
+{
+    bcmos_sw_error_table *sw_error_table;
+    uint8_t *sram;
+    uint8_t *local;
+    uint32_t size;
+    uint32_t i;
+
+    sram = bcm_fld_get_sw_error_table(device, &size);
+    local = bcmos_alloc(size);
+    for (i = 0; i < size; i++)
+    {
+        local[i] = sram[i];
+    }
+
+    sw_error_table = (bcmos_sw_error_table*)local;
+    dev_ctrl_db[device].sw_error_count = BCMOS_ENDIAN_LITTLE_TO_CPU_U32(sw_error_table->count);
+    if (dev_ctrl_db[device].sw_error_count > NUM_ELEM(dev_ctrl_db[device].sw_errors))
+    {
+        bcmos_free(local);
+        return BCM_ERR_OVERFLOW;
+    }
+
+    for (i = 0; i < dev_ctrl_db[device].sw_error_count; i++)
+    {
+        dev_ctrl_db[device].sw_errors[i].first_error_time_us =
+            BCMOS_ENDIAN_LITTLE_TO_CPU_U64(sw_error_table->error[i].first_error_time);
+        dev_ctrl_db[device].sw_errors[i].last_error_time_us =
+            BCMOS_ENDIAN_LITTLE_TO_CPU_U64(sw_error_table->error[i].last_error_time);
+        dev_ctrl_db[device].sw_errors[i].line_number =
+            BCMOS_ENDIAN_LITTLE_TO_CPU_U32(sw_error_table->error[i].line_number);
+        dev_ctrl_db[device].sw_errors[i].error_counter =
+            BCMOS_ENDIAN_LITTLE_TO_CPU_U32(sw_error_table->error[i].error_counter);
+        dev_ctrl_db[device].sw_errors[i].instance =
+            BCMOS_ENDIAN_LITTLE_TO_CPU_U32(sw_error_table->error[i].instance);
+        strncpy(
+            dev_ctrl_db[device].sw_errors[i].filename,
+            sw_error_table->error[i].file_name,
+            BCMOLT_SW_ERROR_MAX_FILE_NAME_LEN);
+        dev_ctrl_db[device].sw_errors[i].filename[BCMOLT_SW_ERROR_MAX_FILE_NAME_LEN-1] = 0;
+        strncpy(
+            dev_ctrl_db[device].sw_errors[i].task_name,
+            sw_error_table->error[i].task_name,
+            BCMOLT_SW_ERROR_MAX_TASK_NAME_LEN);
+        dev_ctrl_db[device].sw_errors[i].task_name[BCMOLT_SW_ERROR_MAX_TASK_NAME_LEN-1] = 0;
+    }
+
+    bcmos_free(local);
+
+    return BCM_ERR_OK;
+}
+
+static bcmos_bool sw_error_key_valid(const bcmolt_software_error_key *key)
+{
+    bcmolt_devid device = (bcmolt_devid)bcmos_task_current()->parm.data;
+    return key->idx < dev_ctrl_db[device].sw_error_count;
+}
+
+static bcmos_errno mh_software_error_key_validate(bcmolt_msg *msg, const bcmolt_software_error_key *key)
+{
+    return sw_error_key_valid(key) ? BCM_ERR_OK : BCM_ERR_NOENT;
+}
+
+static bcmos_errno mh_software_error_cfg_get(
+    bcmolt_msg *msg,
+    const bcmolt_software_error_key *key,
+    bcmolt_software_error_cfg_data *data)
+{
+    bcmolt_devid device = (bcmolt_devid)bcmos_task_current()->parm.data;
+    bcmolt_presence_mask props = msg->presence_mask;
+    bcmos_errno rc = BCM_ERR_OK;
+
+    if (props == BCMOLT_PRESENCE_MASK_ALL)
+    { 
+        /* Convert from sentinel "all" presence bits to set of all valid bits*/
+        props = (1U << BCMOLT_SOFTWARE_ERROR_CFG_ID__NUM_OF) - 1;
+    }
+
+    if (BCMOLT_CFG_PROP_IS_SET((bcmolt_software_error_cfg*)msg, software_error, entry))
+    {
+        if (dev_ctrl_db[device].fld_info.soc_sram_base == 0)
+        {
+            return bcmolt_msg_err(
+                msg,
+                DEV_LOG_INVALID_ID,
+                BCM_ERR_STATE,
+                BCMOLT_SOFTWARE_ERROR_CFG_ID_ENTRY,
+                "Software errors can only be retreived after initial device connection");
+        }
+
+        data->entry = dev_ctrl_db[device].sw_errors[key->idx];
+        props &= ~BCMOLT_PROP_MASK_GET(software_error, _cfg, entry);
+    }
+
+    if (props != 0)
+    {
+        rc = bcmolt_msg_err(msg,
+            DEV_LOG_INVALID_ID,
+            BCM_ERR_NOT_SUPPORTED,
+            BCMOLT_ERR_FIELD_NONE,
+            "Unsupported properties: 0x%llx", (unsigned long long)props);
+    }
+
+    return rc;
+}
+
+static bcmos_errno mh_software_error_key_iterate(bcmolt_software_error_key *key)
+{
+    key->idx++;
+    return sw_error_key_valid(key) ? BCM_ERR_OK : BCM_ERR_NO_MORE;
+}
+
+static bcmos_errno mh_software_error_key_resolve_wildcards(bcmolt_software_error_key *key)
+{
+    return BCM_ERR_OK;
+}
+
+MH_DECLARE_CFG_GET_MULTI(software_error)
+
+static bcmos_errno dev_ctrl_sw_error_get(bcmolt_devid device, bcmolt_msg *msg)
+{
+    bcmolt_software_error_cfg *cfg = (bcmolt_software_error_cfg*)msg;
+    bcmos_errno err = dev_ctrl_get_sw_error_table(device);
+    if (err != BCM_ERR_OK)
+    {
+        return BCM_ERR_INTERNAL;
+    }
+
+    if (msg->type == BCMOLT_MSG_TYPE_GET)
+    {
+        bcmolt_software_error_key_id key_prop_id;
+        if (!bcmolt_software_error_key_bounds_check(&cfg->key, BCMOLT_PRESENCE_MASK_ALL, &key_prop_id))
+        {
+            msg->err_field_idx = (uint16_t) key_prop_id;
+            return BCM_ERR_KEY_RANGE;
+        }
+
+        err = mh_software_error_key_validate(msg, &cfg->key);
+        if (err != BCM_ERR_OK)
+        {
+            return err;
+        }
+
+        return mh_software_error_cfg_get(msg, &cfg->key, &cfg->data);
+    }
+    else if (msg->type == BCMOLT_MSG_TYPE_GET_MULTI)
+    {
+        return mh_software_error_cfg_get_multi(cfg, msg->msg_set->filter_flags, msg->msg_set);
+    }
+    else
+    {
+        BCM_LOG(ERROR, dev_ctrl_db[device].log_id, "Unexpected type 0x%x\n", msg->type);
+    }
+    return BCM_ERR_INTERNAL;
+}
+#endif
+
+static void dev_ctrl_send_indication(bcmolt_devid device, bcmolt_msg *msg)
+{
+    msg->subch = BCMTRMUX_CHANNEL_AUTO_PROXY;
+    msg->type = BCMOLT_MSG_TYPE_SET;
+    bcmtrmux_control_to_host(device, msg);
+}
+
+static void dev_ctrl_send_ind_connection_complete(bcmolt_devid device, bcmos_bool standalone)
+{
+    bcmolt_device_connection_complete ind = {};
+    BCM_LOG(INFO, dev_ctrl_db[device].log_id, "Connection complete: standalone=%s\n", standalone ? "yes" : "no");
+    BCMOLT_AUTO_INIT(&ind, device, connection_complete);
+    ind.data.standalone = standalone;
+    dev_ctrl_send_indication(device, &ind.hdr.hdr);
+}
+
+static void dev_ctrl_send_ind_disconnection_complete(bcmolt_devid device)
+{
+    bcmolt_device_disconnection_complete ind = {};
+    BCM_LOG(INFO, dev_ctrl_db[device].log_id, "Disconnection complete\n");
+    BCMOLT_AUTO_INIT(&ind, device, disconnection_complete);
+    dev_ctrl_send_indication(device, &ind.hdr.hdr);
+}
+
+static void dev_ctrl_send_ind_connection_failure(bcmolt_devid device, bcmolt_host_connection_fail_reason reason)
+{
+    bcmolt_device_connection_failure ind = {};
+    BCM_LOG(INFO, dev_ctrl_db[device].log_id, "Connection failure: %s\n", bcm_str_host_connection_fail_reason(reason));
+    BCMOLT_AUTO_INIT(&ind, device, connection_failure);
+    ind.data.reason = reason;
+    dev_ctrl_send_indication(device, &ind.hdr.hdr);
+    dev_ctrl_db[device].conn_fail_reason = reason; /* log the failure reason to the db. */
+}
+
+static void dev_ctrl_send_ind_connection_failure_from_msg(bcmolt_devid device, const bcmolt_msg *msg)
+{
+    BUG_ON(msg->subgroup != BCMOLT_DEVICE_AUTO_ID_CONNECTION_FAILURE);
+    dev_ctrl_send_ind_connection_failure(device, ((const bcmolt_device_connection_failure *)msg)->data.reason);
+}
+
+#ifndef IN_BAND
+static void dev_ctrl_send_ind_exception_log(bcmolt_devid device, uint32_t cpuid, const char *exception_buf)
+{
+    /* Because indication size is limited (but IND_MSG_MAX_SIZE > sizeof(bcmolt_str_2000.str), we may need to split into multiple indications.
+     * We use a static variable because our stack size is limited. */
+    static bcmolt_str_2000 api_exception_str;
+    const char *pos = exception_buf;
+    uint32_t remaining_len = strlen(pos);
+
+    while (remaining_len)
+    {
+        bcmolt_device_sw_exception ind = {};
+        uint32_t bytes_copied;
+
+        strncpy(api_exception_str.str, pos, sizeof(api_exception_str.str) - 1);
+        api_exception_str.str[sizeof(api_exception_str.str) - 1] = '\0';
+
+        BCMOLT_AUTO_INIT(&ind, device, sw_exception);
+        ind.data.cpu_id = cpuid;
+        ind.data.text = api_exception_str;
+        dev_ctrl_send_indication(device, &ind.hdr.hdr);
+
+        if (sizeof(api_exception_str.str) - 1 < remaining_len)
+        {
+            bytes_copied = sizeof(api_exception_str.str) - 1;
+        }
+        else
+        {
+            bytes_copied = remaining_len;
+        }
+        remaining_len -= bytes_copied;
+        pos += bytes_copied;
+    }
+}
+#endif
+
+static void dev_ctrl_send_config_set_msg(
+    bcmolt_devid device,
+    bcmolt_presence_mask mask,
+    uint16_t corr_tag,
+    const bcmolt_device_cfg_data *data)
+{
+    bcmolt_device_key key = {};
+    bcmolt_device_cfg cfg;
+    bcmos_errno rc;
+
+    BCMOLT_CFG_INIT(&cfg, device, key);
+    cfg.data = *data;
+    cfg.hdr.hdr.presence_mask = mask;
+
+    cfg.hdr.hdr.corr_tag = corr_tag;
+    cfg.hdr.hdr.type = BCMOLT_MSG_TYPE_SET;
+
+    rc = bcmtrmux_control_to_line(device, &cfg.hdr.hdr);
+    if (rc != BCM_ERR_OK)
+    {
+        BCM_LOG(ERROR, dev_ctrl_db[device].log_id,
+            "bcmtrmux_control_to_line of device config msg returned error %s (%d)\n",
+            bcmos_strerror(rc),
+            rc);
+    }
+}
+
+static void dev_ctrl_send_config_get_msg(bcmolt_devid device, bcmolt_presence_mask mask, uint16_t corr_tag)
+{
+    bcmolt_device_key key = {};
+    bcmolt_device_cfg cfg;
+    bcmos_errno rc;
+
+    BCMOLT_CFG_INIT(&cfg, device, key);
+    cfg.hdr.hdr.presence_mask = mask;
+
+    cfg.hdr.hdr.corr_tag = corr_tag;
+    cfg.hdr.hdr.type = BCMOLT_MSG_TYPE_GET;
+
+    rc = bcmtrmux_control_to_line(device, &cfg.hdr.hdr);
+    if (rc != BCM_ERR_OK)
+    {
+        BCM_LOG(ERROR, dev_ctrl_db[device].log_id,
+            "bcmtrmux_control_to_line of device config msg returned error %s (%d)\n",
+            bcmos_strerror(rc),
+            rc);
+    }
+}
+
+static void dev_ctrl_send_device_disconnect_msg(bcmolt_devid device, uint16_t corr_tag)
+{
+    bcmolt_device_key key = {};
+    bcmolt_device_disconnect oper;
+    bcmos_errno rc;
+
+    BCMOLT_OPER_INIT(&oper, device, disconnect, key);
+
+    oper.hdr.hdr.corr_tag = corr_tag;
+    oper.hdr.hdr.type = BCMOLT_MSG_TYPE_SET;
+    rc = bcmtrmux_control_to_line(device, &oper.hdr.hdr);
+    if (rc != BCM_ERR_OK)
+    {
+        BCM_LOG(ERROR, dev_ctrl_db[device].log_id,
+            "bcmtrmux_control_to_line of device disconnect operation returned error %s (%d)\n",
+            bcmos_strerror(rc),
+            rc);
+    }
+}
+
+/* Set all device object properties to default values. */
+static void dev_ctrl_clear_device_cfg(bcmolt_devid device)
+{
+    dev_ctrl_db[device].device_params_present = 0;
+
+    /* Pay attention: We use the interval and tolerance from dev_ctrl_db[device].ka_info and not from
+     * dev_ctrl_db[device].device_params. These parameters exist in dev_ctrl_db[device].device_params only because it is
+     * the data model representation. */
+    bcmolt_device_cfg_data_set_default(&dev_ctrl_db[device].device_params, BCMOLT_PRESENCE_MASK_ALL);
+    dev_ctrl_db[device].ka_info.ka_interval =
+        dev_ctrl_db[device].device_params.keepalive_interval * BCMOS_MICROSECONDS_IN_SECONDS;
+    dev_ctrl_db[device].ka_info.ka_tolerance = dev_ctrl_db[device].device_params.keepalive_tolerance;
+}
+
+static void dev_ctrl_init_connection_state(bcmolt_devid device)
+{
+    dev_ctrl_db[device].connection_info.config_send_counter = CONFIG_SEND_MAX_NUMBER;
+    dev_ctrl_db[device].connection_info.config_interval = DEVICE_CONTROL_CONFIG_TIME_US;
+}
+
+static bcmos_errno dev_ctrl_validate_cfg_set(bcmolt_devid device, bcmolt_msg *msg)
+{
+#ifndef IN_BAND
+    bcmos_errno rc;
+#endif
+    bcmolt_device_cfg *cfg = (bcmolt_device_cfg *)msg;
+    bcmolt_device_state state = dev_ctrl_db[device].device_params.state;
+    bcmolt_device_cfg_id failed_prop = BCMOLT_ERR_FIELD_NONE;
+
+    if (!bcmolt_device_cfg_data_bounds_check(&cfg->data, msg->presence_mask, &failed_prop))
+    {
+        msg->err_field_idx = (uint16_t)failed_prop;
+        return BCM_ERR_RANGE;
+    }
+
+#ifndef IN_BAND
+    if (BCMOLT_CFG_PROP_IS_SET(cfg, device, system_mode))
+    {
+        if (state != BCMOLT_DEVICE_STATE_DISCONNECTED)
+        {
+            return bcmolt_msg_err(
+                msg,
+                DEV_LOG_INVALID_ID,
+                BCM_ERR_STATE,
+                BCMOLT_DEVICE_CFG_ID_SYSTEM_MODE,
+                "System mode can only be changed while disconnected");
+        }
+
+        rc = dev_ctrl_params.system_mode_validate_cb(device, cfg->data.system_mode);
+        if (rc != BCM_ERR_OK)
+        {
+            return bcmolt_msg_err(
+                msg,
+                DEV_LOG_INVALID_ID,
+                rc,
+                BCMOLT_DEVICE_CFG_ID_SYSTEM_MODE,
+                "Given system mode is not supported for this board");
+        }
+    }
+#endif
+
+    if (BCMOLT_CFG_PROP_IS_SET(cfg, device, nni_speed) && state != BCMOLT_DEVICE_STATE_DISCONNECTED)
+    {
+        return bcmolt_msg_err(
+            msg,
+            DEV_LOG_INVALID_ID,
+            BCM_ERR_STATE,
+            BCMOLT_DEVICE_CFG_ID_NNI_SPEED,
+            "NNI speed can only be changed while disconnected");
+    }
+
+    if (BCMOLT_CFG_PROP_IS_SET(cfg, device, debug) && state != BCMOLT_DEVICE_STATE_DISCONNECTED)
+    {
+        return bcmolt_msg_err(
+            msg,
+            DEV_LOG_INVALID_ID,
+            BCM_ERR_STATE,
+            BCMOLT_DEVICE_CFG_ID_DEBUG,
+            "Debug parameters can only be changed while disconnected");
+    }
+
+    if (BCMOLT_CFG_PROP_IS_SET(cfg, device, firmware_sw_version) ||
+        BCMOLT_CFG_PROP_IS_SET(cfg, device, host_sw_version) ||
+        BCMOLT_CFG_PROP_IS_SET(cfg, device, chip_revision)||
+        BCMOLT_CFG_PROP_IS_SET(cfg, device, state)||
+        BCMOLT_CFG_PROP_IS_SET(cfg, device, chip_temperature)||
+        BCMOLT_CFG_PROP_IS_SET(cfg, device, chip_voltage))
+    {
+        return bcmolt_msg_err(
+            msg,
+            DEV_LOG_INVALID_ID,
+            BCM_ERR_STATE,
+            BCMOLT_ERR_FIELD_NONE,
+            "Cannot set read only fields");
+    }
+
+    return BCM_ERR_OK;
+}
+
+static bcmos_errno dev_ctrl_validate_cfg_get(bcmolt_devid device, bcmolt_msg *msg)
+{
+    bcmolt_device_state state = dev_ctrl_db[device].device_params.state;
+    bcmolt_device_cfg *cfg = (bcmolt_device_cfg *)msg;
+
+    if (BCMOLT_CFG_PROP_IS_SET(cfg, device, firmware_sw_version) ||
+        BCMOLT_CFG_PROP_IS_SET(cfg, device, chip_revision) ||
+        BCMOLT_CFG_PROP_IS_SET(cfg, device, chip_temperature)||
+        BCMOLT_CFG_PROP_IS_SET(cfg, device, chip_voltage) ||
+        BCMOLT_CFG_PROP_IS_SET(cfg, device, epon_tod_string))
+    {
+        if (!dev_ctrl_is_connected(state))
+        {
+            return bcmolt_msg_err(
+                msg,
+                DEV_LOG_INVALID_ID,
+				BCM_ERR_STATE,
+                BCMOLT_ERR_FIELD_NONE,
+                "Cannot retrieve parameter while disconnected.");
+        }
+    }
+    if (BCMOLT_CFG_PROP_IS_SET(cfg, device, protection_switching_ext_irq))
+    {
+        if (!dev_ctrl_is_connected(state) &&
+            (dev_ctrl_db[device].device_params_present &
+            BCMOLT_PROP_MASK_GET(device, _cfg, protection_switching_ext_irq)) == 0)
+        {
+            return bcmolt_msg_err(
+                msg,
+                DEV_LOG_INVALID_ID,
+				BCM_ERR_STATE,
+                BCMOLT_DEVICE_CFG_ID_PROTECTION_SWITCHING_EXT_IRQ,
+                "Cannot retrieve protection_switching_ext_irq while disconnected and not having a cache.");
+        }
+    }
+    if (BCMOLT_CFG_PROP_IS_SET(cfg, device, epon_clock_transport_sample_delay))
+    {
+        if (!dev_ctrl_is_connected(state) &&
+            (dev_ctrl_db[device].device_params_present &
+            BCMOLT_PROP_MASK_GET(device, _cfg, epon_clock_transport_sample_delay)) == 0)
+        {
+            return bcmolt_msg_err(
+                msg,
+                DEV_LOG_INVALID_ID,
+				BCM_ERR_STATE,
+                BCMOLT_DEVICE_CFG_ID_EPON_CLOCK_TRANSPORT_SAMPLE_DELAY,
+                "Cannot retrieve epon_clock_transport_sample_delay while disconnected and not having a cache.");
+        }
+    }
+    if (BCMOLT_CFG_PROP_IS_SET(cfg, device, indication_shaping))
+    {
+        if (!dev_ctrl_is_connected(state) &&
+            (dev_ctrl_db[device].device_params_present & BCMOLT_PROP_MASK_GET(device, _cfg, indication_shaping)) == 0)
+        {
+            return bcmolt_msg_err(
+                msg,
+                DEV_LOG_INVALID_ID,
+				BCM_ERR_STATE,
+                BCMOLT_DEVICE_CFG_ID_INDICATION_SHAPING,
+                "Cannot retrieve indication_shaping while disconnected and not having a cache.");
+        }
+    }
+    if (BCMOLT_CFG_PROP_IS_SET(cfg, device, gpon_xgpon_tod_enable))
+    {
+        if (!dev_ctrl_is_connected(state) &&
+            (dev_ctrl_db[device].device_params_present &
+            BCMOLT_PROP_MASK_GET(device, _cfg, gpon_xgpon_tod_enable)) == 0)
+        {
+            return bcmolt_msg_err(
+                msg,
+                DEV_LOG_INVALID_ID,
+				BCM_ERR_STATE,
+                BCMOLT_DEVICE_CFG_ID_GPON_XGPON_TOD_ENABLE,
+                "Cannot retrieve gpon_xgpon_tod_enable while disconnected and not having a cache.");
+        }
+    }
+    if (BCMOLT_CFG_PROP_IS_SET(cfg, device, gpon_xgpon_tod_gpio_pin))
+    {
+        if (!dev_ctrl_is_connected(state) &&
+            (dev_ctrl_db[device].device_params_present &
+            BCMOLT_PROP_MASK_GET(device, _cfg, gpon_xgpon_tod_gpio_pin)) == 0)
+        {
+            return bcmolt_msg_err(
+                msg,
+                DEV_LOG_INVALID_ID,
+                BCM_ERR_STATE,
+                BCMOLT_DEVICE_CFG_ID_GPON_XGPON_TOD_GPIO_PIN,
+                "Cannot retrieve gpon_xgpon_tod_gpio_pin while disconnected and not having a cache.");
+        }
+    }
+    if (BCMOLT_CFG_PROP_IS_SET(cfg, device, gpon_xgpon_tod_connected_internally))
+    {
+        if (!dev_ctrl_is_connected(state) &&
+            (dev_ctrl_db[device].device_params_present &
+            BCMOLT_PROP_MASK_GET(device, _cfg, gpon_xgpon_tod_connected_internally)) == 0)
+        {
+            return bcmolt_msg_err(
+                msg,
+                DEV_LOG_INVALID_ID,
+				BCM_ERR_STATE,
+                BCMOLT_DEVICE_CFG_ID_GPON_XGPON_TOD_CONNECTED_INTERNALLY,
+                "Cannot retrieve gpon_xgpon_tod_connected_internally while disconnected and not having a cache.");
+        }
+    }
+    if (BCMOLT_CFG_PROP_IS_SET(cfg, device, epon_8021_as_tod_format))
+    {
+        if (!dev_ctrl_is_connected(state) &&
+            (dev_ctrl_db[device].device_params_present &
+            BCMOLT_PROP_MASK_GET(device, _cfg, epon_8021_as_tod_format)) == 0)
+        {
+            return bcmolt_msg_err(
+                msg,
+                DEV_LOG_INVALID_ID,
+				BCM_ERR_STATE,
+                BCMOLT_DEVICE_CFG_ID_EPON_8021_AS_TOD_FORMAT,
+                "Cannot retrieve epon_8021_as_tod_format while disconnected and not having a cache.");
+        }
+    }
+    if (BCMOLT_CFG_PROP_IS_SET(cfg, device, epon_shaper_mode))
+    {
+        if (!dev_ctrl_is_connected(state) &&
+            (dev_ctrl_db[device].device_params_present &
+            BCMOLT_PROP_MASK_GET(device, _cfg, epon_shaper_mode)) == 0)
+        {
+            return bcmolt_msg_err(
+                msg,
+                DEV_LOG_INVALID_ID,
+				BCM_ERR_STATE,
+                BCMOLT_DEVICE_CFG_ID_EPON_SHAPER_MODE,
+                "Cannot retrieve epon_shaper_mode while disconnected and not having a cache.");
+        }
+    }
+    if (BCMOLT_CFG_PROP_IS_SET(cfg, device, embedded_image_list))
+    {
+        if (!dev_ctrl_is_connected(state) &&
+            (dev_ctrl_db[device].device_params_present &
+            BCMOLT_PROP_MASK_GET(device, _cfg, embedded_image_list)) == 0)
+        {
+            return bcmolt_msg_err(
+                msg,
+                DEV_LOG_INVALID_ID,
+				BCM_ERR_STATE,
+                BCMOLT_DEVICE_CFG_ID_EMBEDDED_IMAGE_LIST,
+                "Cannot retrieve embedded_image_list while disconnected and not having a cache.");
+        }
+    }
+    if (BCMOLT_CFG_PROP_IS_SET(cfg, device, gpon_xgpon_tod_string_length))
+    {
+    	if (!dev_ctrl_is_connected(state) &&
+			(dev_ctrl_db[device].device_params_present &
+			BCMOLT_PROP_MASK_GET(device, _cfg, gpon_xgpon_tod_string_length)) == 0)
+    	{
+    		return bcmolt_msg_err(
+    			msg,
+				DEV_LOG_INVALID_ID,
+				BCM_ERR_STATE,
+				BCMOLT_DEVICE_CFG_ID_GPON_XGPON_TOD_STRING_LENGTH,
+				"Cannot retrieve gpon_xgpon_tod_string_length while disconnected and not having a cache.");
+    	}
+    }
+    if (BCMOLT_CFG_PROP_IS_SET(cfg, device, tod_uart_baudrate))
+    {
+    	if (!dev_ctrl_is_connected(state) &&
+    		(dev_ctrl_db[device].device_params_present &
+    		BCMOLT_PROP_MASK_GET(device, _cfg, tod_uart_baudrate)) == 0)
+    	{
+    		return bcmolt_msg_err(
+    			msg,
+				DEV_LOG_INVALID_ID,
+				BCM_ERR_STATE,
+				BCMOLT_DEVICE_CFG_ID_TOD_UART_BAUDRATE,
+				"Cannot retrieve tod_uart_baudrate while disconnected and not having a cache.");
+    	}
+    }
+    return BCM_ERR_OK;
+}
+
+static bcmos_errno dev_ctrl_validate_cfg_clear(bcmolt_devid device, bcmolt_msg *msg)
+{
+    if (dev_ctrl_db[device].device_params.state != BCMOLT_DEVICE_STATE_DISCONNECTED)
+    {
+        return bcmolt_msg_err(
+            msg,
+            DEV_LOG_INVALID_ID,
+            BCM_ERR_STATE,
+            BCMOLT_ERR_FIELD_NONE,
+            "Device cfg_clear is only allowed while disconnected");
+    }
+    return BCM_ERR_OK;
+}
+
+static bcmos_errno bcm_dev_ctrl_validate_oper_connect(bcmolt_devid device, bcmolt_msg *msg)
+{
+    bcmolt_device_state state = dev_ctrl_db[device].device_params.state;
+
+    if (dev_ctrl_is_connected(state))
+    {
+        return bcmolt_msg_err(msg, DEV_LOG_INVALID_ID, BCM_ERR_ALREADY, BCMOLT_ERR_FIELD_NONE, "already connected");
+    }
+
+    /* If not all mandatory properties are valid return "mandatory parameter is missing" */
+    if (dev_ctrl_db[device].device_params.system_mode >= BCMOLT_SYSTEM_MODE__NUM_OF)
+    {
+        BCM_LOG(INFO, dev_ctrl_db[device].log_id, "Cannot connect: system mode not included\n");
+        return bcmolt_msg_err(
+            msg,
+            DEV_LOG_INVALID_ID,
+            BCM_ERR_MANDATORY_PARM_IS_MISSING,
+            BCMOLT_DEVICE_CFG_ID_SYSTEM_MODE,
+            "System mode must be set before connecting");
+    }
+#ifdef IN_BAND
+    /* For In Band Management IP Address and UDP port must be set prior to connecting*/
+    /* If not all mandatory properties are valid return "mandatory parameter is missing" */
+    if (dev_ctrl_db[device].device_params.device_ip_address.u32 == 0)
+    {
+        BCM_LOG(INFO, dev_ctrl_db[device].log_id, "Cannot connect: must set IP Address port\n");
+        return bcmolt_msg_err(
+            msg,
+            DEV_LOG_INVALID_ID,
+            BCM_ERR_MANDATORY_PARM_IS_MISSING,
+            BCMOLT_DEVICE_CFG_ID_DEVICE_IP_ADDRESS,
+            "Device IP Address must be set before connecting");
+    }
+    if (dev_ctrl_db[device].device_params.device_udp_port == 0)
+    {
+        BCM_LOG(INFO, dev_ctrl_db[device].log_id, "Cannot connect: must set IP Address UDP port\n");
+        return bcmolt_msg_err(
+            msg,
+            DEV_LOG_INVALID_ID,
+            BCM_ERR_MANDATORY_PARM_IS_MISSING,
+            BCMOLT_DEVICE_CFG_ID_DEVICE_UDP_PORT,
+            "UDP port must be set before connecting");
+    }
+#endif
+
+    return BCM_ERR_OK;
+}
+
+static bcmos_errno bcm_dev_ctrl_validate_oper_disconnect(bcmolt_devid device, bcmolt_msg *msg)
+{
+    bcmolt_device_state state = dev_ctrl_db[device].device_params.state;
+    if (state == BCMOLT_DEVICE_STATE_DISCONNECTED)
+    {
+        return bcmolt_msg_err(msg, DEV_LOG_INVALID_ID, BCM_ERR_ALREADY, BCMOLT_ERR_FIELD_NONE, "already disconnected");
+    }
+    return BCM_ERR_OK;
+}
+
+static bcmos_errno bcm_dev_ctrl_validate_oper_run_ddr_test(bcmolt_devid device, bcmolt_msg *msg)
+{
+    bcmolt_device_run_ddr_test *ddr_test = (bcmolt_device_run_ddr_test*)msg;
+    bcmos_bool is_standalone;
+    bcmos_errno rc;
+
+    if (BCMOLT_DEVICE_STATE_DISCONNECTED != dev_ctrl_db[device].device_params.state)
+    {
+        return bcmolt_msg_err(
+            msg,
+            DEV_LOG_INVALID_ID,
+            BCM_ERR_STATE,
+            BCMOLT_ERR_FIELD_NONE,
+            "DDR test can only be run when disconnected");
+    }
+
+    if (dev_ctrl_db[device].is_host_reset_pending)
+    {
+        return bcmolt_msg_err(
+            msg,
+            DEV_LOG_INVALID_ID,
+            BCM_ERR_STATE,
+            BCMOLT_ERR_FIELD_NONE,
+            "Cannot run DDR test while host reset is pending");
+    }
+
+    /* Check if the chip is running in standalone mode */
+    rc = dev_ctrl_params.device_is_running_cb(device, &is_standalone);
+    if (rc != BCM_ERR_OK)
+    {
+        BCM_LOG(ERROR, dev_ctrl_db[device].log_id, "device_is_running_cb returned error: %s (%d)\n", bcmos_strerror(rc), rc);
+        return bcmolt_msg_err(
+            msg,
+            DEV_LOG_INVALID_ID,
+            rc,
+            BCMOLT_ERR_FIELD_NONE,
+            "Failed to retrieve device status");
+    }
+    if (is_standalone)
+    {
+        return bcmolt_msg_err(
+            msg,
+            DEV_LOG_INVALID_ID,
+            BCM_ERR_STATE,
+            BCMOLT_ERR_FIELD_NONE,
+            "Cannot run DDR test while device is running");
+    }
+
+    if (!ddr_test->data.cpu && !ddr_test->data.ras_0 && !ddr_test->data.ras_1)
+    {
+        return bcmolt_msg_err(
+            msg,
+            DEV_LOG_INVALID_ID,
+            BCM_ERR_STATE,
+            BCMOLT_ERR_FIELD_NONE,
+            "Must request at least one DDR Test");
+    }
+
+    return BCM_ERR_OK;
+}
+
+static bcmos_errno dev_ctrl_validate_operation(bcmolt_devid device, bcmolt_msg *msg)
+{
+    bcmolt_device_state state = dev_ctrl_db[device].device_params.state;
+    if (state == BCMOLT_DEVICE_STATE_CONNECTING)
+    {
+        return bcmolt_msg_err(
+            msg,
+            DEV_LOG_INVALID_ID,
+            BCM_ERR_STATE,
+            BCMOLT_ERR_FIELD_NONE,
+            "Device operations are not allowed while connecting");
+    }
+    if (state == BCMOLT_DEVICE_STATE_TESTING_DDR)
+    {
+        return bcmolt_msg_err(
+            msg,
+            DEV_LOG_INVALID_ID,
+            BCM_ERR_STATE,
+            BCMOLT_ERR_FIELD_NONE,
+            "Device operations are not allowed while DDR test is in progress");
+    }
+
+    switch (msg->subgroup)
+    {
+    case BCMOLT_DEVICE_OPER_ID_CONNECT:
+        return bcm_dev_ctrl_validate_oper_connect(device, msg);
+    case BCMOLT_DEVICE_OPER_ID_DISCONNECT:
+        return bcm_dev_ctrl_validate_oper_disconnect(device, msg);
+    case BCMOLT_DEVICE_OPER_ID_RUN_DDR_TEST:
+        return bcm_dev_ctrl_validate_oper_run_ddr_test(device, msg);
+    default:
+        return BCM_ERR_OK;
+    }
+}
+
+static bcmos_errno dev_ctrl_validate_msg(bcmolt_devid device, bcmolt_msg *msg)
+{
+    if (dev_ctrl_db[device].device_params.state == BCMOLT_DEVICE_STATE_WAITING_FOR_DEVICE)
+    {
+        return bcmolt_msg_err(
+            msg,
+            DEV_LOG_INVALID_ID,
+            BCM_ERR_STATE,
+            BCMOLT_ERR_FIELD_NONE,
+            "The device object is busy processing another API request");
+    }
+
+    if (msg->group == BCMOLT_MGT_GROUP_CFG)
+    {
+        switch (msg->type)
+        {
+        case BCMOLT_MSG_TYPE_CLEAR:
+            return dev_ctrl_validate_cfg_clear(device, msg);
+        case BCMOLT_MSG_TYPE_SET:
+            return dev_ctrl_validate_cfg_set(device, msg);
+        case BCMOLT_MSG_TYPE_GET:
+            return dev_ctrl_validate_cfg_get(device, msg);
+        default:
+            break;
+        }
+    }
+
+    if (msg->group == BCMOLT_MGT_GROUP_OPER && msg->type == BCMOLT_MSG_TYPE_SET)
+    {
+        return dev_ctrl_validate_operation(device, msg);
+    }
+
+    return bcmolt_msg_err(
+        msg,
+        DEV_LOG_INVALID_ID,
+        BCM_ERR_INTERNAL,
+        BCMOLT_ERR_FIELD_NONE,
+        "Invalid message for device control");
+}
+
+static bcmolt_presence_mask dev_ctrl_fill_from_local(bcmolt_devid device)
+{
+    bcmolt_device_cfg *cfg = (bcmolt_device_cfg *)dev_ctrl_db[device].last_message;
+    bcmolt_presence_mask mask = dev_ctrl_db[device].last_message->presence_mask;
+
+    if (BCMOLT_CFG_PROP_IS_SET(cfg, device, system_mode))
+    {
+        cfg->data.system_mode = dev_ctrl_db[device].device_params.system_mode;
+        mask &= ~BCMOLT_PROP_MASK_GET(device, _cfg, system_mode);
+    }
+
+    if (BCMOLT_CFG_PROP_IS_SET(cfg, device, keepalive_interval))
+    {
+        cfg->data.keepalive_interval = dev_ctrl_db[device].ka_info.ka_interval / BCMOS_MICROSECONDS_IN_SECONDS;
+        mask &= ~BCMOLT_PROP_MASK_GET(device, _cfg, keepalive_interval);
+    }
+
+    if (BCMOLT_CFG_PROP_IS_SET(cfg, device, keepalive_tolerance))
+    {
+        cfg->data.keepalive_tolerance = dev_ctrl_db[device].ka_info.ka_tolerance;
+        mask &= ~BCMOLT_PROP_MASK_GET(device, _cfg, keepalive_tolerance);
+    }
+
+    if (BCMOLT_CFG_PROP_IS_SET(cfg, device, host_sw_version))
+    {
+        cfg->data.host_sw_version.major = BCMOLT_HOST_MAJOR_VER;
+        cfg->data.host_sw_version.minor = BCMOLT_HOST_MINOR_VER;
+        cfg->data.host_sw_version.revision = BCMOLT_HOST_REVISION_VER;
+        cfg->data.host_sw_version.model = BCMOLT_MODEL_REVISION;
+        snprintf(
+            cfg->data.host_sw_version.build_time,
+            sizeof(cfg->data.host_sw_version.build_time),
+            "%s %s",
+            __DATE__,
+            __TIME__);
+        mask &= ~BCMOLT_PROP_MASK_GET(device, _cfg, host_sw_version);
+    }
+
+    if (BCMOLT_CFG_PROP_IS_SET(cfg, device, state))
+    {
+        cfg->data.state = dev_ctrl_db[device].device_params.state;
+        mask &= ~BCMOLT_PROP_MASK_GET(device, _cfg, state);
+    }
+
+    if (BCMOLT_CFG_PROP_IS_SET(cfg, device, debug))
+    {
+        cfg->data.debug = dev_ctrl_db[device].device_params.debug;
+        mask &= ~BCMOLT_PROP_MASK_GET(device, _cfg, debug);
+    }
+
+    if (BCMOLT_CFG_PROP_IS_SET(cfg, device, nni_speed))
+    {
+        cfg->data.nni_speed = dev_ctrl_db[device].device_params.nni_speed;
+        mask &= ~BCMOLT_PROP_MASK_GET(device, _cfg, nni_speed);
+    }
+
+    if (BCMOLT_CFG_PROP_IS_SET(cfg, device, xgpon_num_of_onus))
+    {
+    	cfg->data.xgpon_num_of_onus = dev_ctrl_db[device].device_params.xgpon_num_of_onus;
+    	mask &= ~BCMOLT_PROP_MASK_GET(device, _cfg, xgpon_num_of_onus);
+    }
+
+    return mask;
+}
+
+static void dev_ctrl_update_local_configuration(bcmolt_devid device, const bcmolt_msg *msg)
+{
+    const bcmolt_device_cfg *cfg = (const bcmolt_device_cfg *)msg;
+
+    dev_ctrl_db[device].device_params_present |= msg->presence_mask;
+
+    if (BCMOLT_CFG_PROP_IS_SET(cfg, device, system_mode))
+    {
+        dev_ctrl_db[device].device_params.system_mode = cfg->data.system_mode;
+    }
+    if (BCMOLT_CFG_PROP_IS_SET(cfg, device, debug))
+    {
+        dev_ctrl_db[device].device_params.debug = cfg->data.debug;
+    }
+    if (BCMOLT_CFG_PROP_IS_SET(cfg, device, nni_speed))
+    {
+        dev_ctrl_db[device].device_params.nni_speed = cfg->data.nni_speed;
+    }
+    if (BCMOLT_CFG_PROP_IS_SET(cfg, device, keepalive_interval))
+    {
+        dev_ctrl_db[device].ka_info.ka_interval = (cfg->data.keepalive_interval * BCMOS_MICROSECONDS_IN_SECONDS);
+        dev_ctrl_db[device].device_params.keepalive_interval = cfg->data.keepalive_interval;
+    }
+    if (BCMOLT_CFG_PROP_IS_SET(cfg, device, keepalive_tolerance))
+    {
+        dev_ctrl_db[device].ka_info.ka_tolerance = cfg->data.keepalive_tolerance;
+        dev_ctrl_db[device].device_params.keepalive_tolerance = cfg->data.keepalive_tolerance;
+    }
+    if (BCMOLT_CFG_PROP_IS_SET(cfg, device, protection_switching_ext_irq))
+    {
+        dev_ctrl_db[device].device_params.protection_switching_ext_irq = cfg->data.protection_switching_ext_irq;
+    }
+    if (BCMOLT_CFG_PROP_IS_SET(cfg, device, epon_clock_transport_sample_delay))
+    {
+        dev_ctrl_db[device].device_params.epon_clock_transport_sample_delay =
+            cfg->data.epon_clock_transport_sample_delay;
+    }
+    if (BCMOLT_CFG_PROP_IS_SET(cfg, device, indication_shaping))
+    {
+        dev_ctrl_db[device].device_params.indication_shaping = cfg->data.indication_shaping;
+    }
+    if (BCMOLT_CFG_PROP_IS_SET(cfg, device, gpon_xgpon_tod_enable))
+    {
+        dev_ctrl_db[device].device_params.gpon_xgpon_tod_enable = cfg->data.gpon_xgpon_tod_enable;
+    }
+    if (BCMOLT_CFG_PROP_IS_SET(cfg, device, gpon_xgpon_tod_gpio_pin))
+    {
+        dev_ctrl_db[device].device_params.gpon_xgpon_tod_gpio_pin = cfg->data.gpon_xgpon_tod_gpio_pin;
+    }
+    if (BCMOLT_CFG_PROP_IS_SET(cfg, device, gpon_xgpon_tod_connected_internally))
+    {
+        dev_ctrl_db[device].device_params.gpon_xgpon_tod_connected_internally = cfg->data.gpon_xgpon_tod_connected_internally;
+    }
+    if (BCMOLT_CFG_PROP_IS_SET(cfg, device, epon_shaper_mode))
+    {
+        dev_ctrl_db[device].device_params.epon_shaper_mode = cfg->data.epon_shaper_mode;
+    }
+    if (BCMOLT_CFG_PROP_IS_SET(cfg, device, embedded_image_list))
+    {
+        dev_ctrl_db[device].device_params.embedded_image_list = cfg->data.embedded_image_list;
+    }
+    if (BCMOLT_CFG_PROP_IS_SET(cfg, device, xgpon_num_of_onus))
+    {
+    	dev_ctrl_db[device].device_params.xgpon_num_of_onus = cfg->data.xgpon_num_of_onus;
+    }
+    if (BCMOLT_CFG_PROP_IS_SET(cfg, device, device_ip_address))
+    {
+        dev_ctrl_db[device].device_params.device_ip_address = cfg->data.device_ip_address;
+    }
+    if (BCMOLT_CFG_PROP_IS_SET(cfg, device, device_udp_port))
+    {
+        dev_ctrl_db[device].device_params.device_udp_port = cfg->data.device_udp_port;
+    }
+    if (BCMOLT_CFG_PROP_IS_SET(cfg, device, gpon_xgpon_tod_string_length))
+    {
+    	dev_ctrl_db[device].device_params.gpon_xgpon_tod_string_length = cfg->data.gpon_xgpon_tod_string_length;
+    }
+    if (BCMOLT_CFG_PROP_IS_SET(cfg, device, tod_uart_baudrate))
+    {
+    	dev_ctrl_db[device].device_params.tod_uart_baudrate = cfg->data.tod_uart_baudrate;
+    }
+}
+
+static bcmos_errno dev_ctrl_validate_fw_version(bcmolt_devid device, const bcmolt_firmware_sw_version *version)
+{
+    BCM_LOG(INFO, dev_ctrl_db[device].log_id,
+        "Firmware SW version %u.%u.%u (Object model revision %u, Build time: %s)\n",
+        version->major,
+        version->minor,
+        version->revision,
+        version->model,
+        version->build_time);
+
+    BCM_LOG(INFO, dev_ctrl_db[device].log_id,
+        "Host SW version %u.%u.%u (Object model revision %u, Build time: %s %s)\n",
+        BCMOLT_HOST_MAJOR_VER,
+        BCMOLT_HOST_MINOR_VER,
+        BCMOLT_HOST_REVISION_VER,
+        BCMOLT_MODEL_REVISION,
+        __DATE__,
+        __TIME__);
+
+    /* Version mismatch - note that only the Host/Firmware revisions can be different between the host and the firmware */
+    if (version->major != BCMOLT_HOST_MAJOR_VER ||
+        version->minor != BCMOLT_HOST_MINOR_VER ||
+        version->model != BCMOLT_MODEL_REVISION)
+    {
+        BCM_LOG(INFO, dev_ctrl_db[device].log_id,
+            "SW Versions Mismatch: Host SW version is %u.%u.%u with object model revision %d, while Firmware SW version is %u.%u.%u with object model revision %u\n",
+            BCMOLT_HOST_MAJOR_VER,
+            BCMOLT_HOST_MINOR_VER,
+            BCMOLT_HOST_REVISION_VER,
+            BCMOLT_MODEL_REVISION,
+            version->major,
+            version->minor,
+            version->revision,
+            version->model);
+        return BCM_ERR_STATE;
+    }
+    return BCM_ERR_OK;
+}
+
+#ifndef IN_BAND
+static bcmos_errno dev_ctrl_register_fld(bcmolt_devid device)
+{
+    bcmos_errno rc;
+    bcm_ll_dev_info ll_info;
+
+    if (dev_ctrl_db[device].fld_info.soc_sram_base > 0)
+    {
+        /* we have already queried the PCIe / registered with the FLD */
+        return BCM_ERR_OK;
+    }
+
+    rc = bcm_ll_pcie_query(device, &ll_info);
+    BCM_DEV_CTRL_RETURN_ON_ERROR(device, rc, "bcm_ll_pcie_query\n");
+    dev_ctrl_db[device].fld_info.soc_ddr_length = ll_info.soc_ddr_length;
+    dev_ctrl_db[device].fld_info.soc_sram_base = ll_info.soc_sram_base;
+    dev_ctrl_db[device].fld_info.soc_ddr_base = ll_info.soc_ddr_base;
+    dev_ctrl_db[device].fld_info.soc_regs_base = ll_info.soc_regs_base;
+
+    BCM_LOG(INFO, dev_ctrl_db[device].log_id,
+        "FLD_INFO: ddr_length=0x%x sram_base=%p soc_ddr_base=%p soc_regs_base=%p\n",
+        dev_ctrl_db[device].fld_info.soc_ddr_length,
+        (void *)dev_ctrl_db[device].fld_info.soc_sram_base,
+        (void *)dev_ctrl_db[device].fld_info.soc_ddr_base,
+        (void *)dev_ctrl_db[device].fld_info.soc_regs_base);
+
+    rc = bcm_fld_register(device, &dev_ctrl_db[device].fld_info);
+    BCM_DEV_CTRL_RETURN_ON_ERROR(device, rc, "bcm_fld_register\n");
+
+    return BCM_ERR_OK;
+}
+
+static bcmos_errno dev_ctrl_handle_file(bcmolt_devid device, bcmolt_device_image_type image_type)
+{
+    int32_t read_len;
+    BCM_FLD_HOST_DEBUG_VALUES host_debug_value;
+    bcmos_errno rc;
+    uint32_t offset_r = 0, offset_w = 0;
+    volatile unsigned long write_complete[2];
+    const char *image_name;
+
+    BUG_ON((image_type != BCMOLT_DEVICE_IMAGE_TYPE_BOOTLOADER) && (image_type != BCMOLT_DEVICE_IMAGE_TYPE_APPLICATION));
+
+    image_name = image_type == BCMOLT_DEVICE_IMAGE_TYPE_APPLICATION ? "application" : "boot loader";
+
+    BCM_LOG(INFO, dev_ctrl_db[device].log_id, "Loading %s\n", image_name);
+
+    host_debug_value = image_type == BCMOLT_DEVICE_IMAGE_TYPE_APPLICATION ? BCM_FLD_HOST_WRITE_DDR : BCM_FLD_HOST_WRITE_SRAM;
+    rc = bcm_fld_set_host_debug_status(device, host_debug_value);
+    BCM_DEV_CTRL_RETURN_ON_ERROR(device, rc, "bcm_fld_set_host_debug_status\n");
+
+    /* If this is the application image, skip the envelope (jump to the data itself). */
+    if (image_type == BCMOLT_DEVICE_IMAGE_TYPE_APPLICATION)
+    {
+        bcmolt_firmware_envelope envelope;
+
+        read_len = dev_ctrl_params.image_read_cb(device, image_type, offset_r, (uint8_t *)&envelope, sizeof(envelope));
+        if (read_len < sizeof(envelope))
+        {
+            BCM_LOG(ERROR, dev_ctrl_db[device].log_id, "image_read_cb returned error %s (%d)\n", bcmos_strerror(rc), rc);
+            return rc;
+        }
+        BCM_LOG(INFO, dev_ctrl_db[device].log_id, "Upload firmware version=%u.%u.%u.%u\n",
+            envelope.revision.release_major_id, envelope.revision.release_minor_id, envelope.revision.release_revision_id, envelope.revision.model_id);
+        offset_r += read_len;
+    }
+
+    do
+    {
+        read_len = dev_ctrl_params.image_read_cb(device, image_type, offset_r, image_buf[device], IMAGE_BUF_SIZE);
+        if (read_len < 0)
+        {
+            BCM_LOG(ERROR, dev_ctrl_db[device].log_id, "image_read_cb returned error %s (%d)\n", bcmos_strerror(rc), rc);
+            return rc;
+        }
+
+        if (!read_len)
+            break;
+
+        BCM_LOG(INFO, dev_ctrl_db[device].log_id, "Writing %s (%d)\n", image_name, read_len);
+        rc = bcm_fld_write(device, (char *)image_buf[device], read_len, offset_w, image_type);
+        if (rc != BCM_ERR_OK)
+        {
+            BCM_LOG(ERROR, dev_ctrl_db[device].log_id, "bcm_fld_write returned error %s (%d)\n", bcmos_strerror(rc), rc);
+            return rc;
+        }
+
+        BCM_LOG(INFO, dev_ctrl_db[device].log_id, "Reading %s for checking (%d)\n", image_name, read_len);
+        rc = bcm_fld_read(device, (char *)rd_image_buf[device], (uint32_t *)&read_len, offset_w, image_type);
+        if (rc != BCM_ERR_OK)
+        {
+            BCM_LOG(ERROR, dev_ctrl_db[device].log_id, "bcm_fld_read returned error %s (%d)\n", bcmos_strerror(rc), rc);
+            return rc;
+        }
+
+        offset_r += read_len;
+        offset_w += read_len;
+
+        BCM_LOG(INFO, dev_ctrl_db[device].log_id, "Comparing %s (%d)/(%u)\n", image_name, read_len, offset_w);
+        if (memcmp(rd_image_buf[device], image_buf[device], read_len))
+        {
+            BCM_LOG(ERROR, dev_ctrl_db[device].log_id, "Error during image uploading  %x\n", offset_w);
+            return BCM_ERR_INTERNAL;
+        }
+    } while (read_len);
+
+    if (!offset_w)
+    {
+        BCM_LOG(ERROR, dev_ctrl_db[device].log_id, "%s image file empty or corrupted!!!\n", image_name);
+        return BCM_ERR_INTERNAL;
+    }
+
+    if (image_type == BCMOLT_DEVICE_IMAGE_TYPE_APPLICATION)
+    {
+        read_len = sizeof(unsigned long);
+        /* first read word from star of the image */
+        bcm_fld_read(device, (char *)(long)&write_complete[0], (uint32_t *)&read_len, 0, image_type);
+        /* sync before read tail of image */
+        bcmos_barrier();
+        /* read from tail of the image */
+        bcm_fld_read(
+            device,
+            (char *)(long)&write_complete[1],
+            (uint32_t *)&read_len,
+            offset_w - sizeof(unsigned long),
+            image_type);
+        /* now we can be sure that full image in the embedded memory */
+    }
+
+    BCM_LOG(INFO, dev_ctrl_db[device].log_id, "Transferred %u bytes\n", offset_w);
+
+    return BCM_ERR_OK;
+}
+
+static bcmos_errno dev_ctrl_handle_application_image(bcmolt_devid device)
+{
+    bcmolt_device_cfg_data *dev_params = &dev_ctrl_db[device].device_params;
+    bcmos_errno rc = BCM_ERR_OK;
+
+    rc = dev_ctrl_handle_file(device, BCMOLT_DEVICE_IMAGE_TYPE_APPLICATION);
+    BCM_DEV_CTRL_RETURN_ON_ERROR(device, rc, "dev_ctrl_handle_file()\n");
+    rc = bcm_fld_host_finish_write_ddr(device, 0);
+    BCM_DEV_CTRL_RETURN_ON_ERROR(device, rc, "bcm_fld_host_finish_write_ddr()\n");
+    rc = bcmtrmux_connect(device, dev_params->debug.host_dma_tx_queue_size, dev_params->debug.host_dma_rx_queue_size);
+    BCM_DEV_CTRL_RETURN_ON_ERROR(device, rc, "bcmtrmux_connect()\n");
+    /* We want that in case ONLY the host is reset, Maple enters standalone mode - this means we need to turn off "hot reset" on the PCIe channel. */
+    rc = bcm_ll_pcie_host_reset_enable(device,BCMOS_FALSE);
+    BCM_DEV_CTRL_RETURN_ON_ERROR(device, rc, "bcm_ll_pcie_host_reset_enable()\n");
+
+    return rc;
+}
+
+static bcmos_errno dev_ctrl_handle_bootloader_image(bcmolt_devid device, uint32_t test_ddr)
+{
+    bcmos_errno rc = BCM_ERR_OK;
+
+    rc = dev_ctrl_handle_file(device, BCMOLT_DEVICE_IMAGE_TYPE_BOOTLOADER);
+    BCM_DEV_CTRL_RETURN_ON_ERROR(device, rc, "dev_ctrl_handle_file()\n");
+    rc = bcm_fld_start_bootloader(device, test_ddr);
+    BCM_DEV_CTRL_RETURN_ON_ERROR(device, rc, "bcm_fld_start_bootloader()\n");
+    bcmos_timer_start(
+        &dev_ctrl_db[device].boot_seq_info.timer.timer,
+        dev_ctrl_db[device].boot_seq_info.polling_interval);
+
+    return rc;
+}
+
+static bcmos_errno dev_ctrl_start_fld(bcmolt_devid device, uint32_t test_ddr)
+{
+    bcmos_errno rc = BCM_ERR_OK;
+
+    bcm_fld_clear_comm_area(device);
+
+    rc = dev_ctrl_handle_bootloader_image(device, test_ddr);
+    BCM_DEV_CTRL_RETURN_ON_ERROR(device, rc, "dev_ctrl_handle_bootloader_image\n");
+
+    return rc;
+}
+
+static bcmos_errno dev_ctrl_get_exception_log_by_cpu(bcmolt_devid device, uint32_t cpuid)
+{
+    char *exception_buf;
+    int exception_buf_len;
+    bcmos_errno rc;
+
+    exception_buf = bcmos_alloc(BCM_FLD_CPU_POSTMORTEM_BUF_SIZE);
+    rc = bcm_fld_copy_exception_log(device, cpuid, exception_buf, &exception_buf_len);
+    if (rc)
+    {
+        BCM_LOG(ERROR, dev_ctrl_db[device].log_id, "bcm_fld_copy_exception_log failed, rc=%u (%s)\n", rc, bcmos_strerror(rc));
+        goto exit;
+    }
+    bcm_fld_clear_exception_state(device, cpuid);
+
+    dev_ctrl_send_ind_exception_log(device, cpuid, exception_buf);
+    rc = BCM_ERR_OK;
+
+exit:
+    bcmos_free(exception_buf);
+    return rc;
+}
+
+/** Dump exception log if there is one, return BCM_ERR_NOENT if not. */
+static bcmos_errno dev_ctrl_get_exception_log_if_present(bcmolt_devid dev_id)
+{
+    bcmos_errno rc;
+    uint32_t state0, state1;
+
+    /* Dump exception log, if any.
+     * This should be done prior to writing bootloader, as it will overwrite the same place in SRAM. */
+    rc = bcm_fld_get_exception_state(dev_id, &state0, &state1);
+    BCM_DEV_CTRL_RETURN_ON_ERROR(dev_id, rc, "bcm_fld_get_exception_state\n");
+    if (state0)
+        dev_ctrl_get_exception_log_by_cpu(dev_id, 0);
+    if (state1)
+        dev_ctrl_get_exception_log_by_cpu(dev_id, 1);
+    if (!state0 && !state1)
+        return BCM_ERR_NOENT;
+
+    return BCM_ERR_OK;
+}
+
+/** Dump exception log if there is one, print a message and return BCM_ERR_OK if not. */
+static bcmos_errno dev_ctrl_get_exception_log(bcmolt_devid dev_id)
+{
+    bcmos_errno rc = dev_ctrl_get_exception_log_if_present(dev_id);
+    if (rc == BCM_ERR_NOENT)
+    {
+        BCM_LOG(DEBUG, dev_ctrl_db[dev_id].log_id, "Exception log for device %d is empty\n", dev_id);
+        rc = BCM_ERR_OK;
+    }
+    return rc;
+}
+
+static void dev_ctrl_sw_error_table_dump(bcmolt_devid dev_id)
+{
+    bcmos_errno err = dev_ctrl_get_sw_error_table(dev_id);
+    uint8_t i;
+
+    if (BCM_ERR_OK != err)
+    {
+        BCM_LOG(INFO, dev_ctrl_db[dev_id].log_id, "Failed to retrieve Embedded Software Error(s): %d\n", err);
+    }
+    else
+    {
+        BCM_LOG(INFO, dev_ctrl_db[dev_id].log_id, "Found %u Embedded Software Error(s):\n", dev_ctrl_db[dev_id].sw_error_count);
+        for (i = 0; i < dev_ctrl_db[dev_id].sw_error_count; i++)
+        {
+            BCM_LOG(INFO, dev_ctrl_db[dev_id].log_id,
+                "\t[%s] %s:%u inst:%u count:%u first:%llu last:%llu\n",
+                dev_ctrl_db[dev_id].sw_errors[i].task_name,
+                dev_ctrl_db[dev_id].sw_errors[i].filename,
+                dev_ctrl_db[dev_id].sw_errors[i].line_number,
+                dev_ctrl_db[dev_id].sw_errors[i].instance,
+                dev_ctrl_db[dev_id].sw_errors[i].error_counter,
+                (unsigned long long)dev_ctrl_db[dev_id].sw_errors[i].first_error_time_us,
+                (unsigned long long)dev_ctrl_db[dev_id].sw_errors[i].last_error_time_us);
+        }
+    }
+}
+#endif
+
+static bcmolt_host_connection_fail_reason dev_ctrl_connect_from_reset(bcmolt_devid device, uint32_t test_ddr)
+{
+#ifndef IN_BAND
+    bcmos_errno rc;
+
+    rc = dev_ctrl_params.device_on_cb(device);
+    BCMOS_TRACE_CHECK_RETURN(
+        rc != BCM_ERR_OK,
+        BCMOLT_HOST_CONNECTION_FAIL_REASON_USER_CALLBACK_ERROR,
+        "device_on_cb\n");
+
+    rc = dev_ctrl_params.pcie_channel_prepare_cb(device);
+    BCMOS_TRACE_CHECK_RETURN(
+        rc != BCM_ERR_OK,
+        BCMOLT_HOST_CONNECTION_FAIL_REASON_USER_CALLBACK_ERROR,
+        "pcie_channel_prepare_cb\n");
+
+
+    rc = dev_ctrl_register_fld(device);
+    BCMOS_TRACE_CHECK_RETURN(
+        rc != BCM_ERR_OK,
+        BCMOLT_HOST_CONNECTION_FAIL_REASON_INTERNAL_ERROR,
+        "dev_ctrl_register_fld\n");
+
+    dev_ctrl_get_exception_log(device);
+    dev_ctrl_sw_error_table_dump(device);
+
+#ifndef SIMULATION_BUILD
+    bcm_fld_set_host_event(device, dev_ctrl_db[device].trx_disable_mask);
+#endif
+    rc = dev_ctrl_start_fld(device, test_ddr);
+    BCMOS_TRACE_CHECK_RETURN(
+        rc != BCM_ERR_OK,
+        BCMOLT_HOST_CONNECTION_FAIL_REASON_INTERNAL_ERROR,
+        "dev_ctrl_start_fld\n");
+#endif
+    return BCMOLT_HOST_CONNECTION_FAIL_REASON_NONE;
+}
+
+static bcmolt_host_connection_fail_reason dev_ctrl_connect_to_standalone(bcmolt_devid device)
+{
+    bcmos_errno rc;
+
+    /* if Maple runs in standalone mode, and host did reset, we need to register maple to fld and and
+       reconnect the transport layer - no need to rescan, it was done automatically by host when
+       ll_pcie registered maple
+       re-scan without passing thru remove and maple off, lets maple out of reset, remapped, but stucked
+       not, really, working in standaloane mode
+       */
+
+    /* The chip is running and the PCIe channel hardware is initialized, we can now safely:
+     * - Register with the FLD driver.
+     * - Restart the PCIe connection process.  As part of this process, the host will set the 'host queues valid' flag.
+     *   If the device is running and sees this flag is set, it will start the reconnection process as well, in sync
+     *   with the host.  If the device fails to connect, it means that the device is unresponsive, so the best we can do
+     *   is reset the device and reprogram it from scratch. */
+#ifndef IN_BAND
+    rc = dev_ctrl_register_fld(device);
+    BCMOS_TRACE_CHECK_RETURN(
+        rc != BCM_ERR_OK,
+        BCMOLT_HOST_CONNECTION_FAIL_REASON_INTERNAL_ERROR,
+        "dev_ctrl_register_fld\n");
+
+    dev_ctrl_get_exception_log(device);
+
+#ifndef SIMULATION_BUILD
+    bcm_fld_set_host_event(device, dev_ctrl_db[device].trx_disable_mask);
+#endif
+#endif
+
+    BCM_LOG(INFO, dev_ctrl_db[device].log_id, "Requesting re-connect to running device...\n");
+#ifndef IN_BAND
+    rc = bcmtrmux_connect(
+        device,
+        dev_ctrl_db[device].device_params.debug.host_dma_tx_queue_size,
+        dev_ctrl_db[device].device_params.debug.host_dma_rx_queue_size); 
+#else
+     /*Need to pass in IP Address and UDP port when running in linux user space*/
+    rc = bcmtrmux_connect(device,
+          dev_ctrl_db[device].device_params.device_ip_address,
+          dev_ctrl_db[device].device_params.device_udp_port);
+
+#endif
+
+    if (rc == BCM_ERR_OK)
+    {
+        dev_ctrl_db[device].connection_info.state = DEV_CTRL_CONNECTING_STATE_STANDALONE;
+        return BCMOLT_HOST_CONNECTION_FAIL_REASON_NONE;
+    }
+    else
+    {
+        BCM_LOG(INFO, dev_ctrl_db[device].log_id, "Connection failed - running device didn't respond to connection request\n");
+        return BCMOLT_HOST_CONNECTION_FAIL_REASON_RECONNECT_TIMEOUT;
+    }
+}
+
+static void dev_ctrl_disconnect(bcmolt_devid device)
+{
+    bcmos_errno rc;
+
+    dev_ctrl_db[device].device_params.state = BCMOLT_DEVICE_STATE_DISCONNECTED;
+#ifdef ENABLE_LOG
+    dev_ctrl_db[device].sram_log_offset = 0;
+    dev_ctrl_db[device].msgs_read = 0;
+#endif
+    stop_keep_alive_process(&dev_ctrl_db[device].ka_info);
+    bcmos_timer_stop(&dev_ctrl_db[device].exception_monitor_timer.timer);
+    dev_ctrl_init_connection_state(device);
+    rc = bcmtrmux_disconnect(device);
+    if (rc != BCM_ERR_OK && rc != BCM_ERR_ALREADY)
+    {
+        BCM_LOG(ERROR, dev_ctrl_db[device].log_id, "bcmtrmux_disconnect returned error: %s (%d)\n", bcmos_strerror(rc), rc);
+    }
+}
+
+static bcmos_errno dev_ctrl_perform_reset_device(bcmolt_devid device)
+{
+    bcmos_errno rc = BCM_ERR_OK;
+
+    dev_ctrl_disconnect(device);
+
+#ifndef IN_BAND
+    rc = dev_ctrl_params.pcie_channel_remove_cb(device);
+    if (rc != BCM_ERR_OK)
+    {
+        BCM_LOG(ERROR, dev_ctrl_db[device].log_id, "Device remove callback failed: %s (%d)\n", bcmos_strerror(rc), rc);
+    }
+    rc = dev_ctrl_params.device_off_cb(device);
+    if (rc != BCM_ERR_OK)
+    {
+        BCM_LOG(ERROR, dev_ctrl_db[device].log_id, "Device off callback failed: %s (%d)\n", bcmos_strerror(rc), rc);
+    }
+
+    /* the device has been reset so our FLD info is now invalid */
+    dev_ctrl_db[device].fld_info.soc_sram_base = 0;
+    bcm_fld_unregister(device);
+#endif
+    return rc;
+}
+static bcmos_errno dev_ctrl_perform_reset(bcmolt_devid device, const bcmolt_msg *msg)
+{
+    bcmos_errno rc = BCM_ERR_OK;
+    bcmolt_device_reset_mode mode = ((const bcmolt_device_reset *)msg)->data.mode;
+    bcmolt_devid i;
+
+    switch (mode)
+    {
+    case BCMOLT_DEVICE_RESET_MODE_DEVICE:
+        return dev_ctrl_perform_reset_device(device);
+
+    case BCMOLT_DEVICE_RESET_MODE_HOST:
+        dev_ctrl_db[device].device_params.state = BCMOLT_DEVICE_STATE_DISCONNECTED;
+        dev_ctrl_db[device].is_host_reset_pending = BCMOS_TRUE;
+        dev_ctrl_send_device_disconnect_msg(device, 0);
+        /* instead of resetting the host right away, wait a few ms so the host can receive the ack / indication */
+        bcmos_timer_start(&dev_ctrl_db[device].reset_delay_timer.timer, HOST_RESET_DELAY_US);
+        break;
+
+    case BCMOLT_DEVICE_RESET_MODE_ALL:
+        for (i = 0; i < BCMTR_MAX_OLTS; i++)
+        {
+            dev_ctrl_db[i].device_params.state = BCMOLT_DEVICE_STATE_DISCONNECTED;
+            dev_ctrl_db[i].is_host_reset_pending = BCMOS_TRUE;
+            rc = dev_ctrl_params.device_off_cb(i);
+            if (rc != BCM_ERR_OK)
+            {
+                BCM_LOG(ERROR, dev_ctrl_db[i].log_id, "Device off callback failed: %s (%d)\n", bcmos_strerror(rc), rc);
+            }
+        }
+        /* instead of resetting the host right away, wait a few ms so the host can receive the ack / indication */
+        bcmos_timer_start(&dev_ctrl_db[device].reset_delay_timer.timer, HOST_RESET_DELAY_US);
+        break;
+
+    default:
+        BCM_LOG(ERROR, dev_ctrl_db[device].log_id, "Unrecognized reset mode: %d\n", mode);
+        break;
+    }
+
+    return rc;
+}
+
+static void dev_ctrl_disconnected_state_device_clear_event(bcmolt_devid device, const bcmolt_msg *msg)
+{
+    dev_ctrl_clear_device_cfg(device);
+}
+
+static void dev_ctrl_disconnected_state_device_config_set_event(bcmolt_devid device, const bcmolt_msg *msg)
+{
+    if (dev_ctrl_db[device].last_message == NULL)
+    {
+        BCM_LOG(ERROR, dev_ctrl_db[device].log_id, "Our saved message was invalid\n");
+        return;
+    }
+
+    dev_ctrl_update_local_configuration(device, msg);
+    dev_ctrl_db[device].last_message->dir = BCMOLT_MSG_DIR_RESPONSE;
+    bcmtrmux_control_to_host(device, dev_ctrl_db[device].last_message);
+    bcmolt_msg_free(dev_ctrl_db[device].last_message);
+    dev_ctrl_db[device].last_message = NULL;
+}
+
+static void dev_ctrl_disconnected_state_device_config_get_event(bcmolt_devid device, const bcmolt_msg *msg)
+{
+    bcmolt_presence_mask mask;
+    bcmolt_device_cfg *cfg;
+
+    if (dev_ctrl_db[device].last_message == NULL)
+    {
+        BCM_LOG(ERROR, dev_ctrl_db[device].log_id, "Our saved message was invalid --- aborting\n");
+        return;
+    }
+
+    cfg = (bcmolt_device_cfg *)dev_ctrl_db[device].last_message;
+    cfg->data = dev_ctrl_db[device].device_params;
+    mask = dev_ctrl_fill_from_local(device);
+
+    if ((mask & ~dev_ctrl_db[device].device_params_present) != 0)
+    {
+        bcmolt_msg_err(
+            dev_ctrl_db[device].last_message,
+            DEV_LOG_INVALID_ID,
+            BCM_ERR_INVALID_OP,
+            BCMOLT_ERR_FIELD_NONE,
+            "Unable to get parameters that have never been set");
+    }
+
+    dev_ctrl_db[device].last_message->dir = BCMOLT_MSG_DIR_RESPONSE;
+    bcmtrmux_control_to_host(device, dev_ctrl_db[device].last_message);
+    bcmolt_msg_free(dev_ctrl_db[device].last_message);
+    dev_ctrl_db[device].last_message = NULL;
+}
+
+static void dev_ctrl_disconnected_state_device_connect_event(bcmolt_devid device, const bcmolt_msg *msg)
+{
+#ifdef IN_BAND
+    bcmolt_device_connect oper;
+    bcmolt_device_key key = {};   
+#else
+    bcmos_errno rc;
+#endif
+    bcmolt_host_connection_fail_reason fail_reason;
+    bcmos_bool is_standalone;
+
+    if (dev_ctrl_db[device].is_host_reset_pending)
+    {
+        BCM_LOG(ERROR, dev_ctrl_db[device].log_id, "Cannot connect while host reset is pending\n");
+        return;
+    }
+
+#ifndef IN_BAND
+    /* Check if the chip is running in standalone mode */
+
+    rc = dev_ctrl_params.device_is_running_cb(device, &is_standalone);
+
+    if (rc != BCM_ERR_OK)
+    {
+        BCM_LOG(ERROR, dev_ctrl_db[device].log_id, "device_status_get_cb returned error: %s (%d)\n", bcmos_strerror(rc), rc);
+        return;
+    }
+    BCM_LOG(INFO, dev_ctrl_db[device].log_id, "device_status_get_cb returned success: is_standalone=%s\n", is_standalone ? "yes" : "no");
+
+    /* If the chip is running in standalone mode, connect to it:
+     * - Check the status of the PCIe channel and prepare it if necessary, using host callbacks
+     * - Register the device in the FLD driver
+     * - Use FLD to ask the device to re-initialize its PCIe transport layer
+     * - Initialize the host PCIe transport layer
+     * Otherwise, we must start the boot sequence:
+     * - Power on the device
+     * - Prepare the PCIe channel via host callback
+     * - Register the device in the FLD driver
+     * - Check if there is an exception log from the last time the application was run (and print it if so)
+     * - Start the FLD timer to load the bootcode
+     * In either case, the resulting state is 'connecting'.
+     */
+    dev_ctrl_db[device].boot_seq_info.polling_counter = BOOT_SEQ_POLLING_MAX_NUMBER;
+    bcmos_timer_handler_set(&dev_ctrl_db[device].boot_seq_info.timer.timer, dev_ctrl_boot_seq_timer_handler, device);
+#else
+    is_standalone= BCMOS_TRUE;
+#endif
+    if (is_standalone)
+    {
+        fail_reason = dev_ctrl_connect_to_standalone(device);
+    }
+    else
+    {
+        fail_reason = dev_ctrl_connect_from_reset(device, 0);
+        dev_ctrl_db[device].connection_info.state = DEV_CTRL_CONNECTING_STATE_ESTABLISHING;
+    }
+
+    if (fail_reason == BCMOLT_HOST_CONNECTION_FAIL_REASON_NONE)
+    {
+        bcmos_timer_start(&dev_ctrl_db[device].connection_info.timer.timer, DEVICE_CONTROL_CONNECT_TIME_US);
+        dev_ctrl_db[device].device_params.state = BCMOLT_DEVICE_STATE_CONNECTING;
+        BCM_LOG(DEBUG, dev_ctrl_db[device].log_id, "began connecting to %s\n", is_standalone ? "standby device" : "device from reset");
+
+#ifndef IN_BAND
+    /*Do nothing*/
+#else
+    BCMOLT_OPER_INIT(&oper, device, connect, key);
+    oper.hdr.hdr.type = BCMOLT_MSG_TYPE_SET;
+    (void)bcmtrmux_control_to_line(device, &oper.hdr.hdr);
+    bcmos_printf("Sent connect to embedded...\n");
+#endif
+
+    }
+    else
+    {
+        BCM_LOG(ERROR, dev_ctrl_db[device].log_id,
+            "failed to begin connection process: %s (%d)\n",
+            bcm_str_host_connection_fail_reason(fail_reason),
+            fail_reason);
+        dev_ctrl_send_ind_connection_failure(device, fail_reason);
+    }
+}
+
+static void dev_ctrl_disconnected_state_device_reset_event(bcmolt_devid device, const bcmolt_msg *msg)
+{
+    dev_ctrl_perform_reset(device, msg);
+}
+
+#ifndef IN_BAND
+static void dev_ctrl_disconnected_state_device_run_ddr_test_event(bcmolt_devid device, const bcmolt_msg *msg)
+{
+    bcmolt_host_connection_fail_reason fail_reason;
+    uint32_t test_ddr = 0;
+
+    const bcmolt_device_run_ddr_test_data *params = &((const bcmolt_device_run_ddr_test *)msg)->data;
+    if (params->cpu)
+    {
+        test_ddr |= BCM_FLD_HOST_RUN_CPU_DDR_TEST_MASK;
+    }
+    if (params->ras_0)
+    {
+        test_ddr |= BCM_FLD_HOST_RUN_RAS_0_TEST_MASK;
+    }
+    if (params->ras_1)
+    {
+        test_ddr |= BCM_FLD_HOST_RUN_RAS_1_TEST_MASK;
+    }
+
+    dev_ctrl_db[device].boot_seq_info.polling_counter = DDR_TEST_POLLING_MAX_NUMBER;
+    bcmos_timer_handler_set(&dev_ctrl_db[device].boot_seq_info.timer.timer, dev_ctrl_ddr_test_timer_handler, device);
+    fail_reason = dev_ctrl_connect_from_reset(device, test_ddr);
+    if (fail_reason == BCMOLT_HOST_CONNECTION_FAIL_REASON_NONE)
+    {
+        dev_ctrl_db[device].device_params.state = BCMOLT_DEVICE_STATE_TESTING_DDR;
+    }
+    else
+    {
+        bcmolt_device_ddr_test_complete ind = {};
+        BCMOLT_AUTO_INIT(&ind, device, ddr_test_complete);
+        ind.data.ddr_test.status = BCMOLT_DDR_TEST_STATUS_CONNECTION_FAILED;
+        ind.data.ddr_test.u.connection_failed.reason = fail_reason;
+        dev_ctrl_send_indication(device, &ind.hdr.hdr);
+    }
+
+}
+
+static void dev_ctrl_testing_ddr_state_ddr_test_completed_event(bcmolt_devid device, const bcmolt_msg *msg)
+{
+    bcmolt_device_ddr_test_complete ind = {};
+
+    BCMOLT_AUTO_INIT(&ind, device, ddr_test_complete);
+
+    ind.data.ddr_test.status = BCMOLT_DDR_TEST_STATUS_COMPLETED;
+    ind.data.ddr_test.u.completed.cpu_result = bcm_fld_ddr_test_result_get(device, 0);
+    ind.data.ddr_test.u.completed.ras_0_result = bcm_fld_ddr_test_result_get(device, 1);
+    ind.data.ddr_test.u.completed.ras_1_result = bcm_fld_ddr_test_result_get(device, 2);
+
+    dev_ctrl_perform_reset_device(device);
+    dev_ctrl_db[device].device_params.state = BCMOLT_DEVICE_STATE_DISCONNECTED;
+
+    dev_ctrl_send_indication(device, &ind.hdr.hdr);
+}
+
+static void dev_ctrl_testing_ddr_state_ddr_test_timeout_event(bcmolt_devid device, const bcmolt_msg *msg)
+{
+    bcmolt_device_ddr_test_complete ind = {};
+
+    dev_ctrl_perform_reset_device(device);
+    dev_ctrl_db[device].device_params.state = BCMOLT_DEVICE_STATE_DISCONNECTED;
+
+    BCMOLT_AUTO_INIT(&ind, device, ddr_test_complete);
+    ind.data.ddr_test.status = BCMOLT_DDR_TEST_STATUS_TIMEOUT;
+    dev_ctrl_send_indication(device, &ind.hdr.hdr);
+}
+#endif
+
+static void dev_ctrl_connecting_state_connection_failure_event(bcmolt_devid device, const bcmolt_msg *msg)
+{
+    dev_ctrl_disconnect(device);
+    dev_ctrl_send_ind_connection_failure_from_msg(device, msg);
+}
+
+static void dev_ctrl_connecting_state_connection_established_event(bcmolt_devid device, const bcmolt_msg *msg)
+{
+    if (dev_ctrl_db[device].connection_info.state == DEV_CTRL_CONNECTING_STATE_ESTABLISHING)
+    {
+        /* Initial connection is complete, now wait for the firmware to be initialized. */
+        dev_ctrl_db[device].connection_info.state = DEV_CTRL_CONNECTING_STATE_CONFIGURING;
+        dev_ctrl_send_config_set_msg(
+            device,
+            dev_ctrl_db[device].device_params_present,
+            0,
+            &dev_ctrl_db[device].device_params);
+        if (dev_ctrl_db[device].connection_info.config_send_counter > 0)
+        {
+            dev_ctrl_db[device].connection_info.config_send_counter--;
+        }
+        bcmos_timer_start(
+            &dev_ctrl_db[device].connection_info.timer.timer,
+            dev_ctrl_db[device].connection_info.config_interval);
+    }
+    else
+    {
+        /* Initial connection was already done - something must have gone wrong.  Try again. */
+        if (dev_ctrl_db[device].connection_info.config_send_counter > 0)
+        {
+            dev_ctrl_send_config_set_msg(
+                device,
+                dev_ctrl_db[device].device_params_present,
+                0,
+                &dev_ctrl_db[device].device_params);
+            bcmos_timer_start(
+                &dev_ctrl_db[device].connection_info.timer.timer,
+                dev_ctrl_db[device].connection_info.config_interval);
+            dev_ctrl_db[device].connection_info.config_send_counter--;
+        }
+        else
+        {
+            dev_ctrl_disconnect(device);
+            dev_ctrl_send_ind_connection_failure(device, BCMOLT_HOST_CONNECTION_FAIL_REASON_TIMEOUT);
+        }
+    }
+}
+
+static inline bcmos_bool dev_ctrl_nni_speed_equal(const bcmolt_device_nni_speed *a, const bcmolt_device_nni_speed *b)
+{
+    return (a->first_half == b->first_half && a->second_half == b->second_half);
+}
+
+static void dev_ctrl_connecting_state_device_ready_event(bcmolt_devid device, const bcmolt_msg *msg)
+{
+    bcmos_errno rc;
+    const bcmolt_device_device_ready *ready_msg = (const bcmolt_device_device_ready *)msg;
+    bcmolt_host_connection_fail_reason fail_reason = BCMOLT_HOST_CONNECTION_FAIL_REASON__NUM_OF;
+
+    if (dev_ctrl_db[device].connection_info.state == DEV_CTRL_CONNECTING_STATE_ESTABLISHING)
+    {
+        BCM_LOG(ERROR, dev_ctrl_db[device].log_id, "Unexpected 'device ready' indication before connection is established\n");
+        return;
+    }
+
+    if (ready_msg->data.system_mode != dev_ctrl_db[device].device_params.system_mode)
+    {
+        fail_reason = BCMOLT_HOST_CONNECTION_FAIL_REASON_SYSTEM_MODE_MISMATCH;
+    }
+    else if ((dev_ctrl_db[device].device_params_present & BCMOLT_PROP_MASK_GET(device, _cfg, nni_speed)) != 0 &&
+        !dev_ctrl_nni_speed_equal(&ready_msg->data.nni_speed, &dev_ctrl_db[device].device_params.nni_speed))
+    {
+        fail_reason = BCMOLT_HOST_CONNECTION_FAIL_REASON_NNI_SPEED_MISMATCH;
+    }
+    else
+    {
+        rc = dev_ctrl_validate_fw_version(device, &ready_msg->data.firmware_sw_version);
+        if (rc != BCM_ERR_OK)
+        {
+            fail_reason = BCMOLT_HOST_CONNECTION_FAIL_REASON_SOFTWARE_VERSION_MISMATCH;
+        }
+    }
+
+    if (fail_reason == BCMOLT_HOST_CONNECTION_FAIL_REASON__NUM_OF)
+    {
+        dev_ctrl_db[device].device_params.firmware_sw_version = ready_msg->data.firmware_sw_version;
+        dev_ctrl_db[device].device_params.chip_revision = ready_msg->data.chip_revision;
+        if ((dev_ctrl_db[device].device_params_present & BCMOLT_PROP_MASK_GET(device, _cfg, nni_speed)) == 0)
+        {
+            dev_ctrl_db[device].device_params.nni_speed = ready_msg->data.nni_speed;
+            dev_ctrl_db[device].device_params_present |= BCMOLT_PROP_MASK_GET(device, _cfg, nni_speed);
+        }
+
+        if (dev_ctrl_db[device].ka_info.ka_interval > 0)
+        {
+            start_keep_alive_process(&dev_ctrl_db[device].ka_info);
+        }
+
+#ifndef IN_BAND
+        bcmos_timer_start(&dev_ctrl_db[device].exception_monitor_timer.timer, EXCEPTION_LOG_MONITOR_INTERVAL);
+#endif
+        dev_ctrl_db[device].device_params.state = BCMOLT_DEVICE_STATE_READY;
+        dev_ctrl_send_ind_connection_complete(
+            device,
+            dev_ctrl_db[device].connection_info.state == DEV_CTRL_CONNECTING_STATE_STANDALONE);
+    }
+    else
+    {
+        dev_ctrl_send_device_disconnect_msg(device, 0);
+        dev_ctrl_disconnect(device);
+        dev_ctrl_send_ind_connection_failure(device, fail_reason);
+    }
+}
+
+static void dev_ctrl_connecting_state_received_ack(bcmolt_devid device, const bcmolt_msg *msg)
+{
+    /* This is called when we receive the ACK response against the configuraiton set message which was sent while the
+     * state-machine as part of the initial connection process.  If the result is OK, we should just move on and keep
+     * waiting for the "ready" indication.  If the result is not OK, the device rejected the configuration so we
+     * should disconnect the device and send a failure indication. */
+    if (msg->err != BCM_ERR_OK)
+    {
+        bcmolt_host_connection_fail_reason fail_reason;
+
+        dev_ctrl_disconnect(device);
+
+        /* Figure out which failure reason based on the message error code. */
+        switch (msg->err)
+        {
+        case BCM_ERR_NOT_SUPPORTED:
+            fail_reason = BCMOLT_HOST_CONNECTION_FAIL_REASON_SYSTEM_MODE_NOT_SUPPORTED;
+            break;
+        case BCM_ERR_PARM:
+            fail_reason = BCMOLT_HOST_CONNECTION_FAIL_REASON_PARAMETER;
+            break;
+        default:
+            fail_reason = BCMOLT_HOST_CONNECTION_FAIL_REASON_INTERNAL_ERROR;
+            break;
+        }
+
+        dev_ctrl_send_ind_connection_failure(device, fail_reason);
+    }
+}
+
+static void dev_ctrl_ready_state_device_config_set_event(bcmolt_devid device, const bcmolt_msg *msg)
+{
+    const bcmolt_device_cfg *cfg = (const bcmolt_device_cfg *)msg;
+
+    dev_ctrl_send_config_set_msg(device, msg->presence_mask, dev_ctrl_db[device].last_message->corr_tag, &cfg->data);
+
+    bcmos_timer_start(&dev_ctrl_db[device].device_response_timer.timer, DEVICE_RESPONSE_TIMEOUT_LENGTH);
+    dev_ctrl_db[device].device_params.state = BCMOLT_DEVICE_STATE_WAITING_FOR_DEVICE;
+}
+
+static void dev_ctrl_ready_state_device_config_get_event(bcmolt_devid device, const bcmolt_msg *msg)
+{
+    bcmolt_presence_mask mask;
+
+    if (dev_ctrl_db[device].last_message == NULL)
+    {
+        BCM_LOG(ERROR, dev_ctrl_db[device].log_id, "Our saved message was invalid --- aborting\n");
+        return;
+    }
+
+    mask = dev_ctrl_fill_from_local(device);
+    if (mask == 0)
+    {
+        dev_ctrl_db[device].last_message->dir = BCMOLT_MSG_DIR_RESPONSE;
+        bcmtrmux_control_to_host(device, dev_ctrl_db[device].last_message);
+        bcmolt_msg_free(dev_ctrl_db[device].last_message);
+        dev_ctrl_db[device].last_message = NULL;
+    }
+    else
+    {
+        bcmos_timer_start(&dev_ctrl_db[device].device_response_timer.timer, DEVICE_RESPONSE_TIMEOUT_LENGTH);
+        dev_ctrl_db[device].device_params.state = BCMOLT_DEVICE_STATE_WAITING_FOR_DEVICE;
+        dev_ctrl_send_config_get_msg(device, mask, dev_ctrl_db[device].last_message->corr_tag);
+    }
+}
+
+static void dev_ctrl_ready_state_device_disconnect_event(bcmolt_devid device, const bcmolt_msg *msg)
+{
+    dev_ctrl_send_device_disconnect_msg(device, 0);
+    dev_ctrl_disconnect(device);
+    dev_ctrl_send_ind_disconnection_complete(device);
+}
+
+static void dev_ctrl_ready_state_device_reset_event(bcmolt_devid device, const bcmolt_msg *msg)
+{
+    dev_ctrl_perform_reset(device, msg);
+    dev_ctrl_send_ind_disconnection_complete(device);
+}
+
+static void dev_ctrl_ready_state_connection_failure_event(bcmolt_devid device, const bcmolt_msg *msg)
+{
+    dev_ctrl_disconnect(device);
+    dev_ctrl_send_ind_connection_failure_from_msg(device, msg);
+}
+
+static void dev_ctrl_waiting_for_device_state_timer_timeout(bcmolt_devid device, const bcmolt_msg *msg)
+{
+    if (dev_ctrl_db[device].last_message == NULL)
+    {
+        BCM_LOG(ERROR, dev_ctrl_db[device].log_id, "Our saved message was invalid --- aborting\n");
+        return;
+    }
+
+    bcmolt_msg_err(
+        dev_ctrl_db[device].last_message,
+        DEV_LOG_INVALID_ID,
+        BCM_ERR_INTERNAL,
+        BCMOLT_ERR_FIELD_NONE,
+        "No response to configuration message from embedded");
+    dev_ctrl_db[device].last_message->dir = BCMOLT_MSG_DIR_RESPONSE;
+    bcmtrmux_control_to_host(device, dev_ctrl_db[device].last_message);
+    bcmolt_msg_free(dev_ctrl_db[device].last_message);
+    dev_ctrl_db[device].last_message = NULL;
+    dev_ctrl_db[device].device_params.state = BCMOLT_DEVICE_STATE_READY;
+}
+
+static void dev_ctrl_waiting_for_device_state_received_ack(bcmolt_devid device, const bcmolt_msg *msg)
+{
+    bcmos_timer_stop(&dev_ctrl_db[device].device_response_timer.timer);
+
+    if (dev_ctrl_db[device].last_message == NULL)
+    {
+        BCM_LOG(ERROR, dev_ctrl_db[device].log_id, "Our saved message was invalid --- aborting\n");
+        return;
+    }
+
+    if (msg->corr_tag != dev_ctrl_db[device].last_message->corr_tag)
+    {
+        /* ignore this response as it was to something other than our request */
+        return;
+    }
+
+    if (msg->err != BCM_ERR_OK)
+    {
+        dev_ctrl_db[device].last_message->err = msg->err;
+        dev_ctrl_db[device].last_message->err_field_idx = msg->err_field_idx;
+        memcpy(dev_ctrl_db[device].last_message->err_text, msg->err_text, sizeof(msg->err_text));
+        dev_ctrl_db[device].last_message->dir = BCMOLT_MSG_DIR_RESPONSE;
+        bcmtrmux_control_to_host(device, dev_ctrl_db[device].last_message);
+        bcmolt_msg_free(dev_ctrl_db[device].last_message);
+        dev_ctrl_db[device].last_message = NULL;
+        dev_ctrl_db[device].device_params.state = BCMOLT_DEVICE_STATE_READY;
+        return;
+    }
+
+    if (msg->type == BCMOLT_MSG_TYPE_GET)
+    {
+        const bcmolt_device_cfg *source = (const bcmolt_device_cfg *)msg;
+        bcmolt_device_cfg *dest = (bcmolt_device_cfg *)dev_ctrl_db[device].last_message;
+        if (BCMOLT_CFG_PROP_IS_SET(source, device, protection_switching_ext_irq))
+        {
+            dest->data.protection_switching_ext_irq = source->data.protection_switching_ext_irq;
+        }
+        if (BCMOLT_CFG_PROP_IS_SET(source, device, epon_clock_transport_sample_delay))
+        {
+            dest->data.epon_clock_transport_sample_delay = source->data.epon_clock_transport_sample_delay;
+        }
+        if (BCMOLT_CFG_PROP_IS_SET(source, device, indication_shaping))
+        {
+            dest->data.indication_shaping = source->data.indication_shaping;
+        }
+        if (BCMOLT_CFG_PROP_IS_SET(source, device, gpon_xgpon_tod_enable))
+        {
+            dest->data.gpon_xgpon_tod_enable = source->data.gpon_xgpon_tod_enable;
+        }
+        if (BCMOLT_CFG_PROP_IS_SET(source, device, gpon_xgpon_tod_gpio_pin))
+        {
+            dest->data.gpon_xgpon_tod_gpio_pin = source->data.gpon_xgpon_tod_gpio_pin;
+        }
+        if (BCMOLT_CFG_PROP_IS_SET(source, device, gpon_xgpon_tod_connected_internally))
+        {
+            dest->data.gpon_xgpon_tod_connected_internally = source->data.gpon_xgpon_tod_connected_internally;
+        }
+        if (BCMOLT_CFG_PROP_IS_SET(source, device, epon_8021_as_tod_format))
+        {
+            dest->data.epon_8021_as_tod_format = source->data.epon_8021_as_tod_format;
+        }
+        if (BCMOLT_CFG_PROP_IS_SET(source, device, firmware_sw_version))
+        {
+            dest->data.firmware_sw_version = source->data.firmware_sw_version;
+        }
+        if (BCMOLT_CFG_PROP_IS_SET(source, device, chip_revision))
+        {
+            dest->data.chip_revision = source->data.chip_revision;
+        }
+        if (BCMOLT_CFG_PROP_IS_SET(source, device, chip_temperature))
+        {
+            dest->data.chip_temperature = source->data.chip_temperature;
+        }
+        if (BCMOLT_CFG_PROP_IS_SET(source, device, epon_shaper_mode))
+        {
+            dest->data.epon_shaper_mode = source->data.epon_shaper_mode;
+        }
+        if (BCMOLT_CFG_PROP_IS_SET(source, device, embedded_image_list))
+        {
+            dest->data.embedded_image_list = source->data.embedded_image_list;
+        }
+        if (BCMOLT_CFG_PROP_IS_SET(source, device, chip_voltage))
+        {
+            dest->data.chip_voltage = source->data.chip_voltage;
+        }
+        if (BCMOLT_CFG_PROP_IS_SET(source, device, epon_tod_string))
+        {
+            dest->data.epon_tod_string = source->data.epon_tod_string;
+        }
+        if (BCMOLT_CFG_PROP_IS_SET(source, device, xgpon_num_of_onus))
+        {
+        	dest->data.xgpon_num_of_onus = source->data.xgpon_num_of_onus;
+        }
+        if (BCMOLT_CFG_PROP_IS_SET(source, device, gpon_xgpon_tod_string_length))
+        {
+        	dest->data.gpon_xgpon_tod_string_length = source->data.gpon_xgpon_tod_string_length;
+        }
+        if (BCMOLT_CFG_PROP_IS_SET(source, device, tod_uart_baudrate))
+        {
+        	dest->data.tod_uart_baudrate = source->data.tod_uart_baudrate;
+        }
+    }
+
+    if (msg->type == BCMOLT_MSG_TYPE_SET)
+    {
+        bcmolt_device_cfg *source = (bcmolt_device_cfg *)dev_ctrl_db[device].last_message;
+        bcmolt_device_cfg_data *dest = &dev_ctrl_db[device].device_params;
+        dev_ctrl_db[device].device_params_present |= source->hdr.hdr.presence_mask;
+        if (BCMOLT_CFG_PROP_IS_SET(source, device, protection_switching_ext_irq))
+        {
+            dest->protection_switching_ext_irq = source->data.protection_switching_ext_irq;
+        }
+        if (BCMOLT_CFG_PROP_IS_SET(source, device, epon_clock_transport_sample_delay))
+        {
+            dest->epon_clock_transport_sample_delay = source->data.epon_clock_transport_sample_delay;
+        }
+        if (BCMOLT_CFG_PROP_IS_SET(source, device, indication_shaping))
+        {
+            dest->indication_shaping = source->data.indication_shaping;
+        }
+        if (BCMOLT_CFG_PROP_IS_SET(source, device, gpon_xgpon_tod_enable))
+        {
+            dest->gpon_xgpon_tod_enable = source->data.gpon_xgpon_tod_enable;
+        }
+        if (BCMOLT_CFG_PROP_IS_SET(source, device, gpon_xgpon_tod_gpio_pin))
+        {
+            dest->gpon_xgpon_tod_gpio_pin = source->data.gpon_xgpon_tod_gpio_pin;
+        }
+        if (BCMOLT_CFG_PROP_IS_SET(source, device, gpon_xgpon_tod_connected_internally))
+        {
+            dest->gpon_xgpon_tod_connected_internally = source->data.gpon_xgpon_tod_connected_internally;
+        }
+        if (BCMOLT_CFG_PROP_IS_SET(source, device, epon_8021_as_tod_format))
+        {
+            dest->epon_8021_as_tod_format = source->data.epon_8021_as_tod_format;
+        }
+        if (BCMOLT_CFG_PROP_IS_SET(source, device, epon_tod_string))
+        {
+            dest->epon_tod_string = source->data.epon_tod_string;
+        }
+        if (BCMOLT_CFG_PROP_IS_SET(source, device, epon_shaper_mode))
+        {
+            dest->epon_shaper_mode = source->data.epon_shaper_mode;
+        }
+        if (BCMOLT_CFG_PROP_IS_SET(source, device, keepalive_tolerance))
+        {
+            dev_ctrl_db[device].ka_info.ka_tolerance = source->data.keepalive_tolerance;
+        }
+        if (BCMOLT_CFG_PROP_IS_SET(source, device, keepalive_interval))
+        {
+            dev_ctrl_db[device].ka_info.ka_interval = source->data.keepalive_interval * BCMOS_MICROSECONDS_IN_SECONDS;
+            if (dev_ctrl_db[device].ka_info.ka_interval > 0)
+            {
+                start_keep_alive_process(&dev_ctrl_db[device].ka_info);
+            }
+            else
+            {
+                stop_keep_alive_process(&dev_ctrl_db[device].ka_info);
+            }
+        }
+        if (BCMOLT_CFG_PROP_IS_SET(source, device, gpon_xgpon_tod_string_length))
+        {
+        	dest->gpon_xgpon_tod_string_length = source->data.gpon_xgpon_tod_string_length;
+        }
+        if (BCMOLT_CFG_PROP_IS_SET(source, device, tod_uart_baudrate))
+        {
+        	dest->tod_uart_baudrate = source->data.tod_uart_baudrate;
+        }
+    }
+
+    dev_ctrl_db[device].last_message->dir = BCMOLT_MSG_DIR_RESPONSE;
+    bcmtrmux_control_to_host(device, dev_ctrl_db[device].last_message);
+    dev_ctrl_db[device].device_params.state = BCMOLT_DEVICE_STATE_READY;
+    bcmolt_msg_free(dev_ctrl_db[device].last_message);
+    dev_ctrl_db[device].last_message = NULL;
+}
+
+static dev_ctrl_sm_cb dev_ctrl_sm[BCMOLT_DEVICE_STATE__NUM_OF][DEVICE_CONTROL_EVENT__NUM_OF] =
+{
+    [BCMOLT_DEVICE_STATE_DISCONNECTED] =
+    {
+        [DEVICE_CONTROL_EVENT_DEVICE_CLEAR] = dev_ctrl_disconnected_state_device_clear_event,
+        [DEVICE_CONTROL_EVENT_DEVICE_CONFIG_SET] = dev_ctrl_disconnected_state_device_config_set_event,
+        [DEVICE_CONTROL_EVENT_DEVICE_CONFIG_GET] = dev_ctrl_disconnected_state_device_config_get_event,
+        [DEVICE_CONTROL_EVENT_DEVICE_CONNECT] = dev_ctrl_disconnected_state_device_connect_event,
+        [DEVICE_CONTROL_EVENT_DEVICE_RESET] = dev_ctrl_disconnected_state_device_reset_event,
+#ifndef IN_BAND
+        [DEVICE_CONTROL_EVENT_RUN_DDR_TEST] = dev_ctrl_disconnected_state_device_run_ddr_test_event,
+#endif
+    },
+
+    [BCMOLT_DEVICE_STATE_CONNECTING] =
+    {
+        [DEVICE_CONTROL_EVENT_CONNECTION_FAILURE] = dev_ctrl_connecting_state_connection_failure_event,
+        [DEVICE_CONTROL_EVENT_CONNECTION_ESTABLISHED] = dev_ctrl_connecting_state_connection_established_event,
+        [DEVICE_CONTROL_EVENT_DEVICE_READY] = dev_ctrl_connecting_state_device_ready_event,
+        [DEVICE_CONTROL_EVENT_DEVICE_RECEIVED_ACK] = dev_ctrl_connecting_state_received_ack,
+    },
+
+    [BCMOLT_DEVICE_STATE_READY] =
+    {
+        [DEVICE_CONTROL_EVENT_DEVICE_CONFIG_SET] = dev_ctrl_ready_state_device_config_set_event,
+        [DEVICE_CONTROL_EVENT_DEVICE_CONFIG_GET] = dev_ctrl_ready_state_device_config_get_event,
+        [DEVICE_CONTROL_EVENT_DEVICE_DISCONNECT] = dev_ctrl_ready_state_device_disconnect_event,
+        [DEVICE_CONTROL_EVENT_DEVICE_RESET] = dev_ctrl_ready_state_device_reset_event,
+        [DEVICE_CONTROL_EVENT_CONNECTION_FAILURE] = dev_ctrl_ready_state_connection_failure_event,
+    },
+
+    [BCMOLT_DEVICE_STATE_WAITING_FOR_DEVICE] =
+    {
+        [DEVICE_CONTROL_EVENT_DEVICE_TIMER_TIMEOUT] = dev_ctrl_waiting_for_device_state_timer_timeout,
+        [DEVICE_CONTROL_EVENT_DEVICE_RECEIVED_ACK] = dev_ctrl_waiting_for_device_state_received_ack
+    },
+
+#ifndef IN_BAND
+    [BCMOLT_DEVICE_STATE_TESTING_DDR] =
+    {
+        [DEVICE_CONTROL_EVENT_DDR_TEST_COMPLETED] = dev_ctrl_testing_ddr_state_ddr_test_completed_event,
+        [DEVICE_CONTROL_EVENT_DDR_TEST_TIMEOUT] = dev_ctrl_testing_ddr_state_ddr_test_timeout_event
+    }
+#endif
+};
+
+static void dev_ctrl_sm_err_cb(bcmolt_devid device, dev_ctrl_event event)
+{
+    BCM_LOG(ERROR, dev_ctrl_db[device].log_id,
+        "Unexpected event: device=%d, state=%s, event=%s\n",
+        device,
+        bcm_str_device_state(dev_ctrl_db[device].device_params.state),
+        bcm_str_device_event(event));
+}
+
+static void dev_ctrl_sm_call_state_cb(bcmolt_devid device, dev_ctrl_event event, const bcmolt_msg *msg)
+{
+    dev_ctrl_sm_cb cb;
+    dev_ctrl_db[device].last_event = event;
+    cb = dev_ctrl_sm[dev_ctrl_db[device].device_params.state][event];
+    if (cb == NULL)
+    {
+        dev_ctrl_sm_err_cb(device, event);
+    }
+    else
+    {
+        cb(device, msg);
+    }
+}
+
+static void dev_ctrl_ka_rx_handler(bcmolt_devid device, bcmolt_device_device_keep_alive *msg)
+{
+    keep_alive_rx_handler((const bcmos_keep_alive_data_msg *)&msg->data, &dev_ctrl_db[device].ka_info);
+}
+
+static bcmos_errno dev_ctrl_ka_tx_handler(bcmolt_devid device, bcmolt_msg *msg)
+{
+    bcmos_errno rc;
+
+    if (!dev_ctrl_is_connected(dev_ctrl_db[device].device_params.state))
+    {
+        return BCM_ERR_OK; /* in case this happens during a disconnect/reset operation */
+    }
+
+    msg->corr_tag = ++dev_ctrl_db[device].corr_tag;
+    rc = bcmtrmux_control_to_line(device, msg);
+    return rc;
+}
+
+static bcmos_errno dev_ctrl_ka_disconnect_handler(bcmolt_devid device)
+{
+    dev_ctrl_disconnect(device);
+    dev_ctrl_send_ind_connection_failure(device, BCMOLT_HOST_CONNECTION_FAIL_REASON_KEEPALIVE);
+    return BCM_ERR_OK;
+}
+
+static void handle_oper_set_msg(bcmolt_devid device, bcmolt_msg *msg)
+{
+    dev_ctrl_event event;
+
+    switch (msg->subgroup)
+    {
+    case BCMOLT_DEVICE_OPER_ID_RESET:
+        event = DEVICE_CONTROL_EVENT_DEVICE_RESET;
+        break;
+    case BCMOLT_DEVICE_OPER_ID_CONNECT:
+        event = DEVICE_CONTROL_EVENT_DEVICE_CONNECT;
+        break;
+    case BCMOLT_DEVICE_OPER_ID_DISCONNECT:
+        event = DEVICE_CONTROL_EVENT_DEVICE_DISCONNECT;
+        break;
+    case BCMOLT_DEVICE_OPER_ID_RUN_DDR_TEST:
+        event = DEVICE_CONTROL_EVENT_RUN_DDR_TEST;
+        break;
+    default :
+        event = DEVICE_CONTROL_EVENT_NO_EVENT;
+        break;
+    }
+
+    /* Send response to the waiting application */
+    msg->dir = BCMOLT_MSG_DIR_RESPONSE;
+    bcmtrmux_control_to_host(device, msg);
+
+    /* Handle event */
+    if (event != DEVICE_CONTROL_EVENT_NO_EVENT)
+    {
+        dev_ctrl_sm_call_state_cb(device, event, msg);
+    }
+}
+
+static void dev_ctrl_process_msg(bcmolt_devid device, bcmolt_msg *msg)
+{
+    if (msg->dir == BCMOLT_MSG_DIR_RESPONSE)
+    {
+        dev_ctrl_sm_call_state_cb(device, DEVICE_CONTROL_EVENT_DEVICE_RECEIVED_ACK, msg);
+    }
+
+    if (msg->group == BCMOLT_MGT_GROUP_AUTO)
+    {
+        if (msg->subgroup != BCMOLT_DEVICE_AUTO_ID_DEVICE_KEEP_ALIVE)
+        {
+            BCM_LOG(DEBUG, dev_ctrl_db[device].log_id, "Indication = %s (%d)\n", bcm_str_auto_id(msg->subgroup), msg->subgroup);
+        }
+
+        switch (msg->subgroup)
+        {
+        case BCMOLT_DEVICE_AUTO_ID_DEVICE_KEEP_ALIVE:
+            dev_ctrl_ka_rx_handler(device, (bcmolt_device_device_keep_alive *)msg);
+            break;
+        case BCMOLT_DEVICE_AUTO_ID_CONNECTION_FAILURE:
+            /* note: this indication is not generated by the device - it's generated by device control itself */
+            dev_ctrl_sm_call_state_cb(device, DEVICE_CONTROL_EVENT_CONNECTION_FAILURE, msg);
+            break;
+        case BCMOLT_DEVICE_AUTO_ID_CONNECTION_ESTABLISHED:
+            dev_ctrl_sm_call_state_cb(device, DEVICE_CONTROL_EVENT_CONNECTION_ESTABLISHED, msg);
+            break;
+        case BCMOLT_DEVICE_AUTO_ID_DEVICE_READY:
+            dev_ctrl_sm_call_state_cb(device, DEVICE_CONTROL_EVENT_DEVICE_READY, msg);
+            break;
+        default:
+            BCM_LOG(ERROR, dev_ctrl_db[device].log_id, "Unexpected indication\n");
+            break;
+        }
+    }
+
+    if (msg->group == BCMOLT_MGT_GROUP_OPER && msg->type == BCMOLT_MSG_TYPE_SET && msg->dir != BCMOLT_MSG_DIR_RESPONSE)
+    {
+        /* All operations happen entirely on the host side */
+        handle_oper_set_msg(device, msg);
+    }
+
+    if (msg->group == BCMOLT_MGT_GROUP_CFG && msg->dir != BCMOLT_MSG_DIR_RESPONSE)
+    {
+        dev_ctrl_db[device].last_message = msg;
+        switch (msg->type)
+        {
+        case BCMOLT_MSG_TYPE_GET:
+            dev_ctrl_sm_call_state_cb(device, DEVICE_CONTROL_EVENT_DEVICE_CONFIG_GET, msg);
+            break;
+        case BCMOLT_MSG_TYPE_CLEAR:
+            dev_ctrl_sm_call_state_cb(device, DEVICE_CONTROL_EVENT_DEVICE_CLEAR, msg);
+            break;
+        case BCMOLT_MSG_TYPE_SET:
+            dev_ctrl_sm_call_state_cb(device, DEVICE_CONTROL_EVENT_DEVICE_CONFIG_SET, msg);
+            break;
+        default:
+            break;
+        }
+        msg = NULL;
+    }
+
+    if (msg != NULL)
+    {
+        bcmolt_msg_free(msg);
+    }
+}
+
+static bcmos_timer_rc dev_ctrl_connection_timer_handler(bcmos_timer *timer, long data)
+{
+    bcmolt_devid device = DEVICE_ID_FROM_MODULE_ID(timer->parm.owner);
+
+    if (dev_ctrl_db[device].device_params.state != BCMOLT_DEVICE_STATE_CONNECTING)
+    {
+        /* The timer is irrelevant in this state - discard it and return. */
+    }
+    else if (dev_ctrl_db[device].connection_info.state == DEV_CTRL_CONNECTING_STATE_CONFIGURING)
+    {
+        /* After we have sent the first "device configuration set" message to the device, the connection timer is used
+         * for retransmitting this message in case the device missed it. */
+        bcmolt_device_connection_established ind = {};
+        BCMOLT_AUTO_INIT(&ind, device, connection_established);
+        dev_ctrl_sm_call_state_cb(device, DEVICE_CONTROL_EVENT_CONNECTION_ESTABLISHED, &ind.hdr.hdr);
+    }
+    else
+    {
+        /* Connection failure due to timeout. */
+        bcmolt_device_connection_failure ind = {};
+        BCMOLT_AUTO_INIT(&ind, device, connection_failure);
+        ind.data.reason = BCMOLT_HOST_CONNECTION_FAIL_REASON_TIMEOUT;
+        dev_ctrl_sm_call_state_cb(device, DEVICE_CONTROL_EVENT_CONNECTION_FAILURE, &ind.hdr.hdr);
+    }
+
+    return BCMOS_TIMER_STOP;
+}
+
+#ifndef IN_BAND
+static void dev_ctrl_get_ras_modes(bcmolt_system_mode system_mode, uint32_t *ras_0_mode, uint32_t *ras_1_mode)
+{
+    switch (system_mode)
+    {
+    case BCMOLT_SYSTEM_MODE_GPON__4_X:
+    case BCMOLT_SYSTEM_MODE_GPON__8_X:
+        *ras_0_mode = BCM_FLD_RAS_MODE_GPON;
+        *ras_1_mode = BCM_FLD_RAS_MODE_NOT_CONFIGURED;
+        break;
+    case BCMOLT_SYSTEM_MODE_GPON__16_X:
+        *ras_0_mode = BCM_FLD_RAS_MODE_GPON;
+        *ras_1_mode = BCM_FLD_RAS_MODE_GPON;
+        break;
+    case BCMOLT_SYSTEM_MODE_XGPON_1__4_X:
+    case BCMOLT_SYSTEM_MODE_XGPON_1__8_X:
+    case BCMOLT_SYSTEM_MODE_NGPON2__8_X_2_P_5_G:
+        *ras_0_mode = BCM_FLD_RAS_MODE_XGPON;
+        *ras_1_mode = BCM_FLD_RAS_MODE_XGPON;
+        break;
+    case BCMOLT_SYSTEM_MODE_GPON_8_XGPON_4_X_COEXISTENCE:
+        *ras_0_mode = BCM_FLD_RAS_MODE_XGPON;
+        *ras_1_mode = BCM_FLD_RAS_MODE_GPON;
+        break;
+    case BCMOLT_SYSTEM_MODE_XGS__2_X_10_G:
+    case BCMOLT_SYSTEM_MODE_NGPON2__2_X_10_G:
+        *ras_0_mode = BCM_FLD_RAS_MODE_XGS_NGPON2;
+        *ras_1_mode = BCM_FLD_RAS_MODE_XGS_NGPON2;
+        break;
+    default:
+        *ras_0_mode = BCM_FLD_RAS_MODE_NOT_CONFIGURED;
+        *ras_1_mode = BCM_FLD_RAS_MODE_NOT_CONFIGURED;
+        break;
+    }
+}
+
+static bcmos_timer_rc dev_ctrl_boot_seq_timer_handler(bcmos_timer *timer, long data)
+{
+    bcmos_bool is_bootloader_done;
+    bcmolt_devid device;
+    uint32_t ras_0_mode;
+    uint32_t ras_1_mode;
+    bcmos_errno rc = BCM_ERR_OK;
+    bcmos_timer_rc timer_rc = BCMOS_TIMER_STOP;
+
+    device = (bcmolt_devid)data;
+
+    if (dev_ctrl_db[device].boot_seq_info.polling_counter > 0)
+    {
+        dev_ctrl_db[device].boot_seq_info.polling_counter--;
+        is_bootloader_done = bcm_fld_is_bootloader_done(device);
+        if (is_bootloader_done)
+        {
+            /* Stop the boot timer */
+            timer_rc = BCMOS_TIMER_STOP;
+            BCM_LOG(INFO, dev_ctrl_db[device].log_id, "Boot loader phase done.\n");
+
+            if (dev_ctrl_db[device].device_params.debug.avs_control)
+            {
+                rc = bcm_fld_set_avs_cont(device, BCM_FLD_AVS_CONT); /* don't stop the cpu when avs fails. */
+            }
+            else
+            {
+                rc = bcm_fld_set_avs_cont(device, BCM_FLD_AVS_STOP); /* stop the cpu when avs fails. */
+            }
+            BCM_DEV_CTRL_RETURN_ON_ERROR(device, rc, "bcm_fld_set_avs_cont\n");
+
+            dev_ctrl_get_ras_modes(dev_ctrl_db[device].device_params.system_mode, &ras_0_mode, &ras_1_mode);
+            rc = bcm_fld_set_ras_mode_set(device, 0, ras_0_mode);
+            BCM_DEV_CTRL_RETURN_ON_ERROR(device, rc, "bcm_fld_set_ras_0_mode_set\n");
+            rc = bcm_fld_set_ras_mode_set(device, 1, ras_1_mode);
+            BCM_DEV_CTRL_RETURN_ON_ERROR(device, rc, "bcm_fld_set_ras_1_mode_set\n");
+            rc = dev_ctrl_handle_application_image(device);
+            BCM_DEV_CTRL_RETURN_ON_ERROR(device, rc, "dev_ctrl_handle_application_image()\n");
+        }
+        else
+        {
+            /* Restart the boot timer */
+            timer_rc = BCMOS_TIMER_OK;
+        }
+    }
+    else
+    {
+        timer_rc = BCMOS_TIMER_STOP;
+        BCM_LOG(ERROR, dev_ctrl_db[device].log_id, "dev_ctrl_boot_seq timer expired while trying to burn BOOTLOADER\n");
+    }
+
+    return timer_rc;
+}
+
+static bcmos_timer_rc dev_ctrl_ddr_test_timer_handler(bcmos_timer *timer, long data)
+{
+    bcmos_bool is_ddr_test_done;
+    bcmolt_devid device;
+    bcmos_timer_rc timer_rc = BCMOS_TIMER_STOP;
+
+    device = (bcmolt_devid)data;
+
+    if (dev_ctrl_db[device].boot_seq_info.polling_counter > 0)
+    {
+        dev_ctrl_db[device].boot_seq_info.polling_counter--;
+        is_ddr_test_done = bcm_fld_is_ddr_test_done(device);
+        if (is_ddr_test_done)
+        {
+            /* Stop the boot timer */
+            timer_rc = BCMOS_TIMER_STOP;
+            dev_ctrl_sm_call_state_cb(device, DEVICE_CONTROL_EVENT_DDR_TEST_COMPLETED, NULL);
+        }
+        else
+        {
+            BCM_LOG(INFO, dev_ctrl_db[device].log_id, "Waiting for DDR Test %u\n", dev_ctrl_db[device].boot_seq_info.polling_counter);
+            /* Restart the boot timer */
+            timer_rc = BCMOS_TIMER_OK;
+        }
+    }
+    else
+    {
+        timer_rc = BCMOS_TIMER_STOP;
+        dev_ctrl_sm_call_state_cb(device, DEVICE_CONTROL_EVENT_DDR_TEST_TIMEOUT, NULL);
+    }
+
+    return timer_rc;
+}
+#endif
+
+static bcmos_errno dev_ctrl_init_modules(bcmolt_devid device)
+{
+    bcmos_module_parm module_params = {};
+    bcmos_errno rc = BCM_ERR_OK;
+    dev_ctrl_db[device].module_info.module_id = MODULE_ID_FROM_DEVICE_ID(device);
+    snprintf(
+        dev_ctrl_db[device].module_info.name,
+        sizeof(dev_ctrl_db[device].module_info.name),
+        "dev_ctrl%u_module",
+        device);
+    module_params.qparm.name = dev_ctrl_db[device].module_info.name;
+    module_params.qparm.size = DEVICE_CONTROL_MSG_QUEUE_SIZE;
+    module_params.init = NULL;
+    rc = bcmos_module_create(
+        dev_ctrl_db[device].module_info.module_id,
+        &dev_ctrl_db[device].task_info.task,
+        &module_params);
+    if (rc != BCM_ERR_OK)
+    {
+        BCM_LOG(ERROR, dev_ctrl_db[device].log_id,
+            "bcmos_module_create returned error %s (%d), module id %d\n",
+            bcmos_strerror(rc),
+            rc,
+            dev_ctrl_db[device].module_info.module_id);
+    }
+    return rc;
+}
+
+static bcmos_errno dev_ctrl_init_tasks(bcmolt_devid device)
+{
+    bcmos_task_parm task_params = {};
+    bcmos_errno rc = BCM_ERR_OK;
+    snprintf(dev_ctrl_db[device].task_info.name, sizeof(dev_ctrl_db[device].task_info.name), "dev_ctrl%u", device);
+    task_params.name = dev_ctrl_db[device].task_info.name;
+    task_params.priority = TASK_PRIORITY_DEVICE_CONTROL;
+    task_params.core = BCMOS_CPU_CORE_ANY; /* No CPU affinity */
+    task_params.init_handler = NULL;
+    task_params.data = (long)device;
+    rc = bcmos_task_create(&dev_ctrl_db[device].task_info.task, &task_params);
+    BCM_DEV_CTRL_RETURN_ON_ERROR(device, rc, "bcmos_task_create()\n");
+
+    return rc;
+}
+
+static void dev_ctrl_mod_msg_handler(bcmos_module_id module_id, bcmos_msg *os_msg)
+{
+    bcmolt_msg *msg;
+    bcmolt_devid device;
+
+    device = DEVICE_ID_FROM_MODULE_ID(module_id);
+    msg = os_msg->data;
+
+#ifndef IN_BAND
+#ifdef ENABLE_LOG
+    if (msg->obj_type == BCMOLT_OBJ_ID_LOGGER &&
+        msg->group == BCMOLT_MGT_GROUP_CFG &&
+        msg->type == BCMOLT_MSG_TYPE_GET &&
+        !dev_ctrl_is_connected(dev_ctrl_db[device].device_params.state))
+    {
+        /* The device is not ready, but still we can fetch the logger file from SRAM. */
+        msg->err = dev_ctrl_get_dev_log(device, (bcmolt_logger_cfg *)msg);
+        msg->dir = BCMOLT_MSG_DIR_RESPONSE;
+        bcmtrmux_control_to_host(device, msg);
+        bcmolt_msg_free(msg);
+        return;
+    }
+#endif
+
+    if (msg->obj_type == BCMOLT_OBJ_ID_SOFTWARE_ERROR &&
+        msg->group == BCMOLT_MGT_GROUP_CFG &&
+        (msg->type == BCMOLT_MSG_TYPE_GET || msg->type == BCMOLT_MSG_TYPE_GET_MULTI) &&
+        !dev_ctrl_is_connected(dev_ctrl_db[device].device_params.state))
+    {
+        /* get sw error table from SRAM */
+        msg->err = dev_ctrl_sw_error_get(device, msg);
+        msg->dir = BCMOLT_MSG_DIR_RESPONSE;
+        bcmtrmux_control_to_host(device, msg);
+        bcmolt_msg_free(msg);
+        return;
+    }
+#endif
+
+    if (msg->obj_type == BCMOLT_OBJ_ID_DEBUG)
+    {
+        bcmolt_debug_ctrl_process_msg(device, msg, dev_ctrl_is_connected(dev_ctrl_db[device].device_params.state));
+        return;
+    }
+
+    if (msg->obj_type != BCMOLT_OBJ_ID_DEVICE)
+    {
+        bcmolt_msg_err(
+            msg,
+            DEV_LOG_INVALID_ID,
+            BCM_ERR_INTERNAL,
+            BCMOLT_ERR_FIELD_NONE,
+            "Can't access target when disconnected");
+        msg->dir = BCMOLT_MSG_DIR_RESPONSE;
+        bcmtrmux_control_to_host(device, msg);
+        bcmolt_msg_free(msg);
+    }
+    else if (msg->group == BCMOLT_MGT_GROUP_AUTO)
+    {
+        dev_ctrl_process_msg(device, msg);
+    }
+    else if (msg->dir == BCMOLT_MSG_DIR_RESPONSE)
+    {
+        if (msg->group == BCMOLT_MGT_GROUP_OPER && msg->subgroup == BCMOLT_DEVICE_OPER_ID_HOST_KEEP_ALIVE)
+        {
+            /* Just free it, otherwise ignore keepalive oper responses */
+            bcmolt_msg_free(msg);
+        }
+        else if ((dev_ctrl_db[device].device_params.state == BCMOLT_DEVICE_STATE_WAITING_FOR_DEVICE) || (dev_ctrl_db[device].device_params.state == BCMOLT_DEVICE_STATE_CONNECTING))
+        {
+            dev_ctrl_process_msg(device, msg);
+        }
+        else
+        {
+            BCM_LOG(INFO, dev_ctrl_db[device].log_id, "received unexpected response: group=%u subgroup=%u\n", msg->group, msg->subgroup);
+            bcmolt_msg_free(msg);
+        }
+    }
+    else if (dev_ctrl_db[device].device_params.state != BCMOLT_DEVICE_STATE_CONNECTING)
+    {
+        msg->err = dev_ctrl_validate_msg(device, msg);
+        if (msg->err == BCM_ERR_OK)
+        {
+            dev_ctrl_process_msg(device, msg);
+        }
+        else
+        {
+            msg->dir = BCMOLT_MSG_DIR_RESPONSE;
+            bcmtrmux_control_to_host(device, msg);
+            bcmolt_msg_free(msg);
+        }
+    }
+    else
+    {
+        bcmolt_msg_err(msg, DEV_LOG_INVALID_ID, BCM_ERR_STATE, BCMOLT_ERR_FIELD_NONE, "Device is busy");
+        msg->dir = BCMOLT_MSG_DIR_RESPONSE;
+        bcmtrmux_control_to_host(device, msg);
+        bcmolt_msg_free(msg);
+    }
+}
+
+static void dev_ctrl_mod_msg_release(bcmos_msg *os_msg)
+{
+    bcmolt_msg_free(container_of(os_msg, bcmolt_msg, os_msg));
+}
+
+static bcmos_msg dev_ctrl_ipc_msg = { .handler = dev_ctrl_mod_msg_handler, .release = dev_ctrl_mod_msg_release };
+
+static void bcmdev_rx_handler(bcmolt_devid device, bcmolt_msg *msg, void *data)
+{
+    bcmos_errno rc;
+
+    msg->os_msg = dev_ctrl_ipc_msg;
+    msg->os_msg.data = msg;
+    rc = bcmos_msg_send_to_module(dev_ctrl_db[device].module_info.module_id, &msg->os_msg, BCMOS_MSG_SEND_AUTO_FREE);
+    if (rc != BCM_ERR_OK)
+    {
+        BCM_LOG(ERROR, dev_ctrl_db[device].log_id,
+            "bcmos_msg_send_to_module returned error %s (%d), module id %d\n",
+            bcmos_strerror(rc),
+            rc,
+            dev_ctrl_db[device].module_info.module_id);
+    }
+}
+
+#ifndef IN_BAND
+static bcmos_timer_rc exception_monitor_timer_handler(bcmos_timer *timer, long data)
+{
+    bcmolt_devid device = (bcmolt_devid)data;
+    bcmos_errno rc;
+
+    if (!dev_ctrl_is_connected(dev_ctrl_db[device].device_params.state))
+    {
+        return BCM_ERR_OK; /* in case this happens during a disconnect/reset operation */
+    }
+
+    rc = dev_ctrl_get_exception_log_if_present(device);
+    if (rc != BCM_ERR_OK && rc != BCM_ERR_NOENT)
+    {
+        BCM_LOG(ERROR, dev_ctrl_db[device].log_id, "cant read Exception log for device %d error %s (%d)\n", device, bcmos_strerror(rc), rc);
+    }
+    return BCMOS_TIMER_OK;
+}
+#endif
+
+static bcmos_timer_rc device_response_timer_handler(bcmos_timer *timer, long data)
+{
+    bcmolt_devid device = (bcmolt_devid)data;
+    dev_ctrl_sm_call_state_cb(device, DEVICE_CONTROL_EVENT_DEVICE_TIMER_TIMEOUT, NULL);
+    return BCMOS_TIMER_OK;
+}
+
+static bcmos_timer_rc reset_delay_timer_handler(bcmos_timer *timer, long data)
+{
+    bcmos_errno rc = dev_ctrl_params.host_reset_cb();
+    if (rc != BCM_ERR_OK)
+    {
+        BCM_LOG(ERROR, dev_ctrl_db[(bcmolt_devid)data].log_id, "Host reset callback failed: %s (%d)\n", bcmos_strerror(rc), rc);
+    }
+    return BCMOS_TIMER_OK;
+}
+
+static bcmos_errno dev_ctrl_timer_create(
+    bcmolt_devid device,
+    bcmos_module_id module_id,
+    dev_ctrl_timer *timer,
+    const char *name,
+    bcmos_bool periodic,
+    F_bcmos_timer_handler handler)
+{
+    bcmos_timer_parm timer_params = {};
+    bcmos_errno rc = BCM_ERR_OK;
+
+    snprintf(timer->name, sizeof(timer->name), "dev_ctrl_%s_timer%u", name, device);
+    timer_params.name = timer->name;
+    timer_params.owner = module_id;
+    timer_params.periodic = periodic;
+    timer_params.handler = handler;
+    timer_params.data = device;
+    rc = bcmos_timer_create(&timer->timer, &timer_params);
+    if (rc != BCM_ERR_OK)
+    {
+        BCM_LOG(ERROR, dev_ctrl_db[device].log_id,
+            "'%s' timer creation failed, bcmos_timer_create returned error %s (%d)\n",
+            timer->name,
+            bcmos_strerror(rc),
+            rc);
+    }
+
+    return rc;
+}
+
+#ifndef IN_BAND
+static void dev_ctrl_link_up_down_cb(uint8_t dev_id, bcm_ll_pcie_link_status status)
+{
+    BCM_LOG(INFO, dev_ctrl_db[dev_id].log_id, "Device %u: PCIe link %s\n", dev_id, status == BCM_LL_PCIE_LINK_DOWN ? "down" : "up");
+}
+#endif
+
+static bcmtrmux_msg_dest dev_ctrl_msg_filter_cb(
+    bcmolt_devid device,
+    bcmolt_obj_id obj,
+    bcmolt_mgt_group group,
+    uint16_t subgroup)
+{
+    /* Device control should intercept the message if one of the two happens:
+     * 1. The message object is "device".
+     * 2. The message object is not "device", but the device is not ready, so an appropriate error should be returned to
+     *    the host application. */
+    bcmtrmux_msg_dest dest = BCMTRMUX_DEST_REMOTE;
+
+    if (!dev_ctrl_is_connected(dev_ctrl_db[device].device_params.state))
+    {
+        dest = BCMTRMUX_DEST_LOCAL;
+    }
+    else if (obj == BCMOLT_OBJ_ID_DEBUG)
+    {
+        dest = BCMTRMUX_DEST_LOCAL;
+    }
+    else if (obj == BCMOLT_OBJ_ID_DEVICE)
+    {
+        switch (group)
+        {
+        case BCMOLT_MGT_GROUP_OPER:
+            switch (subgroup)
+            {
+            case BCMOLT_DEVICE_OPER_ID_IMAGE_TRANSFER_START:
+            case BCMOLT_DEVICE_OPER_ID_IMAGE_TRANSFER_DATA:
+            case BCMOLT_DEVICE_OPER_ID_SW_UPGRADE_ACTIVATE:
+                return BCMTRMUX_DEST_REMOTE;
+            default:
+                return BCMTRMUX_DEST_LOCAL;
+            }
+            break;
+        default:
+            return BCMTRMUX_DEST_LOCAL;
+        }
+    }
+    return dest;
+}
+
+static void dev_ctrl_init_device_objects(bcmolt_devid device)
+{
+    dev_ctrl_clear_device_cfg(device);
+    dev_ctrl_init_connection_state(device);
+    dev_ctrl_db[device].device_params.state = BCMOLT_DEVICE_STATE_DISCONNECTED;
+    dev_ctrl_db[device].device_params.system_mode = BCMOLT_SYSTEM_MODE__NUM_OF;
+    dev_ctrl_db[device].boot_seq_info.polling_counter = BOOT_SEQ_POLLING_MAX_NUMBER;
+    dev_ctrl_db[device].boot_seq_info.polling_interval = BOOT_SEQ_POLL_INTERVAL_SEC * BCMOS_MICROSECONDS_IN_SECONDS;
+    dev_ctrl_db[device].corr_tag = 0;
+#ifdef ENABLE_LOG
+    dev_ctrl_db[device].sram_log_offset = 0;
+    dev_ctrl_db[device].msgs_read = 0;
+#endif
+
+#ifndef SIMULATION_BUILD
+    dev_ctrl_db[device].trx_disable_mask = 0xFFFF; /* Mark all PONs with TRX disabled. */
+#endif
+
+    dev_ctrl_db[device].conn_fail_reason = BCMOLT_HOST_CONNECTION_FAIL_REASON_NONE;
+    dev_ctrl_db[device].last_event = DEVICE_CONTROL_EVENT_NO_EVENT;
+}
+
+bcmos_errno bcmolt_dev_ctrl_host_event_write(uint32_t device, uint32_t event)
+{
+#ifndef IN_BAND
+    bcmolt_device_state state = dev_ctrl_db[device].device_params.state;
+#endif
+#ifndef SIMULATION_BUILD
+    /* Update local database, so that after reset we will be able to sync this value with the device. */
+    dev_ctrl_db[device].trx_disable_mask = event;
+#endif
+#ifndef IN_BAND
+    /* Notify device using SRAM, but only if we are already connected (otherwise FLD might be not ready). */
+    if (dev_ctrl_is_connected(state))
+        bcm_fld_set_host_event(device, event);
+#endif
+    return BCM_ERR_OK;
+}
+/*Use different function signatures linux kernel device control and other*/
+#if !defined(LINUX_USER_SPACE)
+bcmos_errno bcmolt_dev_ctrl_init(bcmolt_dev_ctrl_params *params)
+#else
+bcmos_errno bcmolt_dev_ctrl_init()
+#endif
+{
+    bcmolt_devid device;
+    bcmos_errno rc = BCM_ERR_OK;
+
+#if !defined(LINUX_USER_SPACE)
+    if (!params->system_mode_validate_cb ||
+        !params->image_read_cb ||
+        !params->device_off_cb ||
+        !params->device_on_cb ||
+        !params->device_is_running_cb ||
+        !params->host_reset_cb ||
+        !params->pcie_channel_prepare_cb ||
+        !params->pcie_channel_remove_cb)
+    {
+        BCMOS_TRACE_ERR("Missing required callbacks\n");
+        return BCM_ERR_PARM;
+    }
+
+    dev_ctrl_params = *params;
+#endif
+    rc = bcmtrmux_init(dev_ctrl_msg_filter_cb);
+    BCMOS_TRACE_CHECK_RETURN(rc, rc, "bcmtrmux_init()\n");
+
+#ifndef IN_BAND
+    rc = bcm_fld_init(BCMTR_MAX_OLTS);
+    BCMOS_TRACE_CHECK_RETURN(rc, rc, "bcm_fld_init()\n");
+#endif
+
+    for (device = 0; device < BCMTR_MAX_OLTS; device++)
+    {
+#ifdef ENABLE_LOG
+        char log_name[MAX_DEV_LOG_ID_NAME];
+        snprintf(log_name, sizeof(log_name) - 1, "dev_ctrl_%u", device);
+        dev_ctrl_db[device].log_id = bcm_dev_log_id_register(log_name, DEV_LOG_LEVEL_INFO, DEV_LOG_ID_TYPE_BOTH);
+#endif
+        dev_ctrl_init_device_objects(device);
+        image_buf[device] = bcmos_alloc(IMAGE_BUF_SIZE);
+        if (!image_buf[device])
+        {
+            BCM_LOG(ERROR, dev_ctrl_db[device].log_id, "Can't allocate packet buffer\n");
+            return BCM_ERR_NOMEM;
+        }
+        rd_image_buf[device] = bcmos_alloc(IMAGE_BUF_SIZE);
+        if (!rd_image_buf[device])
+        {
+            BCM_LOG(ERROR, dev_ctrl_db[device].log_id, "Can't allocate nh_packet buffer\n");
+            return BCM_ERR_NOMEM;
+        }
+        rc = dev_ctrl_init_tasks(device);
+        BCM_DEV_CTRL_RETURN_ON_ERROR(device, rc, "dev_ctrl_init_tasks()\n");
+
+        rc = dev_ctrl_init_modules(device);
+        BCM_DEV_CTRL_RETURN_ON_ERROR(device, rc, "dev_ctrl_init_modules()\n");
+
+        dev_ctrl_db[device].ka_info.orig = BCM_KEEP_ALIVE_MSG_ORIG_HOST;
+        dev_ctrl_db[device].ka_info.send_handler = dev_ctrl_ka_tx_handler;
+        dev_ctrl_db[device].ka_info.disconnect_handler = dev_ctrl_ka_disconnect_handler;
+        dev_ctrl_db[device].ka_info.device = device;
+        rc = create_keep_alive_timer(&dev_ctrl_db[device].ka_info, dev_ctrl_db[device].module_info.module_id);
+        BCM_DEV_CTRL_RETURN_ON_ERROR(device, rc, "create_keep_alive_timer()\n");
+
+        rc = dev_ctrl_timer_create(
+            device,
+            dev_ctrl_db[device].module_info.module_id,
+            &dev_ctrl_db[device].connection_info.timer,
+            "connection",
+            BCMOS_FALSE, /* non-periodic */
+            dev_ctrl_connection_timer_handler);
+        BCMOS_CHECK_RETURN_ERROR(rc, rc);
+
+#ifndef IN_BAND
+        rc = dev_ctrl_timer_create(
+            device,
+            dev_ctrl_db[device].module_info.module_id,
+            &dev_ctrl_db[device].boot_seq_info.timer,
+            "boot_seq",
+            BCMOS_TRUE, /* periodic */
+            dev_ctrl_boot_seq_timer_handler);
+        BCMOS_CHECK_RETURN_ERROR(rc, rc);
+
+        rc = dev_ctrl_timer_create(
+            device,
+            dev_ctrl_db[device].module_info.module_id,
+            &dev_ctrl_db[device].exception_monitor_timer,
+            "exception_monitor",
+            BCMOS_TRUE, /* periodic */
+            exception_monitor_timer_handler);
+        BCMOS_CHECK_RETURN_ERROR(rc, rc);
+#endif
+        rc = dev_ctrl_timer_create(
+            device,
+            dev_ctrl_db[device].module_info.module_id,
+            &dev_ctrl_db[device].device_response_timer,
+            "device_response",
+            BCMOS_FALSE, /* non-periodic */
+            device_response_timer_handler);
+        BCMOS_CHECK_RETURN_ERROR(rc, rc);
+
+        rc = dev_ctrl_timer_create(
+            device,
+            dev_ctrl_db[device].module_info.module_id,
+            &dev_ctrl_db[device].reset_delay_timer,
+            "reset_delay",
+            BCMOS_FALSE, /* non-periodic */
+            reset_delay_timer_handler);
+        BCMOS_CHECK_RETURN_ERROR(rc, rc);
+
+        /* Register callback to MUX */
+        rc = bcmtrmux_local_handler_register(device, bcmdev_rx_handler, (void *)(long)device);
+        BCM_DEV_CTRL_RETURN_ON_ERROR(device, rc, "bcmtrmux_local_handler_register()\n");
+
+        /* Intercept CONNECTION_ESTABLISHED, DEVICE_READY, KEEP_ALIVE messages */
+        rc = bcmtrmux_control_auto_intercept_filter(
+            device,
+            BCMOLT_OBJ_ID_DEVICE,
+            BCMOLT_DEVICE_AUTO_ID_CONNECTION_ESTABLISHED);
+        rc = rc ? rc : bcmtrmux_control_auto_intercept_filter(
+            device,
+            BCMOLT_OBJ_ID_DEVICE,
+            BCMOLT_DEVICE_AUTO_ID_DEVICE_READY);
+        rc = rc ? rc : bcmtrmux_control_auto_intercept_filter(
+            device,
+            BCMOLT_OBJ_ID_DEVICE,
+            BCMOLT_DEVICE_AUTO_ID_DEVICE_KEEP_ALIVE);
+        BCM_DEV_CTRL_RETURN_ON_ERROR(device, rc, "bcmtrmux_control_auto_intercept_filter()\n");
+    }
+#ifndef IN_BAND
+    /* Register for link_up / link_down interrupt */
+    bcm_ll_pcie_status_change_register(dev_ctrl_link_up_down_cb);
+#endif
+
+    bcmolt_debug_ctrl_init();
+
+    return rc;
+}
+
+void bcmolt_dev_ctrl_exit(void)
+{
+#ifndef IN_BAND
+    bcmolt_devid device;
+
+    for (device = 0; device < BCMTR_MAX_OLTS; device++)
+    {
+        bcmtrmux_local_handler_unregister(device);
+        bcmos_free(image_buf[device]);
+        bcmos_free(rd_image_buf[device]);
+        bcmos_timer_destroy(&dev_ctrl_db[device].connection_info.timer.timer);
+        bcmos_timer_destroy(&dev_ctrl_db[device].ka_info.ka_timer.timer);
+        bcmos_timer_destroy(&dev_ctrl_db[device].boot_seq_info.timer.timer);
+        bcmos_timer_destroy(&dev_ctrl_db[device].exception_monitor_timer.timer);
+        bcmos_timer_destroy(&dev_ctrl_db[device].device_response_timer.timer);
+        bcmos_timer_destroy(&dev_ctrl_db[device].reset_delay_timer.timer);
+        bcmos_module_destroy(dev_ctrl_db[device].module_info.module_id);
+        bcmos_task_destroy(&dev_ctrl_db[device].task_info.task);
+    }
+#endif
+#ifndef IN_BAND
+    bcm_fld_exit();
+#endif
+    bcmtrmux_exit();
+#ifndef IN_BAND
+    bcm_ll_pcie_status_change_unregister();
+#endif
+}
diff --git a/bcm68620_release/release/host_driver/dev_ctrl/bcmolt_dev_ctrl.h b/bcm68620_release/release/host_driver/dev_ctrl/bcmolt_dev_ctrl.h
new file mode 100644
index 0000000..7187ba3
--- /dev/null
+++ b/bcm68620_release/release/host_driver/dev_ctrl/bcmolt_dev_ctrl.h
@@ -0,0 +1,205 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#ifndef _BCMOLT_DEV_CTRL_H_
+#define _BCMOLT_DEV_CTRL_H_
+
+#include <bcmos_system.h>
+#include <bcmolt_msg.h>
+#include <bcmolt_model_types.h>
+#include "bcm_keep_alive.h"
+#include "bcmolt_fld.h"
+#include "bcmolt_sw_error.h"
+
+typedef int (*bcmolt_dev_ctrl_cb_image_read)(
+    bcmolt_devid device,
+    bcmolt_device_image_type image_type,
+    uint32_t offset,
+    uint8_t *buf,
+    uint32_t buf_size);
+typedef bcmos_errno (*bcmolt_dev_ctrl_cb_system_mode_validate)(bcmolt_devid device, bcmolt_system_mode system_mode);
+typedef bcmos_errno (*bcmolt_dev_ctrl_cb_device_off)(bcmolt_devid device);
+typedef bcmos_errno (*bcmolt_dev_ctrl_cb_device_on)(bcmolt_devid device);
+typedef bcmos_errno (*bcmolt_dev_ctrl_cb_device_is_running)(bcmolt_devid device, bcmos_bool *is_running);
+typedef bcmos_errno (*bcmolt_dev_ctrl_cb_host_reset)(void);
+typedef bcmos_errno (*bcmolt_dev_ctrl_cb_pcie_channel_prepare)(bcmolt_devid device);
+typedef bcmos_errno (*bcmolt_dev_ctrl_cb_pcie_channel_remove)(bcmolt_devid device);
+typedef bcmos_errno (*bcmolt_dev_ctrl_cb_pcie_status_get)(bcmolt_devid device, bcmos_bool *is_prepared);
+
+typedef struct
+{
+    bcmolt_dev_ctrl_cb_system_mode_validate    system_mode_validate_cb;
+    bcmolt_dev_ctrl_cb_image_read              image_read_cb;
+    bcmolt_dev_ctrl_cb_device_off              device_off_cb;
+    bcmolt_dev_ctrl_cb_device_on               device_on_cb;
+    bcmolt_dev_ctrl_cb_device_is_running       device_is_running_cb;
+    bcmolt_dev_ctrl_cb_host_reset              host_reset_cb;
+    bcmolt_dev_ctrl_cb_pcie_channel_prepare    pcie_channel_prepare_cb;
+    bcmolt_dev_ctrl_cb_pcie_channel_remove     pcie_channel_remove_cb;
+} bcmolt_dev_ctrl_params;
+
+#define DEVICE_CONTROL_MSG_QUEUE_SIZE  BCMOS_MSG_POOL_DEFAULT_SIZE
+#define IMAGE_BUF_SIZE                 (1 * 1024 * 1024) /* 1MB */
+#define BOOT_SEQ_POLL_INTERVAL_SEC     1
+#define BOOT_SEQ_POLLING_MAX_NUMBER    5
+#define DDR_TEST_POLLING_MAX_NUMBER    20
+#define DEVICE_CONTROL_CONFIG_TIME_US  (15 * 1000000) /* 15 seconds */
+#define DEVICE_CONTROL_CONNECT_TIME_US (40 * 1000000) /* 40 seconds */
+#define CONFIG_SEND_MAX_NUMBER         2
+#define FILE_PATH_LEN                  128
+#define HOST_DMA_RX_DEFAULT_QUEUE_SIZE 128
+#define HOST_DMA_TX_DEFAULT_QUEUE_SIZE 128
+#define EXCEPTION_LOG_MONITOR_INTERVAL (5 * 1000000) /* 5 second */
+#define DEVICE_RESPONSE_TIMEOUT_LENGTH (2 * 100000)  /* 200 milliseconds */
+#define HOST_RESET_DELAY_US            100000 /* how long to wait before resetting the host via callback (100ms) */
+
+/* indicates successful connection - used internally, no need to expose this in the host-facing enum */
+#define BCMOLT_HOST_CONNECTION_FAIL_REASON_NONE ((bcmolt_host_connection_fail_reason)0xFF)
+
+typedef enum
+{
+    DEVICE_CONTROL_EVENT_DEVICE_CLEAR,
+    DEVICE_CONTROL_EVENT_DEVICE_CONFIG_SET,
+    DEVICE_CONTROL_EVENT_DEVICE_CONFIG_GET,
+    DEVICE_CONTROL_EVENT_DEVICE_TIMER_TIMEOUT,
+    DEVICE_CONTROL_EVENT_DEVICE_RECEIVED_ACK,
+    DEVICE_CONTROL_EVENT_DEVICE_DISCONNECT,
+    DEVICE_CONTROL_EVENT_DEVICE_CONNECT,
+    DEVICE_CONTROL_EVENT_DEVICE_RESET,
+    DEVICE_CONTROL_EVENT_CONNECTION_FAILURE,
+    DEVICE_CONTROL_EVENT_CONNECTION_ESTABLISHED,
+    DEVICE_CONTROL_EVENT_DEVICE_READY,
+    DEVICE_CONTROL_EVENT_RUN_DDR_TEST,
+    DEVICE_CONTROL_EVENT_DDR_TEST_COMPLETED,
+    DEVICE_CONTROL_EVENT_DDR_TEST_TIMEOUT,
+
+    DEVICE_CONTROL_EVENT__NUM_OF,
+    DEVICE_CONTROL_EVENT_NO_EVENT = DEVICE_CONTROL_EVENT__NUM_OF
+} dev_ctrl_event;
+
+typedef enum
+{
+    DEV_CTRL_CONNECTING_STATE_ESTABLISHING, /* writing software via FLD, waiting for "connection established" */
+    DEV_CTRL_CONNECTING_STATE_CONFIGURING,  /* connection established, cfg sent, waiting for "device ready" */
+    DEV_CTRL_CONNECTING_STATE_STANDALONE,   /* connecting to a standalone device, waiting for "device ready" */
+} dev_ctrl_connecting_state;
+
+typedef struct
+{
+    char name[MAX_TASK_NAME_SIZE];
+    bcmos_task task;
+} dev_ctrl_task;
+
+typedef struct
+{
+    char name[MAX_MODULE_NAME_SIZE];
+    bcmos_module_id module_id;
+} dev_ctrl_module;
+
+typedef struct
+{
+    char name[MAX_TIMER_NAME_SIZE];
+    bcmos_timer timer;
+} dev_ctrl_timer;
+
+typedef struct
+{
+    uint32_t pcie_addr;
+} dev_ctrl_pcie;
+
+typedef struct
+{
+    dev_ctrl_connecting_state state;
+    uint32_t                  config_send_counter;
+    uint32_t                  config_interval;
+    dev_ctrl_timer            timer;
+} dev_ctrl_connection;
+
+typedef struct
+{
+    uint32_t             polling_counter;
+    uint32_t             polling_interval;
+    dev_ctrl_timer       timer;
+} dev_ctrl_boot_seq;
+
+typedef struct
+{
+    dev_ctrl_task           task_info;
+    dev_ctrl_module         module_info;
+    dev_ctrl_connection     connection_info;
+    dev_ctrl_pcie           pcie_info;
+    bcmos_keep_alive_info   ka_info;
+    dev_ctrl_boot_seq       boot_seq_info;
+    bcm_fld_device_info     fld_info;
+    bcmolt_device_cfg_data  device_params;
+    bcmolt_presence_mask    device_params_present;
+    dev_ctrl_timer          exception_monitor_timer;
+    uint16_t                corr_tag;
+    bcmolt_msg *            last_message;
+    dev_ctrl_timer          device_response_timer;
+    dev_ctrl_timer          reset_delay_timer;
+    bcmos_bool              is_host_reset_pending;
+#ifdef ENABLE_LOG
+    uint32_t                sram_log_offset;
+    uint32_t                msgs_read;
+#endif
+    bcmolt_control_state    enable_tod;
+#ifndef SIMULATION_BUILD
+    uint32_t                trx_disable_mask;
+#endif
+    dev_ctrl_event last_event;
+    bcmolt_host_connection_fail_reason conn_fail_reason;
+    uint32_t sw_error_count;
+    bcmolt_sw_error sw_errors[30];
+    dev_log_id log_id;
+} dev_ctrl_database;
+
+typedef void (*dev_ctrl_sm_cb)(bcmolt_devid device, const bcmolt_msg *msg);
+
+#define DEVICE_ID_FROM_MODULE_ID(module_id) ((bcmolt_devid)(module_id - BCMOS_MODULE_ID_DEV_CTRL_DEV0))
+#define MODULE_ID_FROM_DEVICE_ID(device) ((bcmos_module_id)(device + BCMOS_MODULE_ID_DEV_CTRL_DEV0))
+
+const char *bcm_str_device_state(bcmolt_device_state device_state);
+const char *bcm_str_device_event(dev_ctrl_event device_event);
+const char *bcm_str_host_connection_fail_reason(bcmolt_host_connection_fail_reason reason);
+const char *bcm_str_host_connecting_state(dev_ctrl_connecting_state state);
+void dev_ctrl_read_db(bcmolt_devid device, dev_ctrl_database *db);
+
+bcmos_errno bcmolt_dev_ctrl_host_event_write(uint32_t device, uint32_t event);
+
+/*Use different function signatures linux kernel device control and other*/
+#if !defined(LINUX_USER_SPACE)
+bcmos_errno bcmolt_dev_ctrl_init(bcmolt_dev_ctrl_params *params);
+#else
+bcmos_errno bcmolt_dev_ctrl_init(void);
+#endif
+
+void bcmolt_dev_ctrl_exit(void);
+
+#endif
diff --git a/bcm68620_release/release/host_driver/dev_ctrl_daemon/Makefile b/bcm68620_release/release/host_driver/dev_ctrl_daemon/Makefile
new file mode 100644
index 0000000..3379a59
--- /dev/null
+++ b/bcm68620_release/release/host_driver/dev_ctrl_daemon/Makefile
@@ -0,0 +1,22 @@
+# Device control driver
+MOD_NAME = dev_ctrl_daemon
+MOD_DEPS = trmux  debug_common keep_alive 
+
+ifneq ("$(SIMULATION_BUILD)", "y")
+	MOD_DEPS += trmux_daemon keep_alive_daemon
+endif
+
+MOD_INC_DIRS = $(SRC_DIR)
+
+ifeq ("$(RELEASE_BUILD)", "y")
+    MOD_INC_DIRS += host_driver/sw_version host_driver/sw_error host_driver/mh_utils
+else
+    MOD_INC_DIRS += host/sw_version $(TOP_DIR)/common/sw_error $(TOP_DIR)/common/mh_utils
+endif
+
+MOD_TYPE = lib
+
+MOD_DEFS += -DIN_BAND
+
+srcs = bcmolt_dev_ctrl_ib.c bcmolt_debug_ctrl_ib.c
+
diff --git a/bcm68620_release/release/host_driver/dev_ctrl_daemon/bcmolt_debug_ctrl.h b/bcm68620_release/release/host_driver/dev_ctrl_daemon/bcmolt_debug_ctrl.h
new file mode 120000
index 0000000..0a25253
--- /dev/null
+++ b/bcm68620_release/release/host_driver/dev_ctrl_daemon/bcmolt_debug_ctrl.h
@@ -0,0 +1 @@
+../dev_ctrl/bcmolt_debug_ctrl.h
\ No newline at end of file
diff --git a/bcm68620_release/release/host_driver/dev_ctrl_daemon/bcmolt_debug_ctrl_ib.c b/bcm68620_release/release/host_driver/dev_ctrl_daemon/bcmolt_debug_ctrl_ib.c
new file mode 120000
index 0000000..3637829
--- /dev/null
+++ b/bcm68620_release/release/host_driver/dev_ctrl_daemon/bcmolt_debug_ctrl_ib.c
@@ -0,0 +1 @@
+../dev_ctrl/bcmolt_debug_ctrl.c
\ No newline at end of file
diff --git a/bcm68620_release/release/host_driver/dev_ctrl_daemon/bcmolt_dev_ctrl.h b/bcm68620_release/release/host_driver/dev_ctrl_daemon/bcmolt_dev_ctrl.h
new file mode 120000
index 0000000..3b0509c
--- /dev/null
+++ b/bcm68620_release/release/host_driver/dev_ctrl_daemon/bcmolt_dev_ctrl.h
@@ -0,0 +1 @@
+../dev_ctrl/bcmolt_dev_ctrl.h
\ No newline at end of file
diff --git a/bcm68620_release/release/host_driver/dev_ctrl_daemon/bcmolt_dev_ctrl_ib.c b/bcm68620_release/release/host_driver/dev_ctrl_daemon/bcmolt_dev_ctrl_ib.c
new file mode 120000
index 0000000..623bd97
--- /dev/null
+++ b/bcm68620_release/release/host_driver/dev_ctrl_daemon/bcmolt_dev_ctrl_ib.c
@@ -0,0 +1 @@
+../dev_ctrl/bcmolt_dev_ctrl.c
\ No newline at end of file
diff --git a/bcm68620_release/release/host_driver/dev_ctrl_daemon/user/Makefile b/bcm68620_release/release/host_driver/dev_ctrl_daemon/user/Makefile
new file mode 100644
index 0000000..f1d01ca
--- /dev/null
+++ b/bcm68620_release/release/host_driver/dev_ctrl_daemon/user/Makefile
@@ -0,0 +1,14 @@
+ifneq ("$(SIMULATION_BUILD)", "y")
+
+MOD_NAME = bcm_dev_ctrl_user
+MOD_TYPE = app
+MOD_DEPS = udtr os_cli user_config host_api dev_ctrl_daemon trmux_daemon keep_alive_daemon
+
+ifeq ("$(ENABLE_CLI)", "y")
+	MOD_DEPS += api_cli embedded_cli
+endif
+
+srcs = bcmolt_dev_ctrl_user.c
+
+endif
+
diff --git a/bcm68620_release/release/host_driver/dev_ctrl_daemon/user/bcmolt_dev_ctrl_user.c b/bcm68620_release/release/host_driver/dev_ctrl_daemon/user/bcmolt_dev_ctrl_user.c
new file mode 100755
index 0000000..baa7229
--- /dev/null
+++ b/bcm68620_release/release/host_driver/dev_ctrl_daemon/user/bcmolt_dev_ctrl_user.c
@@ -0,0 +1,72 @@
+#include <bcmolt_tr_ud_driver.h>
+#include <bcm_dev_log.h>
+#include <bcmolt_dev_ctrl.h>
+#include <bcmolt_tr_mux.h>
+#include <bcmos_system.h>
+#include <bcmolt_user_utils.h>
+#include <bcmolt_host_api.h>
+#include <bcmolt_fld.h>
+#include <bcmtr_pcie.h>
+
+extern struct proc_dir_entry *bcmolt_dir;
+
+bcmos_errno bcmtr_init(void)
+{
+    return BCM_ERR_OK;
+}
+
+#ifdef ENABLE_LOG
+#define DEV_LOG_SIZE1 1<<11
+#define DEV_LOG_SIZE2 1<<13
+#define DEV_LOG_QUEUE_SIZE 1000
+
+static bcmos_errno dev_ctrl_logger_init_cb(void)
+{
+    bcmos_errno rc;
+    static uint8_t logger_buf1[DEV_LOG_SIZE1];
+    static uint8_t logger_buf2[DEV_LOG_SIZE2];
+    void *addresses[DEV_LOG_MAX_FILES] = {logger_buf1, logger_buf2};
+    uint32_t sizes[DEV_LOG_MAX_FILES] = {sizeof(logger_buf1), sizeof(logger_buf2)};
+    uint32_t flags[DEV_LOG_MAX_FILES] = {BCM_DEV_LOG_FILE_FLAG_STOP_WHEN_FULL, BCM_DEV_LOG_FILE_FLAG_WRAP_AROUND};
+
+    rc = bcm_dev_log_init_default_logger(addresses, sizes, flags, BCM_SIZEOFARRAY(addresses), 0x4000, TASK_PRIORITY_DEV_LOG, DEV_LOG_QUEUE_SIZE);
+    BCMOS_TRACE_CHECK_RETURN(rc, rc, "bcm_dev_log_initialize_dev_logger_default()\n");
+
+    /* For now just map BCMOS_TRACE_XX to dev_log. Later on dev_control
+     * can define its own log ids
+     */
+    //rc = bcm_dev_log_os_trace_init();
+    //BUG_ON(rc);
+
+    return rc;
+}
+#endif
+
+
+
+int main(int argc, char *argv[])
+{
+    bcmos_errno rc;
+    bcmolt_host_init_params params =
+    {
+#ifdef ENABLE_LOG
+        .logger_init_cb = dev_ctrl_logger_init_cb,
+#endif
+        .run_dev_ctrl = BCMOS_TRUE
+    };
+
+    rc = bcmolt_host_init(&params);
+    BUG_ON(rc);
+
+    bcmos_trace_level_set(BCMOS_TRACE_LEVEL_DEBUG);
+
+    rc = bcmtr_ud_init();  /*  Never returns - runs accept loop */
+    BUG_ON(rc);
+
+    while (BCMOS_TRUE)
+    {
+        bcmos_usleep(5*1000*1000);
+        bcmos_printf("Waiting\n");
+    }
+}
+
diff --git a/bcm68620_release/release/host_driver/fld/Makefile b/bcm68620_release/release/host_driver/fld/Makefile
new file mode 100644
index 0000000..b4571ca
--- /dev/null
+++ b/bcm68620_release/release/host_driver/fld/Makefile
@@ -0,0 +1,38 @@
+# FLD driver
+# - low-level FLD driver (load functions)
+#
+MOD_NAME = fld
+MOD_DEPS = model
+
+ifneq ("$(RELEASE_BUILD)", "y")
+    MOD_INC_DIRS = $(SRC_DIR) common/drivers/$(PLATFORM)/fld
+endif
+
+ifeq ("$(ENABLE_TRACE)", "y")
+	MOD_DEFS += -DTX_ENABLE_EVENT_TRACE
+    ifeq ("$(DEBUG_TRACE_INIT)", "y")
+       MOD_DEFS += -DDEBUG_TRACE_INIT
+    endif
+endif
+
+ifeq ("$(OS_KERNEL)", "linux")
+MOD_TYPE = linux_lib
+else
+MOD_TYPE = lib
+endif
+
+# If called by linux kernel builder - add include paths manually.
+# It is not elegant, but we'll not have many linux modules
+ifneq ("$(KBUILD_SRC)", "")
+	-include $(OUT_DIR_BASE)/Makefile.config.$(MOD_NAME)
+endif
+
+# Disable "cast increases required alignment of target type" warning. 
+# There are places in the code with casting from (uint8_t *) to (uint32_t *), but in fact
+# the buffer is well-aligned. 
+EXTRA_CFLAGS += -Wno-error=cast-align
+
+srcs = bcmolt_fld.c
+
+USE_LINT = yes
+
diff --git a/bcm68620_release/release/host_driver/fld/bcm_fld_common.h b/bcm68620_release/release/host_driver/fld/bcm_fld_common.h
new file mode 100644
index 0000000..236c32d
--- /dev/null
+++ b/bcm68620_release/release/host_driver/fld/bcm_fld_common.h
@@ -0,0 +1,245 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#ifndef BCM_FLD_COMMON_H
+#define BCM_FLD_COMMON_H
+
+#define BCM_FLD_SRAM_SIZE                           0x00010000 /* 64 KB */
+
+/******************************/
+/* FLD communication area */
+/******************************/
+#define COMM_WORD_SIZE                              4                   /* 32 bit, 4 byte */
+#define BCM_FLD_COMMUNICATION_AREA_TOP              BCM_FLD_SRAM_SIZE
+
+/* Please do not change PCIE_OPAQUE_DATA_SIZE define, MUST be same as used by pcie dma driver */
+#define PCIE_OPAQUE_DATA_SIZE                       (2*4)               /* two pointers (BD and SBD) */
+
+#define BOOTRECORD_RESERVED                         (2*COMM_WORD_SIZE)  /* 4 words reserved for future needs */
+#define BCM_FLD_CPU_POSTMORTEM_BUF_SIZE             0x00001000
+
+#define BCM_FLD_CPU_STATE_OFFSET                    (BCM_FLD_COMMUNICATION_AREA_TOP       - COMM_WORD_SIZE)     /* 0xfffc */
+#define BCM_FLD_HOST_STATE_OFFSET                   (BCM_FLD_CPU_STATE_OFFSET             - COMM_WORD_SIZE)
+#define BCM_FLD_CPU_DEBUG_STATE_OFFSET              (BCM_FLD_HOST_STATE_OFFSET            - COMM_WORD_SIZE)
+#define BCM_FLD_HOST_DEBUG_STATE_OFFSET             (BCM_FLD_CPU_DEBUG_STATE_OFFSET       - COMM_WORD_SIZE)
+#define BCM_FLD_CPU_BOOTREC_STATE_OFFSET            (BCM_FLD_HOST_DEBUG_STATE_OFFSET      - COMM_WORD_SIZE)
+#define BCM_FLD_HOST_BOOTREC_STATE_OFFSET           (BCM_FLD_CPU_BOOTREC_STATE_OFFSET     - COMM_WORD_SIZE)
+
+#define BCM_FLD_CPU_RESET_REASON_OFFSET             (BCM_FLD_HOST_BOOTREC_STATE_OFFSET    - COMM_WORD_SIZE)
+#define BCM_FLD_CPU_EXCEP_REASON_OFFSET             (BCM_FLD_CPU_RESET_REASON_OFFSET      - COMM_WORD_SIZE)
+#define BCM_FLD_CPU_DDR_MEMC_STATE_OFFSET           (BCM_FLD_CPU_EXCEP_REASON_OFFSET      - COMM_WORD_SIZE)
+#define BCM_FLD_RAS_0_DDR_MEMC_STATE_OFFSET         (BCM_FLD_CPU_DDR_MEMC_STATE_OFFSET    - COMM_WORD_SIZE)
+#define BCM_FLD_RAS_1_DDR_MEMC_STATE_OFFSET         (BCM_FLD_RAS_0_DDR_MEMC_STATE_OFFSET  - COMM_WORD_SIZE)
+
+#define BCM_FLD_CPU_DDR_PHY_STATE_OFFSET            (BCM_FLD_RAS_1_DDR_MEMC_STATE_OFFSET  - COMM_WORD_SIZE)
+#define BCM_FLD_RAS_0_DDR_PHY_STATE_OFFSET          (BCM_FLD_CPU_DDR_PHY_STATE_OFFSET     - 6*COMM_WORD_SIZE)
+#define BCM_FLD_RAS_1_DDR_PHY_STATE_OFFSET          (BCM_FLD_RAS_0_DDR_PHY_STATE_OFFSET   - 6*COMM_WORD_SIZE)
+#define BCM_FLD_BOOT_PROTOCOL_VERSION_OFFSET        (BCM_FLD_RAS_1_DDR_PHY_STATE_OFFSET   - 6*COMM_WORD_SIZE)
+#define BCM_FLD_OS_ENTRY_OFFSET                     (BCM_FLD_BOOT_PROTOCOL_VERSION_OFFSET - COMM_WORD_SIZE)
+#define BCM_FLD_CPU_SET_QUEUES_SIZE                 (BCM_FLD_OS_ENTRY_OFFSET - COMM_WORD_SIZE)
+
+/******************************/
+/* Boot-record  area */
+/******************************/
+/* host write for SoC its rx queue size */
+#define BCM_FLD_HOST_RX_QUEUE_SIZE_OFFSET           (BCM_FLD_CPU_SET_QUEUES_SIZE - COMM_WORD_SIZE)
+#define BCM_FLD_CPU_RX_QUEUE_SIZE_OFFSET            (BCM_FLD_HOST_RX_QUEUE_SIZE_OFFSET - COMM_WORD_SIZE)
+
+#define BCM_FLD_CPU_BOOTRECORD_OFFSET               (BCM_FLD_CPU_RX_QUEUE_SIZE_OFFSET - BOOTRECORD_RESERVED)
+
+#define BCM_FLD_HOST_BOOTRECORD_OFFSET              (BCM_FLD_CPU_BOOTRECORD_OFFSET - PCIE_OPAQUE_DATA_SIZE - BOOTRECORD_RESERVED )
+
+#define BCM_FLD_CPU1_POSTMORTEM_STATE               (BCM_FLD_HOST_BOOTRECORD_OFFSET - COMM_WORD_SIZE)
+#define BCM_FLD_CPU0_POSTMORTEM_STATE               (BCM_FLD_CPU1_POSTMORTEM_STATE - COMM_WORD_SIZE)
+
+#define BCM_FLD_RAS_0_SETTINGS                      (BCM_FLD_CPU0_POSTMORTEM_STATE - COMM_WORD_SIZE)
+#define BCM_FLD_RAS_1_SETTINGS                      (BCM_FLD_RAS_0_SETTINGS - COMM_WORD_SIZE)
+
+#define BCM_RAS_DISABLE                              0x0
+#define BCM_RAS_MODE_GPON                            0x1
+#define BCM_RAS_MODE_XGPON                           0x2
+
+#define BCM_FLD_AVS_SETTINGS                         (BCM_FLD_RAS_1_SETTINGS - COMM_WORD_SIZE)
+#define BCM_FLD_AVS_STOP                             0x0
+#define BCM_FLD_AVS_CONT                             0x1
+
+#ifdef TX_ENABLE_EVENT_TRACE
+#define BCM_FLD_EVENT_TRACE_OFFSET                   (BCM_FLD_AVS_SETTINGS - COMM_WORD_SIZE)
+
+/*********************************************************************************
+ PAY ATTENTION !!! BCM_FLD_COMMUNICATION_AREA_BASE must be equal first byte in the FLD
+            communication area therefore  it should be equal to the last define above
+*********************************************************************************/
+
+#define BCM_FLD_COMMUNICATION_AREA_BASE             BCM_FLD_EVENT_TRACE_OFFSET
+#else
+#define BCM_FLD_COMMUNICATION_AREA_BASE             BCM_FLD_RAS_1_SETTINGS
+#endif
+#define BCM_FLD_COMMUNICATION_AREA_SIZE             BCM_FLD_COMMUNICATION_AREA_TOP - BCM_FLD_COMMUNICATION_AREA_BASE
+
+/*********************************************************************************
+ PAY ATTENTION !!! POSTMORTEM_BUF_OFFSET must be outside the communication area
+             therefore  it should be defined from BCM_FLD_COMMUNICATION_AREA_BASE
+*********************************************************************************/
+
+#define BCM_FLD_CPU1_POSTMORTEM_BUF_OFFSET          (BCM_FLD_COMMUNICATION_AREA_BASE - BCM_FLD_CPU_POSTMORTEM_BUF_SIZE)
+#define BCM_FLD_CPU0_POSTMORTEM_BUF_OFFSET          (BCM_FLD_CPU1_POSTMORTEM_BUF_OFFSET - BCM_FLD_CPU_POSTMORTEM_BUF_SIZE)
+#define BCM_FLD_HOST_EVENT                          (BCM_FLD_CPU0_POSTMORTEM_BUF_OFFSET - COMM_WORD_SIZE)
+
+#define BCM_FLD_DDR_TEST_RESULTS_SIZE               (3 * COMM_WORD_SIZE) /* CPU + RAS 0 + RAS 1 */
+#define BCM_FLD_DDR_TEST_RESULTS                    (BCM_FLD_HOST_EVENT - BCM_FLD_DDR_TEST_RESULTS_SIZE)
+
+/* SW Error table */
+#define BCM_FLD_SW_ERROR_TABLE_SIZE                 (1171 * COMM_WORD_SIZE)
+#define BCM_FLD_SW_ERROR_TABLE                      (BCM_FLD_DDR_TEST_RESULTS - BCM_FLD_SW_ERROR_TABLE_SIZE)
+
+/* logger will NOT overwrite other fields */
+#define BCM_FLD_LOGGER_TOP                          BCM_FLD_SW_ERROR_TABLE
+#define BCM_FLD_LOGGER_BASE                         0 /* logger will overwrite the bootloader */
+
+/* BCM68620 (Maple) functional states */
+#define BCM_FLD_CPU_FINISH_BOOTLOADER_SHIFT         0
+#define BCM_FLD_CPU_FINISH_BOOTLOADER_MASK          (0x1 << BCM_FLD_CPU_FINISH_BOOTLOADER_SHIFT)
+
+#define BCM_FLD_CPU_READY_SHIFT                     1
+#define BCM_FLD_CPU_READY_MASK                      (0x1 << BCM_FLD_CPU_READY_SHIFT)
+
+#define BCM_FLD_DDR_TEST_DONE_SHIFT                 2
+#define BCM_FLD_DDR_TEST_DONE_MASK                  (0x1 << BCM_FLD_DDR_TEST_DONE_SHIFT)
+
+/* BCM68620 (Host) functional states */
+#define BCM_FLD_HOST_FINISH_WRITE_DDR_SHIFT         0
+#define BCM_FLD_HOST_FINISH_WRITE_DDR_MASK          (0x1 << BCM_FLD_HOST_FINISH_WRITE_DDR_SHIFT)
+
+#define BCM_FLD_HOST_RUN_CPU_DDR_TEST_SHIFT         1
+#define BCM_FLD_HOST_RUN_CPU_DDR_TEST_MASK          (0x1 << BCM_FLD_HOST_RUN_CPU_DDR_TEST_SHIFT)
+
+#define BCM_FLD_HOST_RUN_RAS_0_TEST_SHIFT           2
+#define BCM_FLD_HOST_RUN_RAS_0_TEST_MASK            (0x1 << BCM_FLD_HOST_RUN_RAS_0_TEST_SHIFT)
+
+#define BCM_FLD_HOST_RUN_RAS_1_TEST_SHIFT           3
+#define BCM_FLD_HOST_RUN_RAS_1_TEST_MASK            (0x1 << BCM_FLD_HOST_RUN_RAS_1_TEST_SHIFT)
+
+/* host bootrecord states */
+#define BCM_FLD_HOST_PRM_VALID_SHIFT                0
+#define BCM_FLD_HOST_PRM_VALID_MASK                 (0x1 << BCM_FLD_HOST_PRM_VALID_SHIFT)
+
+/* device bootrecord states */
+#define BCM_FLD_CPU_PRM_VALID_SHIFT                 0
+#define BCM_FLD_CPU_PRM_VALID_MASK                  (0x1 << BCM_FLD_CPU_PRM_VALID_SHIFT)
+
+/* queue validity flag */
+#define BCM_FLD_CPU_QUEUE_VALID_SHIFT               0
+#define BCM_FLD_CPU_QUEUE_VALID_MASK                (0x1 << BCM_FLD_CPU_QUEUE_VALID_SHIFT)
+
+/* CPU debug states */
+#define CPU_DEBUG_BOOT_FLASH        (1<<0)
+#define CPU_DEBUG_RUN__FROM_SRAM    (1<<1)
+#define CPU_DEBUG_LUT_DONE          (1<<2)
+#define CPU_DEBUG_B15_CFG_DONE      (1<<3)
+#define CPU_DEBUG_UART_INIT_DONE    (1<<4)
+#define CPU_DEBUG_CLEAR_BSS_DONE    (1<<5)
+#define CPU_DEBUG_RUN_C             (1<<6)
+#define CPU_DEBUG_FLASH_READ_FAILED (1<<7)
+#define CPU_DEBUG_OS_FAILED         (1<<8)
+
+/* CPU exception reason */
+#define CPU_EXCEP_UNDEF_INSTR       (1<<0)
+#define CPU_EXCEP_SW_INTR           (1<<1)
+#define CPU_EXCEP_PREFETCH_ABORT    (1<<2)
+#define CPU_EXCEP_DATA_ABORT        (1<<3)
+#define CPU_EXCEP_IRQ               (1<<4)
+#define CPU_EXCEP_FIQ               (1<<5)
+
+#ifndef __ASSEMBLER__
+/* SoC states values */
+typedef enum
+{
+    BCM_FLD_CPU_STATE_UNKNOWN,
+    BCM_FLD_SRAM_BOOT_DONE,
+    BCM_FLD_BOOT_FROM_DDR,
+    BCM_FLD_RUN_FROM_DDR,
+    BCM_FLD_CPU_READY,
+    BCM_FLD_HOST_READY,
+    BCM_FLD_CPU_FINISH_BOOTLOADER
+} BCM_FLD_CPU_STATE;
+
+/* SoC reset values */
+typedef enum
+{
+    BCM_FLD_CPU_RESET_UNKNOWN
+} BCM_FLD_CPU_RESET_REASON;
+
+typedef enum
+{
+    BCM_FLD_RAS_MODE_NOT_CONFIGURED,
+    BCM_FLD_RAS_MODE_GPON,
+    BCM_FLD_RAS_MODE_XGPON,
+    BCM_FLD_RAS_MODE_XGS_NGPON2,
+} BCM_FLD_RSM_MODE;
+
+typedef struct
+{
+    unsigned int magic;
+    unsigned int msg_len;
+    char msg[1];
+} BCM_FLD_POSTMORTEM_LOG;
+#endif
+
+#define BCM_FLD_POSTMORTEM_LOG_MAGIC      0xFEEDBACC
+
+/* device_debug_states */
+#define BCM_FLD_CPU_BOOT_FROM_SRAM_STATES_SHIFT     0
+#define BCM_FLD_CPU_BOOT_FROM_SRAM_STATES_MASK      0x000000ffU
+#define BCM_FLD_CPU_BOOT_FROM_SRAM_ERRORS_SHIFT     8
+#define BCM_FLD_CPU_BOOT_FROM_SRAM_ERRORS_MASK      0x0000ff00U
+#define BCM_FLD_CPU_BOOT_FROM_SRAM_EXCEPTION_SHIFT  16
+#define BCM_FLD_CPU_BOOT_FROM_SRAM_EXCEPTION_MASK   0x00ff0000U
+#define BCM_FLD_CPU_RUN_FROM_DDR_STATES_SHIFT       24
+#define BCM_FLD_CPU_RUN_FROM_DDR_STATES_MASK        0xff000000U
+/* host_debug_states */
+#define BCM_FLD_HOST_WRITE_SRAM_SHIFT               0
+#define BCM_FLD_HOST_WRITE_SRAM_MASK                0x00000001U
+#define BCM_FLD_HOST_START_CPU_SHIFT                1
+#define BCM_FLD_HOST_START_CPU_MASK                 0x00000002U
+#define BCM_FLD_HOST_WRITE_DDR_SHIFT                2
+#define BCM_FLD_HOST_WRITE_DDR_MASK                 0x00000004U
+
+#define CPU_2_PCIE_MEM_WIN0_BASE    0x90000000
+#define CPU_2_PCIE_MEM_WIN0_SIZE    0x00100000
+#define MAX_PMC_SIZE                0x8000
+
+#ifdef TX_ENABLE_EVENT_TRACE
+#define EVENT_BUFFER_SIZE           0x00600000 /* 6 Mbyte */
+/* leave 1 Mbyte gap between windows */
+#define CPU_2_PCIE_MEM_WIN1_BASE    CPU_2_PCIE_MEM_WIN0_BASE + CPU_2_PCIE_MEM_WIN0_SIZE + 0x100000
+#define CPU_2_PCIE_MEM_WIN1_SIZE    EVENT_BUFFER_SIZE
+#endif
+
+#endif
diff --git a/bcm68620_release/release/host_driver/fld/bcmolt_fld.c b/bcm68620_release/release/host_driver/fld/bcmolt_fld.c
new file mode 100644
index 0000000..d4e92b2
--- /dev/null
+++ b/bcm68620_release/release/host_driver/fld/bcmolt_fld.c
@@ -0,0 +1,850 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#include "bcmolt_fld.h"
+#ifdef TX_ENABLE_EVENT_TRACE
+#include "bcmolt_llpcie.h"
+#endif
+
+/* internal data base */
+static uint32_t max_bcm68620_device = 0;
+static bcm_fld_device_info *bcm68620_info = NULL;
+
+#define SRAM_ADDRESS(device,offset) (uint32_t *)(bcm68620_info[device].soc_sram_base + offset)
+
+bcmos_errno bcm_fld_init(uint32_t max_devices)
+{
+    max_bcm68620_device = max_devices;
+    bcm68620_info = (bcm_fld_device_info *)bcmos_alloc(max_devices * sizeof(bcm_fld_device_info));
+    if (!bcm68620_info)
+        return BCM_ERR_NOMEM;
+    memset(bcm68620_info, 0, max_devices * sizeof(bcm_fld_device_info));
+
+    return BCM_ERR_OK;
+}
+
+void bcm_fld_clear_comm_area(uint32_t device)
+{
+    memset((char *)SRAM_ADDRESS(device,BCM_FLD_COMMUNICATION_AREA_BASE), 0 ,BCM_FLD_COMMUNICATION_AREA_SIZE);
+#if defined(TX_ENABLE_EVENT_TRACE) && defined(DEBUG_TRACE_INIT)
+    bcm_ll_pcie_setrace(device);
+#endif
+}
+
+bcmos_errno bcm_fld_exit(void)
+{
+    if (bcm68620_info)
+        bcmos_free(bcm68620_info);
+
+    bcm68620_info = NULL;
+
+    return BCM_ERR_OK;
+}
+
+/* register a device to driver
+   returns the driver index, instead the user's
+   store the user,s information about the device */
+bcmos_errno bcm_fld_register(uint32_t device, bcm_fld_device_info *info)
+{
+    if (!info)
+        return BCM_ERR_PARM;
+
+    if (!bcm68620_info)
+        return BCM_ERR_NORES;
+
+    if (device >= max_bcm68620_device)
+        return BCM_ERR_RANGE;
+
+    if (bcm68620_info[device].soc_sram_base)
+        return BCM_ERR_ALREADY;
+
+    /* copy the information received from the user to uint32_ternal data base */
+    bcm68620_info[device].soc_sram_base = info->soc_sram_base;
+    bcm68620_info[device].soc_ddr_base = info->soc_ddr_base;
+    bcm68620_info[device].soc_regs_base = info->soc_regs_base;
+    bcm68620_info[device].soc_ddr_length = info->soc_ddr_length;
+
+    return BCM_ERR_OK;
+}
+
+/* remove a device from uint32_ternal data base */
+bcmos_errno bcm_fld_unregister(uint32_t device)
+{
+    if (!bcm68620_info)
+        return BCM_ERR_NORES;
+
+    if (device >= max_bcm68620_device)
+        return BCM_ERR_RANGE;
+
+    /* clear the uint32_ternal data base for the given device */
+    bcm68620_info[device].soc_sram_base = 0;
+    bcm68620_info[device].soc_ddr_base = 0;
+    bcm68620_info[device].soc_ddr_length = 0;
+    bcm68620_info[device].soc_crt_length = 0;
+    bcm68620_info[device].soc_regs_base = 0;
+
+    return BCM_ERR_OK;
+}
+
+/* read from communication area and return the soc state
+   reset reason and protocol version */
+bcmos_errno bcm_fld_get_device_status(uint32_t device, bcm_fld_device_stat *debug_state)
+{
+    if (!debug_state)
+        return BCM_ERR_PARM;
+
+    if (!bcm68620_info)
+        return BCM_ERR_NORES;
+
+    if (device >= max_bcm68620_device)
+        return BCM_ERR_RANGE;
+
+    /* read from SRAM os entry offset, CPU status, reason and protocol version */
+    debug_state->protocol_version   = bcm_pci_read32(SRAM_ADDRESS(device,BCM_FLD_BOOT_PROTOCOL_VERSION_OFFSET));
+    debug_state->state              = bcm_pci_read32(SRAM_ADDRESS(device,BCM_FLD_CPU_STATE_OFFSET));
+    debug_state->reason             = bcm_pci_read32(SRAM_ADDRESS(device,BCM_FLD_CPU_RESET_REASON_OFFSET));
+    debug_state->os_entry_offset    = bcm_pci_read32(SRAM_ADDRESS(device,BCM_FLD_OS_ENTRY_OFFSET));
+
+    return BCM_ERR_OK;
+}
+
+/* returns the last soc state */
+bcmos_errno bcm_fld_get_device_loading_state(uint32_t device, BCM_FLD_CPU_STATE *cpu_state)
+{
+    uint32_t temp;
+    volatile uint32_t value;
+
+    if (!cpu_state)
+        return BCM_ERR_PARM;
+
+    if (!bcm68620_info)
+        return BCM_ERR_NORES;
+
+    if (device >= max_bcm68620_device)
+        return BCM_ERR_RANGE;
+
+    value = bcm_pci_read32(SRAM_ADDRESS(device,BCM_FLD_CPU_STATE_OFFSET));
+    temp = value & BCM_FLD_CPU_READY_MASK;
+    if (temp)
+        *cpu_state = BCM_FLD_CPU_READY;
+    else
+    {
+        temp = value & BCM_FLD_CPU_FINISH_BOOTLOADER_MASK;
+        if (temp)
+            *cpu_state = BCM_FLD_CPU_FINISH_BOOTLOADER;
+        else
+            *cpu_state = BCM_FLD_CPU_STATE_UNKNOWN;
+    }
+
+    return BCM_ERR_OK;
+}
+
+/* write in communication area the current host status during loading process */
+bcmos_errno bcm_fld_host_finish_write_ddr(uint32_t device, uint32_t os_entry_address)
+{
+    if (!bcm68620_info)
+        return BCM_ERR_NORES;
+
+    if (device >= max_bcm68620_device)
+        return BCM_ERR_RANGE;
+
+    /* write os_entry address of the code from DDR */
+    bcm_pci_write32(SRAM_ADDRESS(device,BCM_FLD_OS_ENTRY_OFFSET), os_entry_address);
+    /* run code from DDR */
+    bcm_pci_write32(SRAM_ADDRESS(device,BCM_FLD_HOST_STATE_OFFSET), BCM_FLD_HOST_FINISH_WRITE_DDR_MASK);
+
+    return BCM_ERR_OK;
+}
+
+/* return the logs area */
+bcmos_errno bcm_fld_get_logs(uint32_t device, char **log_area, int *length)
+{
+    if (!log_area || !length)
+        return BCM_ERR_PARM;
+
+    if (!bcm68620_info)
+        return BCM_ERR_NORES;
+
+    if (device >= max_bcm68620_device)
+        return BCM_ERR_RANGE;
+
+    *log_area = (char *)SRAM_ADDRESS(device, BCM_FLD_LOGGER_BASE);
+    *length = BCM_FLD_LOGGER_TOP;
+
+    return BCM_ERR_OK;
+}
+
+/* write the received buffer to memory according to offset and type */
+bcmos_errno bcm_fld_write(uint32_t device, char *buff, uint32_t buff_size, uint32_t offset_in_image, bcmolt_device_image_type image_type)
+{
+    unsigned long address = 0;
+    int i;
+#ifndef PCIE_BYTE_COPY
+    uint32_t size, rest;
+    uint32_t* buff_32;
+    uint32_t* addr_32;
+#endif
+
+    if (!buff)
+        return BCM_ERR_PARM;
+
+    if (!bcm68620_info)
+        return BCM_ERR_NORES;
+
+    if (device >= max_bcm68620_device)
+        return BCM_ERR_RANGE;
+
+    if (image_type == BCMOLT_DEVICE_IMAGE_TYPE_BOOTLOADER)
+    {
+        address = bcm68620_info[device].soc_sram_base + offset_in_image;
+        if ((offset_in_image + buff_size) > BCM_FLD_COMMUNICATION_AREA_BASE)
+            return BCM_ERR_OVERFLOW;
+    }
+    else if (image_type == BCMOLT_DEVICE_IMAGE_TYPE_APPLICATION)
+    {
+        address = bcm68620_info[device].soc_ddr_base + offset_in_image;
+        if ((offset_in_image + buff_size) > bcm68620_info[device].soc_ddr_length)
+            return BCM_ERR_OVERFLOW;
+        bcm68620_info[device].soc_crt_length += buff_size;
+    }
+    else
+    {
+        return BCM_ERR_PARM;
+    }
+
+#ifndef PCIE_BYTE_COPY
+    size = buff_size / sizeof(*buff_32);
+    rest = buff_size & (sizeof(*buff_32) -1);
+
+    buff_32 = (uint32_t*)buff;
+    addr_32 = (uint32_t*)address;
+
+    if (rest)
+        size++;
+    for(i = 0; i < size; i++)
+        bcm_pci_write32((addr_32 + i),BCMOS_ENDIAN_CPU_TO_LITTLE_U32(*(buff_32 +i)));
+#else
+    for (i = 0; i < buff_size; i++)
+        *(uint8_t *)(address + i) = buff[i];
+#endif
+
+    bcmos_barrier();
+
+    return BCM_ERR_OK;
+}
+
+/* read to the received buffer from memory according to offset and type */
+bcmos_errno bcm_fld_read(uint32_t device, char *buff, uint32_t *buff_size, uint32_t offset_in_image, bcmolt_device_image_type image_type)
+{
+    unsigned long address = 0;
+    uint32_t i;
+#ifndef PCIE_BYTE_COPY
+    uint32_t size, rest;
+    uint32_t* buff_32;
+    uint32_t* addr_32;
+#endif
+
+    if (!buff || !buff_size)
+        return BCM_ERR_PARM;
+
+    if (!bcm68620_info)
+        return BCM_ERR_NORES;
+
+    if (device >= max_bcm68620_device)
+        return BCM_ERR_RANGE;
+
+    if(image_type == BCMOLT_DEVICE_IMAGE_TYPE_BOOTLOADER)
+        address = bcm68620_info[device].soc_sram_base + offset_in_image;
+    else if (image_type == BCMOLT_DEVICE_IMAGE_TYPE_APPLICATION)
+        address = bcm68620_info[device].soc_ddr_base + offset_in_image;
+    else
+        return BCM_ERR_PARM;
+
+    /* temporary for test , consider to integrate in future */
+#ifndef PCIE_BYTE_COPY
+    size = *buff_size /sizeof(*buff_32);
+    rest = *buff_size & (sizeof(*buff_32) -1);
+    buff_32 = (uint32_t*)buff;
+    addr_32 = (uint32_t*)address;
+
+    if (rest)
+        size++;
+    for(i = 0; i < size; i++)
+        *(buff_32 +i)= BCMOS_ENDIAN_CPU_TO_LITTLE_U32(bcm_pci_read32((uint32_t *)(addr_32 + i)));
+#else
+    for (i = 0; i < *buff_size; i++)
+        buff[i] = *(uint8_t *)(address + i);
+
+#endif
+
+    bcmos_barrier();
+
+    return BCM_ERR_OK;
+}
+
+
+/*********** PMC definitions ****************/
+#define PMC_QUEUE_0_DATA_UNRESET0   0x401c00U
+#define PMC_QUEUE_0_DATA_UNRESET1   0x401c04U
+#define PMC_QUEUE_0_DATA_UNRESET2   0x401c08U
+#define PMC_QUEUE_0_DATA_UNRESET3   0x401c0cU
+
+#define PMC_QUEUE_1_DATA_UNRESET0   0x401c10U
+#define PMC_QUEUE_1_DATA_UNRESET1   0x401c14U
+#define PMC_QUEUE_1_DATA_UNRESET2   0x401c18U
+#define PMC_QUEUE_1_DATA_UNRESET3   0x401c1cU
+
+#define PMC_CNTRL_HOST_MBOX_IN      0x401028U
+#define PMC_HOST_MBOX_MASK          0x2
+#define PMC_PMB_CNTRL               0x4800c0U
+/* The below value is the swap of ((1 << 31) | (1<<20) | (4 << 12) | (0x0C)) */
+#define PMC_PMB_CMD                 0x0C401080
+#define PMC_PMB_WRITE               0x4800c4U
+/* The below value is the swap of 0x1*/
+#define PMC_PMB_ADDRESS             0x1000000
+
+/* PMC command to take ARM out of reset */
+#define ARM_OUT_OF_RESET            35
+/********************************************/
+
+bcmos_errno bcm_fld_start_bootloader(uint32_t device, uint32_t test_ddr)
+{
+/* temporary disabled: just for A0, should be enabled in B0
+#ifdef BCM_PMC_EXIST
+    volatile uint32_t readval;
+#endif
+*/
+    if (!bcm68620_info)
+        return BCM_ERR_NORES;
+
+    if (device >= max_bcm68620_device)
+        return BCM_ERR_RANGE;
+
+    bcm_pci_write32(SRAM_ADDRESS(device, BCM_FLD_HOST_STATE_OFFSET), test_ddr);
+    /* start processor */
+    bcm_fld_set_host_debug_status(device, BCM_FLD_HOST_START_CPU);
+/* Temporary disabled - should be enabled in B0
+#ifndef BCM_PMC_EXIST */
+    bcm_pci_read32((uint32_t *)(bcm68620_info[device].soc_regs_base + PMC_PMB_CNTRL));
+    bcm_pci_write32((uint32_t *)(bcm68620_info[device].soc_regs_base + PMC_PMB_WRITE), PMC_PMB_ADDRESS);
+    bcm_pci_read32((uint32_t *)(bcm68620_info[device].soc_regs_base + PMC_PMB_WRITE));
+    bcm_pci_write32((uint32_t *)(bcm68620_info[device].soc_regs_base + PMC_PMB_CNTRL), PMC_PMB_CMD);
+    bcm_pci_read32((uint32_t *)(bcm68620_info[device].soc_regs_base + PMC_PMB_CNTRL));
+/*
+#else
+    readval = bcm_pci_read32((uint32_t *)(bcm68620_info[device].soc_regs_base + PMC_CNTRL_HOST_MBOX_IN));
+    if (!(readval & PMC_HOST_MBOX_MASK))
+        return BCM_ERR_NOT_CONNECTED;
+
+    bcm_pci_write32((bcm68620_info[device].soc_regs_base + PMC_QUEUE_0_DATA_UNRESET0), BCMOS_ENDIAN_CPU_TO_LITTLE_U32(ARM_OUT_OF_RESET));
+    bcm_pci_write32((bcm68620_info[device].soc_regs_base + PMC_QUEUE_0_DATA_UNRESET1), BCMOS_ENDIAN_CPU_TO_LITTLE_U32(0));
+    bcm_pci_write32((bcm68620_info[device].soc_regs_base + PMC_QUEUE_0_DATA_UNRESET2), BCMOS_ENDIAN_CPU_TO_LITTLE_U32(0));
+    bcm_pci_write32((bcm68620_info[device].soc_regs_base + PMC_QUEUE_0_DATA_UNRESET3), BCMOS_ENDIAN_CPU_TO_LITTLE_U32(0));
+    bcmos_usleep(10000); // 10 msec
+    // read PMC response, to clean the queue
+    bcm_pci_read32((uint32_t *)(bcm68620_info[device].soc_regs_base + PMC_QUEUE_1_DATA_UNRESET0));
+    bcm_pci_read32((uint32_t *)(bcm68620_info[device].soc_regs_base + PMC_QUEUE_1_DATA_UNRESET1));
+    bcm_pci_read32((uint32_t *)(bcm68620_info[device].soc_regs_base + PMC_QUEUE_1_DATA_UNRESET2));
+    bcm_pci_read32((uint32_t *)(bcm68620_info[device].soc_regs_base + PMC_QUEUE_1_DATA_UNRESET3));
+#endif
+*/
+
+    return BCM_ERR_OK;
+}
+
+bcmos_bool bcm_fld_is_bootloader_done(uint32_t device)
+{
+    volatile uint32_t value;
+
+    if (!bcm68620_info)
+        return BCMOS_FALSE;
+
+    if (device >= max_bcm68620_device)
+        return BCMOS_FALSE;
+
+    value = bcm_pci_read32(SRAM_ADDRESS(device,BCM_FLD_CPU_STATE_OFFSET));
+    if (value & BCM_FLD_CPU_FINISH_BOOTLOADER_MASK)
+        return BCMOS_TRUE;
+
+    return BCMOS_FALSE;
+}
+
+bcmos_bool bcm_fld_is_ddr_test_done(uint32_t device)
+{
+    uint32_t value = bcm_pci_read32(SRAM_ADDRESS(device, BCM_FLD_CPU_STATE_OFFSET));
+    return 0 != (value & BCM_FLD_DDR_TEST_DONE_MASK);
+}
+
+bcmos_bool bcm_fld_test_device_bootrecord_flag(uint32_t device)
+{
+    volatile uint32_t value;
+
+    if (!bcm68620_info)
+        return BCMOS_FALSE;
+
+    if (device >= max_bcm68620_device)
+        return BCMOS_FALSE;
+
+    value = bcm_pci_read32(SRAM_ADDRESS(device,BCM_FLD_CPU_BOOTREC_STATE_OFFSET));
+    if (value & BCM_FLD_CPU_PRM_VALID_MASK)
+        return BCMOS_TRUE;
+
+    return BCMOS_FALSE;
+}
+
+bcmos_errno bcm_fld_get_device_bootrecord(uint32_t device, uint32_t *opaque_data)
+{
+    uint32_t *addr, *temp;
+    int32_t i;
+
+    if (!opaque_data)
+        return BCM_ERR_PARM;
+
+    if (!bcm68620_info)
+        return BCM_ERR_NORES;
+
+    if (device >= max_bcm68620_device)
+        return BCM_ERR_RANGE;
+
+    temp = opaque_data;
+    addr = SRAM_ADDRESS(device,BCM_FLD_CPU_BOOTRECORD_OFFSET);
+    for (i = 0; i < PCIE_OPAQUE_DATA_SIZE / 4; i++)
+    {
+        *temp++ = bcm_pci_read32(addr++);
+    }
+
+    return BCM_ERR_OK;
+}
+
+bcmos_errno bcm_fld_clear_device_bootrecord_flag(uint32_t device)
+{
+    volatile uint32_t value;
+
+    if (!bcm68620_info)
+        return BCM_ERR_NORES;
+
+    if (device >= max_bcm68620_device)
+        return BCM_ERR_RANGE;
+
+    /* clear SoC prm valid bit */
+    value = bcm_pci_read32(SRAM_ADDRESS(device,BCM_FLD_CPU_BOOTREC_STATE_OFFSET));
+    value &= ~BCM_FLD_CPU_PRM_VALID_MASK;
+    bcm_pci_write32(SRAM_ADDRESS(device,BCM_FLD_CPU_BOOTREC_STATE_OFFSET), value);
+
+    return BCM_ERR_OK;
+}
+
+bcmos_errno bcm_fld_set_host_bootrecord_flag(uint32_t device)
+{
+    volatile uint32_t value;
+
+    if (!bcm68620_info)
+        return BCM_ERR_NORES;
+
+    if (device >= max_bcm68620_device)
+        return BCM_ERR_RANGE;
+
+    /* set host prm valid bit */
+    value = bcm_pci_read32(SRAM_ADDRESS(device,BCM_FLD_HOST_BOOTREC_STATE_OFFSET));
+    value |= ((1 << BCM_FLD_HOST_PRM_VALID_SHIFT) & BCM_FLD_HOST_PRM_VALID_MASK);
+    bcm_pci_write32(SRAM_ADDRESS(device,BCM_FLD_HOST_BOOTREC_STATE_OFFSET), value);
+
+    return BCM_ERR_OK;
+}
+
+bcmos_bool bcm_fld_test_host_bootrecord_flag(uint32_t device)
+{
+    volatile uint32_t value;
+
+    if (!bcm68620_info)
+        return BCMOS_FALSE;
+
+    if (device >= max_bcm68620_device)
+        return BCMOS_FALSE;
+
+    value = bcm_pci_read32(SRAM_ADDRESS(device,BCM_FLD_HOST_BOOTREC_STATE_OFFSET));
+    if (value & BCM_FLD_HOST_PRM_VALID_MASK)
+        return BCMOS_TRUE;
+
+    return BCMOS_FALSE;
+}
+
+bcmos_errno bcm_fld_set_rings_size(uint32_t device, uint32_t host_tx_size, uint32_t host_rx_size)
+{
+    volatile uint32_t value;
+
+    if (!bcm68620_info)
+        return BCM_ERR_NORES;
+
+    if (device >= max_bcm68620_device)
+        return BCM_ERR_RANGE;
+
+    /* write host_pd_ring_size to communication area - SoC will use it in first stages of application */
+    /* device tx ring size is the same as host rx queue */
+    bcm_pci_write32(SRAM_ADDRESS(device,BCM_FLD_HOST_RX_QUEUE_SIZE_OFFSET), host_rx_size);
+    /* device rx ring size is the same as host tx queue */
+    bcm_pci_write32(SRAM_ADDRESS(device,BCM_FLD_CPU_RX_QUEUE_SIZE_OFFSET), host_tx_size);
+    /* set host queue valid bit */
+    value = bcm_pci_read32(SRAM_ADDRESS(device,BCM_FLD_CPU_SET_QUEUES_SIZE));
+    value |= ((1 << BCM_FLD_CPU_QUEUE_VALID_SHIFT) & BCM_FLD_CPU_QUEUE_VALID_MASK);
+    bcm_pci_write32(SRAM_ADDRESS(device,BCM_FLD_CPU_SET_QUEUES_SIZE), value);
+
+    return BCM_ERR_OK;
+}
+
+bcmos_errno bcm_fld_get_exception_state(uint32_t device, uint32_t *state0, uint32_t *state1)
+{
+    if (!bcm68620_info)
+        return BCM_ERR_NORES;
+
+    if (device >= max_bcm68620_device)
+        return BCM_ERR_RANGE;
+
+    if (!state0 || !state1)
+        return BCM_ERR_PARM;
+
+    *state0 = bcm_pci_read32(SRAM_ADDRESS(device, BCM_FLD_CPU0_POSTMORTEM_STATE));
+    *state1 = bcm_pci_read32(SRAM_ADDRESS(device, BCM_FLD_CPU1_POSTMORTEM_STATE));
+
+    return BCM_ERR_OK;
+}
+
+bcmos_errno bcm_fld_clear_exception_state(uint32_t device, uint32_t cpuid)
+{
+
+    uint32_t offset =  cpuid ? BCM_FLD_CPU1_POSTMORTEM_STATE : BCM_FLD_CPU0_POSTMORTEM_STATE;
+
+    if (!bcm68620_info)
+        return BCM_ERR_NORES;
+
+    if ((device >= max_bcm68620_device) || (cpuid > 1))
+        return BCM_ERR_RANGE;
+
+    bcm_pci_write32(SRAM_ADDRESS(device, offset), 0);
+
+    return BCM_ERR_OK;
+}
+
+bcmos_errno bcm_fld_copy_exception_log(uint32_t device, uint32_t cpuid, char *buffer, int *length)
+{
+    BCM_FLD_POSTMORTEM_LOG *exlog;
+    uint32_t offset =  cpuid ? BCM_FLD_CPU1_POSTMORTEM_BUF_OFFSET : BCM_FLD_CPU0_POSTMORTEM_BUF_OFFSET;
+
+    if (!bcm68620_info)
+        return BCM_ERR_NORES;
+
+    if ((device >= max_bcm68620_device) || (cpuid > 1))
+        return BCM_ERR_RANGE;
+
+    if (!buffer || !length)
+        return BCM_ERR_PARM;
+
+    exlog = (BCM_FLD_POSTMORTEM_LOG *)SRAM_ADDRESS(device, offset);
+    if (exlog->magic != BCM_FLD_POSTMORTEM_LOG_MAGIC)
+        *length = 0;
+    else
+    {
+        int i;
+        *length = exlog->msg_len;
+        /* if host is 64 bit and bigendian memcpy does not work correctly */
+        for (i=0; i < exlog->msg_len; i++)
+        {
+            buffer[i] = exlog->msg[i];
+        }
+    }
+    buffer[*length] = '\0';
+
+    return BCM_ERR_OK;
+}
+
+/**
+* \Debug states and functions
+*/
+bcmos_errno bcm_fld_get_device_debug_status(uint32_t device, bcm_fld_device_debug_state *info)
+{
+    volatile uint32_t value;
+
+    if (!info)
+        return BCM_ERR_PARM;
+
+    if (!bcm68620_info)
+        return BCM_ERR_NORES;
+
+    if (device >= max_bcm68620_device)
+        return BCM_ERR_RANGE;
+
+    value = bcm_pci_read32(SRAM_ADDRESS(device,BCM_FLD_CPU_DEBUG_STATE_OFFSET));
+    info->boot_from_sram_states = (value & BCM_FLD_CPU_BOOT_FROM_SRAM_STATES_MASK) >> BCM_FLD_CPU_BOOT_FROM_SRAM_STATES_SHIFT;
+    info->boot_from_sram_errors = (value & BCM_FLD_CPU_BOOT_FROM_SRAM_ERRORS_MASK) >> BCM_FLD_CPU_BOOT_FROM_SRAM_ERRORS_SHIFT;
+    info->boot_from_sram_exception = (value & BCM_FLD_CPU_BOOT_FROM_SRAM_EXCEPTION_MASK) >> BCM_FLD_CPU_BOOT_FROM_SRAM_EXCEPTION_SHIFT;
+    info->run_from_ddr_state = (value & BCM_FLD_CPU_RUN_FROM_DDR_STATES_MASK) >> BCM_FLD_CPU_RUN_FROM_DDR_STATES_SHIFT;
+
+    return BCM_ERR_OK;
+}
+
+bcmos_errno bcm_fld_get_host_debug_status(uint32_t device, bcm_fld_host_debug_state *info)
+{
+    volatile uint32_t value;
+
+    if (!info)
+        return BCM_ERR_PARM;
+
+    if (!bcm68620_info)
+        return BCM_ERR_NORES;
+
+    if (device >= max_bcm68620_device)
+        return BCM_ERR_RANGE;
+
+    value = bcm_pci_read32(SRAM_ADDRESS(device,BCM_FLD_HOST_DEBUG_STATE_OFFSET));
+    info->write_sram = (value & BCM_FLD_HOST_WRITE_SRAM_MASK) >> BCM_FLD_HOST_WRITE_SRAM_SHIFT;
+    info->start_device = (value & BCM_FLD_HOST_START_CPU_MASK) >> BCM_FLD_HOST_START_CPU_SHIFT;
+    info->write_ddr = (value & BCM_FLD_HOST_WRITE_DDR_MASK) >> BCM_FLD_HOST_WRITE_DDR_SHIFT;
+    value = bcm_pci_read32(SRAM_ADDRESS(device,BCM_FLD_HOST_STATE_OFFSET));
+    info->finish_ddr = (value & BCM_FLD_HOST_FINISH_WRITE_DDR_MASK) >> BCM_FLD_HOST_FINISH_WRITE_DDR_SHIFT;
+
+    return BCM_ERR_OK;
+}
+
+bcmos_errno bcm_fld_set_host_debug_status(uint32_t device, BCM_FLD_HOST_DEBUG_VALUES stat)
+{
+    volatile uint32_t value = 0;
+
+    if (!bcm68620_info)
+        return BCM_ERR_NORES;
+
+    if (device >= max_bcm68620_device)
+        return BCM_ERR_RANGE;
+
+    if (stat == BCM_FLD_HOST_WRITE_SRAM)
+        value = ((1 << BCM_FLD_HOST_WRITE_SRAM_SHIFT) & BCM_FLD_HOST_WRITE_SRAM_MASK);
+    else
+    {
+        value = bcm_pci_read32(SRAM_ADDRESS(device,BCM_FLD_HOST_DEBUG_STATE_OFFSET));
+        if (stat == BCM_FLD_HOST_START_CPU)
+            value |= ((1 << BCM_FLD_HOST_START_CPU_SHIFT) & BCM_FLD_HOST_START_CPU_MASK);
+        else if (stat == BCM_FLD_HOST_WRITE_DDR)
+            value |= ((1 << BCM_FLD_HOST_WRITE_DDR_SHIFT) & BCM_FLD_HOST_WRITE_DDR_MASK);
+        else
+            return BCM_ERR_PARM;
+    }
+    bcm_pci_write32(SRAM_ADDRESS(device,BCM_FLD_HOST_DEBUG_STATE_OFFSET), value);
+
+    return BCM_ERR_OK;
+}
+
+bcmos_errno bcm_fld_set_ras_mode_set(uint32_t device, uint32_t ras, uint32_t mode)
+{
+    uint32_t offset =  ras ? BCM_FLD_RAS_1_SETTINGS :BCM_FLD_RAS_0_SETTINGS;
+
+    bcm_pci_write32(SRAM_ADDRESS(device, offset), mode);
+
+    return BCM_ERR_OK;
+}
+
+bcmos_errno bcm_fld_set_host_event(uint32_t device, uint32_t event)
+{
+    if (!bcm68620_info)
+        return BCM_ERR_NORES;
+
+    if (device >= max_bcm68620_device)
+        return BCM_ERR_RANGE;
+
+    bcm_pci_write32(SRAM_ADDRESS(device, BCM_FLD_HOST_EVENT), event);
+
+    return BCM_ERR_OK;
+}
+
+bcmos_bool bcm_fld_test_queues_flag(uint32_t device)
+{
+    volatile uint32_t value;
+
+    if (!bcm68620_info)
+        return BCMOS_FALSE;
+
+    if (device >= max_bcm68620_device)
+        return BCMOS_FALSE;
+
+    value = bcm_pci_read32(SRAM_ADDRESS(device,BCM_FLD_CPU_SET_QUEUES_SIZE));
+    if (value & BCM_FLD_CPU_QUEUE_VALID_MASK)
+        return BCMOS_TRUE;
+
+    return BCMOS_FALSE;
+}
+
+bcmos_bool bcm_fld_regs_swap_needed(uint32_t device)
+{
+    uint32_t value;
+
+    value = *(volatile uint32_t *)(bcm68620_info[device].soc_regs_base + PCIE_REVISION_REGISTER_OFFSET);
+    if ((value & 0xffff) != 0x0302)
+        return BCMOS_TRUE;
+
+    return BCMOS_FALSE;
+}
+
+bcmos_bool bcm_fld_sram_swap_needed(uint32_t device)
+{
+    uint32_t value;
+    uint8_t charvalue;
+
+    value = 0xaabbccdd;
+    *(volatile uint32_t *)bcm68620_info[device].soc_sram_base = value;
+    charvalue = *(volatile uint8_t *)bcm68620_info[device].soc_sram_base;
+    if (charvalue != *(uint8_t *)&value)
+        return BCMOS_TRUE;
+
+    return BCMOS_FALSE;
+}
+
+bcmos_bool bcm_fld_ddr_swap_needed(uint32_t device)
+{
+    uint32_t value;
+    volatile uint32_t *address;
+    uint8_t charvalue;
+
+    value = 0xaabbccdd;
+    address = (uint32_t *)(bcm68620_info[device].soc_ddr_base + bcm68620_info[device].soc_crt_length);
+    *address = value;
+    charvalue = *address;
+    if (charvalue != *&value)
+        return BCMOS_TRUE;
+
+    return BCMOS_FALSE;
+}
+
+#ifdef TX_ENABLE_EVENT_TRACE
+bcmos_errno bcm_fld_set_event_trace(uint32_t device)
+{
+    if (!bcm68620_info)
+        return BCM_ERR_NORES;
+
+    if (device >= max_bcm68620_device)
+        return BCM_ERR_RANGE;
+
+    bcm_pci_write32(SRAM_ADDRESS(device,BCM_FLD_EVENT_TRACE_OFFSET), 0x1);
+
+    return BCM_ERR_OK;
+}
+bcmos_errno bcm_fld_clear_event_trace(uint32_t device)
+{
+    if (!bcm68620_info)
+        return BCM_ERR_NORES;
+
+    if (device >= max_bcm68620_device)
+        return BCM_ERR_RANGE;
+
+    bcm_pci_write32(SRAM_ADDRESS(device,BCM_FLD_EVENT_TRACE_OFFSET), 0x0);
+
+    return BCM_ERR_OK;
+}
+#endif
+#ifdef DMA_STUB
+bcmos_errno bcm_fld_set_device_bootrecord_flag(uint32_t device)
+{
+    volatile uint32_t value;
+
+    value = BCM_FLD_CPU_PRM_VALID_MASK;
+    bcm_pci_write32(SRAM_ADDRESS(device,BCM_FLD_CPU_BOOTREC_STATE_OFFSET), value);
+
+    return BCM_ERR_OK;
+}
+
+bcmos_errno bcm_fld_set_device_bootrecord(uint32_t device, uint32_t *opaque_data)
+{
+    uint32_t *addr, *temp;
+    int32_t i;
+
+    temp = opaque_data;
+    addr = SRAM_ADDRESS(device,BCM_FLD_CPU_BOOTRECORD_OFFSET);
+    for (i = 0; i < PCIE_OPAQUE_DATA_SIZE / 4; i++)
+    {
+        bcm_pci_write32(addr++,*temp++);
+    }
+
+    return BCM_ERR_OK;
+}
+#endif
+
+bcmos_errno bcm_fld_set_avs_cont(uint32_t device, uint32_t value)
+{
+    bcm_pci_write32(SRAM_ADDRESS(device, BCM_FLD_AVS_SETTINGS), value);
+
+    return BCM_ERR_OK;
+}
+
+void *bcm_fld_get_sw_error_table(uint32_t device, uint32_t *size)
+{
+    *size = BCM_FLD_SW_ERROR_TABLE_SIZE;
+    return SRAM_ADDRESS(device, BCM_FLD_SW_ERROR_TABLE);
+}
+
+uint32_t bcm_fld_ddr_test_result_get(uint32_t device, uint32_t word)
+{
+    return bcm_pci_read32(SRAM_ADDRESS(device, BCM_FLD_DDR_TEST_RESULTS + (word * COMM_WORD_SIZE)));
+}
+
+#ifdef __KERNEL__
+EXPORT_SYMBOL(bcm_fld_init);
+EXPORT_SYMBOL(bcm_fld_clear_comm_area);
+EXPORT_SYMBOL(bcm_fld_exit);
+EXPORT_SYMBOL(bcm_fld_register);
+EXPORT_SYMBOL(bcm_fld_unregister);
+EXPORT_SYMBOL(bcm_fld_get_device_status);
+EXPORT_SYMBOL(bcm_fld_get_device_loading_state);
+EXPORT_SYMBOL(bcm_fld_host_finish_write_ddr);
+EXPORT_SYMBOL(bcm_fld_get_logs);
+EXPORT_SYMBOL(bcm_fld_write);
+EXPORT_SYMBOL(bcm_fld_read);
+EXPORT_SYMBOL(bcm_fld_start_bootloader);
+EXPORT_SYMBOL(bcm_fld_is_bootloader_done);
+EXPORT_SYMBOL(bcm_fld_set_rings_size);
+EXPORT_SYMBOL(bcm_fld_get_device_bootrecord);
+EXPORT_SYMBOL(bcm_fld_test_device_bootrecord_flag);
+EXPORT_SYMBOL(bcm_fld_clear_device_bootrecord_flag);
+EXPORT_SYMBOL(bcm_fld_set_host_bootrecord_flag);
+EXPORT_SYMBOL(bcm_fld_test_host_bootrecord_flag);
+EXPORT_SYMBOL(bcm_fld_test_queues_flag);
+EXPORT_SYMBOL(bcm_fld_get_device_debug_status);
+EXPORT_SYMBOL(bcm_fld_get_host_debug_status);
+EXPORT_SYMBOL(bcm_fld_set_host_debug_status);
+EXPORT_SYMBOL(bcm_fld_set_ras_mode_set);
+EXPORT_SYMBOL(bcm_fld_set_host_event);
+EXPORT_SYMBOL(bcm_fld_get_exception_state);
+EXPORT_SYMBOL(bcm_fld_clear_exception_state);
+EXPORT_SYMBOL(bcm_fld_copy_exception_log);
+EXPORT_SYMBOL(bcm_fld_regs_swap_needed);
+EXPORT_SYMBOL(bcm_fld_sram_swap_needed);
+EXPORT_SYMBOL(bcm_fld_ddr_swap_needed);
+#ifdef TX_ENABLE_EVENT_TRACE
+EXPORT_SYMBOL(bcm_fld_set_event_trace);
+EXPORT_SYMBOL(bcm_fld_clear_event_trace);
+#endif
+EXPORT_SYMBOL(bcm_fld_set_avs_cont);
+EXPORT_SYMBOL(bcm_fld_get_sw_error_table);
+#endif
diff --git a/bcm68620_release/release/host_driver/fld/bcmolt_fld.h b/bcm68620_release/release/host_driver/fld/bcmolt_fld.h
new file mode 100644
index 0000000..f2297b2
--- /dev/null
+++ b/bcm68620_release/release/host_driver/fld/bcmolt_fld.h
@@ -0,0 +1,456 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#ifndef BCMOLT_FLD_H
+#define BCMOLT_FLD_H
+
+#include "bcmos_system.h"
+#include "bcmolt_model_types.h"
+#include "bcmolt_model_ids.h"
+#include "bcm_fld_common.h"
+
+/** \defgroup \fld_data_types Data Types
+ * \ingroup fld
+ * @{
+ */
+
+#define PCIE_REVISION_REGISTER_OFFSET       0x6406CU /* PCIE_PCIE_PCIE_0_PCIE_PCIE_0_MISC_REVISION    */
+
+typedef struct
+{
+    unsigned long   soc_regs_base;
+    unsigned long   soc_sram_base;
+    unsigned long   soc_ddr_base;
+    uint32_t        soc_ddr_length;     /* ddr window length */
+    uint32_t        soc_crt_length;     /* ddr used for load length */
+} bcm_fld_device_info;
+
+typedef struct
+{
+    uint32_t    os_entry_offset;
+    uint32_t    protocol_version;
+    uint32_t    state;
+    uint32_t    reason;
+} bcm_fld_device_stat;
+
+/**
+* \brief Initialize internal data base
+*
+*  allocate the array of pointers to info per device allocate
+*  and clear the info structure for every possible device
+*
+* \param[in] max_devices How many devices might be defined
+*
+* \return
+* 0 if successful, <0 if failed
+*/
+bcmos_errno bcm_fld_init(uint32_t max_devices);
+
+/**
+* \brief Initialize communication area
+*
+*  clear the communication area
+*
+* \param[in] device Identifies the device
+*
+*/
+void bcm_fld_clear_comm_area(uint32_t device);
+
+/**
+* \brief Release internal data base
+*
+* \return
+* 0 if successful, <0 if failed
+*/
+bcmos_errno bcm_fld_exit(void);
+
+/**
+* \brief Register a device to driver
+*
+*  store user's information about the device
+*
+* \param[in] device Identifies the device
+* \param[in] info Information
+*   - regs base address
+*   - sram base address
+*   - ddr base address
+*   - ddr window size
+*
+* \return
+* 0 if successful, <0 if failed
+*/
+bcmos_errno bcm_fld_register(uint32_t device, bcm_fld_device_info *info);
+
+/**
+* \brief Unregister a device from driver
+*
+*  remove the device from the internal db
+*
+* \param[in] device Identifies the device
+*
+* \return
+* 0 if successful, <0 if failed
+*/
+bcmos_errno bcm_fld_unregister(uint32_t device);
+
+/**
+* \brief Read from communication SoC debug information
+*
+* \param[in] device Identifies the device
+* \param[in] debug_state Information to be filled pointer
+*
+* \return
+* 0 if successful, <0 if failed
+*/
+bcmos_errno bcm_fld_get_device_status(uint32_t device, bcm_fld_device_stat *debug_state);
+
+/**
+* \brief Read from communication SoC status
+*
+* \param[in] device Identifies the device
+* \param[in] cpu_state Information to be filled pointer
+*
+* \return
+* 0 if successful, <0 if failed
+*/
+bcmos_errno bcm_fld_get_device_loading_state(uint32_t device, BCM_FLD_CPU_STATE *cpu_state);
+
+/**
+* \brief Write in communication area the finish writing DDR
+*        indicator
+*
+* \param[in] device Identifies the device
+* \param[in] os_entry_address Entry point for embedded
+*       application
+*
+* \return
+* 0 if successful, <0 if failed
+*/
+bcmos_errno bcm_fld_host_finish_write_ddr(uint32_t device, uint32_t os_entry_address);
+
+/**
+* \brief Read from communication the logs area
+*
+* \param[in] device Identifies the device
+* \param[out] log_area Pointer logger area
+* \param[out] length Length logger area
+*
+* \return
+* 0 if successful, <0 if failed
+*/
+bcmos_errno bcm_fld_get_logs(uint32_t device, char **log_area, int *length);
+
+/**
+* \brief Write the received buffer to memory according to offset
+*        and type
+*
+* \param[in] device Identifies the device
+* \param[in] buff Pointer to the buffer to be written
+* \param[in] buff_size Buffer size
+* \param[in] offset_in_image offset to write the buffer
+* \param[in] image_type Loading type, according to destination :
+*       SRAM or DDR
+*
+* \return
+* 0 if successful, <0 if failed
+*/
+bcmos_errno bcm_fld_write(uint32_t device, char *buff, uint32_t buff_size, uint32_t offset_in_image, bcmolt_device_image_type image_type);
+
+/**
+* \brief Read into received buffer from memory according to
+*        offset and type
+*
+* \param[in] device Identifies the device
+* \param[in] buff Pointer to the buffer to receive the content
+* \param[in] buff_size Buffer size
+* \param[in] offset_in_image offset to read into the buffer
+* \param[in] image_type Loading type, according to destination :
+*       SRAM or DDR
+*
+* \return
+* 0 if successful, <0 if failed
+*/
+bcmos_errno bcm_fld_read(uint32_t device, char *buff, uint32_t *buff_size, uint32_t offset_in_image, bcmolt_device_image_type image_type);
+
+/**
+* \brief Take soc cpu out of reset
+*
+* \param[in] device Identifies the device
+*
+* \return
+* 0 if successful, <0 if failed
+*/
+bcmos_errno bcm_fld_start_bootloader(uint32_t device, uint32_t test_ddr);
+
+/**
+* \brief Check if bootloader finished to run
+*
+* \param[in] device Identifies the device
+*
+* \return
+* BCMOS_TRUE if successful, BCMOS_FALSE if failed
+*/
+bcmos_bool bcm_fld_is_bootloader_done(uint32_t device);
+
+bcmos_bool bcm_fld_is_ddr_test_done(uint32_t device);
+
+/**
+* \brief Check if SoC finished synchronization process
+*
+* \param[in] device Identifies the device
+*
+* \return
+*/
+bcmos_bool bcm_fld_test_device_bootrecord(uint32_t device);
+
+/**
+* \brief Returns the bootrecord of the SoC
+*
+* \param[in] device Identifies the device
+* \param[in] opaque_data Pointer to information
+*   - physical address of the buffer descriptors ring
+*   - physical address of shadow buffer descriptors ring
+*   info_length MUST be modulo 4
+*
+* \return
+* 0 if successful, <0 if failed
+*/
+bcmos_errno bcm_fld_get_device_bootrecord(uint32_t device, uint32_t *opaque_data);
+
+/**
+* \brief Set bootrecord valid bit to be checked by the device
+*
+* \param[in] device Identifies the device
+* \return
+* 0 if successful, <0 if failed
+*/
+bcmos_errno bcm_fld_set_host_bootrecord_flag(uint32_t device);
+
+/**
+* \brief Check bootrecord valid bit set previously by the device
+*
+* \param[in] device Identifies the device
+* \return
+* 0 if successful, <0 if failed
+*/
+bcmos_bool bcm_fld_test_host_bootrecord_flag(uint32_t device);
+
+/**
+* \brief Clear bootrecord valid bit to be checked by the device
+*
+* \param[in] device Identifies the device
+* \return
+* 0 if successful, <0 if failed
+*/
+bcmos_errno bcm_fld_clear_device_bootrecord_flag(uint32_t device);
+
+/**
+* \brief Check bootrecord valid bit set previously by the device
+*
+* \param[in] device Identifies the device
+* \return
+* 0 if successful, <0 if failed
+*/
+bcmos_bool bcm_fld_test_device_bootrecord_flag(uint32_t device);
+
+/**
+* \brief Write the tx and rx queue sizes to communication area
+*   set queue validity bit for the device
+*
+* \param[in] device Identifies the device
+* \param[in] host_tx_size Queue size : is also the device rx
+*       queue size
+* \param[in] host_rx_size Queue size : is also the device tx
+*       queue size
+* \return
+* 0 if successful, <0 if failed
+*/
+bcmos_errno bcm_fld_set_rings_size(uint32_t device, uint32_t host_tx_size, uint32_t host_rx_size);
+
+/**
+* \brief set DDR RASconfiguration properties
+*
+* \param[in] device Identifies the device
+*
+* \param[in] ras  Identifies the ras number , can be 0 or 1
+*
+* \param[in] mode Identifies mode - disable 0, gpon 1, xgpon 2,
+*
+* \return
+* 0 if successful, <0 if failed
+*/
+bcmos_errno bcm_fld_set_ras_mode_set(uint32_t device, uint32_t ras, uint32_t mode);
+
+/**
+* \brief Notify device about an event that occurred on the host side
+*
+* \param[in] device Identifies the device
+*
+* \param[in] event  User defined event
+*
+* \return
+* 0 if successful, <0 if failed
+*/
+bcmos_errno bcm_fld_set_host_event(uint32_t device, uint32_t event);
+
+/**
+* \brief Check queues valid bit set previously by Host
+*
+* \param[in] device Identifies the device
+*
+* \return
+* FALSE if PRM_VALID bit is not set, TRUE if PRM_VALID bit is
+* set
+*/
+bcmos_bool bcm_fld_test_queues_flag(uint32_t device);
+
+/**
+* \brief Get the exception area state, set by the device exception
+*        handler
+*
+* \param[in] device Identifies the device
+* \param[out] state Pointer to exception state on cpu0 value
+* \param[out] state Pointer to exception state on cpu1 value
+*
+* \return
+* 0 if successful, <0 if failed
+*/
+
+bcmos_errno bcm_fld_get_exception_state(uint32_t device, uint32_t *state0, uint32_t *state1);
+
+/**
+* \brief Clear the exception area state
+*
+* \param[in] device Identifies the device
+* \param[in] cpuid Identifies the the device cpu
+*
+* \return
+* 0 if successful, <0 if failed
+*/
+bcmos_errno bcm_fld_clear_exception_state(uint32_t device, uint32_t cpuid);
+
+/**
+* \brief Fill buffer with the exception area content, set by
+*        the device exception handler
+*
+* \param[in] device Identifies the device
+* \param[in] cpuid Identifies the the device cpu
+* \param[out] buffer Pointer to be filled with the exception
+*       area content
+* \param[out] length Length of the buffer
+*
+* \return
+* 0 if successful, <0 if failed
+*/
+bcmos_errno bcm_fld_copy_exception_log(uint32_t device, uint32_t cpuid, char *buffer, int *length);
+
+#ifdef TX_ENABLE_EVENT_TRACE
+/**
+* \brief Set event trace flag to be read by embedded and start
+*        traceing
+*
+* \param[in] device Identifies the device
+*
+* \return
+* 0 if successful, <0 if failed
+*/
+bcmos_errno bcm_fld_set_event_trace(uint32_t device);
+
+/**
+* \brief Clear event trace flag to be read by embedded and stop
+*        traceing
+*
+* \param[in] device Identifies the device
+*
+* \return
+* 0 if successful, <0 if failed
+*/
+bcmos_errno bcm_fld_clear_event_trace(uint32_t device);
+#endif
+
+/**
+* \Debug states and functions
+*/
+typedef struct
+{
+    uint32_t    write_sram;
+    uint32_t    start_device;
+    uint32_t    write_ddr;
+    uint32_t    finish_ddr;
+} bcm_fld_host_debug_state;
+
+typedef enum
+{
+    BCM_FLD_HOST_NONE,
+    BCM_FLD_HOST_WRITE_SRAM,    /* set before load  image to SRAM */
+    BCM_FLD_HOST_START_CPU,     /* set before resume ARM */
+    BCM_FLD_HOST_WRITE_DDR      /* set before load  image to DDR */
+} BCM_FLD_HOST_DEBUG_VALUES;
+
+typedef struct
+{
+    uint32_t boot_from_sram_states;
+    uint32_t boot_from_sram_errors;
+    uint32_t boot_from_sram_exception;
+    uint32_t run_from_ddr_state;
+} bcm_fld_device_debug_state;
+
+/**
+* \brief Set and get debugging traceing from communication area
+*
+* \param[in] device Identifies the device
+* \param[in] info Pointer to information
+*
+* \return
+* 0 if successful, <0 if failed
+*/
+/* returns soc debug states */
+bcmos_errno bcm_fld_get_device_debug_status(uint32_t device, bcm_fld_device_debug_state *info);
+/* deal with host states - functional and debug */
+bcmos_errno bcm_fld_get_host_debug_status(uint32_t device, bcm_fld_host_debug_state *info);
+bcmos_errno bcm_fld_set_host_debug_status(uint32_t device, BCM_FLD_HOST_DEBUG_VALUES stat);
+/**
+* \brief Check if swap needed for the respective memory
+*
+* \param[in] device Identifies the device
+*
+* \return
+* true if swap needed, false if swap not needed
+*/
+bcmos_bool bcm_fld_regs_swap_needed(uint32_t device);
+bcmos_bool bcm_fld_sram_swap_needed(uint32_t device);
+bcmos_bool bcm_fld_ddr_swap_needed(uint32_t device);
+
+bcmos_errno bcm_fld_set_avs_cont(uint32_t device, uint32_t value);
+
+void *bcm_fld_get_sw_error_table(uint32_t device, uint32_t *size);
+uint32_t bcm_fld_ddr_test_result_get(uint32_t device, uint32_t word);
+
+#endif
+
diff --git a/bcm68620_release/release/host_driver/host_api/Makefile b/bcm68620_release/release/host_driver/host_api/Makefile
new file mode 100644
index 0000000..089ec56
--- /dev/null
+++ b/bcm68620_release/release/host_driver/host_api/Makefile
@@ -0,0 +1,16 @@
+MOD_NAME = host_api
+MOD_TYPE = lib
+MOD_DEPS = dev_log common_gpon dev_ctrl_daemon
+
+ifeq ("$(RELEASE_BUILD)", "y")
+    MOD_DEPS += common_api
+else
+    MOD_DEPS += api
+endif
+
+ifeq ("$(ENABLE_CLI)", "y")
+    MOD_DEPS += api_cli os_cli embedded_cli
+endif
+
+srcs = bcmolt_host_api.c
+
diff --git a/bcm68620_release/release/host_driver/host_api/bcmolt_host_api.c b/bcm68620_release/release/host_driver/host_api/bcmolt_host_api.c
new file mode 100644
index 0000000..b88d3c1
--- /dev/null
+++ b/bcm68620_release/release/host_driver/host_api/bcmolt_host_api.c
@@ -0,0 +1,76 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+ 
+#include <bcmos_system.h>
+#if !defined(LINUX_USER_SPACE)
+#include <bcmolt_dev_ctrl.h>
+#else
+bcmos_errno bcmolt_dev_ctrl_init(void);
+#endif
+#include <bcm_dev_log.h>
+#include "bcmolt_host_api.h"
+
+bcmos_errno bcmolt_host_init(bcmolt_host_init_params *params)
+{
+    bcmos_errno rc;
+
+    rc = bcmos_init();
+    BUG_ON(rc);
+
+#ifdef ENABLE_LOG
+    if (params->logger_init_cb)
+    {
+        rc = params->logger_init_cb();
+        BUG_ON(rc);
+    }
+#endif
+
+    bcmos_trace_level_set(BCMOS_TRACE_LEVEL_ERROR);
+
+    /* In usermode Linux, we don't invoke bcmolt_dev_ctrl_init() from the application, but from a kernel module (bcm_dev_ctrl_linux.ko). */
+#if !defined(LINUX_USER_SPACE)
+    rc = bcmolt_dev_ctrl_init(&params->dev_ctrl_params);
+    BUG_ON(rc);
+#else
+    if (params->run_dev_ctrl)
+    {
+        rc = bcmolt_dev_ctrl_init();
+        BUG_ON(rc);
+    }
+#endif
+
+#if !defined(__KERNEL__)
+    /* Initialize transport layer. */
+    rc = bcmtr_init();
+    BUG_ON(rc);
+#endif
+
+    return BCM_ERR_OK;
+}
+
diff --git a/bcm68620_release/release/host_driver/host_api/bcmolt_host_api.h b/bcm68620_release/release/host_driver/host_api/bcmolt_host_api.h
new file mode 100644
index 0000000..e7acd61
--- /dev/null
+++ b/bcm68620_release/release/host_driver/host_api/bcmolt_host_api.h
@@ -0,0 +1,75 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#ifndef _BCMOLT_HOST_API_H_
+#define _BCMOLT_HOST_API_H_
+
+#include <bcmos_system.h>
+#include <bcmolt_model_types.h>
+
+#if !defined(__KERNEL__)
+#include <bcmtr_debug.h>
+#include <bcmtr_interface.h>
+#include "bcmolt_api.h"
+#include <bcm_common_gpon.h>
+#include <bcmolt_host_api_gpon_utils.h>
+#endif
+
+#if defined(ENABLE_CLI) && !defined(__KERNEL__)
+#include <bcm_api_cli.h>
+#include <bcmos_cli.h>
+#include <bcmolt_embedded_cli.h>
+#include <bcmtr_transport_cli.h>
+#include <bcm_api_cli_helpers.h>
+#endif
+
+#if !defined(LINUX_USER_SPACE)
+#include <bcmolt_dev_ctrl.h>
+#endif
+
+#if !defined(LINUX_USER_SPACE)
+typedef bcmolt_dev_ctrl_cb_image_read bcmolt_host_image_read_cb;
+#endif
+typedef bcmos_errno (*bcmolt_host_logger_init_cb)(void);
+
+typedef struct
+{
+#if !defined(LINUX_USER_SPACE)
+    bcmolt_dev_ctrl_params dev_ctrl_params;
+#endif
+    /* This callback initializes the logger module. If using common/dev_log module, it should be called after OS abstraction layer is initialized, and that's why
+     * it is a callback and not directly initialized by the caller. */
+    bcmolt_host_logger_init_cb logger_init_cb;
+    bcmos_bool run_dev_ctrl;
+} bcmolt_host_init_params;
+
+bcmos_errno bcmolt_host_init(bcmolt_host_init_params *params);
+
+#endif
+
diff --git a/bcm68620_release/release/host_driver/host_api/bcmolt_host_api_gpon_utils.h b/bcm68620_release/release/host_driver/host_api/bcmolt_host_api_gpon_utils.h
new file mode 100644
index 0000000..4676400
--- /dev/null
+++ b/bcm68620_release/release/host_driver/host_api/bcmolt_host_api_gpon_utils.h
@@ -0,0 +1,42 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#ifndef _BCMOLT_HOST_API_GPON_UTILS_H_
+#define _BCMOLT_HOST_API_GPON_UTILS_H_
+
+#include <bcmos_system.h>
+#include <bcm_common_gpon.h>
+
+/* Note that PONs 4-7 are not used in GPON/XGPON coexistence mode. */
+#define FOR_EACH_PON(pon_ni)\
+    for (pon_ni = (bcmolt_pon_ni)0;\
+         pon_ni < (bcmolt_pon_ni)smdbg->num_of_pons;\
+         ((bcm_common_gpon_get_system_mode() == BCMOLT_SYSTEM_MODE_GPON_8_XGPON_4_X_COEXISTENCE && pon_ni == XGPON_HALF_CHIP_MAX_NUM_OF_PONS-1) ? pon_ni = XGPON_MAX_NUM_OF_PONS : pon_ni++))
+
+#endif
diff --git a/bcm68620_release/release/host_driver/host_api/user/Makefile b/bcm68620_release/release/host_driver/host_api/user/Makefile
new file mode 100755
index 0000000..5b5baeb
--- /dev/null
+++ b/bcm68620_release/release/host_driver/host_api/user/Makefile
@@ -0,0 +1,19 @@
+
+MOD_NAME = host_api_user
+MOD_TYPE = lib
+MOD_DEPS = dev_log common_gpon dev_ctrl_daemon host_api
+
+ifeq ("$(RELEASE_BUILD)", "y")
+    MOD_DEPS += common_api
+else
+    MOD_DEPS += api
+endif
+
+ifeq ("$(ENABLE_CLI)", "y")
+    MOD_DEPS += api_cli os_cli embedded_cli
+endif
+
+MOD_DEFS += -DIN_BAND
+
+srcs = ../bcmolt_host_api.c
+
diff --git a/bcm68620_release/release/host_driver/keep_alive/Makefile b/bcm68620_release/release/host_driver/keep_alive/Makefile
new file mode 100644
index 0000000..ee02f1a
--- /dev/null
+++ b/bcm68620_release/release/host_driver/keep_alive/Makefile
@@ -0,0 +1,20 @@
+# Common keep_alive
+#
+MOD_NAME = keep_alive
+
+ifeq ("$(OS_KERNEL)", "linux")
+MOD_TYPE = linux_lib
+else
+MOD_TYPE = lib
+endif
+
+MOD_DEPS = model   
+
+srcs = bcm_keep_alive.c
+	 
+# If called by linux kernel builder - add include paths manually.
+# It is not elegant, but we'll not have many linux modules
+ifneq ("$(KBUILD_SRC)", "")
+	-include $(OUT_DIR_BASE)/Makefile.config.$(MOD_NAME)
+endif
+USE_LINT = yes
diff --git a/bcm68620_release/release/host_driver/keep_alive/bcm_keep_alive.c b/bcm68620_release/release/host_driver/keep_alive/bcm_keep_alive.c
new file mode 100644
index 0000000..780f60e
--- /dev/null
+++ b/bcm68620_release/release/host_driver/keep_alive/bcm_keep_alive.c
@@ -0,0 +1,245 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#include <bcmos_system.h>
+#include <bcmolt_msg.h>
+#include <bcmolt_api.h>
+#include <bcmolt_model_types.h>
+#include <bcmolt_model_ids.h>
+#include "bcm_keep_alive.h"
+
+keep_alive_msg_orig2str_t keep_alive_msg_orig2str[] =
+{
+    {BCM_KEEP_ALIVE_MSG_ORIG_DEVICE, "device"},
+    {BCM_KEEP_ALIVE_MSG_ORIG_HOST, "host"},
+    {-1}
+};
+
+static void keep_alive_tx_handler(bcmos_keep_alive_info *ka_info);
+
+static bcmos_timer_rc keep_alive_timer_handler(bcmos_timer *timer, long data)
+{
+    bcmos_keep_alive_info *ka_info;
+    uint32_t  last_recv_ka_ts;
+    uint32_t  ka_interval;
+    uint32_t  ka_tolerance;
+    uint32_t  time_diff_from_prev_ka;
+    uint32_t  ka_process_start_ts;
+    uint32_t  prev_ka_ts;
+    ka_info = (bcmos_keep_alive_info *)data;
+    last_recv_ka_ts = ka_info->last_recv_ka_timestamp;
+    ka_interval = ka_info->ka_interval;
+    ka_tolerance = ka_info->ka_tolerance;
+    ka_process_start_ts = ka_info->ka_process_start_ts;
+
+    /* The first keep alive message that arrives changes last_recv_ka_ts to a value different than zero.
+     * If no keep alive message has arrived yet then the previous keep alive time stamp is the time the process has
+     * started. */
+    prev_ka_ts = (last_recv_ka_ts ? last_recv_ka_ts : ka_process_start_ts);
+
+    /* Time difference between current time and the previous keep alive message */
+    time_diff_from_prev_ka = bcmos_timestamp() - prev_ka_ts;
+
+    /* Check if keep alive message has been received in the past keep alive interval, both part of the equation can't overflow:
+     * The left part is subtraction of two unsigned integers and the right part is restricted by ka_interval max value and ka_tolerance max value -
+     * their multiplication can't exceed max unsigned integer */
+    if (time_diff_from_prev_ka > ka_interval * (ka_tolerance + 1))
+    {
+        if (last_recv_ka_ts)
+        {
+            BCMOS_TRACE_INFO(
+                "Didn't receive keep alive message for %u seconds - about to disconnect\n",
+                (bcmos_timestamp() - last_recv_ka_ts) / BCMOS_MICROSECONDS_IN_SECONDS);
+        }
+        else
+        {
+            BCMOS_TRACE_INFO(
+                "Didn't receive keep alive message since keep alive process started %u seconds ago - "
+                    "about to disconnect\n",
+                (bcmos_timestamp() - ka_process_start_ts) / BCMOS_MICROSECONDS_IN_SECONDS);
+        }
+
+        if (ka_info->disconnect_handler(ka_info->device) != BCM_ERR_OK)
+        {
+            if (ka_info->orig == BCM_KEEP_ALIVE_MSG_ORIG_HOST)
+                BCMOS_TRACE_ERR("Error while trying to send disconnect message (device=%d)\n", ka_info->device);
+            else
+                BCMOS_TRACE_ERR("Error while trying to invoke disconnect from the host procedure\n");
+        }
+        return BCMOS_TIMER_STOP;
+    }
+
+    /* Send Keep alive message to the remote side */
+    keep_alive_tx_handler(ka_info);
+
+    return BCMOS_TIMER_OK;
+}
+
+static void keep_alive_tx_handler(bcmos_keep_alive_info *ka_info)
+{
+    bcmos_keep_alive_msg ka_msg = {};
+    bcmolt_device_key key = {};
+    if (ka_info->orig == BCM_KEEP_ALIVE_MSG_ORIG_HOST)
+    {
+        BCMOLT_OPER_INIT(&ka_msg.host, device, host_keep_alive, key);
+        ka_msg.host.hdr.hdr.type = BCMOLT_MSG_TYPE_SET;
+        BCMOLT_OPER_PROP_SET(&ka_msg.host, device, host_keep_alive, sequence_number, ka_info->last_sent_ka_seq++);
+        BCMOLT_OPER_PROP_SET(&ka_msg.host, device, host_keep_alive, time_stamp, bcmos_timestamp());
+    }
+    else
+    {
+        BCMOLT_AUTO_INIT(&ka_msg.device, device, device_keep_alive);
+        ka_msg.device.hdr.hdr.type = BCMOLT_MSG_TYPE_SET;
+        ka_msg.device.data.sequence_number = ka_info->last_sent_ka_seq++;
+        ka_msg.device.data.time_stamp = bcmos_timestamp();
+    }
+
+    if (ka_info->send_handler(ka_info->device, (bcmolt_msg *)&ka_msg) != BCM_ERR_OK)
+    {
+        BCMOS_TRACE_INFO("Error while trying to send keep alive sequence number %u\n", ka_info->last_sent_ka_seq);
+    }
+}
+
+void keep_alive_rx_handler(const bcmos_keep_alive_data_msg *ka_data_msg, bcmos_keep_alive_info *ka_info)
+{
+    uint32_t seq_diff;
+    uint32_t rx_msg_seq;
+    uint32_t rx_msg_ts;
+
+    /* Tricky part - rx_msg_seq is NOT from the originator but from the other side */
+    if (ka_info->orig == BCM_KEEP_ALIVE_MSG_ORIG_HOST)
+    {
+        rx_msg_seq = ka_data_msg->device.sequence_number;
+        rx_msg_ts = ka_data_msg->device.time_stamp;
+    }
+    else
+    {
+        rx_msg_seq = ka_data_msg->host.sequence_number;
+        rx_msg_ts = ka_data_msg->host.time_stamp;
+    }
+
+    /* If last_recv_ka_seq and last_recv_ka_timestamp are both zeros then it's the first message */
+    if (ka_info->last_recv_ka_seq || ka_info->last_recv_ka_timestamp)
+    {
+        /* All part of the equation are unsigned integers so warp around is already taken care of */
+        seq_diff = rx_msg_seq - ka_info->last_recv_ka_seq;
+
+        /* In the normal case seq_diff should be one */
+        if (seq_diff > 1UL)
+        {
+            BCMOS_TRACE_INFO(
+                "Current keep alive sequence number is %u while previous keep alive sequence number was %u\n",
+                rx_msg_seq,
+                ka_info->last_recv_ka_seq);
+            BCMOS_TRACE_INFO(
+                "Current time stamp is %u while previous time stamp was %u, receive timestamp is %u\n",
+                bcmos_timestamp(),
+                ka_info->last_recv_ka_timestamp,rx_msg_ts);
+            if (seq_diff <= ka_info->ka_tolerance)
+            {
+                BCMOS_TRACE_INFO(
+                    "Missed %u keep alive messages (keep alive tolerance is to lose %d messages)\n",
+                    seq_diff,
+                    ka_info->ka_tolerance);
+            }
+            else
+            {
+                BCMOS_TRACE_ERR(
+                    "Missed %u keep alive messages (keep alive tolerance is to lose %d messages - "
+                        "about to disconnect)\n",
+                    seq_diff,
+                    ka_info->ka_tolerance);
+                stop_keep_alive_process(ka_info);
+                if (ka_info->disconnect_handler(ka_info->device) != BCM_ERR_OK)
+                {
+                    if (ka_info->orig == BCM_KEEP_ALIVE_MSG_ORIG_HOST)
+                    {
+                        BCMOS_TRACE_ERR(
+                            "Error while trying to send disconnect message (device=%d)\n",
+                            ka_info->device);
+                    }
+                    else
+                    {
+                        BCMOS_TRACE_ERR("Error while trying to send disconnect from the host message\n");
+                    }
+                }
+            }
+        }
+    }
+	/* Stroe at the recieving side's database, the sequence number of the last message that came  */
+    ka_info->last_recv_ka_seq = rx_msg_seq;
+
+    /* The time stamp is taken from the clock at the receiving side , not what came in the message */
+    ka_info->last_recv_ka_timestamp = bcmos_timestamp();
+}
+
+bcmos_errno create_keep_alive_timer(bcmos_keep_alive_info *ka_info, bcmos_module_id module_id)
+{
+    bcmos_timer_parm timer_params = {};
+    bcmos_errno rc = BCM_ERR_OK;
+    ka_info->last_recv_ka_timestamp = 0;
+    ka_info->last_recv_ka_seq = 0;
+
+    snprintf(ka_info->ka_timer.name, sizeof(ka_info->ka_timer.name), "keep_alive_t%u", ka_info->device);
+    timer_params.name = ka_info->ka_timer.name;
+    timer_params.owner = module_id;
+    timer_params.periodic = BCMOS_TRUE;
+    timer_params.handler = keep_alive_timer_handler;
+    timer_params.data = (long)ka_info;
+    rc = bcmos_timer_create(&ka_info->ka_timer.timer, &timer_params);
+    if (rc != BCM_ERR_OK)
+    {
+        BCMOS_TRACE_ERR(
+            "keep alive timer creation failed, bcmos_timer_create returned error %s (%d)\n",
+            bcmos_strerror(rc),
+            rc);
+    }
+    return rc;
+}
+
+void start_keep_alive_process(bcmos_keep_alive_info *ka_info)
+{
+    ka_info->last_recv_ka_timestamp = 0;
+    ka_info->last_recv_ka_seq = 0;
+    ka_info->ka_process_start_ts = bcmos_timestamp();
+    bcmos_timer_start(&ka_info->ka_timer.timer, ka_info->ka_interval);
+}
+
+void stop_keep_alive_process(bcmos_keep_alive_info *ka_info)
+{
+    bcmos_timer_stop(&ka_info->ka_timer.timer);
+}
+
+#ifdef __KERNEL__
+EXPORT_SYMBOL(create_keep_alive_timer);
+EXPORT_SYMBOL(keep_alive_rx_handler);
+
+MODULE_DESCRIPTION("BCM device keep-alive support");
+MODULE_LICENSE("Dual BSD/GPL");
+#endif
diff --git a/bcm68620_release/release/host_driver/keep_alive/bcm_keep_alive.h b/bcm68620_release/release/host_driver/keep_alive/bcm_keep_alive.h
new file mode 100644
index 0000000..3779ddd
--- /dev/null
+++ b/bcm68620_release/release/host_driver/keep_alive/bcm_keep_alive.h
@@ -0,0 +1,86 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#ifndef BCM_KEEP_ALIVE_H_
+#define BCM_KEEP_ALIVE_H_
+
+#include <bcmos_system.h>
+#include <bcmolt_conv.h>
+
+/* Message originator : device  or host */
+typedef enum
+{
+    BCM_KEEP_ALIVE_MSG_ORIG_DEVICE,
+    BCM_KEEP_ALIVE_MSG_ORIG_HOST,
+} keep_alive_msg_orig;
+
+typedef struct
+{
+    char name[MAX_TIMER_NAME_SIZE];
+    bcmos_timer timer;
+} keep_alive_timer;
+
+typedef bcmos_errno (*F_bcmos_keep_alive_send_handler)(bcmolt_devid device, bcmolt_msg *msg);
+typedef bcmos_errno (*F_bcmos_keep_alive_disconnect_handler)(bcmolt_devid device);
+
+typedef struct
+{
+    uint32_t last_sent_ka_seq;
+    uint32_t last_recv_ka_seq;
+    uint32_t last_recv_ka_timestamp;
+    uint32_t ka_process_start_ts;
+    uint32_t ka_interval;
+    uint32_t ka_tolerance;
+    keep_alive_msg_orig orig;
+    bcmolt_devid device;
+    keep_alive_timer ka_timer;
+    F_bcmos_keep_alive_disconnect_handler disconnect_handler;
+    F_bcmos_keep_alive_send_handler send_handler;
+} bcmos_keep_alive_info;
+
+typedef union
+{
+    bcmolt_device_device_keep_alive device;  /**< Keep alive message originated at the Device */
+    bcmolt_device_host_keep_alive host;      /**< Keep alive message originated at the Host */
+} bcmos_keep_alive_msg;
+
+typedef union
+{
+    bcmolt_device_device_keep_alive_data device;  /**< Keep alive message originated at the Device */
+    bcmolt_device_host_keep_alive_data host;      /**< Keep alive message originated at the Host */
+} bcmos_keep_alive_data_msg;
+
+BCMOLT_TYPE2STR(keep_alive_msg_orig, extern)
+
+void keep_alive_rx_handler(const bcmos_keep_alive_data_msg *ka_data_msg, bcmos_keep_alive_info *ka_info);
+bcmos_errno create_keep_alive_timer(bcmos_keep_alive_info *ka_info,bcmos_module_id module_id);
+void start_keep_alive_process(bcmos_keep_alive_info *ka_info);
+void stop_keep_alive_process(bcmos_keep_alive_info *ka_info);
+
+#endif /* BCM_KEEP_ALIVE_H_ */
diff --git a/bcm68620_release/release/host_driver/keep_alive/daemon/Makefile b/bcm68620_release/release/host_driver/keep_alive/daemon/Makefile
new file mode 100755
index 0000000..5eb7f6c
--- /dev/null
+++ b/bcm68620_release/release/host_driver/keep_alive/daemon/Makefile
@@ -0,0 +1,11 @@
+# Common keep_alive
+#
+MOD_NAME = keep_alive_daemon
+
+MOD_TYPE = lib
+
+MOD_DEPS = model   
+
+srcs = ../bcm_keep_alive.c
+	 
+USE_LINT = yes
diff --git a/bcm68620_release/release/host_driver/mh_utils/bcmolt_mh_utils.h b/bcm68620_release/release/host_driver/mh_utils/bcmolt_mh_utils.h
new file mode 100644
index 0000000..6252a45
--- /dev/null
+++ b/bcm68620_release/release/host_driver/mh_utils/bcmolt_mh_utils.h
@@ -0,0 +1,149 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#ifndef _BCMOLT_MH_UTILS_H_
+#define _BCMOLT_MH_UTILS_H_
+
+#define MH_EXIT_IF(cond, error)                                                                                        \
+    do                                                                                                                 \
+    {                                                                                                                  \
+        if (cond)                                                                                                      \
+        {                                                                                                              \
+            if ((error) != BCM_ERR_OK && (error) != BCM_ERR_NO_MORE)                                                   \
+            {                                                                                                          \
+                BCMOS_TRACE_INFO(#cond);                                                                               \
+            }                                                                                                          \
+            err = (error);                                                                                             \
+            goto cleanup;                                                                                              \
+        }                                                                                                              \
+    } while (BCMOS_FALSE)
+
+/* Macro for declaring cfg_get_multi handlers, since the format is perfectly regular */
+#define MH_DECLARE_CFG_GET_MULTI(obj)                                                                                  \
+static bcmos_errno mh_##obj##_cfg_get_multi(                                                                           \
+    const bcmolt_##obj##_cfg *filter,                                                                                  \
+    bcmolt_filter_flags flags,                                                                                         \
+    bcmolt_msg_set *msg_set)                                                                                           \
+{                                                                                                                      \
+    bcmolt_##obj##_cfg cfg;                                                                                            \
+    uint8_t *filter_packed = NULL;                                                                                     \
+    uint8_t *msg_packed = NULL;                                                                                        \
+    bcmos_errno err;                                                                                                   \
+    bcmos_bool success;                                                                                                \
+    uint32_t len;                                                                                                      \
+    bcmolt_buf buf;                                                                                                    \
+    bcmos_bool is_match;                                                                                               \
+    bcmolt_msg dummy_hdr;                                                                                              \
+    bcmolt_##obj##_key_id dummy_prop_id;                                                                               \
+                                                                                                                       \
+    /* assume we didn't finish all objects unless told otherwise */                                                    \
+    msg_set->more = BCMOS_TRUE;                                                                                        \
+                                                                                                                       \
+    /* start with the key included in the filter */                                                                    \
+    *((bcmolt_##obj##_key *)msg_set->next_key) = filter->key;                                                          \
+                                                                                                                       \
+    /* if the filter's key contains any wildcards, get the first real key */                                           \
+    err = mh_##obj##_key_resolve_wildcards(msg_set->next_key);                                                         \
+    MH_EXIT_IF(err != BCM_ERR_OK, err);                                                                                \
+                                                                                                                       \
+    /* if the initial key is invalid, exit early */                                                                    \
+    MH_EXIT_IF(                                                                                                        \
+        !bcmolt_##obj##_key_bounds_check(msg_set->next_key, BCMOLT_PRESENCE_MASK_ALL, &dummy_prop_id),                 \
+        BCM_ERR_KEY_RANGE);                                                                                            \
+    err = mh_##obj##_key_validate(&dummy_hdr, msg_set->next_key);                                                      \
+    MH_EXIT_IF(err != BCM_ERR_OK, err);                                                                                \
+                                                                                                                       \
+    /* pack filter data (including presence mask) for comparisons */                                                   \
+    len = bcmolt_##obj##_cfg_data_get_packed_length(&filter->data, filter->hdr.hdr.presence_mask);                     \
+    filter_packed = bcmos_calloc(len);                                                                                 \
+    MH_EXIT_IF(len > 0 && filter_packed == NULL, BCM_ERR_NOMEM);                                                       \
+    bcmolt_buf_init(&buf, len, filter_packed, BCMOLT_BUF_ENDIAN_FIXED);                                                \
+    success = bcmolt_##obj##_cfg_data_pack(&filter->data, &buf, filter->hdr.hdr.presence_mask);                        \
+                                                                                                                       \
+    while (msg_set->num_instances < msg_set->max_instances)                                                            \
+    {                                                                                                                  \
+        /* initialize the cfg structure with the key and pass it to the MH cfg_get handler */                          \
+        BCMOLT_CFG_INIT(&cfg, obj, *((bcmolt_##obj##_key *)msg_set->next_key));                                        \
+        /* (get all properties that were requested or are being filtered on) */                                        \
+        cfg.hdr.hdr.presence_mask = msg_set->presence_mask | filter->hdr.hdr.presence_mask;                            \
+        cfg.hdr.hdr.type = BCMOLT_MSG_TYPE_GET;                                                                        \
+        cfg.hdr.hdr.dir = BCMOLT_MSG_DIR_RESPONSE;                                                                     \
+        cfg.hdr.hdr.err = mh_##obj##_cfg_get(&cfg.hdr.hdr, &cfg.key, &cfg.data);                                       \
+        MH_EXIT_IF(cfg.hdr.hdr.err != BCM_ERR_OK, cfg.hdr.hdr.err);                                                    \
+                                                                                                                       \
+        /* pack the resulting message data */                                                                          \
+        len = bcmolt_##obj##_cfg_data_get_packed_length(&cfg.data, filter->hdr.hdr.presence_mask);                     \
+        msg_packed = bcmos_calloc(len);                                                                                \
+        MH_EXIT_IF(len > 0 && msg_packed == NULL, BCM_ERR_NOMEM);                                                      \
+        bcmolt_buf_init(&buf, len, msg_packed, BCMOLT_BUF_ENDIAN_FIXED);                                               \
+        success = bcmolt_##obj##_cfg_data_pack(&cfg.data, &buf, filter->hdr.hdr.presence_mask);                        \
+        MH_EXIT_IF(!success, BCM_ERR_INTERNAL);                                                                        \
+                                                                                                                       \
+        /* check the packed message against the filter */                                                              \
+        is_match = (memcmp(filter_packed, msg_packed, len) == 0);                                                      \
+        if ((flags & BCMOLT_FILTER_FLAGS_INVERT_SELECTION) != 0)                                                       \
+        {                                                                                                              \
+            is_match = !is_match;                                                                                      \
+        }                                                                                                              \
+        bcmos_free(msg_packed);                                                                                        \
+        msg_packed = NULL;                                                                                             \
+                                                                                                                       \
+        if (is_match)                                                                                                  \
+        {                                                                                                              \
+            /* if there is a match, include this message in the message set */                                         \
+            msg_set->msg[msg_set->num_instances] = NULL;                                                               \
+            err = bcmolt_msg_clone(&msg_set->msg[msg_set->num_instances], &cfg.hdr.hdr);                               \
+            MH_EXIT_IF(err != BCM_ERR_OK, err);                                                                        \
+            msg_set->num_instances++;                                                                                  \
+        }                                                                                                              \
+                                                                                                                       \
+        /* get next key, break if no more keys are found */                                                            \
+        err = mh_##obj##_key_iterate(msg_set->next_key);                                                               \
+        MH_EXIT_IF(err != BCM_ERR_OK, err);                                                                            \
+    }                                                                                                                  \
+                                                                                                                       \
+cleanup:                                                                                                               \
+    if (filter_packed != NULL)                                                                                         \
+    {                                                                                                                  \
+        bcmos_free(filter_packed);                                                                                     \
+    }                                                                                                                  \
+    if (msg_packed != NULL)                                                                                            \
+    {                                                                                                                  \
+        bcmos_free(msg_packed);                                                                                        \
+    }                                                                                                                  \
+    if (err == BCM_ERR_NO_MORE)                                                                                        \
+    {                                                                                                                  \
+        err = BCM_ERR_OK;                                                                                              \
+        msg_set->more = BCMOS_FALSE;                                                                                   \
+    }                                                                                                                  \
+    return err;                                                                                                        \
+}
+
+#endif /* _BCMOLT_MH_UTILS_H_ */
+
diff --git a/bcm68620_release/release/host_driver/model/Makefile b/bcm68620_release/release/host_driver/model/Makefile
new file mode 100644
index 0000000..7416316
--- /dev/null
+++ b/bcm68620_release/release/host_driver/model/Makefile
@@ -0,0 +1,21 @@
+# Maple object model
+#
+MOD_NAME = model
+MOD_TYPE = lib
+MOD_DEPS = utils common_api
+MOD_INC_DIRS = $(MODEL_OUT_DIR)
+gen_srcs = bcmolt_model_types.c bcmolt_msg_pack.c
+
+ifeq ("$(OS_KERNEL)", "linux")
+    MOD_DEPS += sysmodel
+endif
+
+EXTRA_TYPES += pon_onu_id pon_alloc_id pon_gem_port_id pon_alloc_index pon_gem_port_index
+
+ifeq ("$(ENABLE_EPON)", "y")
+    EXTRA_TYPES += eni pon_rate ieee_8021as_time_sync 
+endif
+
+ifeq ("$(ENABLE_GPON)", "y")
+    EXTRA_TYPES += burst_profile mac_table_idx_main mac_table_idx_cam mac_table_idx_combined
+endif
diff --git a/bcm68620_release/release/host_driver/model/bcmolt_model_data.h b/bcm68620_release/release/host_driver/model/bcmolt_model_data.h
new file mode 100644
index 0000000..f83d4e7
--- /dev/null
+++ b/bcm68620_release/release/host_driver/model/bcmolt_model_data.h
@@ -0,0 +1,3893 @@
+/*
+<:copyright-BRCM:2016:proprietary:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+This program is the proprietary software of Broadcom Corporation and/or its
+licensors, and may only be used, duplicated, modified or distributed pursuant
+to the terms and conditions of a separate, written license agreement executed
+between you and Broadcom (an "Authorized License").  Except as set forth in
+an Authorized License, Broadcom grants no license (express or implied), right
+to use, or waiver of any kind with respect to the Software, and Broadcom
+expressly reserves all rights in and to the Software and all intellectual
+property rights therein.  IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE
+NO RIGHT TO USE THIS SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY
+BROADCOM AND DISCONTINUE ALL USE OF THE SOFTWARE.
+
+Except as expressly set forth in the Authorized License,
+
+1. This program, including its structure, sequence and organization,
+    constitutes the valuable trade secrets of Broadcom, and you shall use
+    all reasonable efforts to protect the confidentiality thereof, and to
+    use this information only in connection with your use of Broadcom
+    integrated circuit products.
+
+2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
+    AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, REPRESENTATIONS OR
+    WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH
+    RESPECT TO THE SOFTWARE.  BROADCOM SPECIFICALLY DISCLAIMS ANY AND
+    ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, NONINFRINGEMENT,
+    FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, ACCURACY OR
+    COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR CORRESPONDENCE
+    TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT OF USE OR
+    PERFORMANCE OF THE SOFTWARE.
+
+3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR
+    ITS LICENSORS BE LIABLE FOR (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL,
+    INDIRECT, OR EXEMPLARY DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY
+    WAY RELATING TO YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN
+    IF BROADCOM HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES;
+    OR (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE
+    SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE LIMITATIONS
+    SHALL APPLY NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF ANY
+    LIMITED REMEDY.
+:>
+*/
+#ifndef BCMOLT_MODEL_DATA_H_
+#define BCMOLT_MODEL_DATA_H_
+
+#include "bcmos_system.h"
+
+/** \addtogroup object_model
+ * @{
+ */
+typedef uint32_t bcmolt_time_quanta;                                /**< bcmolt_time_quanta: typed alias for a 32-bit unsigned integer. */
+typedef uint16_t bcmolt_ae_ni;                                      /**< bcmolt_ae_ni: typed alias for a 16-bit unsigned integer. */
+#define BCMOLT_AE_NI_AE_NI_INVALID  ((bcmolt_ae_ni) 65535U)
+typedef uint8_t bcmolt_aggregation_domain;                          /**< bcmolt_aggregation_domain: typed alias for a 8-bit unsigned integer. */
+typedef uint32_t bcmolt_bandwidth_Kbps;                             /**< bcmolt_bandwidth_Kbps: typed alias for a 32-bit unsigned integer. */
+typedef uint32_t bcmolt_ber_interval;                               /**< bcmolt_ber_interval: typed alias for a 32-bit unsigned integer. */
+#define BCMOLT_BER_INTERVAL_BER_INTERVAL_NOT_CONFIGURED ((bcmolt_ber_interval) 0)
+typedef uint8_t bcmolt_burst_profile_index;                         /**< bcmolt_burst_profile_index: typed alias for a 8-bit unsigned integer. */
+typedef uint8_t bcmolt_dba_port;                                    /**< bcmolt_dba_port: typed alias for a 8-bit unsigned integer. */
+#define BCMOLT_DBA_PORT_COUNT   ((bcmolt_dba_port) 8)
+typedef uint8_t bcmolt_epon_top;                                    /**< bcmolt_epon_top: typed alias for a 8-bit unsigned integer. */
+#define BCMOLT_EPON_TOP_COUNT   ((bcmolt_epon_top) 8)
+typedef uint8_t bcmolt_epm_lim_global;                              /**< bcmolt_epm_lim_global: typed alias for a 8-bit unsigned integer. */
+#define BCMOLT_EPM_LIM_GLOBAL_COUNT ((bcmolt_epm_lim_global) 16)
+typedef uint8_t bcmolt_xg2g_id;                                     /**< bcmolt_xg2g_id: typed alias for a 8-bit unsigned integer. */
+typedef uint16_t bcmolt_epon_llid;                                  /**< bcmolt_epon_llid: typed alias for a 16-bit unsigned integer. */
+#define BCMOLT_EPON_LLID_BROADCAST_LLID_10G ((bcmolt_epon_llid) 32766)
+#define BCMOLT_EPON_LLID_BROADCAST_LLID_1G  ((bcmolt_epon_llid) 32767)
+typedef uint32_t bcmolt_epon_tunnel_id;                             /**< bcmolt_epon_tunnel_id: typed alias for a 32-bit unsigned integer. */
+typedef uint16_t bcmolt_epon_ni;                                    /**< bcmolt_epon_ni: typed alias for a 16-bit unsigned integer. */
+#define BCMOLT_EPON_NI_INVALID  ((bcmolt_epon_ni) 65535U)
+typedef uint8_t bcmolt_epon_onu_id;                                 /**< bcmolt_epon_onu_id: typed alias for a 8-bit unsigned integer. */
+#define BCMOLT_EPON_ONU_ID_UNKNOWN_ONU  ((bcmolt_epon_onu_id) 255)
+typedef uint16_t bcmolt_flow_id;                                    /**< bcmolt_flow_id: typed alias for a 16-bit unsigned integer. */
+typedef uint16_t bcmolt_gpon_alloc_id;                              /**< bcmolt_gpon_alloc_id: typed alias for a 16-bit unsigned integer. */
+#define BCMOLT_GPON_ALLOC_ID_ANY        ((bcmolt_gpon_alloc_id) 65534U)
+#define BCMOLT_GPON_ALLOC_ID_INVALID    ((bcmolt_gpon_alloc_id) 65535U)
+typedef uint16_t bcmolt_vlan_id;                                    /**< bcmolt_vlan_id: typed alias for a 16-bit unsigned integer. */
+#define BCMOLT_VLAN_ID_MAX  ((bcmolt_vlan_id) 4095)
+#define BCMOLT_VLAN_ID_ANY  ((bcmolt_vlan_id) 65535U)
+typedef uint16_t bcmolt_gpon_gem_id;                                /**< bcmolt_gpon_gem_id: typed alias for a 16-bit unsigned integer. */
+#define BCMOLT_GPON_GEM_ID_ANY      ((bcmolt_gpon_gem_id) 65534U)
+#define BCMOLT_GPON_GEM_ID_INVALID  ((bcmolt_gpon_gem_id) 65535U)
+typedef uint16_t bcmolt_gpon_onu_id;                                /**< bcmolt_gpon_onu_id: typed alias for a 16-bit unsigned integer. */
+#define BCMOLT_GPON_ONU_ID_ANY      ((bcmolt_gpon_onu_id) 65534U)
+#define BCMOLT_GPON_ONU_ID_INVALID  ((bcmolt_gpon_onu_id) 65535U)
+typedef uint8_t bcmolt_gpon_ni;                                     /**< bcmolt_gpon_ni: typed alias for a 8-bit unsigned integer. */
+#define BCMOLT_GPON_NI_INVALID  ((bcmolt_gpon_ni) 255)
+typedef uint16_t bcmolt_pon_onu_id;                                 /**< bcmolt_pon_onu_id: typed alias for a 16-bit unsigned integer. */
+#define BCMOLT_PON_ONU_ID_INVALID   ((bcmolt_pon_onu_id) 65535U)
+typedef uint8_t bcmolt_mac_table_idx_cam;                           /**< bcmolt_mac_table_idx_cam: typed alias for a 8-bit unsigned integer. */
+#define BCMOLT_MAC_TABLE_IDX_CAM_NONE   ((bcmolt_mac_table_idx_cam) 255)
+typedef uint16_t bcmolt_mac_table_idx_combined;                     /**< bcmolt_mac_table_idx_combined: typed alias for a 16-bit unsigned integer. */
+#define BCMOLT_MAC_TABLE_IDX_COMBINED_NONE  ((bcmolt_mac_table_idx_combined) 65535U)
+typedef uint16_t bcmolt_mac_table_idx_main;                         /**< bcmolt_mac_table_idx_main: typed alias for a 16-bit unsigned integer. */
+#define BCMOLT_MAC_TABLE_IDX_MAIN_NONE  ((bcmolt_mac_table_idx_main) 65535U)
+typedef uint32_t bcmolt_meters;                                     /**< bcmolt_meters: typed alias for a 32-bit unsigned integer. */
+typedef uint16_t bcmolt_pon_alloc_id;                               /**< bcmolt_pon_alloc_id: typed alias for a 16-bit unsigned integer. */
+#define BCMOLT_PON_ALLOC_ID_INVALID ((bcmolt_pon_alloc_id) 65535U)
+typedef uint16_t bcmolt_pon_alloc_index;                            /**< bcmolt_pon_alloc_index: typed alias for a 16-bit unsigned integer. */
+#define BCMOLT_PON_ALLOC_INDEX_INVALID  ((bcmolt_pon_alloc_index) 65535U)
+typedef uint16_t bcmolt_pon_gem_port_id;                            /**< bcmolt_pon_gem_port_id: typed alias for a 16-bit unsigned integer. */
+#define BCMOLT_PON_GEM_PORT_ID_INVALID  ((bcmolt_pon_gem_port_id) 65535U)
+typedef uint16_t bcmolt_pon_gem_port_index;                         /**< bcmolt_pon_gem_port_index: typed alias for a 16-bit unsigned integer. */
+#define BCMOLT_PON_GEM_PORT_INDEX_INVALID   ((bcmolt_pon_gem_port_index) 65535U)
+typedef uint8_t bcmolt_pon_ni;                                      /**< bcmolt_pon_ni: typed alias for a 8-bit unsigned integer. */
+#define BCMOLT_PON_NI_INVALID   ((bcmolt_pon_ni) 255)
+typedef uint16_t bcmolt_xgpon_alloc_id;                             /**< bcmolt_xgpon_alloc_id: typed alias for a 16-bit unsigned integer. */
+#define BCMOLT_XGPON_ALLOC_ID_ANY       ((bcmolt_xgpon_alloc_id) 65534U)
+#define BCMOLT_XGPON_ALLOC_ID_INVALID   ((bcmolt_xgpon_alloc_id) 65535U)
+typedef uint16_t bcmolt_xgpon_gem_id;                               /**< bcmolt_xgpon_gem_id: typed alias for a 16-bit unsigned integer. */
+#define BCMOLT_XGPON_GEM_ID_ANY     ((bcmolt_xgpon_gem_id) 65534U)
+#define BCMOLT_XGPON_GEM_ID_INVALID ((bcmolt_xgpon_gem_id) 65535U)
+typedef uint8_t bcmolt_xgpon_ni;                                    /**< bcmolt_xgpon_ni: typed alias for a 8-bit unsigned integer. */
+#define BCMOLT_XGPON_NI_INVALID ((bcmolt_xgpon_ni) 255)
+typedef uint16_t bcmolt_xgpon_onu_id;                               /**< bcmolt_xgpon_onu_id: typed alias for a 16-bit unsigned integer. */
+#define BCMOLT_XGPON_ONU_ID_ANY     ((bcmolt_xgpon_onu_id) 65534U)
+#define BCMOLT_XGPON_ONU_ID_INVALID ((bcmolt_xgpon_onu_id) 65535U)
+
+/** activation fail reason. 
+ */
+typedef enum bcmolt_activation_fail_reason
+{
+    BCMOLT_ACTIVATION_FAIL_REASON__BEGIN                    = 0,
+    BCMOLT_ACTIVATION_FAIL_REASON_NONE                      = 0,    /**< None. */
+    BCMOLT_ACTIVATION_FAIL_REASON_RANGING                   = 1,    /**< Ranging. */
+    BCMOLT_ACTIVATION_FAIL_REASON_PASSWORD_AUTHENTICATION   = 2,    /**< Password authentication. */
+    BCMOLT_ACTIVATION_FAIL_REASON_LOS                       = 3,    /**< LOS. */
+    BCMOLT_ACTIVATION_FAIL_REASON_ONU_ALARM                 = 4,    /**< ONU Alarm. */
+    BCMOLT_ACTIVATION_FAIL_REASON__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_activation_fail_reason;
+
+/** Additional BW eligibility. 
+ */
+typedef enum bcmolt_additional_bw_eligibility
+{
+    BCMOLT_ADDITIONAL_BW_ELIGIBILITY__BEGIN                 = 0,
+    BCMOLT_ADDITIONAL_BW_ELIGIBILITY_NONE                   = 0,    /**< None. */
+    BCMOLT_ADDITIONAL_BW_ELIGIBILITY_NON_ASSURED            = 1,    /**< Non Assured. */
+    BCMOLT_ADDITIONAL_BW_ELIGIBILITY_BEST_EFFORT            = 2,    /**< Best Effort. */
+    BCMOLT_ADDITIONAL_BW_ELIGIBILITY__NUM_OF                        /**< Number of enum entries, not an entry itself. */
+} bcmolt_additional_bw_eligibility;
+
+/** Enable state of the AE NI. 
+ */
+typedef enum bcmolt_ae_ni_en_state
+{
+    BCMOLT_AE_NI_EN_STATE__BEGIN                            = 0,
+    BCMOLT_AE_NI_EN_STATE_DISABLED                          = 0,    /**< AE NI is fully disabled. */
+    BCMOLT_AE_NI_EN_STATE_ENABLED                           = 1,    /**< AE NI is fully enabled. */
+    BCMOLT_AE_NI_EN_STATE__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_ae_ni_en_state;
+
+/** Alloc operation. 
+ */
+typedef enum bcmolt_alloc_operation
+{
+    BCMOLT_ALLOC_OPERATION__BEGIN                           = 0,
+    BCMOLT_ALLOC_OPERATION_ACTIVATE                         = 0,    /**< Activate. */
+    BCMOLT_ALLOC_OPERATION_DEACTIVATE                       = 1,    /**< Deactivate. */
+    BCMOLT_ALLOC_OPERATION__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_alloc_operation;
+
+/** Alloc State. 
+ */
+typedef enum bcmolt_alloc_state
+{
+    BCMOLT_ALLOC_STATE__BEGIN                               = 0,
+    BCMOLT_ALLOC_STATE_NOT_CONFIGURED                       = 0,    /**< Not configured. */
+    BCMOLT_ALLOC_STATE_INACTIVE                             = 1,    /**< Inactive. */
+    BCMOLT_ALLOC_STATE_PROCESSING                           = 2,    /**< Processing. */
+    BCMOLT_ALLOC_STATE_ACTIVE                               = 3,    /**< Active. */
+    BCMOLT_ALLOC_STATE__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_alloc_state;
+
+/** Alloc Type. 
+ */
+typedef enum bcmolt_alloc_type
+{
+    BCMOLT_ALLOC_TYPE__BEGIN                                = 0,
+    BCMOLT_ALLOC_TYPE_NONE                                  = 0,    /**< None. */
+    BCMOLT_ALLOC_TYPE_NSR                                   = 1,    /**< Non Status Report. */
+    BCMOLT_ALLOC_TYPE_SR                                    = 2,    /**< Status Report. */
+    BCMOLT_ALLOC_TYPE__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_alloc_type;
+
+/** Alloc Type to scan during the rogue onu detection process. 
+ */
+typedef enum bcmolt_alloc_type_to_scan
+{
+    BCMOLT_ALLOC_TYPE_TO_SCAN__BEGIN                        = 0,
+    BCMOLT_ALLOC_TYPE_TO_SCAN_UNUSED                        = 0,    /**< Scan only the Alloc-IDs that have not been used. */
+    BCMOLT_ALLOC_TYPE_TO_SCAN_PREVIOUSLY_USED               = 1,    /**< Scan only the Alloc-IDs that has been used but currently not being used.  This is for detecting the case when the OLT has released the Alloc, but the ONU is still holding it due to an error. */
+    BCMOLT_ALLOC_TYPE_TO_SCAN_ALL                           = 2,    /**< Scan both used and unused Alloc-IDs. */
+    BCMOLT_ALLOC_TYPE_TO_SCAN__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_alloc_type_to_scan;
+
+/** What to do when the capture buffer is full. 
+ */
+typedef enum bcmolt_api_capture_buffer_mode
+{
+    BCMOLT_API_CAPTURE_BUFFER_MODE__BEGIN                   = 0,
+    BCMOLT_API_CAPTURE_BUFFER_MODE_OVERFLOW                 = 0,    /**< Drop messages when the buffer is full. */
+    BCMOLT_API_CAPTURE_BUFFER_MODE_WRAP                     = 1,    /**< Wrap back to the beginning when the buffer is full. */
+    BCMOLT_API_CAPTURE_BUFFER_MODE__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_api_capture_buffer_mode;
+
+/** Where to perform the API capture. 
+ */
+typedef enum bcmolt_api_capture_location
+{
+    BCMOLT_API_CAPTURE_LOCATION__BEGIN                      = 0,
+    BCMOLT_API_CAPTURE_LOCATION_DEVICE                      = 0,    /**< On the device. */
+    BCMOLT_API_CAPTURE_LOCATION_HOST                        = 1,    /**< On the host. */
+    BCMOLT_API_CAPTURE_LOCATION__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_api_capture_location;
+
+/** Calibration Record. 
+ */
+typedef enum bcmolt_calibration_record
+{
+    BCMOLT_CALIBRATION_RECORD__BEGIN                        = 0,
+    BCMOLT_CALIBRATION_RECORD_UNSPECIFIED                   = 0,    /**< Unspecified. */
+    BCMOLT_CALIBRATION_RECORD_UNCALIBRATED                  = 1,    /**< Uncalibrated. */
+    BCMOLT_CALIBRATION_RECORD_LOOSE                         = 2,    /**< Loose. */
+    BCMOLT_CALIBRATION_RECORD_SUFFICIENT                    = 3,    /**< Sufficient. */
+    BCMOLT_CALIBRATION_RECORD__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_calibration_record;
+
+/** sign. 
+ */
+typedef enum bcmolt_sign
+{
+    BCMOLT_SIGN__BEGIN                                      = 0,
+    BCMOLT_SIGN_POSITIVE                                    = 0,    /**< Positive. */
+    BCMOLT_SIGN_NEGATIVE                                    = 1,    /**< Negative. */
+    BCMOLT_SIGN__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_sign;
+
+/** XGPON ni upstream line rate capabilities 
+ */
+typedef enum bcmolt_upstream_line_rate_capabilities
+{
+    BCMOLT_UPSTREAM_LINE_RATE_CAPABILITIES__BEGIN           = 0,
+    BCMOLT_UPSTREAM_LINE_RATE_CAPABILITIES_RATE_2_P_5_G     = 0,    /**< 2.5G Upstream line rate capability */
+    BCMOLT_UPSTREAM_LINE_RATE_CAPABILITIES_RATE_10_G        = 1,    /**< 10G Upstream line rate capability */
+    BCMOLT_UPSTREAM_LINE_RATE_CAPABILITIES__NUM_OF                  /**< Number of enum entries, not an entry itself. */
+} bcmolt_upstream_line_rate_capabilities;
+
+/** Link type. 
+ */
+typedef enum bcmolt_link_type
+{
+    BCMOLT_LINK_TYPE__BEGIN                                 = 0,
+    BCMOLT_LINK_TYPE_UNSPECIFIED                            = 0,    /**< Link type unspecified */
+    BCMOLT_LINK_TYPE_B                                      = 1,    /**< Link type A is not supported, link type B is supported */
+    BCMOLT_LINK_TYPE_A                                      = 2,    /**< Link type A is supported, link type B is not supported */
+    BCMOLT_LINK_TYPE_A_AND_B                                = 3,    /**< Both link types A and B are supported */
+    BCMOLT_LINK_TYPE__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_link_type;
+
+/** capture strobe signal. 
+ */
+typedef enum bcmolt_capture_strobe_signal
+{
+    BCMOLT_CAPTURE_STROBE_SIGNAL__BEGIN                     = 0,
+    BCMOLT_CAPTURE_STROBE_SIGNAL_GPON_BCDR_RESET            = 0,    /**< gpon bcdr reset. */
+    BCMOLT_CAPTURE_STROBE_SIGNAL_GPON_TRX_ED                = 1,    /**< gpon trx ed. */
+    BCMOLT_CAPTURE_STROBE_SIGNAL_GPON_RSSI                  = 2,    /**< gpon rssi. */
+    BCMOLT_CAPTURE_STROBE_SIGNAL_GPON_EOB                   = 3,    /**< gpon eob. */
+    BCMOLT_CAPTURE_STROBE_SIGNAL_SERDES_BURST_EN            = 4,    /**< serdes burst en. */
+    BCMOLT_CAPTURE_STROBE_SIGNAL_SERDES_RX_LOCK             = 5,    /**< serdes rx lock. */
+    BCMOLT_CAPTURE_STROBE_SIGNAL__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_capture_strobe_signal;
+
+/** Console Redirection Type. 
+ */
+typedef enum bcmolt_console_redirection
+{
+    BCMOLT_CONSOLE_REDIRECTION__BEGIN                       = 0,
+    BCMOLT_CONSOLE_REDIRECTION_NONE                         = 0,    /**< No redirection */
+    BCMOLT_CONSOLE_REDIRECTION_REDIRECT                     = 1,    /**< Embedded console output is redirected to the host */
+    BCMOLT_CONSOLE_REDIRECTION_CLONE                        = 2,    /**< Embedded console output is cloned to the host */
+    BCMOLT_CONSOLE_REDIRECTION__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_console_redirection;
+
+/** control state. 
+ */
+typedef enum bcmolt_control_state
+{
+    BCMOLT_CONTROL_STATE__BEGIN                             = 0,
+    BCMOLT_CONTROL_STATE_DISABLE                            = 0,    /**< Disabled. */
+    BCMOLT_CONTROL_STATE_ENABLE                             = 1,    /**< Enabled. */
+    BCMOLT_CONTROL_STATE__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_control_state;
+
+/** dba mode. 
+ */
+typedef enum bcmolt_dba_mode
+{
+    BCMOLT_DBA_MODE__BEGIN                                  = 0,
+    BCMOLT_DBA_MODE_NORMAL                                  = 0,    /**< normal. */
+    BCMOLT_DBA_MODE_EXTENDED                                = 1,    /**< extended. */
+    BCMOLT_DBA_MODE__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_dba_mode;
+
+/** DBA RAM. 
+ */
+typedef enum bcmolt_dba_ram
+{
+    BCMOLT_DBA_RAM__BEGIN                                   = 0,
+    BCMOLT_DBA_RAM_GRANT_FIFO_RAM_0                         = 0,    /**< Grant FIFO RAM 0. */
+    BCMOLT_DBA_RAM_GRANT_FIFO_RAM_1                         = 1,    /**< Grant FIFO RAM 1. */
+    BCMOLT_DBA_RAM_GRANT_FIFO_RAM_2                         = 2,    /**< Grant FIFO RAM 2. */
+    BCMOLT_DBA_RAM_GRANT_FIFO_RAM_3                         = 3,    /**< Grant FIFO RAM 3. */
+    BCMOLT_DBA_RAM_GRANT_FIFO_RAM_4                         = 4,    /**< Grant FIFO RAM 4. */
+    BCMOLT_DBA_RAM_GRANT_FIFO_RAM_5                         = 5,    /**< Grant FIFO RAM 5. */
+    BCMOLT_DBA_RAM_GRANT_FIFO_RAM_6                         = 6,    /**< Grant FIFO RAM 6. */
+    BCMOLT_DBA_RAM_GRANT_FIFO_RAM_7                         = 7,    /**< Grant FIFO RAM 7. */
+    BCMOLT_DBA_RAM_GRANTS_OUT_RAM                           = 8,    /**< Grants Out RAM. */
+    BCMOLT_DBA_RAM_GRANTS_IN_RAM                            = 9,    /**< Grants In RAM. */
+    BCMOLT_DBA_RAM_GRANTS_RETIRED_RAM                       = 10,   /**< Grants Retired RAM. */
+    BCMOLT_DBA_RAM_REPORT_RAM                               = 11,   /**< Report RAM. */
+    BCMOLT_DBA_RAM_GRANT_CFG_RAM                            = 12,   /**< Grant Cfg RAM. */
+    BCMOLT_DBA_RAM_DEFAULT_TOKENS_RAM                       = 13,   /**< Default Tokens RAM. */
+    BCMOLT_DBA_RAM_POLL_RECORDS_RAM                         = 14,   /**< Poll Records RAM. */
+    BCMOLT_DBA_RAM_HEIR_POLL_RAM                            = 15,   /**< Heir Poll RAM. */
+    BCMOLT_DBA_RAM_LAST_POLL_TIME_RAM                       = 16,   /**< Last Poll Time RAM. */
+    BCMOLT_DBA_RAM_POLL_ORDER_RAM                           = 17,   /**< Poll Order RAM. */
+    BCMOLT_DBA_RAM_TDM_RAM_0                                = 18,   /**< TDM RAM 0. */
+    BCMOLT_DBA_RAM_TDM_RAM_1                                = 19,   /**< TDM RAM 1. */
+    BCMOLT_DBA_RAM_TDM_RAM_2                                = 20,   /**< TDM RAM 2. */
+    BCMOLT_DBA_RAM_TDM_RAM_3                                = 21,   /**< TDM RAM 3. */
+    BCMOLT_DBA_RAM_TDM_RAM_4                                = 22,   /**< TDM RAM 4. */
+    BCMOLT_DBA_RAM_TDM_RAM_5                                = 23,   /**< TDM RAM 5. */
+    BCMOLT_DBA_RAM_TDM_RAM_6                                = 24,   /**< TDM RAM 6. */
+    BCMOLT_DBA_RAM_TDM_RAM_7                                = 25,   /**< TDM RAM 7. */
+    BCMOLT_DBA_RAM__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_dba_ram;
+
+/** DBA type. 
+ */
+typedef enum bcmolt_dba_type
+{
+    BCMOLT_DBA_TYPE__BEGIN                                  = 0,
+    BCMOLT_DBA_TYPE_INTERNAL                                = 0,    /**< DBA internal implementation */
+    BCMOLT_DBA_TYPE_PARTIAL_EXTERNAL                        = 1,    /**< DBA partial external implementation (DE, BA are implemented externally) */
+    BCMOLT_DBA_TYPE_EXTERNAL                                = 2,    /**< DBA external implementation  */
+    BCMOLT_DBA_TYPE__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_dba_type;
+
+/** DDR Test Status. 
+ */
+typedef enum bcmolt_ddr_test_status
+{
+    BCMOLT_DDR_TEST_STATUS__BEGIN                           = 0,
+    BCMOLT_DDR_TEST_STATUS_COMPLETED                        = 0,    /**< The DDR test ran to completion */
+    BCMOLT_DDR_TEST_STATUS_CONNECTION_FAILED                = 1,    /**< The DDR test failed due to an issue loading the bootloader */
+    BCMOLT_DDR_TEST_STATUS_TIMEOUT                          = 2,    /**< The DDR test failed to complete within the expected time */
+    BCMOLT_DDR_TEST_STATUS__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_ddr_test_status;
+
+/** DDR Test Result. 
+ */
+typedef enum bcmolt_ddr_test_result
+{
+    BCMOLT_DDR_TEST_RESULT_SUCCESS                          = 0,        /**< Success. */
+    BCMOLT_DDR_TEST_RESULT_PHY_INIT_ERROR                   = 1,        /**< PHY Init Error. */
+    BCMOLT_DDR_TEST_RESULT_DRAM_INIT_ERROR                  = 2,        /**< DRAM Init Error. */
+    BCMOLT_DDR_TEST_RESULT_SHMOO_ERROR                      = 3,        /**< SHMOO Error. */
+    BCMOLT_DDR_TEST_RESULT_EDIS_TEST_ERROR                  = 4,        /**< EDIS Test Error. */
+    BCMOLT_DDR_TEST_RESULT_MEM_TEST_ERROR                   = 5,        /**< Mem Test Error. */
+    BCMOLT_DDR_TEST_RESULT_NOT_TESTED                       = 127       /**< Not Tested. */
+} bcmolt_ddr_test_result;
+
+/** Reasons why the connection between the host and the device failed 
+ */
+typedef enum bcmolt_host_connection_fail_reason
+{
+    BCMOLT_HOST_CONNECTION_FAIL_REASON__BEGIN                   = 0,
+    BCMOLT_HOST_CONNECTION_FAIL_REASON_TIMEOUT                  = 0,    /**< The connection process has timed out. */
+    BCMOLT_HOST_CONNECTION_FAIL_REASON_KEEPALIVE                = 1,    /**< Too much time has passed between keepalive messages from the device. */
+    BCMOLT_HOST_CONNECTION_FAIL_REASON_USER_CALLBACK_ERROR      = 2,    /**< A user callback returned a nonzero error code.  Check log output to determine which callback failed. */
+    BCMOLT_HOST_CONNECTION_FAIL_REASON_SOFTWARE_VERSION_MISMATCH= 3,    /**< The software version on the running device doesn't match the version in the host software.  Only the revision number is allowed to differ - major/minor/model must match. */
+    BCMOLT_HOST_CONNECTION_FAIL_REASON_SYSTEM_MODE_MISMATCH     = 4,    /**< The system mode on the running device doesn't match the version in the host software. */
+    BCMOLT_HOST_CONNECTION_FAIL_REASON_NNI_SPEED_MISMATCH       = 5,    /**< The NNI speed on the running device doesn't match the version in the host software. */
+    BCMOLT_HOST_CONNECTION_FAIL_REASON_RECONNECT_TIMEOUT        = 6,    /**< A running device didn't respond to the request to reconnect. */
+    BCMOLT_HOST_CONNECTION_FAIL_REASON_INTERNAL_ERROR           = 7,    /**< An unspecified internal error occurred - check the log output for details. */
+    BCMOLT_HOST_CONNECTION_FAIL_REASON_SYSTEM_MODE_NOT_SUPPORTED= 8,    /**< The given system mode is not supported on this device. */
+    BCMOLT_HOST_CONNECTION_FAIL_REASON_PARAMETER                = 9,    /**< One of the initial connection parameters was incorrect. */
+    BCMOLT_HOST_CONNECTION_FAIL_REASON__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_host_connection_fail_reason;
+
+/** deactivation reason. 
+ */
+typedef enum bcmolt_deactivation_reason
+{
+    BCMOLT_DEACTIVATION_REASON__BEGIN                           = 0,
+    BCMOLT_DEACTIVATION_REASON_NONE                             = 0,    /**< none. */
+    BCMOLT_DEACTIVATION_REASON_DEACTIVATION                     = 1,    /**< deactivation. */
+    BCMOLT_DEACTIVATION_REASON_ACK_TIMEOUT                      = 2,    /**< ack timeout. */
+    BCMOLT_DEACTIVATION_REASON_SFI                              = 3,    /**< sfi alarm. */
+    BCMOLT_DEACTIVATION_REASON_TIWI                             = 4,    /**< tiwi. */
+    BCMOLT_DEACTIVATION_REASON_PASSWORD_AUTHENTICATION          = 5,    /**< password authentication. */
+    BCMOLT_DEACTIVATION_REASON_ONU_ALARM                        = 6,    /**< onu alarm. */
+    BCMOLT_DEACTIVATION_REASON_LOS                              = 7,    /**< los. */
+    BCMOLT_DEACTIVATION_REASON_LOKI                             = 8,    /**< loki. */
+    BCMOLT_DEACTIVATION_REASON_RERANGE_FAILURE                  = 9,    /**< re-range failure. */
+    BCMOLT_DEACTIVATION_REASON__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_deactivation_reason;
+
+/** Revision of the BCM68620 device. 
+ */
+typedef enum bcmolt_device_chip_revision
+{
+    BCMOLT_DEVICE_CHIP_REVISION_A0                              = 160,  /**< A0. */
+    BCMOLT_DEVICE_CHIP_REVISION_B0                              = 176   /**< B0. */
+} bcmolt_device_chip_revision;
+
+/** Device Image Type. 
+ */
+typedef enum bcmolt_device_image_type
+{
+    BCMOLT_DEVICE_IMAGE_TYPE__BEGIN                             = 0,
+    BCMOLT_DEVICE_IMAGE_TYPE_BOOTLOADER                         = 0,    /**< Bootloader. */
+    BCMOLT_DEVICE_IMAGE_TYPE_APPLICATION                        = 1,    /**< Application. */
+    BCMOLT_DEVICE_IMAGE_TYPE_ITU_PON_ONU_FIRMWARE               = 2,    /**< ITU PON ONU firmware. */
+    BCMOLT_DEVICE_IMAGE_TYPE_EPON_ONU_FIRMWARE                  = 3,    /**< EPON ONU firmware. */
+    BCMOLT_DEVICE_IMAGE_TYPE__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_device_image_type;
+
+/** Network interface speed 
+ */
+typedef enum bcmolt_nni_speed
+{
+    BCMOLT_NNI_SPEED__BEGIN                                     = 0,
+    BCMOLT_NNI_SPEED_GBPS_1                                     = 0,    /**< 1Gbps */
+    BCMOLT_NNI_SPEED_GBPS_2P5                                   = 1,    /**< 2.5Gbps */
+    BCMOLT_NNI_SPEED_GBPS_10                                    = 2,    /**< 10Gbps */
+    BCMOLT_NNI_SPEED_GBPS_12P5                                  = 3,    /**< 12.5Gbps */
+    BCMOLT_NNI_SPEED_GBPS_10_G_MUX                              = 4,    /**< 10Gbps Mux */
+    BCMOLT_NNI_SPEED__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_nni_speed;
+
+/** Options for the reset operation. 
+ */
+typedef enum bcmolt_device_reset_mode
+{
+    BCMOLT_DEVICE_RESET_MODE_DEVICE                             = 1,    /**< Turn off the embedded device's processor. */
+    BCMOLT_DEVICE_RESET_MODE_HOST                               = 2,    /**< Reset the host processor. */
+    BCMOLT_DEVICE_RESET_MODE_ALL                                = 3     /**< Turn off the embedded device's processor and reset the host processor. */
+} bcmolt_device_reset_mode;
+
+/** The overall state of the host's connection to the device. 
+ */
+typedef enum bcmolt_device_state
+{
+    BCMOLT_DEVICE_STATE__BEGIN                                  = 0,
+    BCMOLT_DEVICE_STATE_DISCONNECTED                            = 0,    /**< The host is not connected to the device. */
+    BCMOLT_DEVICE_STATE_CONNECTING                              = 1,    /**< The host is in the process of connecting to the device. */
+    BCMOLT_DEVICE_STATE_READY                                   = 2,    /**< The device is connected to the host and is ready to accept any command from the host. */
+    BCMOLT_DEVICE_STATE_WAITING_FOR_DEVICE                      = 3,    /**< Waiting for the embedded side to respond to a configuration message. */
+    BCMOLT_DEVICE_STATE_TESTING_DDR                             = 4,    /**< A DDR test is currently in progress */
+    BCMOLT_DEVICE_STATE__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_device_state;
+
+/** Disable Serial Number Control. 
+ */
+typedef enum bcmolt_disable_serial_number_control
+{
+    BCMOLT_DISABLE_SERIAL_NUMBER_CONTROL__BEGIN                 = 0,
+    BCMOLT_DISABLE_SERIAL_NUMBER_CONTROL_UNICAST_DISABLE        = 0,    /**< Unicast Disable. */
+    BCMOLT_DISABLE_SERIAL_NUMBER_CONTROL_UNICAST_ENABLE         = 1,    /**< Unicast Enable. */
+    BCMOLT_DISABLE_SERIAL_NUMBER_CONTROL_BROADCAST_ENABLE       = 2,    /**< Broadcast Enable. */
+    BCMOLT_DISABLE_SERIAL_NUMBER_CONTROL_BROADCAST_DISABLE      = 3,    /**< Broadcast Disable. */
+    BCMOLT_DISABLE_SERIAL_NUMBER_CONTROL_DISABLE_DISCOVERY      = 4,    /**< Disable Discovery. */
+    BCMOLT_DISABLE_SERIAL_NUMBER_CONTROL__NUM_OF                        /**< Number of enum entries, not an entry itself. */
+} bcmolt_disable_serial_number_control;
+
+/** drv_icf_id. 
+ */
+typedef enum bcmolt_drv_icf_id
+{
+    BCMOLT_DRV_ICF_ID__BEGIN                                    = 0,
+    BCMOLT_DRV_ICF_ID_IDX0                                      = 0,    /**< IDX0. */
+    BCMOLT_DRV_ICF_ID_IDX1                                      = 1,    /**< IDX1. */
+    BCMOLT_DRV_ICF_ID_IDX2                                      = 2,    /**< IDX2. */
+    BCMOLT_DRV_ICF_ID_IDX3                                      = 3,    /**< IDX3. */
+    BCMOLT_DRV_ICF_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_drv_icf_id;
+
+/** drv_sgb_id. 
+ */
+typedef enum bcmolt_drv_sgb_id
+{
+    BCMOLT_DRV_SGB_ID__BEGIN                                    = 0,
+    BCMOLT_DRV_SGB_ID_IDX0                                      = 0,    /**< IDX0. */
+    BCMOLT_DRV_SGB_ID_IDX1                                      = 1,    /**< IDX1. */
+    BCMOLT_DRV_SGB_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_drv_sgb_id;
+
+/** DS VLAN action. 
+ */
+typedef enum bcmolt_ds_vlan_action
+{
+    BCMOLT_DS_VLAN_ACTION__BEGIN                                = 0,
+    BCMOLT_DS_VLAN_ACTION_REMOVE                                = 0,    /**< Remove. */
+    BCMOLT_DS_VLAN_ACTION_TRANSPARENT                           = 1,    /**< Transparent. */
+    BCMOLT_DS_VLAN_ACTION__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_ds_vlan_action;
+
+/** TFB Trap Behavior. 
+ */
+typedef enum bcmolt_tfb_trap_behavior
+{
+    BCMOLT_TFB_TRAP_BEHAVIOR__BEGIN                             = 0,
+    BCMOLT_TFB_TRAP_BEHAVIOR_DROP                               = 0,    /**< Drop. */
+    BCMOLT_TFB_TRAP_BEHAVIOR_FORWARD_NNI                        = 1,    /**< Forward NNI. */
+    BCMOLT_TFB_TRAP_BEHAVIOR_FORWARD_CPU                        = 2,    /**< Forward CPU. */
+    BCMOLT_TFB_TRAP_BEHAVIOR_SNOOP                              = 3,    /**< Snoop. */
+    BCMOLT_TFB_TRAP_BEHAVIOR__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_tfb_trap_behavior;
+
+/** TFB Mode. 
+ */
+typedef enum bcmolt_tfb_mode
+{
+    BCMOLT_TFB_MODE__BEGIN                                      = 0,
+    BCMOLT_TFB_MODE_GPON                                        = 0,    /**< GPON. */
+    BCMOLT_TFB_MODE_XGPON                                       = 1,    /**< XGPON. */
+    BCMOLT_TFB_MODE_EPON                                        = 2,    /**< EPON. */
+    BCMOLT_TFB_MODE_XEPON                                       = 3,    /**< XEPON. */
+    BCMOLT_TFB_MODE_COEX                                        = 4,    /**< COEX. */
+    BCMOLT_TFB_MODE__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_tfb_mode;
+
+/** LIM SEC Mode Up. 
+ */
+typedef enum bcmolt_lim_sec_mode_up
+{
+    BCMOLT_LIM_SEC_MODE_UP__BEGIN                               = 0,
+    BCMOLT_LIM_SEC_MODE_UP_TEK                                  = 0,    /**< Teknovus encryption mode */
+    BCMOLT_LIM_SEC_MODE_UP_PER_LLID                             = 1,    /**< Encryption per LLID, 802.1ae/zero-overhead */
+    BCMOLT_LIM_SEC_MODE_UP_NTT                                  = 2,    /**< EPON (NTT) encryption mode */
+    BCMOLT_LIM_SEC_MODE_UP__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_lim_sec_mode_up;
+
+/** LIM SEC Mode Dn. 
+ */
+typedef enum bcmolt_lim_sec_mode_dn
+{
+    BCMOLT_LIM_SEC_MODE_DN__BEGIN                               = 0,
+    BCMOLT_LIM_SEC_MODE_DN_TEK                                  = 0,    /**< Teknovus encryption mode */
+    BCMOLT_LIM_SEC_MODE_DN_PER_LLID                             = 1,    /**< Encryption per LLID, 802.1ae/zero-overhead */
+    BCMOLT_LIM_SEC_MODE_DN_NTT                                  = 2,    /**< EPON (NTT) encryption mode */
+    BCMOLT_LIM_SEC_MODE_DN_CEPON                                = 3,    /**< CEPON (3Churn) encryption mode */
+    BCMOLT_LIM_SEC_MODE_DN__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_lim_sec_mode_dn;
+
+/** XIM SEC Mode. 
+ */
+typedef enum bcmolt_xim_sec_mode
+{
+    BCMOLT_XIM_SEC_MODE__BEGIN                                  = 0,
+    BCMOLT_XIM_SEC_MODE_RESERVED_0                              = 0,    /**< Reserved 0. */
+    BCMOLT_XIM_SEC_MODE_PER_LLID                                = 1,    /**< Per LLID. */
+    BCMOLT_XIM_SEC_MODE_RESERVED_2                              = 2,    /**< Reserved 2. */
+    BCMOLT_XIM_SEC_MODE_CEPON                                   = 3,    /**< CEPON. */
+    BCMOLT_XIM_SEC_MODE__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_xim_sec_mode;
+
+/** HSC RAM. 
+ */
+typedef enum bcmolt_hsc_ram
+{
+    BCMOLT_HSC_RAM__BEGIN                                       = 0,
+    BCMOLT_HSC_RAM_LLC_T1                                       = 0,    /**< LLC T1. */
+    BCMOLT_HSC_RAM_LLC_T2                                       = 1,    /**< LLC T2. */
+    BCMOLT_HSC_RAM_LLC_T3                                       = 2,    /**< LLC T3. */
+    BCMOLT_HSC_RAM_GRP_T2                                       = 3,    /**< Grp T2. */
+    BCMOLT_HSC_RAM_GRP_T3                                       = 4,    /**< Grp T3. */
+    BCMOLT_HSC_RAM_SHP_T1                                       = 5,    /**< Shp T1. */
+    BCMOLT_HSC_RAM_SHP_T2                                       = 6,    /**< Shp T2. */
+    BCMOLT_HSC_RAM_SHP_T3                                       = 7,    /**< Shp T3. */
+    BCMOLT_HSC_RAM_PRF_T1                                       = 8,    /**< Prf T1. */
+    BCMOLT_HSC_RAM_PRF_T2                                       = 9,    /**< Prf T2. */
+    BCMOLT_HSC_RAM_PRF_T3                                       = 10,   /**< Prf T3. */
+    BCMOLT_HSC_RAM_CRE_T1                                       = 11,   /**< Cre T1. */
+    BCMOLT_HSC_RAM_CRE_T2                                       = 12,   /**< Cre T2. */
+    BCMOLT_HSC_RAM_CRE_T3                                       = 13,   /**< Cre T3. */
+    BCMOLT_HSC_RAM_ELU                                          = 14,   /**< ELU. */
+    BCMOLT_HSC_RAM_PTR_T1                                       = 15,   /**< Ptr T1. */
+    BCMOLT_HSC_RAM_PTR_T2                                       = 16,   /**< Ptr T2. */
+    BCMOLT_HSC_RAM_AGR_SHP_T1                                   = 17,   /**< Agr Shp T1. */
+    BCMOLT_HSC_RAM_AEM                                          = 18,   /**< AEM. */
+    BCMOLT_HSC_RAM_ALL_LLC                                      = 19,   /**< All LLC. */
+    BCMOLT_HSC_RAM__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_hsc_ram;
+
+/** LIM RAM. 
+ */
+typedef enum bcmolt_lim_ram
+{
+    BCMOLT_LIM_RAM__BEGIN                                       = 0,
+    BCMOLT_LIM_RAM_LLID_UP                                      = 0,    /**< LLID Up. */
+    BCMOLT_LIM_RAM_PER_ONU_STAT                                 = 1,    /**< Per ONU Stat. */
+    BCMOLT_LIM_RAM_FEC_UP_FULL_S                                = 2,    /**< FEC Up Full S. */
+    BCMOLT_LIM_RAM_FEC_UP_DATA                                  = 3,    /**< FEC Up Data. */
+    BCMOLT_LIM_RAM__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_lim_ram;
+
+/** LKY RAM. 
+ */
+typedef enum bcmolt_lky_ram
+{
+    BCMOLT_LKY_RAM__BEGIN                                       = 0,
+    BCMOLT_LKY_RAM_TX_KEY_RAM                                   = 0,    /**< Tx Key RAM. */
+    BCMOLT_LKY_RAM_TX_KEY_BUFFER                                = 1,    /**< Tx Key Buffer. */
+    BCMOLT_LKY_RAM_RX_KEY_RAM                                   = 2,    /**< Rx Key RAM. */
+    BCMOLT_LKY_RAM_RX_KEY_BUFFER                                = 3,    /**< Rx Key Buffer. */
+    BCMOLT_LKY_RAM__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_lky_ram;
+
+/** MIC RAM. 
+ */
+typedef enum bcmolt_mic_ram
+{
+    BCMOLT_MIC_RAM__BEGIN                                       = 0,
+    BCMOLT_MIC_RAM_RANGE                                        = 0,    /**< Range. */
+    BCMOLT_MIC_RAM_LLID                                         = 1,    /**< LLID. */
+    BCMOLT_MIC_RAM_IDX                                          = 2,    /**< Index. */
+    BCMOLT_MIC_RAM_GRANT_MISS                                   = 3,    /**< Grant Miss. */
+    BCMOLT_MIC_RAM_GRANT_ID                                     = 4,    /**< Grant ID. */
+    BCMOLT_MIC_RAM_TX_IV                                        = 5,    /**< Tx IV. */
+    BCMOLT_MIC_RAM_RX_IV                                        = 6,    /**< Rx IV. */
+    BCMOLT_MIC_RAM_TX_PORT_STAT                                 = 7,    /**< Tx Port Stat. */
+    BCMOLT_MIC_RAM_RX_PORT_STAT                                 = 8,    /**< Rx Port Stat. */
+    BCMOLT_MIC_RAM__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_mic_ram;
+
+/** XPCSRM RAM. 
+ */
+typedef enum bcmolt_xpcsrm_ram
+{
+    BCMOLT_XPCSRM_RAM__BEGIN                                    = 0,
+    BCMOLT_XPCSRM_RAM_CAPTURE_FIFO                              = 0,    /**< Capture FIFO. */
+    BCMOLT_XPCSRM_RAM_FEC_DECODE                                = 1,    /**< FEC Decode. */
+    BCMOLT_XPCSRM_RAM_FEC_STATS                                 = 2,    /**< FEC Stats. */
+    BCMOLT_XPCSRM_RAM_FEC_ENQUEUE                               = 3,    /**< FEC Enqueue. */
+    BCMOLT_XPCSRM_RAM_IDLE_INSERT                               = 4,    /**< Idle Insert. */
+    BCMOLT_XPCSRM_RAM__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_xpcsrm_ram;
+
+/** embedded image transfer status. 
+ */
+typedef enum bcmolt_embedded_image_transfer_status
+{
+    BCMOLT_EMBEDDED_IMAGE_TRANSFER_STATUS__BEGIN                = 0,
+    BCMOLT_EMBEDDED_IMAGE_TRANSFER_STATUS_NONE                  = 0,    /**< No file.  Transfer has never started for this entry. */
+    BCMOLT_EMBEDDED_IMAGE_TRANSFER_STATUS_IN_PROGRESS           = 1,    /**< Transfer has started and not finished. */
+    BCMOLT_EMBEDDED_IMAGE_TRANSFER_STATUS_SUCCESS               = 2,    /**< Transfer has finished successfully. */
+    BCMOLT_EMBEDDED_IMAGE_TRANSFER_STATUS_FAILURE               = 3,    /**< Transfer failed.  Typically due to CRC error. */
+    BCMOLT_EMBEDDED_IMAGE_TRANSFER_STATUS__NUM_OF                       /**< Number of enum entries, not an entry itself. */
+} bcmolt_embedded_image_transfer_status;
+
+/** EPON Encryption information format. 
+ */
+typedef enum bcmolt_epon_encryption_information_format
+{
+    BCMOLT_EPON_ENCRYPTION_INFORMATION_FORMAT__BEGIN            = 0,
+    BCMOLT_EPON_ENCRYPTION_INFORMATION_FORMAT_CFB               = 0,    /**< CFB. */
+    BCMOLT_EPON_ENCRYPTION_INFORMATION_FORMAT_CTR               = 1,    /**< CTR. */
+    BCMOLT_EPON_ENCRYPTION_INFORMATION_FORMAT__NUM_OF                   /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_encryption_information_format;
+
+/** energy detect source. 
+ */
+typedef enum bcmolt_energy_detect_source
+{
+    BCMOLT_ENERGY_DETECT_SOURCE__BEGIN                          = 0,
+    BCMOLT_ENERGY_DETECT_SOURCE_INTERNAL                        = 0,    /**< internal. */
+    BCMOLT_ENERGY_DETECT_SOURCE_TRX                             = 1,    /**< TRX. */
+    BCMOLT_ENERGY_DETECT_SOURCE_BCDR                            = 2,    /**< BCDR. */
+    BCMOLT_ENERGY_DETECT_SOURCE__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_energy_detect_source;
+
+/** EPON turbo mode.  Enables double downstream speed (2G) on 1G EPON NIs 
+ */
+typedef enum bcmolt_epon_1g_turbo_mode
+{
+    BCMOLT_EPON_1G_TURBO_MODE__BEGIN                            = 0,
+    BCMOLT_EPON_1G_TURBO_MODE_DISABLED                          = 0,    /**< Turbo mode is disabled - EPON NI has a dowstream data rate of 1G. */
+    BCMOLT_EPON_1G_TURBO_MODE_ENABLED                           = 1,    /**< Turbo mode is enabled - EPON NI has a dowstream data rate of 2G. */
+    BCMOLT_EPON_1G_TURBO_MODE__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_1g_turbo_mode;
+
+/** EPON Clock Transport Mode. 
+ */
+typedef enum bcmolt_epon_clock_transport_mode
+{
+    BCMOLT_EPON_CLOCK_TRANSPORT_MODE__BEGIN                     = 0,
+    BCMOLT_EPON_CLOCK_TRANSPORT_MODE_HOST_DRIVEN                = 0,    /**< At each pulse, the Maple will issue an indication to the host containing the equivalent MPCP time for this PON. */
+    BCMOLT_EPON_CLOCK_TRANSPORT_MODE_EMBEDDED_DRIVEN            = 1,    /**< At each pulse, the Maple will parse the ToD from the second UART (if available) and then format and send down an IEEE 802.1as clock transport time sync message to each user link. */
+    BCMOLT_EPON_CLOCK_TRANSPORT_MODE__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_clock_transport_mode;
+
+/** Control for how the DBA handles received MPCP report frames. 
+ */
+typedef enum bcmolt_epon_dba_reporting_mode
+{
+    BCMOLT_EPON_DBA_REPORTING_MODE__BEGIN                       = 0,
+    BCMOLT_EPON_DBA_REPORTING_MODE_SIEPON_A                     = 0,    /**< Handle reports as specified by SIEPON package A. */
+    BCMOLT_EPON_DBA_REPORTING_MODE_SIEPON_B                     = 1,    /**< Handle reports as specified by SIEPON package B. */
+    BCMOLT_EPON_DBA_REPORTING_MODE_SIEPON_C                     = 2,    /**< Handle reports as specified by SIEPON package C */
+    BCMOLT_EPON_DBA_REPORTING_MODE__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_dba_reporting_mode;
+
+/** EPON link rate. 
+ */
+typedef enum bcmolt_epon_link_rate
+{
+    BCMOLT_EPON_LINK_RATE__BEGIN                                = 0,
+    BCMOLT_EPON_LINK_RATE_TEN_TEN                               = 0,    /**< Ten_Ten. */
+    BCMOLT_EPON_LINK_RATE_TEN_ONE                               = 1,    /**< Ten_One. */
+    BCMOLT_EPON_LINK_RATE_ONE_ONE                               = 2,    /**< One_One. */
+    BCMOLT_EPON_LINK_RATE__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_link_rate;
+
+/** Status. 
+ */
+typedef enum bcmolt_status
+{
+    BCMOLT_STATUS__BEGIN                                        = 0,
+    BCMOLT_STATUS_OFF                                           = 0,    /**< Status is off. */
+    BCMOLT_STATUS_ON                                            = 1,    /**< Status is on. */
+    BCMOLT_STATUS_NO_CHANGE                                     = 2,    /**< Status should not be changed (valid for SET API calls only). */
+    BCMOLT_STATUS__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_status;
+
+/** EPON encryption mode. 
+ */
+typedef enum bcmolt_epon_encryption_mode
+{
+    BCMOLT_EPON_ENCRYPTION_MODE__BEGIN                          = 0,
+    BCMOLT_EPON_ENCRYPTION_MODE_NO_ENCRYPTION                   = 0,    /**< No encryption of any kind. */
+    BCMOLT_EPON_ENCRYPTION_MODE_EPON_TRIPLE_CHURNING            = 1,    /**< EPON triple-churning mode per CTC specification.  */
+    BCMOLT_EPON_ENCRYPTION_MODE_EPON_ZERO_OVERHEAD_AES          = 2,    /**< EPON zero-overhead AES mode. */
+    BCMOLT_EPON_ENCRYPTION_MODE__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_encryption_mode;
+
+/** Epon Key Choice. 
+ */
+typedef enum bcmolt_epon_key_choice
+{
+    BCMOLT_EPON_KEY_CHOICE__BEGIN                               = 0,
+    BCMOLT_EPON_KEY_CHOICE_KEY_0                                = 0,    /**< Key 0. */
+    BCMOLT_EPON_KEY_CHOICE_KEY_1                                = 1,    /**< Key 1. */
+    BCMOLT_EPON_KEY_CHOICE__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_key_choice;
+
+/** EPON Encryption Direction. 
+ */
+typedef enum bcmolt_epon_encryption_direction
+{
+    BCMOLT_EPON_ENCRYPTION_DIRECTION__BEGIN                     = 0,
+    BCMOLT_EPON_ENCRYPTION_DIRECTION_DOWNSTREAM_ONLY            = 0,    /**< Encrypt downstream traffic only. */
+    BCMOLT_EPON_ENCRYPTION_DIRECTION__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_encryption_direction;
+
+/** EPON FEC enable state.  See flag descriptions for restrictions. 
+ */
+typedef enum bcmolt_epon_fec_en_state
+{
+    BCMOLT_EPON_FEC_EN_STATE__BEGIN                             = 0,
+    BCMOLT_EPON_FEC_EN_STATE_DISABLED                           = 0,    /**< FEC is disabled. */
+    BCMOLT_EPON_FEC_EN_STATE_ENABLED                            = 1,    /**< FEC is enabled.   Note: FEC can only be enabled and disabled PON-wide for 10G paths, but can be enabled and disabled with logical link granularity for 1G paths. */
+    BCMOLT_EPON_FEC_EN_STATE__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_fec_en_state;
+
+/** The types of OAM to choose from. 
+ */
+typedef enum bcmolt_epon_oam_type
+{
+    BCMOLT_EPON_OAM_TYPE__BEGIN                                 = 0,
+    BCMOLT_EPON_OAM_TYPE_BROADCOM                               = 0,    /**< Broadcom OAM (formerly TEK). */
+    BCMOLT_EPON_OAM_TYPE_CTC                                    = 1,    /**< CTC OAM. */
+    BCMOLT_EPON_OAM_TYPE_DPOE                                   = 2,    /**< DPoE OAM */
+    BCMOLT_EPON_OAM_TYPE_SIEPONA                                = 3,    /**< SiEPON OAM. (Mostly similar to DPoE). */
+    BCMOLT_EPON_OAM_TYPE__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_oam_type;
+
+/** epon link fec state. 
+ */
+typedef enum bcmolt_epon_link_fec_state
+{
+    BCMOLT_EPON_LINK_FEC_STATE__BEGIN                           = 0,
+    BCMOLT_EPON_LINK_FEC_STATE_DISABLED                         = 0,    /**< Disabled. */
+    BCMOLT_EPON_LINK_FEC_STATE_ENABLED                          = 1,    /**< Enabled. */
+    BCMOLT_EPON_LINK_FEC_STATE_USE_DEFAULT                      = 2,    /**< Use defaults. */
+    BCMOLT_EPON_LINK_FEC_STATE__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_link_fec_state;
+
+/** The current registration status of a link. 
+ */
+typedef enum bcmolt_epon_link_status
+{
+    BCMOLT_EPON_LINK_STATUS_NONE                                = 0,
+    BCMOLT_EPON_LINK_STATUS_DISCOVERED                          = 0x0001,   /**< Link has completed MPCP registration. */
+    BCMOLT_EPON_LINK_STATUS_REGISTRATION_PREVENTED              = 0x0008    /**< Link is being prevented from registering. */
+} bcmolt_epon_link_status;
+
+/** MPCP discovery info. 
+ */
+typedef enum bcmolt_mpcp_discovery_info
+{
+    BCMOLT_MPCP_DISCOVERY_INFO_NONE                             = 0,
+    BCMOLT_MPCP_DISCOVERY_INFO_ONE_G_CAPABLE                    = 0x0001,   /**< 1G Capable. */
+    BCMOLT_MPCP_DISCOVERY_INFO_TEN_G_CAPABLE                    = 0x0002,   /**< 10G Capable. */
+    BCMOLT_MPCP_DISCOVERY_INFO_ONE_G_WINDOW                     = 0x0010,   /**< 1G window. */
+    BCMOLT_MPCP_DISCOVERY_INFO_TEN_G_WINDOW                     = 0x0020    /**< 10G window. */
+} bcmolt_mpcp_discovery_info;
+
+/** EPON link state flags reflect the current status of the link.  
+ */
+typedef enum bcmolt_epon_link_state_flags
+{
+    BCMOLT_EPON_LINK_STATE_FLAGS_NONE                           = 0,
+    BCMOLT_EPON_LINK_STATE_FLAGS_MPCP_REGISTRATION_COMPLETE     = 0x0001    /**< Link has completed MPCP registration. */
+} bcmolt_epon_link_state_flags;
+
+/** EPON Link Type. 
+ */
+typedef enum bcmolt_epon_link_type
+{
+    BCMOLT_EPON_LINK_TYPE__BEGIN                                = 0,
+    BCMOLT_EPON_LINK_TYPE_SYSTEM                                = 0,        /**< A Link automatically created for system usage. */
+    BCMOLT_EPON_LINK_TYPE_DOWNSTREAM_ONLY                       = 1,        /**< A Link that does not consume upstream bandwidth. */
+    BCMOLT_EPON_LINK_TYPE_BIDIRECTIONAL                         = 2,        /**< A Link that undergoes the MPCP registration process. */
+    BCMOLT_EPON_LINK_TYPE__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_link_type;
+
+/** MPCP gate mode. 
+ */
+typedef enum bcmolt_mpcp_gate_mode
+{
+    BCMOLT_MPCP_GATE_MODE__BEGIN                                = 0,
+    BCMOLT_MPCP_GATE_MODE_TEKNOVUS                              = 0,    /**< Teknovus MPCP registration mode. */
+    BCMOLT_MPCP_GATE_MODE_CUSTOM                                = 1,    /**< Non-Teknovus MPCP registration mode. */
+    BCMOLT_MPCP_GATE_MODE__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_mpcp_gate_mode;
+
+/** MPCP registration gate flags. 
+ */
+typedef enum bcmolt_mpcp_registration_gate_flags
+{
+    BCMOLT_MPCP_REGISTRATION_GATE_FLAGS_NONE                    = 0,
+    BCMOLT_MPCP_REGISTRATION_GATE_FLAGS_FORCE_REPORT            = 0x0001    /**< Force report bit. */
+} bcmolt_mpcp_registration_gate_flags;
+
+/** Enable state of the EPON NI.  Initially the only enable states defined are 
+ * `disabled' and `enabled', but this may later be extended to include 
+ * different degrees of enablement. 
+ */
+typedef enum bcmolt_epon_ni_en_state
+{
+    BCMOLT_EPON_NI_EN_STATE__BEGIN                              = 0,
+    BCMOLT_EPON_NI_EN_STATE_DISABLED                            = 0,        /**< EPON NI is fully disabled. */
+    BCMOLT_EPON_NI_EN_STATE_ENABLED                             = 1,        /**< EPON NI is fully enabled. */
+    BCMOLT_EPON_NI_EN_STATE_PROTECTED_WORKING                   = 2,        /**< EPON NI is fully enabled. redundant and activily carrying traffic. */
+    BCMOLT_EPON_NI_EN_STATE_PROTECTED_STANDBY                   = 3,        /**< EPON NI is fully enabled. redundant and protecting another PON. */
+    BCMOLT_EPON_NI_EN_STATE_PROCESSING                          = 4,        /**< EPON NI is currently transitioning between states */
+    BCMOLT_EPON_NI_EN_STATE__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_ni_en_state;
+
+/** EPON OAM Extension Type. 
+ */
+typedef enum bcmolt_epon_oam_extension_type
+{
+    BCMOLT_EPON_OAM_EXTENSION_TYPE__BEGIN                       = 0,
+    BCMOLT_EPON_OAM_EXTENSION_TYPE_RESERVED                     = 0,    /**< Reserved */
+    BCMOLT_EPON_OAM_EXTENSION_TYPE_BROADCOM                     = 1,    /**< Broadcom */
+    BCMOLT_EPON_OAM_EXTENSION_TYPE_CTC                          = 2,    /**< China Telecom */
+    BCMOLT_EPON_OAM_EXTENSION_TYPE_DASAN                        = 3,    /**< Dasan Networks */
+    BCMOLT_EPON_OAM_EXTENSION_TYPE_KT                           = 4,    /**< Korea Telecom */
+    BCMOLT_EPON_OAM_EXTENSION_TYPE_DPOE                         = 5,    /**< DPoE */
+    BCMOLT_EPON_OAM_EXTENSION_TYPE__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_oam_extension_type;
+
+/** 1 to 11 matche the DPoE response code.  Refer to DPoE-SP-OAMv1.0-I08-140807, 
+ * Cl. 12.1.3. 21 to 28 are used for CTC. 
+ */
+typedef enum bcmolt_epon_onu_upgrade_onu_response_code
+{
+    BCMOLT_EPON_ONU_UPGRADE_ONU_RESPONSE_CODE_OK                    = 0,    /**< No errors. */
+    BCMOLT_EPON_ONU_UPGRADE_ONU_RESPONSE_CODE_UNDEFINED             = 1,    /**< Unknown error, or one not covered elsewhere. */
+    BCMOLT_EPON_ONU_UPGRADE_ONU_RESPONSE_CODE_NOT_FOUND             = 2,    /**< Read requested file that is not available. */
+    BCMOLT_EPON_ONU_UPGRADE_ONU_RESPONSE_CODE_NO_ACCESS             = 3,    /**< Access permissions do not allow the requested read/write. */
+    BCMOLT_EPON_ONU_UPGRADE_ONU_RESPONSE_CODE_FULL                  = 4,    /**< Storage is full, and cannot hold the written file. */
+    BCMOLT_EPON_ONU_UPGRADE_ONU_RESPONSE_CODE_ILLEGAL_OPERATION     = 5,    /**< Cannot perform requested operation in current state. */
+    BCMOLT_EPON_ONU_UPGRADE_ONU_RESPONSE_CODE_UNKNOWN_ID            = 6,    /**< Requested file ID is not supported by this device. */
+    BCMOLT_EPON_ONU_UPGRADE_ONU_RESPONSE_CODE_BAD_BLOCK             = 7,    /**< Block received in error. */
+    BCMOLT_EPON_ONU_UPGRADE_ONU_RESPONSE_CODE_TIMEOUT               = 8,    /**< No block received before timer expiration. */
+    BCMOLT_EPON_ONU_UPGRADE_ONU_RESPONSE_CODE_BUSY                  = 9,    /**< Cannot perform requested action due to other activity. */
+    BCMOLT_EPON_ONU_UPGRADE_ONU_RESPONSE_CODE_INCOMPATIBLE_FILE     = 10,   /**< Received file is incompatible with this device. File incompatibility is determined by the device vendor. */
+    BCMOLT_EPON_ONU_UPGRADE_ONU_RESPONSE_CODE_CORRUPTED_FILE        = 11,   /**< File was received corrupted and is unusable by this device. File integrity is determined by the device vendor. */
+    BCMOLT_EPON_ONU_UPGRADE_ONU_RESPONSE_CODE_ERROR_NOT_DEFINED     = 21,   /**< ONU returned ERROR PDU: Undefined error code. */
+    BCMOLT_EPON_ONU_UPGRADE_ONU_RESPONSE_CODE_ERROR_ALLOC_EXCEEDED  = 22,   /**< ONU returned ERROR PDU: Disk full or allocation exceeded. */
+    BCMOLT_EPON_ONU_UPGRADE_ONU_RESPONSE_CODE_ERROR_ILLEGAL_OP      = 23,   /**< ONU returned ERROR PDU: Illegal TFTP operation. */
+    BCMOLT_EPON_ONU_UPGRADE_ONU_RESPONSE_CODE_ERROR_FILE_EXISTS     = 24,   /**< ONU returned ERROR PDU: Mirror file already exists. */
+    BCMOLT_EPON_ONU_UPGRADE_ONU_RESPONSE_CODE_END_WRITING_NVS       = 25,   /**< ONU returned END RESPONSE PDU with error: Writing file to NVS */
+    BCMOLT_EPON_ONU_UPGRADE_ONU_RESPONSE_CODE_END_CRC_ERROR         = 26,   /**< ONU returned END RESPONSE PDU with error: CRC32 error */
+    BCMOLT_EPON_ONU_UPGRADE_ONU_RESPONSE_CODE_END_PARAM_ERROR       = 27,   /**< ONU returned END RESPONSE PDU with error: Parameter error */
+    BCMOLT_EPON_ONU_UPGRADE_ONU_RESPONSE_CODE_END_CMD_UNSUPPORTED   = 28,   /**< ONU returned END RESPONSE PDU with error: Command not supported */
+    BCMOLT_EPON_ONU_UPGRADE_ONU_RESPONSE_CODE_LAST                  = 29    /**< Last. */
+} bcmolt_epon_onu_upgrade_onu_response_code;
+
+/** EPON ONU Upgrade Return Code. 
+ */
+typedef enum bcmolt_epon_onu_upgrade_return_code
+{
+    BCMOLT_EPON_ONU_UPGRADE_RETURN_CODE__BEGIN                      = 0,
+    BCMOLT_EPON_ONU_UPGRADE_RETURN_CODE_SUCCESS                     = 0,    /**< Command succeeded. */
+    BCMOLT_EPON_ONU_UPGRADE_RETURN_CODE_ONU_RESPONSE_TIMEOUT        = 1,    /**< ONU did not respond to a message within the time specified by the "Write request timeout". */
+    BCMOLT_EPON_ONU_UPGRADE_RETURN_CODE_ONU_ERROR_RESPONSE          = 2,    /**< Error found in the ONU response. */
+    BCMOLT_EPON_ONU_UPGRADE_RETURN_CODE_SYNC_ERROR                  = 3,    /**< Block number sync error. */
+    BCMOLT_EPON_ONU_UPGRADE_RETURN_CODE_COMMIT_FAILED               = 4,    /**< Commit software command failed. */
+    BCMOLT_EPON_ONU_UPGRADE_RETURN_CODE_INTERNAL                    = 5,    /**< Internal error. */
+    BCMOLT_EPON_ONU_UPGRADE_RETURN_CODE_PARSE_ERROR                 = 6,    /**< Unable to parse the ONU response. */
+    BCMOLT_EPON_ONU_UPGRADE_RETURN_CODE__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_onu_upgrade_return_code;
+
+/** Indicates whether links are unprotected, protected standby, or protected 
+ * working. 
+ */
+typedef enum bcmolt_epon_protection_state
+{
+    BCMOLT_EPON_PROTECTION_STATE__BEGIN                             = 0,
+    BCMOLT_EPON_PROTECTION_STATE_UNPROTECTED                        = 0,    /**< The link is not a member of a protection pair. */
+    BCMOLT_EPON_PROTECTION_STATE_PROTECTED_STANDBY                  = 1,    /**< The link is a member of a protection pair in the standby role. */
+    BCMOLT_EPON_PROTECTION_STATE_PROTECTED_WORKING                  = 2,    /**< The link is a member of a protection pair in the working role. */
+    BCMOLT_EPON_PROTECTION_STATE__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_protection_state;
+
+/** EPON Protection Switching Type. 
+ */
+typedef enum bcmolt_epon_protection_switching_type
+{
+    BCMOLT_EPON_PROTECTION_SWITCHING_TYPE__BEGIN                        = 0,
+    BCMOLT_EPON_PROTECTION_SWITCHING_TYPE_NO_PROTECTION_SWTICHING       = 0,    /**< No protection swtiching. */
+    BCMOLT_EPON_PROTECTION_SWITCHING_TYPE_LINE_CARD_PROTECTION_SWITCHING= 1,    /**< Line card protection switching. */
+    BCMOLT_EPON_PROTECTION_SWITCHING_TYPE__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_protection_switching_type;
+
+/** Protection Switching Detection Options. 
+ */
+typedef enum bcmolt_protection_switching_detection_options
+{
+    BCMOLT_PROTECTION_SWITCHING_DETECTION_OPTIONS_NONE                  = 0,
+    BCMOLT_PROTECTION_SWITCHING_DETECTION_OPTIONS_STANDBY_LOS_DETECTION = 0x0001            /**< Standby LOS detection. */
+} bcmolt_protection_switching_detection_options;
+
+/** Criteria for logical link selection during re-ranging process 
+ */
+typedef enum bcmolt_epon_protection_switching_reranging_options
+{
+    BCMOLT_EPON_PROTECTION_SWITCHING_RERANGING_OPTIONS_RERANGE_NONE                 = 1,    /**< No re-ranging at all */
+    BCMOLT_EPON_PROTECTION_SWITCHING_RERANGING_OPTIONS_RERANGE_SINGLE_LOGICAL_LINK  = 2,    /**< Pick minimum logical links to re-range */
+    BCMOLT_EPON_PROTECTION_SWITCHING_RERANGING_OPTIONS_RERANGE_ALL_LOGICAL_LINKS    = 4     /**< Individually re-range all logical links */
+} bcmolt_epon_protection_switching_reranging_options;
+
+/** GPIO pin number. 
+ */
+typedef enum bcmolt_gpio_pin
+{
+    BCMOLT_GPIO_PIN_PIN0                                                            = 0,    /**< GPIO pin 0. */
+    BCMOLT_GPIO_PIN_PIN1                                                            = 1,    /**< GPIO pin 1. */
+    BCMOLT_GPIO_PIN_PIN2                                                            = 2,    /**< GPIO pin 2. */
+    BCMOLT_GPIO_PIN_PIN3                                                            = 3,    /**< GPIO pin 3. */
+    BCMOLT_GPIO_PIN_PIN4                                                            = 4,    /**< GPIO pin 4. */
+    BCMOLT_GPIO_PIN_PIN5                                                            = 5,    /**< GPIO pin 5. */
+    BCMOLT_GPIO_PIN_PIN6                                                            = 6,    /**< GPIO pin 6. */
+    BCMOLT_GPIO_PIN_PIN7                                                            = 7,    /**< GPIO pin 7. */
+    BCMOLT_GPIO_PIN_PIN8                                                            = 8,    /**< GPIO pin 8. */
+    BCMOLT_GPIO_PIN_PIN9                                                            = 9,    /**< GPIO pin 9. */
+    BCMOLT_GPIO_PIN_PIN10                                                           = 10,   /**< GPIO pin 10. */
+    BCMOLT_GPIO_PIN_PIN11                                                           = 11,   /**< GPIO pin 11. */
+    BCMOLT_GPIO_PIN_PIN12                                                           = 12,   /**< GPIO pin 12. */
+    BCMOLT_GPIO_PIN_PIN13                                                           = 13,   /**< GPIO pin 13. */
+    BCMOLT_GPIO_PIN_PIN14                                                           = 14,   /**< GPIO pin 14. */
+    BCMOLT_GPIO_PIN_PIN15                                                           = 15,   /**< GPIO pin 15. */
+    BCMOLT_GPIO_PIN_PIN16                                                           = 16,   /**< GPIO pin 16. */
+    BCMOLT_GPIO_PIN_PIN17                                                           = 17,   /**< GPIO pin 17. */
+    BCMOLT_GPIO_PIN_PIN18                                                           = 18,   /**< GPIO pin 18. */
+    BCMOLT_GPIO_PIN_PIN19                                                           = 19,   /**< GPIO pin 19. */
+    BCMOLT_GPIO_PIN_PIN20                                                           = 20,   /**< GPIO pin 20. */
+    BCMOLT_GPIO_PIN_PIN21                                                           = 21,   /**< GPIO pin 21. */
+    BCMOLT_GPIO_PIN_PIN22                                                           = 22,   /**< GPIO pin 22. */
+    BCMOLT_GPIO_PIN_PIN23                                                           = 23,   /**< GPIO pin 23. */
+    BCMOLT_GPIO_PIN_PIN24                                                           = 24,   /**< GPIO pin 24. */
+    BCMOLT_GPIO_PIN_PIN25                                                           = 25,   /**< GPIO pin 25. */
+    BCMOLT_GPIO_PIN_PIN26                                                           = 26,   /**< GPIO pin 26. */
+    BCMOLT_GPIO_PIN_PIN27                                                           = 27,   /**< GPIO pin 27. */
+    BCMOLT_GPIO_PIN_PIN28                                                           = 28,   /**< GPIO pin 28. */
+    BCMOLT_GPIO_PIN_PIN29                                                           = 29,   /**< GPIO pin 29. */
+    BCMOLT_GPIO_PIN_PIN30                                                           = 30,   /**< GPIO pin 30. */
+    BCMOLT_GPIO_PIN_PIN31                                                           = 31,   /**< GPIO pin 31. */
+    BCMOLT_GPIO_PIN_PIN32                                                           = 32,   /**< GPIO pin 32. */
+    BCMOLT_GPIO_PIN_PIN33                                                           = 33,   /**< GPIO pin 33. */
+    BCMOLT_GPIO_PIN_PIN34                                                           = 34,   /**< GPIO pin 34. */
+    BCMOLT_GPIO_PIN_PIN35                                                           = 35,   /**< GPIO pin 35. */
+    BCMOLT_GPIO_PIN_PIN36                                                           = 36,   /**< GPIO pin 36. */
+    BCMOLT_GPIO_PIN_PIN37                                                           = 37,   /**< GPIO pin 37. */
+    BCMOLT_GPIO_PIN_PIN38                                                           = 38,   /**< GPIO pin 38. */
+    BCMOLT_GPIO_PIN_PIN39                                                           = 39,   /**< GPIO pin 39. */
+    BCMOLT_GPIO_PIN_PIN40                                                           = 40,   /**< GPIO pin 40. */
+    BCMOLT_GPIO_PIN_PIN41                                                           = 41,   /**< GPIO pin 41. */
+    BCMOLT_GPIO_PIN_PIN42                                                           = 42,   /**< GPIO pin 42. */
+    BCMOLT_GPIO_PIN_PIN43                                                           = 43,   /**< GPIO pin 43. */
+    BCMOLT_GPIO_PIN_PIN44                                                           = 44,   /**< GPIO pin 44. */
+    BCMOLT_GPIO_PIN_PIN45                                                           = 45,   /**< GPIO pin 45. */
+    BCMOLT_GPIO_PIN_PIN46                                                           = 46,   /**< GPIO pin 46. */
+    BCMOLT_GPIO_PIN_PIN47                                                           = 47,   /**< GPIO pin 47. */
+    BCMOLT_GPIO_PIN_PIN48                                                           = 48,   /**< GPIO pin 48. */
+    BCMOLT_GPIO_PIN_PIN49                                                           = 49,   /**< GPIO pin 49. */
+    BCMOLT_GPIO_PIN_PIN50                                                           = 50,   /**< GPIO pin 50. */
+    BCMOLT_GPIO_PIN_PIN51                                                           = 51,   /**< GPIO pin 51. */
+    BCMOLT_GPIO_PIN_PIN52                                                           = 52,   /**< GPIO pin 52. */
+    BCMOLT_GPIO_PIN_PIN53                                                           = 53,   /**< GPIO pin 53. */
+    BCMOLT_GPIO_PIN_PIN54                                                           = 54,   /**< GPIO pin 54. */
+    BCMOLT_GPIO_PIN_PIN55                                                           = 55,   /**< GPIO pin 55. */
+    BCMOLT_GPIO_PIN_PIN56                                                           = 56,   /**< GPIO pin 56. */
+    BCMOLT_GPIO_PIN_PIN57                                                           = 57,   /**< GPIO pin 57. */
+    BCMOLT_GPIO_PIN_PIN58                                                           = 58,   /**< GPIO pin 58. */
+    BCMOLT_GPIO_PIN_PIN59                                                           = 59,   /**< GPIO pin 59. */
+    BCMOLT_GPIO_PIN_PIN60                                                           = 60,   /**< GPIO pin 60. */
+    BCMOLT_GPIO_PIN_PIN61                                                           = 61,   /**< GPIO pin 61. */
+    BCMOLT_GPIO_PIN_PIN62                                                           = 62,   /**< GPIO pin 62. */
+    BCMOLT_GPIO_PIN_PIN63                                                           = 63,   /**< GPIO pin 63. */
+    BCMOLT_GPIO_PIN_PIN64                                                           = 64,   /**< GPIO pin 64. */
+    BCMOLT_GPIO_PIN_PIN65                                                           = 65,   /**< GPIO pin 65. */
+    BCMOLT_GPIO_PIN_PIN66                                                           = 66,   /**< GPIO pin 66. */
+    BCMOLT_GPIO_PIN_PIN67                                                           = 67,   /**< GPIO pin 67. */
+    BCMOLT_GPIO_PIN_PIN68                                                           = 68,   /**< GPIO pin 68. */
+    BCMOLT_GPIO_PIN_PIN69                                                           = 69,   /**< GPIO pin 69. */
+    BCMOLT_GPIO_PIN_PIN70                                                           = 70,   /**< GPIO pin 70. */
+    BCMOLT_GPIO_PIN_PIN71                                                           = 71,   /**< GPIO pin 71. */
+    BCMOLT_GPIO_PIN_PIN72                                                           = 72,   /**< GPIO pin 72. */
+    BCMOLT_GPIO_PIN_PIN73                                                           = 73,   /**< GPIO pin 73. */
+    BCMOLT_GPIO_PIN_PIN74                                                           = 74,   /**< GPIO pin 74. */
+    BCMOLT_GPIO_PIN_PIN75                                                           = 75,   /**< GPIO pin 75. */
+    BCMOLT_GPIO_PIN_PIN76                                                           = 76,   /**< GPIO pin 76. */
+    BCMOLT_GPIO_PIN_PIN77                                                           = 77,   /**< GPIO pin 77. */
+    BCMOLT_GPIO_PIN_PIN78                                                           = 78,   /**< GPIO pin 78. */
+    BCMOLT_GPIO_PIN_PIN79                                                           = 79,   /**< GPIO pin 79. */
+    BCMOLT_GPIO_PIN_PIN80                                                           = 80,   /**< GPIO pin 80. */
+    BCMOLT_GPIO_PIN_PIN81                                                           = 81,   /**< GPIO pin 81. */
+    BCMOLT_GPIO_PIN_PIN82                                                           = 82,   /**< GPIO pin 82. */
+    BCMOLT_GPIO_PIN_PIN83                                                           = 83,   /**< GPIO pin 83. */
+    BCMOLT_GPIO_PIN_PIN84                                                           = 84,   /**< GPIO pin 84. */
+    BCMOLT_GPIO_PIN_PIN85                                                           = 85,   /**< GPIO pin 85. */
+    BCMOLT_GPIO_PIN_PIN86                                                           = 86,   /**< GPIO pin 86. */
+    BCMOLT_GPIO_PIN_PIN87                                                           = 87,   /**< GPIO pin 87. */
+    BCMOLT_GPIO_PIN_PIN88                                                           = 88,   /**< GPIO pin 88. */
+    BCMOLT_GPIO_PIN_PIN89                                                           = 89,   /**< GPIO pin 89. */
+    BCMOLT_GPIO_PIN_PIN90                                                           = 90,   /**< GPIO pin 90. */
+    BCMOLT_GPIO_PIN_PIN91                                                           = 91,   /**< GPIO pin 91. */
+    BCMOLT_GPIO_PIN_PIN92                                                           = 92,   /**< GPIO pin 92. */
+    BCMOLT_GPIO_PIN_PIN93                                                           = 93,   /**< GPIO pin 93. */
+    BCMOLT_GPIO_PIN_PIN94                                                           = 94,   /**< GPIO pin 94. */
+    BCMOLT_GPIO_PIN_PIN95                                                           = 95,   /**< GPIO pin 95. */
+    BCMOLT_GPIO_PIN_PIN96                                                           = 96,   /**< GPIO pin 96. */
+    BCMOLT_GPIO_PIN_PIN97                                                           = 97,   /**< GPIO pin 97. */
+    BCMOLT_GPIO_PIN_PIN98                                                           = 98,   /**< GPIO pin 98. */
+    BCMOLT_GPIO_PIN_PIN99                                                           = 99,   /**< GPIO pin 99. */
+    BCMOLT_GPIO_PIN_PIN100                                                          = 100,  /**< GPIO pin 100. */
+    BCMOLT_GPIO_PIN_PIN101                                                          = 101,  /**< GPIO pin 101. */
+    BCMOLT_GPIO_PIN_PIN102                                                          = 102,  /**< GPIO pin 102. */
+    BCMOLT_GPIO_PIN_PIN103                                                          = 103,  /**< GPIO pin 103. */
+    BCMOLT_GPIO_PIN_PIN104                                                          = 104,  /**< GPIO pin 104. */
+    BCMOLT_GPIO_PIN_PIN105                                                          = 105,  /**< GPIO pin 105. */
+    BCMOLT_GPIO_PIN_PIN106                                                          = 106,  /**< GPIO pin 106. */
+    BCMOLT_GPIO_PIN_UNCONFIGURED                                                    = 255   /**< Unconfigured GPIO pin. */
+} bcmolt_gpio_pin;
+
+/** GPIO Polarity. 
+ */
+typedef enum bcmolt_gpio_polarity
+{
+    BCMOLT_GPIO_POLARITY__BEGIN                                                     = 0,
+    BCMOLT_GPIO_POLARITY_ACTIVE_LOW                                                 = 0,    /**< Active Low. */
+    BCMOLT_GPIO_POLARITY_ACTIVE_HIGH                                                = 1,    /**< Active High. */
+    BCMOLT_GPIO_POLARITY__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpio_polarity;
+
+/** External IRQ. 
+ */
+typedef enum bcmolt_ext_irq
+{
+    BCMOLT_EXT_IRQ_EXT_IRQ0                                                         = 0,    /**< External IRQ 0. */
+    BCMOLT_EXT_IRQ_EXT_IRQ1                                                         = 1,    /**< External IRQ 1. */
+    BCMOLT_EXT_IRQ_EXT_IRQ2                                                         = 2,    /**< External IRQ 2. */
+    BCMOLT_EXT_IRQ_EXT_IRQ3                                                         = 3,    /**< External IRQ 3. */
+    BCMOLT_EXT_IRQ_EXT_IRQ4                                                         = 4,    /**< External IRQ 4. */
+    BCMOLT_EXT_IRQ_EXT_IRQ5                                                         = 5,    /**< External IRQ 5. */
+    BCMOLT_EXT_IRQ_UNCONFIGURED                                                     = 255   /**< Unconfigured external IRQ. */
+} bcmolt_ext_irq;
+
+/** Flush MAC table option. 
+ */
+typedef enum bcmolt_flush_mac_table_option
+{
+    BCMOLT_FLUSH_MAC_TABLE_OPTION__BEGIN                                            = 0,
+    BCMOLT_FLUSH_MAC_TABLE_OPTION_ALL                                               = 0,    /**< All. */
+    BCMOLT_FLUSH_MAC_TABLE_OPTION_PER_VID                                           = 1,    /**< PER VID. */
+    BCMOLT_FLUSH_MAC_TABLE_OPTION_PER_FLOW                                          = 2,    /**< PER flow. */
+    BCMOLT_FLUSH_MAC_TABLE_OPTION_VID_PLUS_FLOW                                     = 3,    /**< VID+flow. */
+    BCMOLT_FLUSH_MAC_TABLE_OPTION__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_flush_mac_table_option;
+
+/** Frequency adjustment direction 
+ */
+typedef enum bcmolt_frequency_adjustment_direction
+{
+    BCMOLT_FREQUENCY_ADJUSTMENT_DIRECTION__BEGIN                                    = 0,
+    BCMOLT_FREQUENCY_ADJUSTMENT_DIRECTION_LOWER                                     = 0,    /**< Lower */
+    BCMOLT_FREQUENCY_ADJUSTMENT_DIRECTION_HIGHER                                    = 1,    /**< Higher */
+    BCMOLT_FREQUENCY_ADJUSTMENT_DIRECTION__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_frequency_adjustment_direction;
+
+/** GEM port ID direction. 
+ */
+typedef enum bcmolt_gem_port_direction
+{
+    BCMOLT_GEM_PORT_DIRECTION__BEGIN                                                = 0,
+    BCMOLT_GEM_PORT_DIRECTION_DOWNSTREAM                                            = 0,    /**< downstream port ID. */
+    BCMOLT_GEM_PORT_DIRECTION_UPSTREAM                                              = 1,    /**< upstream port ID. */
+    BCMOLT_GEM_PORT_DIRECTION_BIDIRECTIONAL                                         = 2,    /**< bidirectional port  ID. */
+    BCMOLT_GEM_PORT_DIRECTION__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_gem_port_direction;
+
+/** GEM port type. 
+ */
+typedef enum bcmolt_gem_port_type
+{
+    BCMOLT_GEM_PORT_TYPE__BEGIN                                                     = 0,
+    BCMOLT_GEM_PORT_TYPE_UNICAST                                                    = 0,    /**< unicast port ID. */
+    BCMOLT_GEM_PORT_TYPE_MULTICAST                                                  = 1,    /**< multicast port ID. */
+    BCMOLT_GEM_PORT_TYPE__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_gem_port_type;
+
+/** GEM port operation. 
+ */
+typedef enum bcmolt_gem_port_operation
+{
+    BCMOLT_GEM_PORT_OPERATION__BEGIN                                                = 0,
+    BCMOLT_GEM_PORT_OPERATION_ACTIVATE                                              = 0,    /**< Activate. */
+    BCMOLT_GEM_PORT_OPERATION_DEACTIVATE                                            = 1,    /**< Deactivate. */
+    BCMOLT_GEM_PORT_OPERATION__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_gem_port_operation;
+
+/** GPIO PIN Direction. 
+ */
+typedef enum bcmolt_gpio_pin_dir
+{
+    BCMOLT_GPIO_PIN_DIR__BEGIN                                                      = 0,
+    BCMOLT_GPIO_PIN_DIR_INPUT                                                       = 0,    /**< Input. */
+    BCMOLT_GPIO_PIN_DIR_OUTPUT                                                      = 1,    /**< Output. */
+    BCMOLT_GPIO_PIN_DIR__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpio_pin_dir;
+
+/** GPIO Value. 
+ */
+typedef enum bcmolt_gpio_value
+{
+    BCMOLT_GPIO_VALUE__BEGIN                                                        = 0,
+    BCMOLT_GPIO_VALUE_CLEAR                                                         = 0,    /**< Clear. */
+    BCMOLT_GPIO_VALUE_SET                                                           = 1,    /**< Set. */
+    BCMOLT_GPIO_VALUE__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpio_value;
+
+/** GPON GEM Port State. 
+ */
+typedef enum bcmolt_gpon_gem_port_state
+{
+    BCMOLT_GPON_GEM_PORT_STATE__BEGIN                                               = 0,
+    BCMOLT_GPON_GEM_PORT_STATE_NOT_CONFIGURED                                       = 0,    /**< not configured. */
+    BCMOLT_GPON_GEM_PORT_STATE_INACTIVE                                             = 1,    /**< inactive. */
+    BCMOLT_GPON_GEM_PORT_STATE_PROCESSING                                           = 2,    /**< processing. */
+    BCMOLT_GPON_GEM_PORT_STATE_ACTIVE                                               = 3,    /**< active. */
+    BCMOLT_GPON_GEM_PORT_STATE__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_gem_port_state;
+
+/** Key exchange mode. 
+ */
+typedef enum bcmolt_key_exchange_mode
+{
+    BCMOLT_KEY_EXCHANGE_MODE__BEGIN                                                 = 0,
+    BCMOLT_KEY_EXCHANGE_MODE_NORMAL                                                 = 0,    /**< Normal. */
+    BCMOLT_KEY_EXCHANGE_MODE_ENHANCED                                               = 1,    /**< Enhanced. */
+    BCMOLT_KEY_EXCHANGE_MODE__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_key_exchange_mode;
+
+/** OMCI Device ID. 
+ */
+typedef enum bcmolt_omci_device_id
+{
+    BCMOLT_OMCI_DEVICE_ID_BASELINE                                                  = 10,   /**< Baseline. */
+    BCMOLT_OMCI_DEVICE_ID_EXTENDED                                                  = 11    /**< Extended. */
+} bcmolt_omci_device_id;
+
+/** GPON ONU Upgrade Return Code. 
+ */
+typedef enum bcmolt_gpon_onu_upgrade_return_code
+{
+    BCMOLT_GPON_ONU_UPGRADE_RETURN_CODE__BEGIN                                      = 0,
+    BCMOLT_GPON_ONU_UPGRADE_RETURN_CODE_SUCCESS                                     = 0,    /**< Command succeeded. */
+    BCMOLT_GPON_ONU_UPGRADE_RETURN_CODE_ONU_RESPONSE_TIMEOUT                        = 1,    /**< ONU did not respond to a message within the time specified by the "Write request timeout". */
+    BCMOLT_GPON_ONU_UPGRADE_RETURN_CODE_ONU_ERROR_RESPONSE                          = 2,    /**< Error found in the ONU response. */
+    BCMOLT_GPON_ONU_UPGRADE_RETURN_CODE_TCI_MISMATCH                                = 3,    /**< Transaction ID mismatch. */
+    BCMOLT_GPON_ONU_UPGRADE_RETURN_CODE_GET_IMAGE_FAILED                            = 4,    /**< Get Image Info command failed. */
+    BCMOLT_GPON_ONU_UPGRADE_RETURN_CODE_ACTIVATION_FAILED                           = 5,    /**< Activation software command failed. */
+    BCMOLT_GPON_ONU_UPGRADE_RETURN_CODE_INTERNAL                                    = 6,    /**< Internal error. */
+    BCMOLT_GPON_ONU_UPGRADE_RETURN_CODE__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_upgrade_return_code;
+
+/** G.988 OMCI Result Code. 
+ */
+typedef enum bcmolt_omci_result_code
+{
+    BCMOLT_OMCI_RESULT_CODE__BEGIN                                                  = 0,
+    BCMOLT_OMCI_RESULT_CODE_NO_ERROR                                                = 0,    /**< Command processed successfully. */
+    BCMOLT_OMCI_RESULT_CODE_PROCESSING_ERROR                                        = 1,    /**< Command processing error. */
+    BCMOLT_OMCI_RESULT_CODE_NOT_SUPPORTED                                           = 2,    /**< Command not supported, or not applicable for End software download message. */
+    BCMOLT_OMCI_RESULT_CODE_PARAMETER_ERROR                                         = 3,    /**< Parameter error, or not applicable for End software download message. */
+    BCMOLT_OMCI_RESULT_CODE_UNKNOWN_ENTITY                                          = 4,    /**< Unknown managed entity. */
+    BCMOLT_OMCI_RESULT_CODE_UNKNOWN_INSTANCE                                        = 5,    /**< Unknown managed entity instance. */
+    BCMOLT_OMCI_RESULT_CODE_DEVICE_BUSY                                             = 6,    /**< Device busy. */
+    BCMOLT_OMCI_RESULT_CODE__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_omci_result_code;
+
+/** ONU state. 
+ */
+typedef enum bcmolt_onu_state
+{
+    BCMOLT_ONU_STATE_NOT_CONFIGURED                                                 = 0,    /**< not_configured. */
+    BCMOLT_ONU_STATE_INACTIVE                                                       = 1,    /**< inactive. */
+    BCMOLT_ONU_STATE_ACTIVE                                                         = 2,    /**< active. */
+    BCMOLT_ONU_STATE_ACTIVE_STANDBY                                                 = 3,    /**< active standby. */
+    BCMOLT_ONU_STATE_DISABLED                                                       = 4,    /**< disabled. */
+    BCMOLT_ONU_STATE_AWAKE_FREE                                                     = 5,    /**< ONU is active, but power management is enabled. ONU is allowed to enter low power states at its own discretion. */
+    BCMOLT_ONU_STATE_PROCESSING                                                     = 7,    /**< processing. */
+    BCMOLT_ONU_STATE_LOW_POWER_DOZE                                                 = 8,    /**< ONU has entered the Doze low power state. */
+    BCMOLT_ONU_STATE_LOW_POWER_SLEEP                                                = 9,    /**< ONU has entered the Sleep low power state. */
+    BCMOLT_ONU_STATE_LOW_POWER_WATCH                                                = 10,   /**< ONU has entered the Watchful Sleep low power state. */
+    BCMOLT_ONU_STATE_UNAWARE                                                        = 11    /**< ONU is added to data base but no bws is saved  */
+} bcmolt_onu_state;
+
+/** rssi location sign. 
+ */
+typedef enum bcmolt_rssi_location_sign
+{
+    BCMOLT_RSSI_LOCATION_SIGN__BEGIN                                                = 0,
+    BCMOLT_RSSI_LOCATION_SIGN_BEFORE                                                = 0,    /**< before. */
+    BCMOLT_RSSI_LOCATION_SIGN_AFTER                                                 = 1,    /**< after. */
+    BCMOLT_RSSI_LOCATION_SIGN__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_rssi_location_sign;
+
+/** ONU post discovery mode. 
+ */
+typedef enum bcmolt_onu_post_discovery_mode
+{
+    BCMOLT_ONU_POST_DISCOVERY_MODE__BEGIN                                           = 0,
+    BCMOLT_ONU_POST_DISCOVERY_MODE_NONE                                             = 0,    /**< none. */
+    BCMOLT_ONU_POST_DISCOVERY_MODE_ACTIVATE                                         = 1,    /**< activate. */
+    BCMOLT_ONU_POST_DISCOVERY_MODE_DISABLE                                          = 2,    /**< disable. */
+    BCMOLT_ONU_POST_DISCOVERY_MODE__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_onu_post_discovery_mode;
+
+/** Image transfer status. 
+ */
+typedef enum bcmolt_image_transfer_status
+{
+    BCMOLT_IMAGE_TRANSFER_STATUS__BEGIN                                             = 0,
+    BCMOLT_IMAGE_TRANSFER_STATUS_SUCCESS                                            = 0,    /**< Success. */
+    BCMOLT_IMAGE_TRANSFER_STATUS_MEMORY_ALLOCATION_FAILURE                          = 1,    /**< Memory allocation failure. */
+    BCMOLT_IMAGE_TRANSFER_STATUS_UNSUPPORTED_FILE_TYPE                              = 2,    /**< Unsupported file type. */
+    BCMOLT_IMAGE_TRANSFER_STATUS_CRC_ERROR                                          = 3,    /**< CRC checksum error. */
+    BCMOLT_IMAGE_TRANSFER_STATUS_BLOCK_OUT_OF_SYNC                                  = 4,    /**< Block out of sync. */
+    BCMOLT_IMAGE_TRANSFER_STATUS_INTERNAL_ERROR                                     = 5,    /**< Internal error. */
+    BCMOLT_IMAGE_TRANSFER_STATUS_INVALID_STATE                                      = 6,    /**< Invalid state. */
+    BCMOLT_IMAGE_TRANSFER_STATUS_PREMATURE_TERMINATION                              = 7,    /**< Premature termination. */
+    BCMOLT_IMAGE_TRANSFER_STATUS_ACK_TIMEOUT                                        = 8,    /**< ACK timeout. */
+    BCMOLT_IMAGE_TRANSFER_STATUS__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_image_transfer_status;
+
+/** iwf mode. 
+ */
+typedef enum bcmolt_iwf_mode
+{
+    BCMOLT_IWF_MODE__BEGIN                                                          = 0,
+    BCMOLT_IWF_MODE_DIRECT_MAPPING_MODE                                             = 0,    /**< DIRECT MAPPING MODE. */
+    BCMOLT_IWF_MODE_PER_FLOW_MODE                                                   = 1,    /**< PER FLOW MODE. */
+    BCMOLT_IWF_MODE__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_iwf_mode;
+
+/** log file id. 
+ */
+typedef enum bcmolt_log_file_id
+{
+    BCMOLT_LOG_FILE_ID__BEGIN                                                       = 0,
+    BCMOLT_LOG_FILE_ID_SRAM                                                         = 0,    /**< SRAM. */
+    BCMOLT_LOG_FILE_ID_DDR                                                          = 1,    /**< DDR. */
+    BCMOLT_LOG_FILE_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_log_file_id;
+
+/** log level. 
+ */
+typedef enum bcmolt_log_level
+{
+    BCMOLT_LOG_LEVEL__BEGIN                                                         = 0,
+    BCMOLT_LOG_LEVEL_NO_LOG                                                         = 0,    /**< no log. */
+    BCMOLT_LOG_LEVEL_FATAL                                                          = 1,    /**< fatal. */
+    BCMOLT_LOG_LEVEL_ERROR                                                          = 2,    /**< error. */
+    BCMOLT_LOG_LEVEL_WARNING                                                        = 3,    /**< warning. */
+    BCMOLT_LOG_LEVEL_INFO                                                           = 4,    /**< info. */
+    BCMOLT_LOG_LEVEL_DEBUG                                                          = 5,    /**< debug. */
+    BCMOLT_LOG_LEVEL__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_log_level;
+
+/** log style. 
+ */
+typedef enum bcmolt_log_style
+{
+    BCMOLT_LOG_STYLE__BEGIN                                                         = 0,
+    BCMOLT_LOG_STYLE_NORMAL                                                         = 0,    /**< normal. */
+    BCMOLT_LOG_STYLE_BOLD                                                           = 1,    /**< bold. */
+    BCMOLT_LOG_STYLE_UNDERLINE                                                      = 2,    /**< underline. */
+    BCMOLT_LOG_STYLE_BLINK                                                          = 3,    /**< blink. */
+    BCMOLT_LOG_STYLE_REVERSE_VIDEO                                                  = 4,    /**< reverse video. */
+    BCMOLT_LOG_STYLE__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_log_style;
+
+/** log type. 
+ */
+typedef enum bcmolt_log_type
+{
+    BCMOLT_LOG_TYPE__BEGIN                                                          = 0,
+    BCMOLT_LOG_TYPE_NONE                                                            = 0,    /**< dont show log  */
+    BCMOLT_LOG_TYPE_PRINT                                                           = 1,    /**< print. */
+    BCMOLT_LOG_TYPE_SAVE                                                            = 2,    /**< save. */
+    BCMOLT_LOG_TYPE_BOTH                                                            = 3,    /**< both. */
+    BCMOLT_LOG_TYPE__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_log_type;
+
+/** MAC table miss fallback. 
+ */
+typedef enum bcmolt_mac_table_miss_fallback
+{
+    BCMOLT_MAC_TABLE_MISS_FALLBACK__BEGIN                                           = 0,
+    BCMOLT_MAC_TABLE_MISS_FALLBACK_DROP                                             = 0,    /**< The packet is dropped. */
+    BCMOLT_MAC_TABLE_MISS_FALLBACK_DEFAULT_FLOW                                     = 1,    /**< The packet is forwarded with the provisioned default flow ID. */
+    BCMOLT_MAC_TABLE_MISS_FALLBACK_VID                                              = 2,    /**< The packet is forwarded with a flow ID equal to its VID. */
+    BCMOLT_MAC_TABLE_MISS_FALLBACK__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_mac_table_miss_fallback;
+
+/** MAC table Learning mode. 
+ */
+typedef enum bcmolt_mac_table_learning_mode
+{
+    BCMOLT_MAC_TABLE_LEARNING_MODE__BEGIN                                           = 0,
+    BCMOLT_MAC_TABLE_LEARNING_MODE_NORMAL                                           = 0,    /**< Normal mode: upstream traffic that matches on MAC/VID but doesn't match on flow ID is still allowed to pass. */
+    BCMOLT_MAC_TABLE_LEARNING_MODE_MOVE                                             = 1,    /**< Normal mode: upstream traffic that matches on MAC/VID but doesn't match on flow ID is considered to be a MAC move condition. */
+    BCMOLT_MAC_TABLE_LEARNING_MODE__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_mac_table_learning_mode;
+
+/** Mapping tag method. 
+ */
+typedef enum bcmolt_mapping_tag_method
+{
+    BCMOLT_MAPPING_TAG_METHOD_OUTER_VID                                             = 1,    /**< Outer VID. */
+    BCMOLT_MAPPING_TAG_METHOD_INNER_VID                                             = 0     /**< Inner VID. */
+} bcmolt_mapping_tag_method;
+
+/** NNI Connection. 
+ */
+typedef enum bcmolt_nni_connection
+{
+    BCMOLT_NNI_CONNECTION__BEGIN                                                    = 0,
+    BCMOLT_NNI_CONNECTION_PRIMARY                                                   = 0,    /**< Primary. */
+    BCMOLT_NNI_CONNECTION_BACKUP                                                    = 1,    /**< Backup. */
+    BCMOLT_NNI_CONNECTION__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_nni_connection;
+
+/** Trivalent. 
+ */
+typedef enum bcmolt_trivalent
+{
+    BCMOLT_TRIVALENT__BEGIN                                                         = 0,
+    BCMOLT_TRIVALENT_FALSE                                                          = 0,    /**< False. */
+    BCMOLT_TRIVALENT_TRUE                                                           = 1,    /**< True. */
+    BCMOLT_TRIVALENT_NOT_APPLICABLE                                                 = 2,    /**< Not Applicable. */
+    BCMOLT_TRIVALENT__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_trivalent;
+
+/** ODN Class. 
+ */
+typedef enum bcmolt_odn_class
+{
+    BCMOLT_ODN_CLASS_N1                                                             = 0,    /**< N1. */
+    BCMOLT_ODN_CLASS_N2                                                             = 1,    /**< N2. */
+    BCMOLT_ODN_CLASS_E1                                                             = 3,    /**< E1. */
+    BCMOLT_ODN_CLASS_E2                                                             = 4     /**< E2. */
+} bcmolt_odn_class;
+
+/** OMCI Port ID operation. 
+ */
+typedef enum bcmolt_omci_port_id_operation
+{
+    BCMOLT_OMCI_PORT_ID_OPERATION__BEGIN                                            = 0,
+    BCMOLT_OMCI_PORT_ID_OPERATION_CONFIGURE                                         = 0,    /**< configure. */
+    BCMOLT_OMCI_PORT_ID_OPERATION_REMOVE                                            = 1,    /**< remove. */
+    BCMOLT_OMCI_PORT_ID_OPERATION__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_omci_port_id_operation;
+
+/** ONU operation. 
+ */
+typedef enum bcmolt_onu_operation
+{
+    BCMOLT_ONU_OPERATION__BEGIN                                                     = 0,
+    BCMOLT_ONU_OPERATION_INACTIVE                                                   = 0,    /**< Inactive. */
+    BCMOLT_ONU_OPERATION_ACTIVE                                                     = 1,    /**< Active. */
+    BCMOLT_ONU_OPERATION_DISABLE                                                    = 2,    /**< Disable. */
+    BCMOLT_ONU_OPERATION_ENABLE                                                     = 3,    /**< Enable. */
+    BCMOLT_ONU_OPERATION_ACTIVE_STANDBY                                             = 4,    /**< Active Standby. */
+    BCMOLT_ONU_OPERATION_AWAKE_FREE                                                 = 5,    /**< Transitions the ONU to an active state with power management enabled. Allowed in inactive, disabled, and active states. */
+    BCMOLT_ONU_OPERATION__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_onu_operation;
+
+/** ONU Power level. 
+ */
+typedef enum bcmolt_onu_power_level
+{
+    BCMOLT_ONU_POWER_LEVEL__BEGIN                                                   = 0,
+    BCMOLT_ONU_POWER_LEVEL_INCREASE                                                 = 0,    /**< increase. */
+    BCMOLT_ONU_POWER_LEVEL_DECREASE                                                 = 1,    /**< decrease. */
+    BCMOLT_ONU_POWER_LEVEL__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_onu_power_level;
+
+/** TC layer protocol. 
+ */
+typedef enum bcmolt_tc_protocol
+{
+    BCMOLT_TC_PROTOCOL__BEGIN                                                       = 0,
+    BCMOLT_TC_PROTOCOL_TC_LAYER_PROTOCOL_G_987_P_3                                  = 0,    /**< TC layer protocol G.987.3 */
+    BCMOLT_TC_PROTOCOL_TC_LAYER_PROTOCOL_G_989_P_3                                  = 1,    /**< TC layer protocol G.989.3 */
+    BCMOLT_TC_PROTOCOL__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_tc_protocol;
+
+/** Packet Injection Error. 
+ */
+typedef enum bcmolt_packet_injection_error
+{
+    BCMOLT_PACKET_INJECTION_ERROR__BEGIN                                            = 0,
+    BCMOLT_PACKET_INJECTION_ERROR_GEM_PORT_NOT_ACTIVE                               = 0,    /**< GEM Port Not Active. */
+    BCMOLT_PACKET_INJECTION_ERROR__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_packet_injection_error;
+
+/** packet type. 
+ */
+typedef enum bcmolt_packet_type
+{
+    BCMOLT_PACKET_TYPE__BEGIN                                                       = 0,
+    BCMOLT_PACKET_TYPE_CPU                                                          = 0,    /**< CPU. */
+    BCMOLT_PACKET_TYPE_OMCI                                                         = 1,    /**< OMCI. */
+    BCMOLT_PACKET_TYPE__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_packet_type;
+
+/** Password authentication fail reason. 
+ */
+typedef enum bcmolt_password_authentication_fail_reason
+{
+    BCMOLT_PASSWORD_AUTHENTICATION_FAIL_REASON__BEGIN                               = 0,
+    BCMOLT_PASSWORD_AUTHENTICATION_FAIL_REASON_NONE                                 = 0,    /**< none. */
+    BCMOLT_PASSWORD_AUTHENTICATION_FAIL_REASON_PASSWORD_INCONSISTENCY               = 1,    /**< Password inconsistency. */
+    BCMOLT_PASSWORD_AUTHENTICATION_FAIL_REASON_PASSWORD_MISMATCH                    = 2,    /**< Password mismatch. */
+    BCMOLT_PASSWORD_AUTHENTICATION_FAIL_REASON_PASSWORD_AUTHENTICATION_TIMEOUT      = 3,    /**< Password authentication timeout. */
+    BCMOLT_PASSWORD_AUTHENTICATION_FAIL_REASON_ONU_ALARM                            = 4,    /**< onu alarm. */
+    BCMOLT_PASSWORD_AUTHENTICATION_FAIL_REASON_LOS_EVENT                            = 5,    /**< los event. */
+    BCMOLT_PASSWORD_AUTHENTICATION_FAIL_REASON_DISABLE_EVENT                        = 6,    /**< disable event. */
+    BCMOLT_PASSWORD_AUTHENTICATION_FAIL_REASON__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_password_authentication_fail_reason;
+
+/** Polarity. 
+ */
+typedef enum bcmolt_polarity
+{
+    BCMOLT_POLARITY__BEGIN                                                          = 0,
+    BCMOLT_POLARITY_LOW                                                             = 0,    /**< Low. */
+    BCMOLT_POLARITY_HIGH                                                            = 1,    /**< High. */
+    BCMOLT_POLARITY__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_polarity;
+
+/** Polling Interval. 
+ */
+typedef enum bcmolt_polling_interval
+{
+    BCMOLT_POLLING_INTERVAL_POLLING_DISABLED                                        = 0,            /**< No polling gates will be sent to this LLID. */
+    BCMOLT_POLLING_INTERVAL_US_500                                                  = 500,          /**< 500 us. */
+    BCMOLT_POLLING_INTERVAL_MS_1                                                    = 1000,         /**< 1 ms. */
+    BCMOLT_POLLING_INTERVAL_MS_2                                                    = 2000,         /**< 2 ms. */
+    BCMOLT_POLLING_INTERVAL_MS_4                                                    = 4000,         /**< 4 ms. */
+    BCMOLT_POLLING_INTERVAL_MS_8                                                    = 8000,         /**< 8 ms. */
+    BCMOLT_POLLING_INTERVAL_MS_16                                                   = 16000,        /**< 16 ms. */
+    BCMOLT_POLLING_INTERVAL_AUTOMATIC                                               = 2147483647L   /**< Firmware will choose an appropriate value. */
+} bcmolt_polling_interval;
+
+/** PON Operation. 
+ */
+typedef enum bcmolt_pon_operation
+{
+    BCMOLT_PON_OPERATION__BEGIN                                                     = 0,
+    BCMOLT_PON_OPERATION_INACTIVE                                                   = 0,            /**< Inactive. */
+    BCMOLT_PON_OPERATION_ACTIVE_WORKING                                             = 1,            /**< Active Working. */
+    BCMOLT_PON_OPERATION_ACTIVE_STANDBY                                             = 2,            /**< Active Standby. */
+    BCMOLT_PON_OPERATION__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_pon_operation;
+
+/** PON Protection Switching Options. 
+ */
+typedef enum bcmolt_pon_protection_switching_options
+{
+    BCMOLT_PON_PROTECTION_SWITCHING_OPTIONS_NONE                                    = 0,
+    BCMOLT_PON_PROTECTION_SWITCHING_OPTIONS_SWIFT_POPUP                             = 0x0001,   /**< If set, switchovers will utilize the Swift_POPUP and Ranging_Adjustment PLOAMs added in G.984 annex D. */
+    BCMOLT_PON_PROTECTION_SWITCHING_OPTIONS_DEBUG_FAST_RANGING                      = 0x0002    /**< If set, ONU EQDs will not be calculated as part of a switchover.  Instead, each ONU's new EQD will be equal to its last EQD when the PON NI was in active-working state.  This provides a fast switchover, but can only be used if the trunk distance never changes. */
+} bcmolt_pon_protection_switching_options;
+
+/** PON state. 
+ */
+typedef enum bcmolt_pon_state
+{
+    BCMOLT_PON_STATE__BEGIN                                                         = 0,
+    BCMOLT_PON_STATE_INACTIVE                                                       = 0,        /**< Inactive. */
+    BCMOLT_PON_STATE_PROCESSING                                                     = 1,        /**< Processing. */
+    BCMOLT_PON_STATE_ACTIVE_WORKING                                                 = 2,        /**< Active Working. */
+    BCMOLT_PON_STATE_ACTIVE_STANDBY                                                 = 3,        /**< Active Standby. */
+    BCMOLT_PON_STATE__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_pon_state;
+
+/** power levelling control. 
+ */
+typedef enum bcmolt_power_levelling_control
+{
+    BCMOLT_POWER_LEVELLING_CONTROL__BEGIN                                           = 0,
+    BCMOLT_POWER_LEVELLING_CONTROL_DIRECT                                           = 0,    /**< Direct. */
+    BCMOLT_POWER_LEVELLING_CONTROL_DECREASE                                         = 1,    /**< Decrease. */
+    BCMOLT_POWER_LEVELLING_CONTROL_INCREASE                                         = 2,    /**< Increase. */
+    BCMOLT_POWER_LEVELLING_CONTROL__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_power_levelling_control;
+
+/** The reason that a power management state change occurred. 
+ */
+typedef enum bcmolt_power_management_transition_reason
+{
+    BCMOLT_POWER_MANAGEMENT_TRANSITION_REASON__BEGIN                                = 0,
+    BCMOLT_POWER_MANAGEMENT_TRANSITION_REASON_POWER_MANAGEMENT_ENABLED              = 0,    /**< Host requested power management enable. */
+    BCMOLT_POWER_MANAGEMENT_TRANSITION_REASON_POWER_MANAGEMENT_DISABLED             = 1,    /**< Host requested power management disable. */
+    BCMOLT_POWER_MANAGEMENT_TRANSITION_REASON_SLEEP_REQUEST_AWAKE                   = 2,    /**< Received sleep request PLOAM from ONU. */
+    BCMOLT_POWER_MANAGEMENT_TRANSITION_REASON_SLEEP_REQUEST_DOZE                    = 3,    /**< Received sleep request PLOAM from ONU. */
+    BCMOLT_POWER_MANAGEMENT_TRANSITION_REASON_SLEEP_REQUEST_SLEEP                   = 4,    /**< Received sleep request PLOAM from ONU. */
+    BCMOLT_POWER_MANAGEMENT_TRANSITION_REASON_SLEEP_REQUEST_WATCH                   = 5,    /**< Received sleep request PLOAM from ONU. */
+    BCMOLT_POWER_MANAGEMENT_TRANSITION_REASON_TERI_EXPIRED                          = 6,    /**< Teri timer expired. It has been too long since we have received an upstream burst from an ONU in a low power state. */
+    BCMOLT_POWER_MANAGEMENT_TRANSITION_REASON_TALERTED_EXPIRED                      = 7,    /**< Talerted timer expired. It has been too long since the ONU was requested to wake up with no idication that it has complied. */
+    BCMOLT_POWER_MANAGEMENT_TRANSITION_REASON_ALARM                                 = 8,    /**< A LOSi/LOFi/LOBi alarm has ben raised against the ONU. */
+    BCMOLT_POWER_MANAGEMENT_TRANSITION_REASON__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_power_management_transition_reason;
+
+/** PRBS Polynomial. 
+ */
+typedef enum bcmolt_prbs_polynomial
+{
+    BCMOLT_PRBS_POLYNOMIAL__BEGIN                                                   = 0,
+    BCMOLT_PRBS_POLYNOMIAL_PRBS_7                                                   = 0,    /**< PRBS_7. */
+    BCMOLT_PRBS_POLYNOMIAL_PRBS_9                                                   = 1,    /**< PRBS_9. */
+    BCMOLT_PRBS_POLYNOMIAL_PRBS_11                                                  = 2,    /**< PRBS_11. */
+    BCMOLT_PRBS_POLYNOMIAL_PRBS_15                                                  = 3,    /**< PRBS_15. */
+    BCMOLT_PRBS_POLYNOMIAL_PRBS_23                                                  = 4,    /**< PRBS_23. */
+    BCMOLT_PRBS_POLYNOMIAL_PRBS_31                                                  = 5,    /**< PRBS_31. */
+    BCMOLT_PRBS_POLYNOMIAL_PRBS_58                                                  = 6,    /**< PRBS_58. */
+    BCMOLT_PRBS_POLYNOMIAL__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_prbs_polynomial;
+
+/** PRBS checker mode. 
+ */
+typedef enum bcmolt_prbs_checker_mode
+{
+    BCMOLT_PRBS_CHECKER_MODE__BEGIN                                                 = 0,
+    BCMOLT_PRBS_CHECKER_MODE_SELF_SYNC                                              = 0,    /**< Self-sync mode w/ hysteresis. PRBS seed register is continuously seeded with previous received bits.  This mode results in faster locking, but bit errors are counted multiple times (often by 3x).  */
+    BCMOLT_PRBS_CHECKER_MODE_INITIAL_SEED_MODE                                      = 1,    /**< Initial seed mode w/ hysteresis. PRBS seed registers is seeded with previous received bits only till PRBS lock is  acquired and then they run locally independently from the received data until the checker goes out of PRBS lock.  */
+    BCMOLT_PRBS_CHECKER_MODE_INITIAL_SEED_MODE_2                                    = 2,    /**< Initial seed mode w/o hysteresis. Similar to mode 1 above except once locked it stays locked until PRBS is disabled.    */
+    BCMOLT_PRBS_CHECKER_MODE__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_prbs_checker_mode;
+
+/** PRBS Lock State. 
+ */
+typedef enum bcmolt_prbs_lock_state
+{
+    BCMOLT_PRBS_LOCK_STATE__BEGIN                                                   = 0,
+    BCMOLT_PRBS_LOCK_STATE_UNLOCKED                                                 = 0,    /**< PRBS Checker is out of LOCK state and state machine is searching for a LOCK */
+    BCMOLT_PRBS_LOCK_STATE_LOCKED                                                   = 1,    /**< PRBS Checker is in LOCKED state */
+    BCMOLT_PRBS_LOCK_STATE__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_prbs_lock_state;
+
+/** Possible Raman Mitigation settings.  Raman mitigation injects pseudo-noise 
+ * into the 1G downstream data path to reduce interference with analog video 
+ * signals on other wavelengths. 
+ */
+typedef enum bcmolt_raman_mitigation_mode
+{
+    BCMOLT_RAMAN_MITIGATION_MODE__BEGIN                                             = 0,
+    BCMOLT_RAMAN_MITIGATION_MODE_DISABLED                                           = 0,    /**< No packets are generated. */
+    BCMOLT_RAMAN_MITIGATION_MODE_RANDOM                                             = 1,    /**< Pseudo-random packets are generated. */
+    BCMOLT_RAMAN_MITIGATION_MODE_FIXED                                              = 2,    /**< Fixed background packets are generated. */
+    BCMOLT_RAMAN_MITIGATION_MODE__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_raman_mitigation_mode;
+
+/** Ranging fail reason. 
+ */
+typedef enum bcmolt_ranging_fail_reason
+{
+    BCMOLT_RANGING_FAIL_REASON__BEGIN                                               = 0,
+    BCMOLT_RANGING_FAIL_REASON_NONE                                                 = 0,    /**< none. */
+    BCMOLT_RANGING_FAIL_REASON_RANGING_ACK_TIMEOUT                                  = 1,    /**< ranging ack timeout. */
+    BCMOLT_RANGING_FAIL_REASON_PLOAM_DATA_MISMATCH                                  = 2,    /**< ploam data mismatch. */
+    BCMOLT_RANGING_FAIL_REASON_PLOAM_TYPE_MISMATCH                                  = 3,    /**< ploam type mismatch. */
+    BCMOLT_RANGING_FAIL_REASON_PLOAM_ONU_ID_MISMATCH                                = 4,    /**< ploam onu id mismatch. */
+    BCMOLT_RANGING_FAIL_REASON_DRIFT_EXCEEDED                                       = 5,    /**< drift exceeded. */
+    BCMOLT_RANGING_FAIL_REASON_NO_PLOAM_RECEIVED                                    = 6,    /**< no ploam received. */
+    BCMOLT_RANGING_FAIL_REASON_LOS                                                  = 7,    /**< los. */
+    BCMOLT_RANGING_FAIL_REASON_ALARMS                                               = 8,    /**< alarms. */
+    BCMOLT_RANGING_FAIL_REASON__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_ranging_fail_reason;
+
+/** Registration Behavior. 
+ */
+typedef enum bcmolt_registration_behavior
+{
+    BCMOLT_REGISTRATION_BEHAVIOR__BEGIN                                             = 0,
+    BCMOLT_REGISTRATION_BEHAVIOR_AUTOMATIC                                          = 0,    /**< All links will be allowed to register. */
+    BCMOLT_REGISTRATION_BEHAVIOR_NOTIFY_UNKNOWN                                     = 1,    /**< Links that are not pre-provisioned will not be allowed to register.  A maskable indication will be sent to the host which can then decide if the link should be provisioned. */
+    BCMOLT_REGISTRATION_BEHAVIOR__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_registration_behavior;
+
+/** request registration fail reason. 
+ */
+typedef enum bcmolt_request_registration_fail_reason
+{
+    BCMOLT_REQUEST_REGISTRATION_FAIL_REASON__BEGIN                                  = 0,
+    BCMOLT_REQUEST_REGISTRATION_FAIL_REASON_NONE                                    = 0,    /**< None. */
+    BCMOLT_REQUEST_REGISTRATION_FAIL_REASON_REGISTRATION_PLOAM_TIMEOUT              = 1,    /**< registration ploam timeout. */
+    BCMOLT_REQUEST_REGISTRATION_FAIL_REASON_ONU_ALARM                               = 2,    /**< onu alarm. */
+    BCMOLT_REQUEST_REGISTRATION_FAIL_REASON_DEACTIVATION                            = 3,    /**< deactivation. */
+    BCMOLT_REQUEST_REGISTRATION_FAIL_REASON_DISABLE                                 = 4,    /**< disable. */
+    BCMOLT_REQUEST_REGISTRATION_FAIL_REASON__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_request_registration_fail_reason;
+
+/** Result. 
+ */
+typedef enum bcmolt_result
+{
+    BCMOLT_RESULT__BEGIN                                                            = 0,
+    BCMOLT_RESULT_SUCCESS                                                           = 0,    /**< Success. */
+    BCMOLT_RESULT_FAIL                                                              = 1,    /**< Fail. */
+    BCMOLT_RESULT__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_result;
+
+/** Type of the rogue detection algorithm. 
+ */
+typedef enum bcmolt_rogue_detection_algorithm_type
+{
+    BCMOLT_ROGUE_DETECTION_ALGORITHM_TYPE__BEGIN                                    = 0,
+    BCMOLT_ROGUE_DETECTION_ALGORITHM_TYPE_EARLY_ROGUE_DETECTION                     = 0,    /**< Firmware-driven periodic process which runs in the background to detect the potential rogue ONU. */
+    BCMOLT_ROGUE_DETECTION_ALGORITHM_TYPE_SPECIAL_MAP                               = 1,    /**< Use the user-provisioned special bandwidth map until it is told to stop. */
+    BCMOLT_ROGUE_DETECTION_ALGORITHM_TYPE_EXTENDED_GUARD_TIME                       = 2,    /**< Destructive tool that extends the guard time on all bursts. */
+    BCMOLT_ROGUE_DETECTION_ALGORITHM_TYPE__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_rogue_detection_algorithm_type;
+
+/** Rogue ONU detection measurement type. 
+ */
+typedef enum bcmolt_rogue_detection_window
+{
+    BCMOLT_ROGUE_DETECTION_WINDOW__BEGIN                                            = 0,
+    BCMOLT_ROGUE_DETECTION_WINDOW_SILENT_WINDOW                                     = 0,    /**< Silent window measurement. */
+    BCMOLT_ROGUE_DETECTION_WINDOW_CUT_OFF_WINDOW                                    = 1,    /**< Cut-off window measurement. */
+    BCMOLT_ROGUE_DETECTION_WINDOW__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_rogue_detection_window;
+
+/** Status of the rogue ONU detection result. 
+ */
+typedef enum bcmolt_rogue_measurement_result
+{
+    BCMOLT_ROGUE_MEASUREMENT_RESULT__BEGIN                                          = 0,
+    BCMOLT_ROGUE_MEASUREMENT_RESULT_RSSI_COMPLETE                                   = 0,    /**< Rogue ONU RSSI detection activity completed. */
+    BCMOLT_ROGUE_MEASUREMENT_RESULT_NOT_PERFORMED                                   = 1,    /**< Rogue ONU detection not performed. */
+    BCMOLT_ROGUE_MEASUREMENT_RESULT_ROGUE_CYCLE_STOP                                = 2,    /**< Rogue ONU cycle detection stopped. */
+    BCMOLT_ROGUE_MEASUREMENT_RESULT_RSSI_ERROR                                      = 3,    /**< There was an error in the RSSI measurement. */
+    BCMOLT_ROGUE_MEASUREMENT_RESULT_RSSI_NOT_COMPLETE                               = 4,    /**< The RSSI mesaurement was not complete. */
+    BCMOLT_ROGUE_MEASUREMENT_RESULT__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_rogue_measurement_result;
+
+/** Rogue Scan Indication Status . 
+ */
+typedef enum bcmolt_rogue_scan_status
+{
+    BCMOLT_ROGUE_SCAN_STATUS__BEGIN                                                 = 0,
+    BCMOLT_ROGUE_SCAN_STATUS_COMPLETE                                               = 0,    /**< Rogue Scan was completed. */
+    BCMOLT_ROGUE_SCAN_STATUS_LLID_STATE_IS_BAD                                      = 1,    /**< llid in targeted scan was an active link. */
+    BCMOLT_ROGUE_SCAN_STATUS_LLID_IS_OOR                                            = 2,    /**< llid in targeted scan is out of range for pon. */
+    BCMOLT_ROGUE_SCAN_STATUS_SCAN_ERR_NORES                                         = 3,    /**< There were no available LIM indexes for the scan.. */
+    BCMOLT_ROGUE_SCAN_STATUS_SCAN_ERR_INTERNAL                                      = 4,    /**< An internal software was encountered.. */
+    BCMOLT_ROGUE_SCAN_STATUS__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_rogue_scan_status;
+
+/** RSSI measurement fail reason. 
+ */
+typedef enum bcmolt_rssi_measurement_fail_reason
+{
+    BCMOLT_RSSI_MEASUREMENT_FAIL_REASON__BEGIN                                      = 0,
+    BCMOLT_RSSI_MEASUREMENT_FAIL_REASON_NONE                                        = 0,    /**< None. */
+    BCMOLT_RSSI_MEASUREMENT_FAIL_REASON_NO_DELIMITER                                = 1,    /**< No delimiter. */
+    BCMOLT_RSSI_MEASUREMENT_FAIL_REASON_NO_ACCESS                                   = 2,    /**< No access. */
+    BCMOLT_RSSI_MEASUREMENT_FAIL_REASON__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_rssi_measurement_fail_reason;
+
+/** secure mutual authentication fail reason. 
+ */
+typedef enum bcmolt_secure_mutual_authentication_fail_reason
+{
+    BCMOLT_SECURE_MUTUAL_AUTHENTICATION_FAIL_REASON__BEGIN                          = 0,
+    BCMOLT_SECURE_MUTUAL_AUTHENTICATION_FAIL_REASON_TIMEOUT                         = 0,    /**< secure mutual authentication timeout. */
+    BCMOLT_SECURE_MUTUAL_AUTHENTICATION_FAIL_REASON__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_secure_mutual_authentication_fail_reason;
+
+/** serdes ranging mode. 
+ */
+typedef enum bcmolt_serdes_ranging_mode
+{
+    BCMOLT_SERDES_RANGING_MODE__BEGIN                                               = 0,
+    BCMOLT_SERDES_RANGING_MODE_ED_MODE                                              = 0,    /**< ed mode. */
+    BCMOLT_SERDES_RANGING_MODE_BCDR_RESET_MODE                                      = 1,    /**< BCDR reset mode. */
+    BCMOLT_SERDES_RANGING_MODE_FAST_MODE                                            = 2,    /**< fast mode. */
+    BCMOLT_SERDES_RANGING_MODE__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_serdes_ranging_mode;
+
+/** SerDes Instance. 
+ */
+typedef enum bcmolt_serdes_instance
+{
+    BCMOLT_SERDES_INSTANCE__BEGIN                                                   = 0,
+    BCMOLT_SERDES_INSTANCE_INSTANCE_0                                               = 0,    /**< Primary Serdes, or 10G SerDes for EPON pon_ids. */
+    BCMOLT_SERDES_INSTANCE_INSTANCE_1                                               = 1,    /**< Secondary Serdes, or 1G/2G SerDes for EPON pon_ids. */
+    BCMOLT_SERDES_INSTANCE__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_serdes_instance;
+
+/** Shaper Mode. 
+ */
+typedef enum bcmolt_shaper_mode
+{
+    BCMOLT_SHAPER_MODE__BEGIN                                                       = 0,
+    BCMOLT_SHAPER_MODE_LAYER_1                                                      = 0,    /**< Shapers will count IPG, preamble, frame, and FCS */
+    BCMOLT_SHAPER_MODE_LAYER_2                                                      = 1,    /**< Shapers will count frame and FCS. */
+    BCMOLT_SHAPER_MODE__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_shaper_mode;
+
+/** All possible statistic alarm trigger conditions. 
+ */
+typedef enum bcmolt_stat_condition_type
+{
+    BCMOLT_STAT_CONDITION_TYPE__BEGIN                                               = 0,
+    BCMOLT_STAT_CONDITION_TYPE_NONE                                                 = 0,    /**< The alarm is disabled. */
+    BCMOLT_STAT_CONDITION_TYPE_RATE_THRESHOLD                                       = 1,    /**< The alarm is triggered if the stats delta value between samples crosses the configured threshold boundary. */
+    BCMOLT_STAT_CONDITION_TYPE_RATE_RANGE                                           = 2,    /**< The alarm is triggered if the stats delta value between samples deviates from the configured range. */
+    BCMOLT_STAT_CONDITION_TYPE_VALUE_THRESHOLD                                      = 3,    /**< The alarm is raised if the stats sample value becomes greater than this level.  The alarm is cleared when the host read the stats. */
+    BCMOLT_STAT_CONDITION_TYPE__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_stat_condition_type;
+
+/** Switch over type c onu state. 
+ */
+typedef enum bcmolt_switch_over_type_c_onu_state
+{
+    BCMOLT_SWITCH_OVER_TYPE_C_ONU_STATE__BEGIN                                      = 0,
+    BCMOLT_SWITCH_OVER_TYPE_C_ONU_STATE_ACTIVE                                      = 0,    /**< Active. */
+    BCMOLT_SWITCH_OVER_TYPE_C_ONU_STATE_ACTIVE_STANDBY                              = 1,    /**< Active standby. */
+    BCMOLT_SWITCH_OVER_TYPE_C_ONU_STATE__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_switch_over_type_c_onu_state;
+
+/** System working mode (GPON/EPON etc.) 
+ */
+typedef enum bcmolt_system_mode
+{
+    BCMOLT_SYSTEM_MODE__BEGIN                                                       = 0,
+    BCMOLT_SYSTEM_MODE_GPON__16_X                                                   = 0,    /**< 16x GPON */
+    BCMOLT_SYSTEM_MODE_GPON__8_X                                                    = 1,    /**< 8x GPON */
+    BCMOLT_SYSTEM_MODE_GPON__4_X                                                    = 2,    /**< 4x GPON */
+    BCMOLT_SYSTEM_MODE_EPON__16_X                                                   = 3,    /**< 16x EPON */
+    BCMOLT_SYSTEM_MODE_XGPON_1__8_X                                                 = 4,    /**< 8x XGPON1 */
+    BCMOLT_SYSTEM_MODE_EPON__8_X_COEXISTENCE_TDMA                                   = 5,    /**< 8x EPON coexistence TDMA */
+    BCMOLT_SYSTEM_MODE_AE_8_X                                                       = 6,    /**< 8x 10G Active Ethernet */
+    BCMOLT_SYSTEM_MODE_EPON__8_X_10_G                                               = 7,    /**< 8x EPON (10/10 only) */
+    BCMOLT_SYSTEM_MODE_GPON_8_XGPON_4_X_COEXISTENCE                                 = 8,    /**< 8x GPON 4x XGPON coexistence */
+    BCMOLT_SYSTEM_MODE_EPON__8_X                                                    = 9,    /**< 8x EPON (1/1 only) */
+    BCMOLT_SYSTEM_MODE_EPON__4_X                                                    = 10,   /**< 4x EPON (1/1 only) */
+    BCMOLT_SYSTEM_MODE_EPON__4_X_COEXISTENCE_TDMA                                   = 11,   /**< 4x EPON coexistence TDMA */
+    BCMOLT_SYSTEM_MODE_EPON__4_X_10_G                                               = 12,   /**< 4x EPON (10/10 only) */
+    BCMOLT_SYSTEM_MODE_XGS__2_X_10_G                                                = 13,   /**< 2x XGS-PON (10/10) */
+    BCMOLT_SYSTEM_MODE_NGPON2__2_X_10_G                                             = 14,   /**< 2x NGPON2 (10/10) */
+    BCMOLT_SYSTEM_MODE_NGPON2__8_X_2_P_5_G                                          = 15,   /**< 8x NGPON2 (10/2.5) */
+    BCMOLT_SYSTEM_MODE_XGPON_1__4_X                                                 = 16,   /**< 4x XGPON1 */
+    BCMOLT_SYSTEM_MODE_EPON__2_X_10_G                                               = 17,   /**< 2x EPON (10/10 only) */
+    BCMOLT_SYSTEM_MODE__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_system_mode;
+
+/** US operating wavelength bands. 
+ */
+typedef enum bcmolt_us_operating_wavelength_bands
+{
+    BCMOLT_US_OPERATING_WAVELENGTH_BANDS_EXPANDED_SPECTRUM_WIDE_BAND                = 0,    /**< Expanded spectrum wide band option */
+    BCMOLT_US_OPERATING_WAVELENGTH_BANDS_EXPANDED_SPECTRUM_REDUCED_BAND             = 1,    /**< Expanded spectrum reduced band option */
+    BCMOLT_US_OPERATING_WAVELENGTH_BANDS_EXPANDED_SPECTRUM_NARROW_BAND              = 2,    /**< Expanded spectrum reduced band option */
+    BCMOLT_US_OPERATING_WAVELENGTH_BANDS_SHARED_SPECTRUM_WIDE_BAND                  = 16,   /**< Shared spectrum wide band option */
+    BCMOLT_US_OPERATING_WAVELENGTH_BANDS_SHARED_SPECTRUM_REDUCED_BAND               = 17,   /**< Shared spectrum reduced band option */
+    BCMOLT_US_OPERATING_WAVELENGTH_BANDS_SHARED_SPECTRUM_NARROW_BAND                = 18    /**< Shared spectrum wide narrow option */
+} bcmolt_us_operating_wavelength_bands;
+
+/** Traffic resume result. 
+ */
+typedef enum bcmolt_traffic_resume_result
+{
+    BCMOLT_TRAFFIC_RESUME_RESULT__BEGIN                                             = 0,
+    BCMOLT_TRAFFIC_RESUME_RESULT_SUCCESS                                            = 0,    /**< Success. */
+    BCMOLT_TRAFFIC_RESUME_RESULT_FAILURE                                            = 1,    /**< Failure. */
+    BCMOLT_TRAFFIC_RESUME_RESULT_SUSPECTED_LOS                                      = 2,    /**< suspected_los. */
+    BCMOLT_TRAFFIC_RESUME_RESULT__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_traffic_resume_result;
+
+/** trx calibration trigger. 
+ */
+typedef enum bcmolt_trx_calibration_trigger
+{
+    BCMOLT_TRX_CALIBRATION_TRIGGER__BEGIN                                           = 0,
+    BCMOLT_TRX_CALIBRATION_TRIGGER_EPON_STAT                                        = 0,    /**< epon stat. */
+    BCMOLT_TRX_CALIBRATION_TRIGGER_GPON_BCDR_RESET                                  = 1,    /**< gpon bcdr reset. */
+    BCMOLT_TRX_CALIBRATION_TRIGGER_GPON_TRX_RESET                                   = 2,    /**< gpon trx reset. */
+    BCMOLT_TRX_CALIBRATION_TRIGGER_GPON_TRX_ED                                      = 3,    /**< gpon trx ed. */
+    BCMOLT_TRX_CALIBRATION_TRIGGER_GPON_RSSI                                        = 4,    /**< gpon rssi. */
+    BCMOLT_TRX_CALIBRATION_TRIGGER_GPON_EOB                                         = 5,    /**< gpon eob. */
+    BCMOLT_TRX_CALIBRATION_TRIGGER_GPON_RANGING                                     = 6,    /**< gpon ranging. */
+    BCMOLT_TRX_CALIBRATION_TRIGGER_SERDES_BURST_EN                                  = 7,    /**< serdes burst en. */
+    BCMOLT_TRX_CALIBRATION_TRIGGER__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_trx_calibration_trigger;
+
+/** trx calibration trigger position. 
+ */
+typedef enum bcmolt_trx_calibration_trigger_position
+{
+    BCMOLT_TRX_CALIBRATION_TRIGGER_POSITION__BEGIN                                  = 0,
+    BCMOLT_TRX_CALIBRATION_TRIGGER_POSITION_RISING                                  = 0,    /**< rising edge. */
+    BCMOLT_TRX_CALIBRATION_TRIGGER_POSITION_FALLING                                 = 1,    /**< falling edge. */
+    BCMOLT_TRX_CALIBRATION_TRIGGER_POSITION__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_trx_calibration_trigger_position;
+
+/** trx calibration window mode. 
+ */
+typedef enum bcmolt_trx_calibration_window_mode
+{
+    BCMOLT_TRX_CALIBRATION_WINDOW_MODE__BEGIN                                       = 0,
+    BCMOLT_TRX_CALIBRATION_WINDOW_MODE_RANGING                                      = 0,    /**< ranging. */
+    BCMOLT_TRX_CALIBRATION_WINDOW_MODE_NON_RANGING                                  = 1,    /**< non ranging. */
+    BCMOLT_TRX_CALIBRATION_WINDOW_MODE_BOTH                                         = 2,    /**< ranging and non ranging. */
+    BCMOLT_TRX_CALIBRATION_WINDOW_MODE__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_trx_calibration_window_mode;
+
+/** TRX type. 
+ */
+typedef enum bcmolt_trx_type
+{
+    BCMOLT_TRX_TYPE__BEGIN                                                          = 0,
+    BCMOLT_TRX_TYPE_SPS_43_48_H_HP_CDE_SD_2013                                      = 0,    /**< SourcePhotonics - SPS-43-48H-HP-CDE-SD Reset is required BEFORE, TRX is Squelched. till 2013 rev.  */
+    BCMOLT_TRX_TYPE_SOG_4321_PSGB                                                   = 1,    /**< Superxon B+ type */
+    BCMOLT_TRX_TYPE_LTE_3680_M                                                      = 2,    /**< LIGENT LTE3680M. */
+    BCMOLT_TRX_TYPE_SOURCE_PHOTONICS                                                = 3,    /**< Source Photonics. */
+    BCMOLT_TRX_TYPE_LTE_3680_P_TYPE_C_PLUS                                          = 4,    /**< LIGENT LTE3680P_TYPE_C_PLUS. */
+    BCMOLT_TRX_TYPE_ANY                                                             = 5,    /**< Any. */
+    BCMOLT_TRX_TYPE_ANY_RESET_GUARD                                                 = 6,    /**< Any reset guard. */
+    BCMOLT_TRX_TYPE_ANY_RESET_PREAMBLE                                              = 7,    /**< Any reset preamble. */
+    BCMOLT_TRX_TYPE_WTD_RTXM_167_526_CPLUS                                          = 8,    /**< WTD RTXM167 526 C+. */
+    BCMOLT_TRX_TYPE_WTD_RTXM_167_522_BPLUS                                          = 9,    /**< WTD RTXM167 522 B+. */
+    BCMOLT_TRX_TYPE_LTE_3680_P_BC                                                   = 10,   /**< LIGENT HiSense LTE3680P-BC. */
+    BCMOLT_TRX_TYPE_SOGQ_4321_PSGB_C_PLUS                                           = 11,   /**< Superxon C+ type */
+    BCMOLT_TRX_TYPE_WTD_RTXM167_521                                                 = 12,   /**< WTD RTXM167_521. */
+    BCMOLT_TRX_TYPE_LTE3678                                                         = 13,   /**< LTE3678. */
+    BCMOLT_TRX_TYPE_SOGP_4321_PSGA                                                  = 14,   /**< Superxon SOGP4321-PSGA. */
+    BCMOLT_TRX_TYPE_GPON_GENERAL_1                                                  = 15,   /**< gpon general 1. */
+    BCMOLT_TRX_TYPE_GPON_GENERAL_2                                                  = 16,   /**< gpon general 2. */
+    BCMOLT_TRX_TYPE_GPON_GENERAL_3                                                  = 17,   /**< gpon general 3. */
+    BCMOLT_TRX_TYPE_GPON_GENERAL_4                                                  = 18,   /**< gpon general 4. */
+    BCMOLT_TRX_TYPE_GPON_GENERAL_5                                                  = 19,   /**< gpon general 5. */
+    BCMOLT_TRX_TYPE_GPON_GENERAL_6                                                  = 20,   /**< gpon general 6. */
+    BCMOLT_TRX_TYPE_GPON_GENERAL_7                                                  = 21,   /**< gpon general 7. */
+    BCMOLT_TRX_TYPE_GPON_GENERAL_8                                                  = 22,   /**< gpon general 8. */
+    BCMOLT_TRX_TYPE_GPON_GENERAL_9                                                  = 23,   /**< gpon general 9. */
+    BCMOLT_TRX_TYPE_GPON_GENERAL_10                                                 = 24,   /**< gpon general 10. */
+    BCMOLT_TRX_TYPE_GPON_GENERAL_11                                                 = 25,   /**< gpon general 11. */
+    BCMOLT_TRX_TYPE__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_trx_type;
+
+/** Tune in fail reason. 
+ */
+typedef enum bcmolt_tune_in_fail_reason
+{
+    BCMOLT_TUNE_IN_FAIL_REASON__BEGIN                                               = 0,
+    BCMOLT_TUNE_IN_FAIL_REASON_NONE                                                 = 0,    /**< none. */
+    BCMOLT_TUNE_IN_FAIL_REASON_NO_TUNING_RESPONSE_PLOAM_RECEIVED                    = 1,    /**< No tuning response ploam received. */
+    BCMOLT_TUNE_IN_FAIL_REASON_ONU_ACTIVATION_FAILED                                = 2,    /**< onu activation failed. */
+    BCMOLT_TUNE_IN_FAIL_REASON__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_tune_in_fail_reason;
+
+/** Tune out fail reason. 
+ */
+typedef enum bcmolt_tune_out_fail_reason
+{
+    BCMOLT_TUNE_OUT_FAIL_REASON__BEGIN                                              = 0,
+    BCMOLT_TUNE_OUT_FAIL_REASON_NONE                                                = 0,    /**< none. */
+    BCMOLT_TUNE_OUT_FAIL_REASON_NACK_PLOAM_RECEIVED                                 = 1,    /**< NACK ploam received. */
+    BCMOLT_TUNE_OUT_FAIL_REASON_NO_TUNING_RESPONSE_PLOAM_RECEIVED                   = 2,    /**< no tuning response ploam received. */
+    BCMOLT_TUNE_OUT_FAIL_REASON_TSOURCE_TIMEOUT                                     = 3,    /**< tsource timeout. */
+    BCMOLT_TUNE_OUT_FAIL_REASON_ROLLBACK_REQUEST                                    = 4,    /**< rollback request. */
+    BCMOLT_TUNE_OUT_FAIL_REASON__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_tune_out_fail_reason;
+
+/** UART baud rate. 
+ */
+typedef enum bcmolt_uart_baudrate
+{
+    BCMOLT_UART_BAUDRATE__BEGIN                                                     = 0,
+    BCMOLT_UART_BAUDRATE_UART_RATE_4800                                             = 0,    /**< UART rate 4800. */
+    BCMOLT_UART_BAUDRATE_UART_RATE_9600                                             = 1,    /**< UART rate 9600. */
+    BCMOLT_UART_BAUDRATE_UART_RATE_14400                                            = 2,    /**< UART rate 14400. */
+    BCMOLT_UART_BAUDRATE_UART_RATE_19200                                            = 3,    /**< UART rate 19200. */
+    BCMOLT_UART_BAUDRATE_UART_RATE_38400                                            = 4,    /**< UART rate 38400. */
+    BCMOLT_UART_BAUDRATE_UART_RATE_57600                                            = 5,    /**< UART rate 57600. */
+    BCMOLT_UART_BAUDRATE_UART_RATE_115200                                           = 6,    /**< UART rate 115200. */
+    BCMOLT_UART_BAUDRATE_UART_RATE_230400                                           = 7,    /**< UART rate 230400. */
+    BCMOLT_UART_BAUDRATE_UART_RATE_380400                                           = 8,    /**< UART rate 380400. */
+    BCMOLT_UART_BAUDRATE_UART_RATE_460800                                           = 9,    /**< UART rate 460800. */
+    BCMOLT_UART_BAUDRATE_UART_RATE_921600                                           = 10,   /**< UART rate 921600. */
+    BCMOLT_UART_BAUDRATE__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_uart_baudrate;
+
+/** us_gem_port_destination. 
+ */
+typedef enum bcmolt_us_gem_port_destination
+{
+    BCMOLT_US_GEM_PORT_DESTINATION__BEGIN                                           = 0,
+    BCMOLT_US_GEM_PORT_DESTINATION_DATA                                             = 0,    /**< data. */
+    BCMOLT_US_GEM_PORT_DESTINATION_CPU                                              = 1,    /**< cpu. */
+    BCMOLT_US_GEM_PORT_DESTINATION_OMCI                                             = 2,    /**< omci. */
+    BCMOLT_US_GEM_PORT_DESTINATION__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_us_gem_port_destination;
+
+/** US VLAN action. 
+ */
+typedef enum bcmolt_us_vlan_action
+{
+    BCMOLT_US_VLAN_ACTION_ADD                                                       = 1,    /**< Add. */
+    BCMOLT_US_VLAN_ACTION_TRANSPARENT                                               = 0     /**< Transparent. */
+} bcmolt_us_vlan_action;
+
+/** VLAN to flow mapping method. 
+ */
+typedef enum bcmolt_vlan_to_flow_mapping_method
+{
+    BCMOLT_VLAN_TO_FLOW_MAPPING_METHOD__BEGIN                                       = 0,
+    BCMOLT_VLAN_TO_FLOW_MAPPING_METHOD_VID                                          = 0,    /**< VID. */
+    BCMOLT_VLAN_TO_FLOW_MAPPING_METHOD_MACPLUSVID                                   = 1,    /**< MAC+VID. */
+    BCMOLT_VLAN_TO_FLOW_MAPPING_METHOD__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_vlan_to_flow_mapping_method;
+
+/** XGPON GEM Port State. 
+ */
+typedef enum bcmolt_xgpon_gem_port_state
+{
+    BCMOLT_XGPON_GEM_PORT_STATE_NOT_CONFIGURED                                      = 0,    /**< not configured. */
+    BCMOLT_XGPON_GEM_PORT_STATE_INACTIVE                                            = 1,    /**< inactive. */
+    BCMOLT_XGPON_GEM_PORT_STATE_ACTIVE                                              = 3     /**< active. */
+} bcmolt_xgpon_gem_port_state;
+
+/** xgpon num of onus. 
+ */
+typedef enum bcmolt_xgpon_num_of_onus
+{
+    BCMOLT_XGPON_NUM_OF_ONUS__BEGIN                                                 = 0,
+    BCMOLT_XGPON_NUM_OF_ONUS_XGPON_SUPPORT_256_ONUS                                 = 0,    /**< xgpon support 256 onus. */
+    BCMOLT_XGPON_NUM_OF_ONUS_XGPON_SUPPORT_510_ONUS                                 = 1,    /**< xgpon support 510 onus. */
+    BCMOLT_XGPON_NUM_OF_ONUS__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_num_of_onus;
+
+/** xgpon serdes ranging mode. 
+ */
+typedef enum bcmolt_xgpon_serdes_ranging_mode
+{
+    BCMOLT_XGPON_SERDES_RANGING_MODE__BEGIN                                         = 0,
+    BCMOLT_XGPON_SERDES_RANGING_MODE_ED                                             = 0,    /**< ed. */
+    BCMOLT_XGPON_SERDES_RANGING_MODE_BCDR                                           = 1,    /**< bcdr. */
+    BCMOLT_XGPON_SERDES_RANGING_MODE_FAST_RANGING1                                  = 2,    /**< fast ranging1. */
+    BCMOLT_XGPON_SERDES_RANGING_MODE_FAST_RANGING2                                  = 3,    /**< fast ranging2. */
+    BCMOLT_XGPON_SERDES_RANGING_MODE__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_serdes_ranging_mode;
+
+/** XGPON TRX type. 
+ */
+typedef enum bcmolt_xgpon_trx_type
+{
+    BCMOLT_XGPON_TRX_TYPE__BEGIN                                                    = 0,
+    BCMOLT_XGPON_TRX_TYPE_LTH_7222_PC                                               = 0,    /**< Ligent LTH 7222-PC. */
+    BCMOLT_XGPON_TRX_TYPE_USER_DEFINED                                              = 1,    /**< User Defined. */
+    BCMOLT_XGPON_TRX_TYPE_WTD_RTXM266_702                                           = 2,    /**< WTD_RTXM266_702. */
+    BCMOLT_XGPON_TRX_TYPE_LTH_7222_BC_PLUS                                          = 3,    /**< SFP+ */
+    BCMOLT_XGPON_TRX_TYPE_LTH_7226_PC                                               = 4,    /**< XGS */
+    BCMOLT_XGPON_TRX_TYPE_LTH_5302_PC                                               = 5,    /**< 10G EPON for XGS mode */
+    BCMOLT_XGPON_TRX_TYPE_XGPON_GENERAL_1                                           = 6,    /**< xgpon general 1. */
+    BCMOLT_XGPON_TRX_TYPE_XGPON_GENERAL_2                                           = 7,    /**< xgpon general 2. */
+    BCMOLT_XGPON_TRX_TYPE_LTW_627_X_PC                                              = 8,    /**< Supports NGPON2 TRx for various channels */
+    BCMOLT_XGPON_TRX_TYPE_XPP_XE_R_3_CDFB                                           = 9,    /**< 10G EPON for XGS mode */
+    BCMOLT_XGPON_TRX_TYPE__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_trx_type;
+
+/** Actual Scheduler/Shaper. 
+ */
+typedef struct bcmolt_actual_schedulershaper
+{
+    bcmolt_time_quanta actual_mbs_tq;       /**< Actual MBS (TQ). */
+    bcmolt_time_quanta actual_weight_tq;    /**< Actual Weight (TQ). */
+} bcmolt_actual_schedulershaper;
+
+/** 128-bit AES key used for ONU authentication. 
+ */
+typedef struct bcmolt_aes_key
+{
+    uint8_t bytes[16];  /**< Bytes that comprise the key. */
+} bcmolt_aes_key;
+
+/** What portion of the capture buffer to read. 
+ */
+typedef struct bcmolt_api_capture_buffer_reader
+{
+    uint32_t offset;    /**< The bytes offset to read from. */
+    uint32_t size;      /**< The number of bytes to read. */
+} bcmolt_api_capture_buffer_reader;
+
+/** Configuration for API capture. 
+ */
+typedef struct bcmolt_api_capture_config
+{
+    bcmolt_api_capture_location location;   /**< Where to perform the API capture. */
+    uint32_t buffer_size_bytes;             /**< Maximum number of bytes to capture. */
+    bcmolt_api_capture_buffer_mode buffer_mode; /**< What to do when the capture buffer is full. */
+} bcmolt_api_capture_config;
+
+/** Statistics on the most recent API capture. 
+ */
+typedef struct bcmolt_api_capture_stats
+{
+    uint32_t buffer_used_bytes; /**< Used space in the capture buffer (in bytes). */
+    uint32_t buffer_wrap_count; /**< Number of times the capture buffer has wrapped. */
+    uint32_t events_recorded;   /**< Number of events recorded in the capture buffer. */
+    uint32_t events_dropped;    /**< Number of events dropped due to overflow. */
+    uint32_t readable_bytes;    /**< Number of bytes needed to retrieve capture buffer. */
+} bcmolt_api_capture_stats;
+
+/** Bounds. 
+ */
+typedef struct bcmolt_bounds
+{
+    uint32_t best_case;     /**< Best Case. */
+    uint32_t worst_case;    /**< Worst Case. */
+} bcmolt_bounds;
+
+/** Fixed-Length list: 8x bounds. 
+ */
+typedef struct bcmolt_arr_bounds_8
+{
+    bcmolt_bounds arr[8];   /**< Array. */
+} bcmolt_arr_bounds_8;
+
+/** Fixed-Length list: 8x calibration_record. 
+ */
+typedef struct bcmolt_arr_calibration_record_8
+{
+    bcmolt_calibration_record arr[8];   /**< Array. */
+} bcmolt_arr_calibration_record_8;
+
+/** DS frequency offset. 
+ */
+typedef struct bcmolt_ds_frequency_offset
+{
+    bcmolt_sign sign;   /**< sign. */
+    uint8_t value;      /**< value. */
+} bcmolt_ds_frequency_offset;
+
+/** Channel Profile 
+ */
+typedef struct bcmolt_channel_profile
+{
+    uint8_t version;        /**< Channel profile version */
+    uint8_t channel_index;  /**< Channel profile index */
+    bcmolt_ds_frequency_offset ds_frequency_offset; /**< The difference between the actual OLT CT Tx frequency and the nominal central frequency for the given DWLCH ID, expressed in units of 0.1GHz */
+    uint8_t channel_partition;                      /**< Channel partition */
+    uint8_t uwlch_id;       /**< The assigned upstream wavelength channel ID */
+    uint32_t us_frequency;  /**< The nominal central frequency of the upstream wavelength channel or a root frequency of the cyclic set of central frequencies forming an upstream wavelength channel, indicates the value in units of 0.1 GHz. */
+    bcmolt_upstream_line_rate_capabilities us_rate; /**< US rate. */
+    uint8_t default_onu_attenuation;                /**< The default ONU attenuation level in steps of 3dB */
+    uint8_t response_threshold;                     /**< Threshold represent the maximum number of Ploams the ONU can transmit at non-zero attenuation level while attempting to establish communication with OLT CT */
+    bcmolt_link_type us_link_type;                  /**< US link type. */
+    bcmos_bool is_valid;    /**< is valid. */
+} bcmolt_channel_profile;
+
+/** Fixed-Length list: 8x channel_profile. 
+ */
+typedef struct bcmolt_arr_channel_profile_8
+{
+    bcmolt_channel_profile arr[8];  /**< Array. */
+} bcmolt_arr_channel_profile_8;
+
+/** Power consumption report per channel 
+ */
+typedef struct bcmolt_power_consumption_channel_report
+{
+    uint8_t ds_wavelength_channel_id;   /**< Downstream wavelength channel ID */
+    uint8_t us_wavelength_channel_id;   /**< Upstream wavelength channel ID */
+    uint16_t power_consumption;         /**< Power consumption */
+} bcmolt_power_consumption_channel_report;
+
+/** Fixed-Length list: 8x power_consumption_channel_report. 
+ */
+typedef struct bcmolt_arr_power_consumption_channel_report_8
+{
+    bcmolt_power_consumption_channel_report arr[8]; /**< Array. */
+} bcmolt_arr_power_consumption_channel_report_8;
+
+/** Fixed-Length list: 2x U16. 
+ */
+typedef struct bcmolt_arr_u16_2
+{
+    uint16_t arr[2];    /**< Array. */
+} bcmolt_arr_u16_2;
+
+/** Fixed-Length list: 2x U16. 
+ */
+typedef struct bcmolt_arr_u16_2_hex
+{
+    uint16_t arr[2];    /**< Array. */
+} bcmolt_arr_u16_2_hex;
+
+/** Fixed-Length list: 5x U16. 
+ */
+typedef struct bcmolt_arr_u16_5_hex
+{
+    uint16_t arr[5];    /**< Array. */
+} bcmolt_arr_u16_5_hex;
+
+/** Fixed-Length list: 7x U16. 
+ */
+typedef struct bcmolt_arr_u16_7
+{
+    uint16_t arr[7];    /**< Array. */
+} bcmolt_arr_u16_7;
+
+/** Fixed-Length list: 6x U32. 
+ */
+typedef struct bcmolt_arr_u32_6
+{
+    uint32_t arr[6];    /**< Array. */
+} bcmolt_arr_u32_6;
+
+/** Fixed-Length list: 10x U8. 
+ */
+typedef struct bcmolt_arr_u8_10
+{
+    uint8_t arr[10];    /**< Array. */
+} bcmolt_arr_u8_10;
+
+/** Fixed-Length list: 12x U8. 
+ */
+typedef struct bcmolt_arr_u8_12
+{
+    uint8_t arr[12];    /**< Array. */
+} bcmolt_arr_u8_12;
+
+/** Fixed-Length list: 13x U8. 
+ */
+typedef struct bcmolt_arr_u8_13
+{
+    uint8_t arr[13];    /**< Array. */
+} bcmolt_arr_u8_13;
+
+/** Fixed-Length list: 36x U8. 
+ */
+typedef struct bcmolt_arr_u8_36
+{
+    uint8_t arr[36];    /**< Array. */
+} bcmolt_arr_u8_36;
+
+/** Fixed-Length list: 4x U8. 
+ */
+typedef struct bcmolt_arr_u8_4
+{
+    uint8_t arr[4]; /**< Array. */
+} bcmolt_arr_u8_4;
+
+/** Fixed-Length list: 40x U8. 
+ */
+typedef struct bcmolt_arr_u8_40
+{
+    uint8_t arr[40];    /**< Array. */
+} bcmolt_arr_u8_40;
+
+/** XGPON burst profile. 
+ */
+typedef struct bcmolt_xgpon_burst_profile
+{
+    uint8_t profile_version;            /**< profile version. */
+    bcmos_bool is_fec_on;               /**< is fec on. */
+    uint8_t delimiter_size_in_bytes;    /**< delimiter size in bytes. */
+    uint32_t delimiter_pattern_high;    /**< delimiter pattern high. */
+    uint32_t delimiter_pattern_low;     /**< delimiter pattern low. */
+    uint8_t preamble_length_in_bytes;   /**< preamble length in bytes. */
+    uint8_t preamble_repeats_count;     /**< preamble repeats count. */
+    uint32_t preamble_pattern_high;     /**< preamble pattern high. */
+    uint32_t preamble_pattern_low;      /**< preamble pattern low. */
+    uint64_t pon_tag;                   /**< PON tag. */
+    uint32_t num_of_guard_bytes;        /**< number of guard bytes. */
+    bcmos_bool is_profile_valid;        /**< is profile valid. */
+    uint32_t burst_overhead_size_in_words;  /**< Burst overhead size in 4-byte words (word size is 4 bytes regardless of upstream data rate). */
+} bcmolt_xgpon_burst_profile;
+
+/** Fixed-Length list: 4x xgpon_burst_profile. 
+ */
+typedef struct bcmolt_arr_xgpon_burst_profile_4
+{
+    bcmolt_xgpon_burst_profile arr[4];  /**< Array. */
+} bcmolt_arr_xgpon_burst_profile_4;
+
+/** XGPON TRX configuration. 
+ */
+typedef struct bcmolt_xgpon_trx_configuration
+{
+    uint32_t trx_reset_pattern_first;           /**< trx reset pattern first. */
+    uint32_t trx_reset_pattern_middle;          /**< trx reset pattern middle. */
+    uint32_t trx_reset_pattern_last;            /**< trx reset pattern last. */
+    uint8_t trx_reset_middle_repeats_count;     /**< trx reset middle repeats count. */
+    uint16_t trx_reset_location;                /**< trx reset location. */
+    bcmos_bool trx_reset_polarity;              /**< trx reset polarity. */
+    uint32_t bcdr_reset_pattern_first;          /**< bcdr reset pattern first. */
+    uint32_t bcdr_reset_pattern_middle;         /**< bcdr reset pattern middle. */
+    uint32_t bcdr_reset_pattern_last;           /**< bcdr reset pattern last. */
+    uint8_t bcdr_reset_middle_repeats_count;    /**< bcdr reset middle repeats count. */
+    uint8_t bcdr_reset_location;                /**< bcdr reset location. */
+    bcmos_bool bcdr_reset_polarity;             /**< bcdr reset polarity. */
+} bcmolt_xgpon_trx_configuration;
+
+/** Fixed-Length list: 4x xgpon_trx_configuration. 
+ */
+typedef struct bcmolt_arr_xgpon_trx_configuration_4
+{
+    bcmolt_xgpon_trx_configuration arr[4];  /**< Array. */
+} bcmolt_arr_xgpon_trx_configuration_4;
+
+/** Automatic ONU deactivation. 
+ */
+typedef struct bcmolt_automatic_onu_deactivation
+{
+    bcmos_bool los;         /**< Auto deactivate ONU due to LOS */
+    bcmos_bool onu_alarms;  /**< Auto deactivate ONU due to ONU alarms */
+    bcmos_bool tiwi;        /**< Auto deactivate ONU due to TIWi alarm */
+    bcmos_bool ack_timeout; /**< Auto deactivate ONU due to Ack timeout */
+    bcmos_bool sfi;         /**< Auto deactivate ONU due to SFi alarm */
+    bcmos_bool loki;        /**< Auto deactivate ONU due to Loki alarm */
+} bcmolt_automatic_onu_deactivation;
+
+/** TRX Resync pattern control. 
+ */
+typedef struct bcmolt_resync_control
+{
+    uint8_t start_pattern;      /**< start pattern. */
+    uint8_t middle_pattern;     /**< middle pattern. */
+    uint8_t last_pattern;       /**< last pattern. */
+    uint8_t middle_repetition;  /**< middle repetition. */
+    uint8_t location;           /**< location. */
+} bcmolt_resync_control;
+
+/** BCDR resync pattern configuration. 
+ */
+typedef struct bcmolt_bcdr_resync_pattern_configuration
+{
+    bcmolt_resync_control resync_control;           /**< resync control. */
+    bcmolt_resync_control ranging_resync_control;   /**< ranging resync control. */
+} bcmolt_bcdr_resync_pattern_configuration;
+
+/** BER monitoring parameters. 
+ */
+typedef struct bcmolt_ber_monitor_params
+{
+    uint32_t us_ber_interval;   /**< Interval in milliseconds for upstream BER monitoring (0 = disabled). */
+    uint8_t sf_threshold;       /**< Signal fail alarm is raised when BER raises to 10^-x, where x is this number. */
+    uint8_t sd_threshold;       /**< Signal degrade alarm is raised when BER raises to 10^-x, where x is this number. */
+} bcmolt_ber_monitor_params;
+
+/** CBR RT Allocation profile. 
+ */
+typedef struct bcmolt_cbr_rt_allocation_profile
+{
+    uint16_t ma_7;  /**< CBA maximum allocation size for frame gap 7 */
+    uint16_t ma_3;  /**< CBA maximum allocation size for frame gap 3 */
+    uint16_t ma_1;  /**< CBA maximum allocation size for frame gap 1 */
+} bcmolt_cbr_rt_allocation_profile;
+
+/** Results of the DDR test 
+ */
+typedef struct bcmolt_ddr_test_completed
+{
+    bcmolt_ddr_test_status status;  /**< Outcome of the DDR test */
+    union
+    {
+        struct
+        {
+            bcmolt_ddr_test_result cpu_result;          /**< CPU Result. */
+            bcmolt_ddr_test_result ras_0_result;        /**< RAS 0 Result. */
+            bcmolt_ddr_test_result ras_1_result;        /**< RAS 1 Result. */
+        } completed;
+
+        struct
+        {
+            bcmolt_host_connection_fail_reason reason;  /**< Connection fail reason. */
+        } connection_failed;
+    } u;
+} bcmolt_ddr_test_completed;
+
+/** Debug parameters for device configuration 
+ */
+typedef struct bcmolt_debug_device_cfg
+{
+    uint16_t host_dma_rx_queue_size;            /**< RX Queue size of the host DMA     */
+    uint16_t host_dma_tx_queue_size;            /**< TX Queue size of the host DMA     */
+    bcmos_bool avs_control;                     /**< AVS control. */
+    bcmos_bool use_prev_pon_serdes_firmware;    /**< This is a fallback option if there are issues with the new firmware */
+    bcmos_bool use_prev_nni_serdes_firmware;    /**< This is a fallback option if there are issues with the new firmware */
+} bcmolt_debug_device_cfg;
+
+/** Device NNI Speed. 
+ */
+typedef struct bcmolt_device_nni_speed
+{
+    bcmolt_nni_speed first_half;    /**< Interface speed for the first half of the NNI ports on the system. */
+    bcmolt_nni_speed second_half;   /**< Interface speed for the second half of the NNI ports on the system. */
+} bcmolt_device_nni_speed;
+
+/* \cond UNDOCUMENTED_SYMBOLS */
+
+/** Dummy Struct For Embedded Types. 
+ */
+typedef struct bcmolt_dummy_struct_for_embedded_types
+{
+    bcmolt_aggregation_domain ad;               /**< ad. */
+    bcmolt_epon_top et;                         /**< et. */
+    bcmolt_epm_lim_global elg;                  /**< elg. */
+    bcmolt_dba_port dba_port;                   /**< dba port. */
+    bcmolt_drv_sgb_id sgb;                      /**< sgb. */
+    bcmolt_drv_icf_id icf;                      /**< icf. */
+    bcmolt_tfb_trap_behavior tfb_trap_behavior; /**< tfb trap behavior. */
+    bcmolt_tfb_mode tfb_mode;                   /**< tfb mode. */
+    bcmolt_lim_sec_mode_up lim_sec_mode_up;     /**< lim sec mode up. */
+    bcmolt_lim_sec_mode_dn lim_sec_mode_dn;     /**< lim sec mode dn. */
+    bcmolt_xim_sec_mode xim_sec_mode;           /**< xim sec mode. */
+    bcmolt_dba_ram dba_ram;                     /**< dba ram. */
+    bcmolt_hsc_ram hsc_ram;                     /**< hsc ram. */
+    bcmolt_lim_ram lim_ram;                     /**< lim ram. */
+    bcmolt_lky_ram lky_ram;                     /**< lky ram. */
+    bcmolt_mic_ram mic_ram;                     /**< mic ram. */
+    bcmolt_xpcsrm_ram xpcs_ram;                 /**< xpcs ram. */
+    bcmolt_xg2g_id xg2g_id;                     /**< xg2g id. */
+} bcmolt_dummy_struct_for_embedded_types;
+
+/* \endcond */
+
+/** Embedded image entry. 
+ */
+typedef struct bcmolt_embedded_image_entry
+{
+    bcmolt_device_image_type image_type;    /**< Type of the embedded file image. */
+    uint32_t image_size;                    /**< Size of the embedded file image.  Unit is bytes. */
+    uint32_t crc32; /**< CRC 32 checksum of entire file image data. */
+    bcmolt_embedded_image_transfer_status status;   /**< Image transfer status. */
+    char image_name[64];    /**< Name of the file image.  Null-terminated string.  This is required for the DPoE ONU only.  DPoE requires the write request OAM contains the name of the file. */
+} bcmolt_embedded_image_entry;
+
+/** Variable-length list of embedded_image_entry. 
+ */
+typedef struct bcmolt_embedded_image_entry_list_u8
+{
+    uint8_t len;                        /**< List length. */
+    bcmolt_embedded_image_entry *val;   /**< List contents. */
+} bcmolt_embedded_image_entry_list_u8;
+
+/** Encryption_information_container. 
+ */
+typedef struct bcmolt_encryption_information_container
+{
+    bcmolt_epon_encryption_information_format format;   /**< Format. */
+    union
+    {
+        struct
+        {
+            uint8_t key[16];    /**< Key. */
+        } cfb;
+
+        struct
+        {
+            uint8_t key[16];    /**< Key. */
+            uint8_t sci[8];     /**< SCI. */
+        } ctr;
+    } u;
+} bcmolt_encryption_information_container;
+
+/** EPON clock transport configuration 
+ */
+typedef struct bcmolt_epon_clock_transport_configuration
+{
+    bcmolt_epon_clock_transport_mode epon_clock_transport_mode; /**< Clock Transport mode on this OLT PON Port. */
+} bcmolt_epon_clock_transport_configuration;
+
+/** Data of unknown link, including rate and alarm status 
+ */
+typedef struct bcmolt_unknown_link_status
+{
+    bcmolt_epon_link_rate link_rate;    /**< The rate of the unknown link */
+    bcmolt_status alarm_status;         /**< Whether the unknown link alarm is raised or cleared. */
+} bcmolt_unknown_link_status;
+
+/** Data of laser on/off violating link, including attempted laser on time, 
+ * attempted laser off time, and alarm status. 
+ */
+typedef struct bcmolt_laser_on_off_status
+{
+    bcmolt_time_quanta laser_on_time;   /**< The laser on time of the ONU that is violating. */
+    bcmolt_time_quanta laser_off_time;  /**< The laser off time of the ONU that is violating. */
+    bcmolt_status alarm_status;         /**< Whether the laser on/off violation alarm is raised or cleared. */
+} bcmolt_laser_on_off_status;
+
+/** Data of range violating link, including the range it attempted to use, and 
+ * alarm status. 
+ */
+typedef struct bcmolt_range_status
+{
+    bcmolt_time_quanta range;   /**< The range that the violating link attempted to register at. */
+    bcmolt_status alarm_status; /**< Whether the range violation alarm is raised or cleared. */
+} bcmolt_range_status;
+
+/** Details of Suspected Rogue ONU provided in Denied Link Alarm 
+ */
+typedef struct bcmolt_rogue_status
+{
+    bcmolt_epon_llid denied_llid;       /**< LLID. */
+    bcmolt_time_quanta denied_range;    /**< ONU Range. */
+    bcmolt_status alarm_status;         /**< Alarm State. */
+} bcmolt_rogue_status;
+
+/** The state of all alarms on an EPON Denied Link. 
+ */
+typedef struct bcmolt_epon_denied_link_alarm_state
+{
+    bcmolt_unknown_link_status unknown_link_violation;  /**< Unknown Link Violation. */
+    bcmolt_status overhead_profile_violation;           /**< Overhead Profile Violation. */
+    bcmolt_status max_link_violation;                   /**< Max Link Violation. */
+    bcmolt_status llid_pool_empty_violation;            /**< LLID Pool Empty Violation. */
+    bcmolt_laser_on_off_status laser_on_off_violation;  /**< Laser On/Off Violation. */
+    bcmolt_status system_resource_violation;            /**< System Resource Violation. */
+    bcmolt_range_status range_violation;                /**< Range Violation. */
+    bcmolt_status tdm_channels_exhausted;               /**< TDM Channels Exhausted. */
+    bcmolt_rogue_status rogue_violation;                /**< Rogue ONU Violation. */
+    bcmolt_status upstream_bandwidth_violation;         /**< Upstream Bandwidth Violation. */
+} bcmolt_epon_denied_link_alarm_state;
+
+/** Keys and mode for encrypting the EPON logical link. 
+ */
+typedef struct bcmolt_epon_encryption_config
+{
+    bcmolt_epon_encryption_mode downstream_mode;    /**< Downstream Mode. */
+    bcmolt_epon_key_choice downstream_key_choice;   /**< Downstream Key Choice. */
+    bcmolt_encryption_information_container downstream_encryption_information;  /**< Downstream Encryption Information. */
+    bcmolt_epon_encryption_mode upstream_mode;  /**< Upstream Mode. */
+    bcmolt_epon_key_choice upstream_key_choice; /**< Upstream Key Choice. */
+    bcmolt_encryption_information_container upstream_encryption_information;    /**< Upstream Encryption Information. */
+} bcmolt_epon_encryption_config;
+
+/** Key exchange configuration that applies to the EPON link. 
+ */
+typedef struct bcmolt_epon_key_exchange_config
+{
+    bcmolt_epon_oam_type oam_type;              /**< The type of OAM that is sent to start the key exchange. */
+    uint16_t period;                            /**< Key exchange period in seconds.  0 means disable encryption. */
+    bcmolt_epon_encryption_direction direction; /**< Encryption direction: Downstream only or Bi-directional. */
+} bcmolt_epon_key_exchange_config;
+
+/** EPON laser overhead parameters. (Laser On and Laser Off times) 
+ */
+typedef struct bcmolt_epon_laser_overhead_parameters
+{
+    bcmolt_time_quanta laser_on_time;   /**< Number of time quanta to allow for ONUs' laser-on transition. */
+    bcmolt_time_quanta laser_off_time;  /**< Number of time quanta to allow for ONUs' laser-off transition. */
+} bcmolt_epon_laser_overhead_parameters;
+
+/** The state of all alarms on an EPON Link. 
+ */
+typedef struct bcmolt_epon_link_alarm_state
+{
+    bcmolt_status key_exchange_failure;         /**< Key Exchange Failure. */
+    bcmolt_status invalid_mpcp_report_received; /**< Invalid MPCP Report Received. */
+    bcmolt_status mpcp_report_timeout;          /**< MPCP Report Timeout. */
+    bcmolt_status oam_keepalive_timeout;        /**< OAM Keepalive Timeout. */
+} bcmolt_epon_link_alarm_state;
+
+/** Downstream and upstream FEC enable state for an EPON link. 
+ */
+typedef struct bcmolt_epon_link_fec_en
+{
+    bcmolt_epon_link_fec_state upstream;    /**< FEC enable state for upstream path. */
+    bcmolt_epon_link_fec_state downstream;  /**< FEC enable state for downstream path. */
+} bcmolt_epon_link_fec_en;
+
+/** EPON logical link. 
+ */
+typedef struct bcmolt_epon_link_info
+{
+    bcmolt_epon_link_status link_status;            /**< Link status flags. */
+    bcmolt_epon_link_rate rate;                     /**< The rate at which the link operates. */
+    bcmolt_epon_llid llid;                          /**< The LLID of the link. */
+    bcmolt_mpcp_discovery_info mpcp_discovery_info; /**< Flags from MPCP discovery. */
+    bcmolt_time_quanta onu_laser_on_time_tq;        /**< Laser on time reported by ONU.  This is set to 0 for 1G/1G links as 1G MPCP does not include this field. */
+    bcmolt_time_quanta onu_laser_off_time_tq;       /**< Laser off time reported by ONU. */
+    uint8_t pending_grants;             /**< The number of pending grants. */
+    bcmolt_time_quanta range_value_tq;  /**< The link's range value in TQ. */
+    bcmolt_epon_tunnel_id tunnel_id;    /**< The tunnel ID to use when sending traffic to the link. */
+} bcmolt_epon_link_info;
+
+/** Gate parameters. 
+ */
+typedef struct bcmolt_gate_parameters
+{
+    bcmolt_mpcp_registration_gate_flags flags;  /**< Flags to set for this gate. */
+    uint32_t delay_before_ms;                   /**< Delay before sending this gate in milliseconds. */
+    bcmolt_time_quanta gate_size_tq;            /**< Size of this gate in time quanta. */
+} bcmolt_gate_parameters;
+
+/** Variable-length list of gate_parameters. 
+ */
+typedef struct bcmolt_gate_parameters_list_u32
+{
+    uint32_t len;                   /**< List length. */
+    bcmolt_gate_parameters *val;    /**< List contents. */
+} bcmolt_gate_parameters_list_u32;
+
+/** Specification of the EPON gate mode and associated parameters. 
+ */
+typedef struct bcmolt_epon_registration_gate_mode
+{
+    bcmolt_mpcp_gate_mode registration_gate_mode;   /**< MPCP registration gate mode. */
+    union
+    {
+        struct
+        {
+            uint16_t reg_ack_timeout_ms;            /**< Amount of time to wait for a link to respond with a register ack after a register is sent. */
+        } teknovus;
+
+        struct
+        {
+            bcmolt_gate_parameters_list_u32 gates;  /**< Gates to send for REG ACK. */
+        } custom;
+    } u;
+} bcmolt_epon_registration_gate_mode;
+
+/** Configuration related to EPON logical link registration and reporting. 
+ */
+typedef struct bcmolt_epon_logical_link_options
+{
+    bcmolt_epon_registration_gate_mode registration_gate_mode;  /**< EPON registration gate mode. */
+    bcmolt_epon_dba_reporting_mode reporting_mode;              /**< Control for how the DBA handles received MPCP report frames. */
+    uint16_t max_links; /**< Maximum number of links to register on the EPON NI.  A value of zero indicates no fixed limit. This is an aggregate limit on the number of non-system links on a PON. This limit applies to both registered and non-registered links. This value cannot be reduced below the count of links currently allocated, nor is it valid to increase it above the sum of the per RP mac_links limits. */
+} bcmolt_epon_logical_link_options;
+
+/** The list of alarms defined for an EPON NI 
+ */
+typedef struct bcmolt_epon_ni_alarm_state
+{
+    bcmolt_status no_reports;   /**< No Reports. */
+} bcmolt_epon_ni_alarm_state;
+
+/** Encryption configuration that applies to the EPON NI as a whole. 
+ */
+typedef struct bcmolt_epon_ni_encryption_cfg
+{
+    bcmolt_epon_encryption_mode downstream_encryption_mode; /**< Downstream encryption mode. */
+    bcmolt_epon_encryption_mode upstream_encryption_mode;   /**< Upstream encryption mode. */
+} bcmolt_epon_ni_encryption_cfg;
+
+/** EPON ONU Upgrade Parameters. 
+ */
+typedef struct bcmolt_epon_onu_upgrade_params
+{
+    bcmolt_epon_oam_extension_type oam_extension_type;  /**< OAM Extension Type. */
+    union
+    {
+        struct
+        {
+            uint32_t response_timeout_ms;               /**< The length of time that the OLT will wait for the ONU to respond. */
+        } broadcom;
+
+        struct
+        {
+            uint32_t response_timeout_ms;               /**< The length of time that the OLT will wait for the ONU to respond. */
+        } ctc;
+
+        struct
+        {
+            uint32_t response_timeout_ms;               /**< The length of time that the OLT will wait for the ONU to respond. */
+        } dasan;
+
+        struct
+        {
+            uint32_t response_timeout_ms;               /**< The length of time that the OLT will wait for the ONU to respond. */
+        } kt;
+
+        struct
+        {
+            uint32_t response_timeout_ms;               /**< The length of time that the OLT will wait for the ONU to respond. */
+            uint16_t block_size;                        /**< Number of byte per data block. */
+            uint32_t final_ack_response_timeout;        /**< Timeout for the final ACK response.  The DPoE standard 1.0 specifies this should be at least 15 seconds.  Unit is seconds. */
+        } dpoe;
+    } u;
+} bcmolt_epon_onu_upgrade_params;
+
+/** EPON ONU Upgrade Status. 
+ */
+typedef struct bcmolt_epon_onu_upgrade_status
+{
+    bcmos_mac_address onu_id;                       /**< ONU ID. */
+    bcmolt_epon_onu_upgrade_return_code error_code; /**< Upgrade status. */
+    bcmolt_epon_onu_upgrade_onu_response_code onu_return_code;  /**< Response code from the ONU. */
+} bcmolt_epon_onu_upgrade_status;
+
+/** Variable-length list of epon_onu_upgrade_status. 
+ */
+typedef struct bcmolt_epon_onu_upgrade_status_list_u32
+{
+    uint32_t len;   /**< List length. */
+    bcmolt_epon_onu_upgrade_status *val;    /**< List contents. */
+} bcmolt_epon_onu_upgrade_status_list_u32;
+
+/** EPON protection switching configuration 
+ */
+typedef struct bcmolt_epon_protection_switching_configuration
+{
+    bcmolt_epon_protection_switching_type protection_type;  /**< Protection scheme. */
+    bcmolt_protection_switching_detection_options protection_switching_options; /**< Protection switching options. */
+    bcmolt_epon_protection_switching_reranging_options rerange_options;         /**< Re-ranging algorithm selection */
+    uint8_t rerange_attempts;                   /**< Number of times to re range during a switch */
+    uint16_t rerange_interval;                  /**< Interval between re-range attempts. */
+    uint16_t sync_gate_duration;                /**< Duration of sync gate. */
+    bcmolt_gpio_pin gpio_input;                 /**< Configures state on PON (working/standby) */
+    bcmolt_gpio_polarity gpio_input_polarity;   /**< GPIO Input Polarity. */
+    bcmolt_gpio_pin gpio_output;                /**< Indicates state on PON (working/standby) */
+    bcmolt_gpio_polarity gpio_output_polarity;  /**< GPIO Output Polarity. */
+} bcmolt_epon_protection_switching_configuration;
+
+/** Variable-length list of U8. 
+ */
+typedef struct bcmolt_u8_list_u16
+{
+    uint16_t len;   /**< List length. */
+    uint8_t *val;   /**< List contents. */
+} bcmolt_u8_list_u16;
+
+/** A template for an Ethernet frame of some fixed length, accompanied by a mask 
+ * vector of equal size.  When used in the context of frame transmission, the 
+ * mask vector distinguishes bit regions of the template that should be 
+ * transmitted verbatim (e.g. the content of an OAM message) from bit regions 
+ * that should be filled in farther along the data path (e.g. Ethernet source 
+ * or destination addresses).  When used in the context of frame reception, the 
+ * mask vector distinguishes bit regions of the template that are to be 
+ * compared with received frames (e.g. flags within OAM heartbeat messages 
+ * received from ONUs) from "don't care" bit regions (e.g. Ethernet source 
+ * addresses from those same messages).  
+ */
+typedef struct bcmolt_ethernet_frame_masked
+{
+    bcmolt_u8_list_u16 frame_octets;    /**< A complete Ethernet frame.  For every zero bit in the mask_octets */
+    bcmolt_u8_list_u16 mask_octets;     /**< A bit vector of the same length as frame_octets. */
+} bcmolt_ethernet_frame_masked;
+
+/** A complete Ethernet frame, beginning with the DA (layer 2 destination 
+ * address) and ending just before the FCS (frame check sequence).  In contrast 
+ * to `masked Ethernet frames,' which see, unmasked Ethernet frames are 
+ * transmitted or interpreted/relayed verbatim.  
+ */
+typedef struct bcmolt_ethernet_frame_unmasked
+{
+    bcmolt_u8_list_u16 frame_octets;    /**< Complete content of the Ethernet frame, beginning with the DA (layer 2 destination */
+} bcmolt_ethernet_frame_unmasked;
+
+/** Extended Guard Time. 
+ */
+typedef struct bcmolt_extended_guard_time
+{
+    uint32_t additional_preburst_guard_time;    /**< Additional guard time (in bytes) before all bursts for this ONU. */
+    uint32_t additional_postburst_guard_time;   /**< Additional guard time (in bytes) after all bursts for this ONU. */
+} bcmolt_extended_guard_time;
+
+/** Firmware SW Version 
+ */
+typedef struct bcmolt_firmware_sw_version
+{
+    uint8_t major;          /**< Major . */
+    uint8_t minor;          /**< Minor. */
+    uint8_t revision;       /**< Revision. */
+    uint32_t model;         /**< Model. */
+    char build_time[32];    /**< Firmware SW build time */
+} bcmolt_firmware_sw_version;
+
+/** GEM port configuration. 
+ */
+typedef struct bcmolt_gem_port_configuration
+{
+    bcmolt_gem_port_direction direction;    /**< GEM port direction */
+    bcmolt_gem_port_type type;              /**< GEM port type */
+} bcmolt_gem_port_configuration;
+
+/** GPON Alloc With State. 
+ */
+typedef struct bcmolt_gpon_alloc_with_state
+{
+    bcmolt_gpon_alloc_id alloc_id;  /**< Alloc ID. */
+    bcmolt_alloc_state state;       /**< State. */
+} bcmolt_gpon_alloc_with_state;
+
+/** Variable-length list of gpon_alloc_with_state. 
+ */
+typedef struct bcmolt_gpon_alloc_with_state_list_u16_max_32
+{
+    uint16_t len;                       /**< List length. */
+    bcmolt_gpon_alloc_with_state *val;  /**< List contents. */
+} bcmolt_gpon_alloc_with_state_list_u16_max_32;
+
+/** GPON Debug Flow Config. 
+ */
+typedef struct bcmolt_gpon_debug_flow_config
+{
+    bcmolt_control_state untagged_flow; /**< If enabled, this GEM port will expect upstream traffic to be untagged and downstream traffic to use a custom VLAN tag. */
+    bcmolt_vlan_id untagged_vid;        /**< The VLAN ID to use when adding MAC table entries for untagged traffic. */
+} bcmolt_gpon_debug_flow_config;
+
+/** Variable-length list of gpon_gem_id. 
+ */
+typedef struct bcmolt_gpon_gem_id_list_u8_max_16
+{
+    uint8_t len;                /**< List length. */
+    bcmolt_gpon_gem_id *val;    /**< List contents. */
+} bcmolt_gpon_gem_id_list_u8_max_16;
+
+/** GPON GEM Port With State. 
+ */
+typedef struct bcmolt_gpon_gem_port_with_state
+{
+    bcmolt_gpon_gem_id gem_id;          /**< GEM ID. */
+    bcmolt_gpon_gem_port_state state;   /**< State. */
+} bcmolt_gpon_gem_port_with_state;
+
+/** Variable-length list of gpon_gem_port_with_state. 
+ */
+typedef struct bcmolt_gpon_gem_port_with_state_list_u16_max_128
+{
+    uint16_t len;   /**< List length. */
+    bcmolt_gpon_gem_port_with_state *val;   /**< List contents. */
+} bcmolt_gpon_gem_port_with_state_list_u16_max_128;
+
+/** Variable-length list of gpon_gem_port_with_state. 
+ */
+typedef struct bcmolt_gpon_gem_port_with_state_list_u16_max_256
+{
+    uint16_t len;   /**< List length. */
+    bcmolt_gpon_gem_port_with_state *val;   /**< List contents. */
+} bcmolt_gpon_gem_port_with_state_list_u16_max_256;
+
+/** Options for configuring the "untagged flow" feature. 
+ */
+typedef struct bcmolt_gpon_iwf_debug_flow_config
+{
+    bcmos_bool learn_untagged_flow_vids;        /**< When a MAC/VID is learned on an untagged flow, learn the received MAC address with both the untagged VID and the received VID (even though it will be invalid). */
+    uint16_t untagged_flow_shaping_ms_per_sec;  /**< If this value is greater than 0, learning events on untagged flows will only be enabled for N milliseconds every second.  For example, a value of 10 would mean learning is only enabled for 1% of the total time. */
+} bcmolt_gpon_iwf_debug_flow_config;
+
+/** GPON Key Exchange . 
+ */
+typedef struct bcmolt_gpon_key_exchange
+{
+    uint32_t interval;              /**< Key Exchange process interval in milliseconds */
+    bcmolt_control_state control;   /**< Enable\disable periodic process of Key Exchange for active ONUs */
+    bcmolt_key_exchange_mode mode;  /**< Key exchange mode */
+    bcmolt_control_state encrypted_ports_only;  /**< Perform key exchange only to ONUs with GEM ports that have downstream encryption enabled */
+} bcmolt_gpon_key_exchange;
+
+/** GPON MAC table scan result for a single MAC table entry. 
+ */
+typedef struct bcmolt_gpon_mac_table_scan_result
+{
+    bcmolt_vlan_id vlan;            /**< The VLAN ID of the entry. */
+    bcmolt_flow_id flow_id;         /**< The flow ID assigned to traffic that matches this MAC table entry. */
+    bcmos_bool stat;                /**< Whether or not the MAC entry is static.  Static entries don't age. */
+    bcmolt_gpon_gem_id gem_port_id; /**< The GEM port ID of the traffic that created this table entry.  This only applies to automatically-learned entries.  Manually-added entries will have the value BCMOLT_PON_GEM_PORT_ID_INVALID. */
+    bcmolt_gpon_onu_id onu_id;      /**< The ONU ID for the traffic that created this table entry.  This only valid if gem_port_id is valid.  Otherwise this will be set to BCMOLT_GPON_ONU_ID_INVALID. */
+} bcmolt_gpon_mac_table_scan_result;
+
+/** Variable-length list of gpon_mac_table_scan_result. 
+ */
+typedef struct bcmolt_gpon_mac_table_scan_result_list_u16
+{
+    uint16_t len;   /**< List length. */
+    bcmolt_gpon_mac_table_scan_result *val; /**< List contents. */
+} bcmolt_gpon_mac_table_scan_result_list_u16;
+
+/** GPON NI Debug parameters 
+ */
+typedef struct bcmolt_gpon_ni_debug
+{
+    uint16_t number_of_gem_ports_per_onu;   /**< Number of Gem ports per ONU */
+} bcmolt_gpon_ni_debug;
+
+/** GPON ONU activation. 
+ */
+typedef struct bcmolt_gpon_onu_activation
+{
+    bcmolt_control_state key_exchange;              /**< Perform single key exchange during activation. */
+    bcmolt_control_state password_authentication;   /**< Perform password authentication during activation */
+    bcmolt_control_state fail_due_to_password_authentication_failure;   /**< Deactivate ONU due to password authentication failure */
+} bcmolt_gpon_onu_activation;
+
+/** GPON ONU alarm status. 
+ */
+typedef struct bcmolt_gpon_onu_alarm_state
+{
+    bcmolt_status losi;     /**< Loss of signal. */
+    bcmolt_status lofi;     /**< Loss of frame. */
+    bcmolt_status loami;    /**< Loss of PLOAM. */
+    bcmolt_status dgi;      /**< Dying Gasp. */
+    bcmolt_status tiwi;     /**< Transmission interference Alarm. */
+    bcmolt_status dowi;     /**< Drift of Window. */
+    bcmolt_status sufi;     /**< Start UP Failure. */
+    bcmolt_status sfi;      /**< Signal Fail. */
+    bcmolt_status sdi;      /**< Signal Degraded. */
+    bcmolt_status dfi;      /**< Deactivation Failure. */
+    bcmolt_status loai;     /**< Loss of ack. */
+    bcmolt_status loki;     /**< loss of key. */
+} bcmolt_gpon_onu_alarm_state;
+
+/** GPON ONU alarms. 
+ */
+typedef struct bcmolt_gpon_onu_alarms
+{
+    bcmolt_status losi;     /**< LOSi. */
+    bcmolt_status lofi;     /**< LOFi. */
+    bcmolt_status loami;    /**< LOAMi. */
+} bcmolt_gpon_onu_alarms;
+
+/** GPON ONU alarms thresholds. 
+ */
+typedef struct bcmolt_gpon_onu_alarms_thresholds
+{
+    uint8_t losi;   /**< Threshold for asserting LOSi alarm */
+    uint8_t lofi;   /**< Threshold for asserting LOFi alarm */
+    uint8_t loami;  /**< Threshold for asserting LOAMi alarm */
+} bcmolt_gpon_onu_alarms_thresholds;
+
+/** GPON ONU EQD. 
+ */
+typedef struct bcmolt_gpon_onu_eqd
+{
+    bcmolt_gpon_onu_id onu_id;  /**< ONU ID. */
+    uint32_t eqd;               /**< EQD. */
+} bcmolt_gpon_onu_eqd;
+
+/** Variable-length list of gpon_onu_eqd. 
+ */
+typedef struct bcmolt_gpon_onu_eqd_list_u32
+{
+    uint32_t len;               /**< List length. */
+    bcmolt_gpon_onu_eqd *val;   /**< List contents. */
+} bcmolt_gpon_onu_eqd_list_u32;
+
+/** Variable-length list of gpon_onu_id. 
+ */
+typedef struct bcmolt_gpon_onu_id_list_u32_max_256
+{
+    uint32_t len;               /**< List length. */
+    bcmolt_gpon_onu_id *val;    /**< List contents. */
+} bcmolt_gpon_onu_id_list_u32_max_256;
+
+/** GPON ONU upgrade params. 
+ */
+typedef struct bcmolt_gpon_onu_upgrade_params
+{
+    uint32_t response_timeout_ms;       /**< The length of time that the OLT will wait for the ONU to respond. */
+    uint8_t max_retry_count;            /**< The number of retries. */
+    bcmolt_omci_device_id omci_format;  /**< Baseline (0x0A) or Extended (0x0B). */
+    uint16_t window_size;               /**< Number of sections per window. */
+    bcmos_bool activate_commit;         /**< Automatically activate the new image and commit. */
+    uint32_t delay_for_commit_ms;       /**< Delay time before COMMIT command.  Unit is milliseconds. */
+    uint8_t max_activation_attempts;    /**< Maximum number of re-attempts to activate the ONU. */
+} bcmolt_gpon_onu_upgrade_params;
+
+/** GPON ONU Upgrade Status. 
+ */
+typedef struct bcmolt_gpon_onu_upgrade_status
+{
+    bcmolt_pon_onu_id onu_id;   /**< ONU ID. */
+    bcmolt_gpon_onu_upgrade_return_code error_code; /**< Error Code. */
+    bcmolt_omci_result_code fail_reason;            /**< Failure reason specific to the Error Code above. */
+} bcmolt_gpon_onu_upgrade_status;
+
+/** Variable-length list of gpon_onu_upgrade_status. 
+ */
+typedef struct bcmolt_gpon_onu_upgrade_status_list_u32
+{
+    uint32_t len;   /**< List length. */
+    bcmolt_gpon_onu_upgrade_status *val;    /**< List contents. */
+} bcmolt_gpon_onu_upgrade_status_list_u32;
+
+/** GPON ONU With State. 
+ */
+typedef struct bcmolt_gpon_onu_with_state
+{
+    bcmolt_gpon_onu_id onu_id;  /**< ONU ID. */
+    bcmolt_onu_state state;     /**< State. */
+} bcmolt_gpon_onu_with_state;
+
+/** Variable-length list of gpon_onu_with_state. 
+ */
+typedef struct bcmolt_gpon_onu_with_state_list_u16_max_128
+{
+    uint16_t len;                       /**< List length. */
+    bcmolt_gpon_onu_with_state *val;    /**< List contents. */
+} bcmolt_gpon_onu_with_state_list_u16_max_128;
+
+/** gpon RSSI general configuration. 
+ */
+typedef struct bcmolt_gpon_rssi_general_configuration
+{
+    uint8_t location;   /**< the pattern activation location in clock cycles relative (before) to start of burst. */
+    bcmolt_rssi_location_sign location_sign;    /**< this bit determines whether the location of the RSSI in data mode (configured as RSSI pattern 1) will be before or after the burst start. */
+    uint8_t start_pattern;                      /**< the value of the first cycle of the pattern (will be transmitted once). */
+    uint8_t middle_pattern;                     /**< the value of the pattern that will be transmitted middle_repetition times between the start and the end of the pattern. */
+    uint8_t last_pattern;                       /**< the value of the last cycle of the pattern. will be transmitted once. */
+    uint8_t middle_repertition;                 /**< the number of times the middle pattern will be repeated. */
+    uint16_t minimum_burst;                     /**< the minimum burst size needed measurement */
+} bcmolt_gpon_rssi_general_configuration;
+
+/** GPON SN Acquisition. 
+ */
+typedef struct bcmolt_gpon_sn_acquisition
+{
+    uint32_t interval;              /**< SN process interval in milliseconds */
+    bcmolt_control_state control;   /**< SN process control */
+    bcmolt_onu_post_discovery_mode onu_post_discovery_mode; /**< Automatic operation following ONU discovery */
+} bcmolt_gpon_sn_acquisition;
+
+/** Host SW Version 
+ */
+typedef struct bcmolt_host_sw_version
+{
+    uint8_t major;          /**< Major . */
+    uint8_t minor;          /**< Minor. */
+    uint8_t revision;       /**< Revision. */
+    uint32_t model;         /**< Model. */
+    char build_time[32];    /**< Firmware SW build time */
+} bcmolt_host_sw_version;
+
+/** HW PON ID. 
+ */
+typedef struct bcmolt_hw_pon_id
+{
+    uint32_t pon_id_1;  /**< LSB 32 bits of PON ID. */
+    uint32_t pon_id_2;  /**< MSB 19 bits of PON ID. */
+} bcmolt_hw_pon_id;
+
+/** Port Identity used in IEEE 802.1as Clock Tranport. 
+ */
+typedef struct bcmolt_ieee_8021as_port_identity
+{
+    uint8_t clock_identity[8];  /**< Clock identity is a unique identifier used in IEEE 802.1as clock transport. */
+    uint16_t port_number;       /**< Port Number. */
+} bcmolt_ieee_8021as_port_identity;
+
+/** Timestamp used in IEEE 802.1as clock transport. 
+ */
+typedef struct bcmolt_ieee_8021as_timestamp
+{
+    uint16_t seconds_high;  /**< The high 16 bits of the 48 bit seconds field as required by IEEE. */
+    uint32_t seconds_low;   /**< The low 32 bts of the 48 bit seconds field as required by IEEE. */
+    uint32_t nanoseconds;   /**< The Nanoseconds part of the timestamp. */
+} bcmolt_ieee_8021as_timestamp;
+
+/** Full frame of the IEEE 802.1as time sync message used in clock transport. 
+ */
+typedef struct bcmolt_ieee_8021as_time_sync
+{
+    bcmos_mac_address destination_mac;  /**< Destination MAC Address. */
+    bcmos_mac_address source_mac;       /**< Source MAC Address. */
+    uint16_t eth_type_len;              /**< Type of Ethernet PDU. */
+    uint8_t eth_subtype;                /**< Slow protocol Subtype. */
+    uint8_t ieee_oui[3];                /**< IEEE OUI. */
+    uint16_t msg_id;                    /**< Message ID. */
+    uint32_t x; /**< Reference Time. */
+    bcmolt_ieee_8021as_timestamp tod;               /**< Time of day timestamp. */
+    bcmolt_ieee_8021as_port_identity port_identity; /**< Source port identity. */
+    int8_t log_msg_interval;                        /**< Log message interval (currently unused but required by spec). */
+    double rate_ratio;                  /**< Ratio of local second to grandmaster second. */
+    uint16_t gm_time_base_indicator;    /**< Grandmaster time base indicator (currently unused but required by spec). */
+    uint8_t last_gm_phase_change[12];   /**< Time of the current grandmaster minus the time of the previous grandmaster, in units of 2^-16 ns (currently unused but required by spec). */
+    int32_t last_frequency_change;      /**< Fractional frequency offset of the current grandmaster relative to the previous grandmaster (Not currently used but required by spec). */
+} bcmolt_ieee_8021as_time_sync;
+
+/** Rate limiting / shaping for the indication channel. 
+ */
+typedef struct bcmolt_indication_shaping
+{
+    bcmos_bool enabled; /**< Whether or not the device will limit the rate of indications sent to the host. */
+    uint32_t max_rate;  /**< Maximum number of indications per second to be generated by the device. */
+    uint32_t max_burst; /**< Maximum number of indications that are allowed to be sent back-to-back. */
+} bcmolt_indication_shaping;
+
+/** LA resync pattern configuration. 
+ */
+typedef struct bcmolt_la_resync_pattern_configuration
+{
+    bcmolt_resync_control resync_control;   /**< used in normal mode */
+    bcmolt_resync_control ranging_resync_control;   /**< used in ranging mode at the beginning of each ranging cycle */
+} bcmolt_la_resync_pattern_configuration;
+
+/** log buffer. 
+ */
+typedef struct bcmolt_log_buffer
+{
+    char buff[2048];        /**< buff. */
+    uint32_t msg_to_read;   /**< msg_to_read. */
+} bcmolt_log_buffer;
+
+/** MAC table configuration. 
+ */
+typedef struct bcmolt_mac_table_configuration
+{
+    bcmolt_mac_table_miss_fallback miss_fallback;   /**< Behavior for downstream traffic when MAC table lookup fails. */
+    bcmolt_flow_id default_flow_id;                 /**< Flow ID assigned to upstream traffic on a MAC table miss if miss_fallback is set to default_flow. */
+    uint32_t aging_time;    /**< Aging time in seconds.  If no traffic is seen for a given MAC address / VID for this length of time, the entry will age and the host will be notified via indication. */
+    bcmolt_mac_table_learning_mode learning_mode;   /**< Learning table mode. */
+    bcmolt_control_state automatic_mac_learning;    /**< If enabled, new MAC table entries are added automatically the first time a new MAC address/VID combination is seen.  If disabled, no actions are taken automatically except notifying the host via indication. */
+    bcmolt_control_state automatic_mac_aging;       /**< If enabled, MAC table entries are deleted automatically when they age.  If disabled, no actions are taken automatically except notifying the host via indication. */
+    bcmolt_control_state automatic_mac_move;        /**< Only applicable if learning_mode is move.  If enabled, MAC table entries are automatically updated when a MAC move condition is encountered.  If disabled, no actions are taken automatically except notifying the host via indication. */
+    bcmos_bool automatic_static_mode;               /**< If enabled, all MAC entries that are added automatically via automatic_mac_learning and automatic_mac_move will be treated as static (not aging). */
+} bcmolt_mac_table_configuration;
+
+/** Variable-length list of MacAddress. 
+ */
+typedef struct bcmolt_macaddress_list_u32
+{
+    uint32_t len;           /**< List length. */
+    bcmos_mac_address *val; /**< List contents. */
+} bcmolt_macaddress_list_u32;
+
+/** Variable-length list of MacAddress. 
+ */
+typedef struct bcmolt_macaddress_list_u32_max_2048
+{
+    uint32_t len;           /**< List length. */
+    bcmos_mac_address *val; /**< List contents. */
+} bcmolt_macaddress_list_u32_max_2048;
+
+/** NNI Link Status. 
+ */
+typedef struct bcmolt_nni_link_status
+{
+    bcmolt_trivalent link_status;       /**< The local and remote partners are abled and ready to transmit/receive traffic. */
+    bcmolt_trivalent signal_detected;   /**< Serdes controller has detected energy on the line.  debugging purpose. */
+    bcmolt_trivalent pmd_locked;        /**< Indicates PMD locked.  debugging purpose.  If this is true, but the links status is not, that means the transceiver is not enabled. */
+} bcmolt_nni_link_status;
+
+/** OAM heartbeat configuration 
+ */
+typedef struct bcmolt_oam_heartbeat_config
+{
+    uint16_t send_period;               /**< The period at which to send OAM info frames, and expect info responses on this link (in seconds). */
+    bcmolt_u8_list_u16 transmit_frame;  /**< The OAM PDU payload from the Flags field (offset 15) to the end of the PDU (before the FCS). */
+    bcmolt_ethernet_frame_masked ignored_receive_frame_template;    /**< OAM packets matching this masked payload will be dropped rather than forwarded to the host. */
+    uint16_t receive_timeout;       /**< The time (in seconds) to report OAM timeout after the last received OAM frame. */
+    uint16_t maximum_receive_size;  /**< Maximum size of received frames.  Setting this value to zero will cause all OAM frames to be dropped. */
+} bcmolt_oam_heartbeat_config;
+
+/** Configuration parameters for the ONU power management feature. These should 
+ * match the parameters sent to the ONU via OMCI. 
+ */
+typedef struct bcmolt_onu_power_management_configuration
+{
+    uint32_t ilowpower;         /**< The maximum amount of time any ONU on this NI may spend in a low power state in units of 125us. */
+    uint32_t iaware;            /**< The minimum amount of time every ONU on his NI must spend in an aware state in units of 125us. */
+    uint16_t itransinit;        /**< The maximum amount of time required by any ONU on this NI to power up its transmitter only from a low power state in units of 125us. */
+    uint16_t itxinit;           /**< The maximum amount of time required by any ONU on this NI to power up its transceiver (transmitter + receiver) from a low power state in units of 125us. */
+    uint32_t irxoff;            /**< The maximum amount of time any ONU on this NI may spend with its receiver disabled in units of 125us. */
+    uint16_t low_power_clobi;   /**< The number of consecutive non-contiguous missing allocations to allow before raising the LOSi/LOFi/LOBi alarms on any ONU on this NI. */
+} bcmolt_onu_power_management_configuration;
+
+/** onu tuning configuration. 
+ */
+typedef struct bcmolt_onu_tuning_configuration
+{
+    uint32_t tsource;   /**< Tsource timer in msec */
+    uint32_t ttarget;   /**< Ttarget timer in msec */
+    bcmos_bool request_registration_required;   /**< is request registration part of the tuning in process */
+} bcmolt_onu_tuning_configuration;
+
+/** Identifies the TWDM channel termination within a certain domain 
+ */
+typedef struct bcmolt_pon_id
+{
+    uint32_t administrative_label;  /**< MSB 28 bit of the PON ID */
+    uint8_t dwlch_id;               /**< LSB 4 bits of the PON ID */
+} bcmolt_pon_id;
+
+/** Operation Control 
+ */
+typedef struct bcmolt_operation_control
+{
+    uint8_t re;                 /**< Indicates whether the Transmit Optical Level (TOL) contains the launch power of the OTL (RE=0) or of a reach extender (RE=1) */
+    bcmolt_odn_class odn_class; /**< Identifies the nominal optical parameters of the transceiver according to the ODN Optical Path Loss (OPL) */
+    bcmolt_control_state ds_fec_mode;   /**< Enable/Disable the downstream FEC. Default is Enable. Attribute can be set only when PON NI state is Inactive. */
+    bcmolt_tc_protocol protocol;        /**< When system mode is NGPON2, this parameter Indicate the TC layer protocol: ITU-T G.989.3 or ITU-T G.987.3 */
+    bcmolt_link_type ds_link_type;      /**< Optical link type (Unspecified, A, B, Both) */
+    bcmolt_pon_id pon_id;               /**< Identifies the TWDM channel termination within a certain domain */
+    uint8_t c;  /**< Transmit optical level (TOL) reference point indicator: S/R-CG or S/R-CP */
+} bcmolt_operation_control;
+
+/** Periodic Standby PON monitoring. 
+ */
+typedef struct bcmolt_periodic_standby_pon_monitoring
+{
+    uint32_t interval;              /**< interval in ms. */
+    bcmolt_control_state control;   /**< control. */
+} bcmolt_periodic_standby_pon_monitoring;
+
+/** Port Level Shaper Configuration:. 
+ */
+typedef struct bcmolt_pon_aggregate_shaper
+{
+    uint32_t bandwidth_kbps;    /**< Rate in kbps, 0 is disabled, If rate is >1G then use 256kbps increments, if rate is < 1G then use 64kbps increments.  */
+    uint32_t mbs_kB;            /**< Maximum Burst Size in KB : range is 2KB to 4MB in 1KB increments.  */
+} bcmolt_pon_aggregate_shaper;
+
+/** PON Alloc SLA. 
+ */
+typedef struct bcmolt_pon_alloc_sla
+{
+    uint32_t cbr_rt_bw;     /**< CBR Real Time Bandwidth which require shaping of the bandwidth allocations in a fine granularity.  */
+    uint32_t cbr_nrt_bw;    /**< Fixed Bandwidth with no critical requirement of shaping */
+    uint32_t guaranteed_bw; /**< Dynamic bandwidth which the OLT is committed to allocate upon demand */
+    uint32_t maximum_bw;    /**< Maximum allocated bandwidth allowed for this alloc ID */
+    bcmolt_additional_bw_eligibility additional_bw_eligibility; /**< Alloc ID additional BW eligibility */
+    bcmos_bool cbr_rt_compensation; /**< Set to True for AllocID with CBR RT Bandwidth that requires compensation for skipped allocations during quiet window */
+    uint8_t cbr_rt_ap_index;        /**< Allocation Profile index for CBR RT Bandwidth */
+    uint8_t cbr_nrt_ap_index;       /**< Allocation Profile index for CBR non-RT Bandwidth */
+    bcmolt_alloc_type alloc_type;   /**< Type of the alloc ID  */
+    uint8_t weight;                 /**< Alloc ID Weight used in case of Extended DBA mode */
+    uint8_t priority;               /**< Alloc ID Priority used in case of Extended DBA mode */
+} bcmolt_pon_alloc_sla;
+
+/** PON available bandwidth. 
+ */
+typedef struct bcmolt_pon_available_bandwidth
+{
+    uint32_t cbr_bw;            /**< Total BW available for CBR real-time traffic (bytes/sec). */
+    uint32_t total_bw;          /**< Total BW available for guaranteed traffic (bytes/sec) */
+    uint32_t next_onu_total_bw; /**< Total BW available for guaranteed traffic after new ONU is added (bytes/sec). */
+} bcmolt_pon_available_bandwidth;
+
+/** PON DBA. 
+ */
+typedef struct bcmolt_pon_dba
+{
+    uint8_t sr_reporting_block_size;    /**< ONU status report block size in bytes */
+    bcmolt_dba_mode dba_mode;           /**< DBA mode */
+} bcmolt_pon_dba;
+
+/** PON Distance. 
+ */
+typedef struct bcmolt_pon_distance
+{
+    uint32_t max_log_distance;  /**< Max logical distance of an ONU on the PON */
+    uint32_t max_diff_reach;    /**< Max distance between the closest and farthest ONU */
+} bcmolt_pon_distance;
+
+/** PON Drift Control. 
+ */
+typedef struct bcmolt_pon_drift_control
+{
+    uint32_t drift_interval;            /**< Interval in milliseconds for ONU transmission drift monitoring (0 = disabled). */
+    uint8_t drift_limit;                /**< DOWi threshold in bits */
+    uint8_t transmission_control_limit; /**< TIWi threshold in bits */
+} bcmolt_pon_drift_control;
+
+/** Variable-length list of pon_onu_id. 
+ */
+typedef struct bcmolt_pon_onu_id_list_u32
+{
+    uint32_t len;           /**< List length. */
+    bcmolt_pon_onu_id *val; /**< List contents. */
+} bcmolt_pon_onu_id_list_u32;
+
+/** PON Power Level. 
+ */
+typedef struct bcmolt_pon_power_level
+{
+    uint32_t pls_maximum_allocation_size;   /**< Max allocation size for PLS transmission */
+    uint8_t mode;   /**< ONU default power level mode */
+} bcmolt_pon_power_level;
+
+/** GPON protection switching configuration. 
+ */
+typedef struct bcmolt_pon_protection_switching
+{
+    uint16_t timeout;           /**< LOS switch over timeout in milliseconds */
+    bcmolt_gpio_pin gpio_pin;   /**< GPIO pin for input/output signal */
+    bcmolt_pon_protection_switching_options options;    /**< Options to control the protection switching process */
+} bcmolt_pon_protection_switching;
+
+/** PON Status. 
+ */
+typedef struct bcmolt_pon_status
+{
+    bcmolt_pon_state state;     /**< state. */
+    bcmolt_status los_status;   /**< LOS status. */
+} bcmolt_pon_status;
+
+/** PRBS checker config. 
+ */
+typedef struct bcmolt_prbs_checker_config
+{
+    bcmolt_prbs_polynomial polynom; /**< PRBS polynom type */
+    bcmolt_prbs_checker_mode mode;  /**< PRBS LOCK state machine. */
+    bcmos_bool data_invert;         /**< Invert or no invert for received PRBS data */
+    bcmolt_control_state control;   /**< Enable\Disable the US PRBS checker */
+} bcmolt_prbs_checker_config;
+
+/** PRBS Generator config. 
+ */
+typedef struct bcmolt_prbs_generator_config
+{
+    bcmolt_prbs_polynomial polynom; /**< PRBS polynom type */
+    bcmos_bool error_insert;        /**< 0 to 1 transition on this signal will insert single bit error in the MSB bit of the data bus. */
+    bcmos_bool invert;              /**< Invert or no invert for transmitted PRBS data */
+    bcmolt_control_state control;   /**< Enable\Disable the DS PRBS generator */
+} bcmolt_prbs_generator_config;
+
+/** That state of the PRBS test, lock state, and error counters. 
+ */
+typedef struct bcmolt_prbs_status
+{
+    bcmolt_prbs_lock_state lock_state;  /**< The state of the PRBS lock */
+    uint32_t error_counts;              /**< The bit errors observed during the PRBS test.  This field is clear on read. */
+} bcmolt_prbs_status;
+
+/** ranging control configuration. 
+ */
+typedef struct bcmolt_ranging_control_configuration
+{
+    uint8_t wait_state_1_window_size;   /**< wait state 1 window size. */
+    uint8_t wait_state_2_window_size;   /**< wait state 2 window size. */
+    bcmos_bool wait_after_resync_4;     /**< wait after resync 4. */
+} bcmolt_ranging_control_configuration;
+
+/** ranging resync conditions. 
+ */
+typedef struct bcmolt_ranging_resync_conditions
+{
+    bcmos_bool after_init;              /**< after init. */
+    bcmos_bool after_no_ed;             /**< after no ed. */
+    bcmos_bool after_ed;                /**< after ed. */
+    bcmos_bool after_no_del;            /**< after no del. */
+    bcmos_bool after_ranging_access;    /**< after ranging access. */
+    uint16_t med_val;                   /**< med val. */
+} bcmolt_ranging_resync_conditions;
+
+/** ranging rssi control. 
+ */
+typedef struct bcmolt_ranging_rssi_control
+{
+    bcmos_bool after_no_ed;     /**< after no ed. */
+    bcmos_bool after_ed;        /**< after ed. */
+    bcmos_bool after_reset_3;   /**< after reset 3. */
+} bcmolt_ranging_rssi_control;
+
+/** request registration status. 
+ */
+typedef struct bcmolt_request_registration_status
+{
+    bcmolt_control_state request_registration_state;    /**< request registration state. */
+    bcmos_bool sma_flag;    /**< is request registration is part of sma process */
+} bcmolt_request_registration_status;
+
+/** Rogue Detection Special Map. 
+ */
+typedef struct bcmolt_rogue_detection_special_map
+{
+    uint32_t plo_size;              /**< PLO size. */
+    bcmolt_pon_alloc_id alloc_id;   /**< Alloc ID. */
+    bcmolt_pon_onu_id onu_id;       /**< ONU ID. */
+    uint8_t access_size;            /**< Access size. */
+} bcmolt_rogue_detection_special_map;
+
+/** Variable-length list of rogue_detection_special_map. 
+ */
+typedef struct bcmolt_rogue_detection_special_map_list_u32_max_8
+{
+    uint32_t len;   /**< List length. */
+    bcmolt_rogue_detection_special_map *val;    /**< List contents. */
+} bcmolt_rogue_detection_special_map_list_u32_max_8;
+
+/** Type and attributes of the rogue detection algorithm. 
+ */
+typedef struct bcmolt_rogue_detection_algorithm
+{
+    bcmolt_rogue_detection_algorithm_type algorithm_type;   /**< Type of the rogue detection algorithm. */
+    union
+    {
+        struct
+        {
+            bcmolt_rogue_detection_window measurement_type; /**< Silent Window or Cut off Window */
+            uint32_t interval;                  /**< Periodic process timer interval in milliseconds */
+            bcmos_bool second_ranging_window;   /**< Determines whether the second ranging window should be invoked or not. */
+            bcmolt_alloc_type_to_scan alloc_type_to_scan;               /**< Alloc type to scan during rogue detection.  Unused, previously used, or all Alloc-IDs. */
+        } early_rogue_detection;
+
+        struct
+        {
+            bcmolt_rogue_detection_special_map_list_u32_max_8 accesses; /**< Accesses. */
+        } special_map;
+
+        struct
+        {
+            uint32_t additional_guard_time; /**< Additional guard time (in bytes) for all ONUs on this PON. */
+        } extended_guard_time;
+    } u;
+} bcmolt_rogue_detection_algorithm;
+
+/** Configures the attributes of the rogue ONU detection periodic process. 
+ */
+typedef struct bcmolt_rogue_onu_detection_process
+{
+    bcmolt_control_state control;   /**< Enable/Disable the rogue ONU detection process. */
+    bcmolt_rogue_detection_algorithm detection_algorithm;   /**< Type and attributes of the rogue detection algorithm. */
+} bcmolt_rogue_onu_detection_process;
+
+/** serdes configuration. 
+ */
+typedef struct bcmolt_serdes_configuration
+{
+    bcmolt_serdes_ranging_mode ranging_mode;    /**< Select ranging mode for GPON/XGPON */
+    bcmos_bool multi_ed_mode;                   /**< Allow for multiple ED for ED mode for GPON/XGPON */
+    uint16_t burst_enable_start_offset;         /**< Start offset for stat capture on SERDES channel */
+    uint16_t burst_enable_end_offset;           /**< End offset for stat capture on SERDES channel  */
+    bcmos_bool ed_invertion;                    /**< ed invertion. */
+} bcmolt_serdes_configuration;
+
+/** serial number. 
+ */
+typedef struct bcmolt_serial_number
+{
+    uint8_t vendor_id[4];       /**< vendor id. */
+    uint8_t vendor_specific[4]; /**< vendor specific. */
+} bcmolt_serial_number;
+
+/** Solicited Scheduler. 
+ */
+typedef struct bcmolt_solicited_scheduler
+{
+    bcmolt_bandwidth_Kbps bandwidth_Kbps;   /**< The maximum layer 1 throughput provided by this scheduler (in Kbps). */
+    bcmolt_time_quanta max_burst_size_tq;   /**< The maximum burst size (in TQ). */
+    uint8_t priority;                       /**< The priority at which this scheduler runs.  This field is read-only and fixed at 0 for the MIN Shaper/Scheduler  element. */
+    bcmolt_time_quanta weight_tq;           /**< The weight of this scheduler (in TQ rounded up to nearest 128). Must be greater than or equal to Grant Threshold. */
+} bcmolt_solicited_scheduler;
+
+/** Statistic alarm trigger configuration. 
+ */
+typedef struct bcmolt_stat_alarm_trigger_config
+{
+    bcmolt_stat_condition_type type;    /**< Type of condition to trigger the alarm. */
+    union
+    {
+        struct
+        {
+            uint64_t rising;            /**< The alarm is raised if the stats delta value per second becomes greater than this threshold level. */
+            uint64_t falling;           /**< The alarm is cleared if the stats delta value per second becomes less than this threshold level. */
+        } rate_threshold;
+
+        struct
+        {
+            uint64_t upper;             /**< The alarm is raised if the stats delta value per second becomes greater than this upper level. */
+            uint64_t lower;             /**< The alarm is raised if the stats delta value per second becomes less than this lower level. */
+        } rate_range;
+
+        struct
+        {
+            uint64_t limit;             /**< The alarm is raised if the stats sample value becomes greater than this level.  The alarm is cleared when the host clears the stats. */
+        } value_threshold;
+    } u;
+} bcmolt_stat_alarm_trigger_config;
+
+/** Statistics alarm soaking configuration 
+ */
+typedef struct bcmolt_stat_alarm_soak_config
+{
+    uint32_t active_soak_time;  /**< If the alarm condition is raised and stays in the raised state for at least this amount of time (unit=seconds), the alarm indication is sent to the host. */
+    uint32_t clear_soak_time;   /**< After the alarm is raised, if it is cleared and stays in the cleared state for at least this amount of time (unit=seconds), the alarm indication is sent to the host. */
+} bcmolt_stat_alarm_soak_config;
+
+/** Statistic alarm configuration. 
+ */
+typedef struct bcmolt_stat_alarm_config
+{
+    bcmolt_stat_alarm_trigger_config trigger;   /**< Statistics alarm trigger configuration. */
+    bcmolt_stat_alarm_soak_config soak;         /**< Statistics alarm soaking configuration */
+} bcmolt_stat_alarm_config;
+
+/** ASCII string with max length 100. 
+ */
+typedef struct bcmolt_str_100
+{
+    char str[100];  /**< String. */
+} bcmolt_str_100;
+
+/** ASCII string with max length 1000. 
+ */
+typedef struct bcmolt_str_1000
+{
+    char str[1000]; /**< String. */
+} bcmolt_str_1000;
+
+/** ASCII string with max length 2000. 
+ */
+typedef struct bcmolt_str_2000
+{
+    char str[2000]; /**< String. */
+} bcmolt_str_2000;
+
+/** ASCII string with max length 256. 
+ */
+typedef struct bcmolt_str_256
+{
+    char str[256];  /**< String. */
+} bcmolt_str_256;
+
+/** ASCII string with max length 64. 
+ */
+typedef struct bcmolt_str_64
+{
+    char str[64];   /**< String. */
+} bcmolt_str_64;
+
+/** SW Error. 
+ */
+typedef struct bcmolt_sw_error
+{
+    uint64_t first_error_time_us;   /**< Timestamp (in us) when his error first occurred */
+    uint64_t last_error_time_us;    /**< Timestamp (in us) when his error last occurred */
+    uint32_t line_number;           /**< Line Number. */
+    uint32_t error_counter;         /**< The number of times this error has occurred */
+    uint32_t instance;              /**< Instance. */
+    char filename[64];              /**< Filename. */
+    char task_name[64];             /**< Task Name. */
+} bcmolt_sw_error;
+
+/** System profile 
+ */
+typedef struct bcmolt_system_profile
+{
+    uint32_t ng_2_sys_id;       /**< 20-bit identifier of the NGPON2 system */
+    uint8_t version;            /**< System profile version. */
+    uint8_t channel_spacing;    /**< An integer indicating the channel spacing in units of 1GHz */
+    bcmolt_us_operating_wavelength_bands us_operating_wavelength_bands; /**< Upstream operating wavelength bands */
+    uint8_t us_mse; /**< Upstream Maximum Spectral Excursion (MSE) represented as an unsigned integer indicating the value in units of 1GHz */
+    bcmolt_calibration_record loose_calibration_bound;  /**< Spectral excursion bound below which a TWDM ONU can be considered as loosely calibrated */
+    uint16_t fsr;               /**< If a cyclic WM is used in the upstream, Free Spectral Range indicates the value in units of 0.1 GHz */
+    uint8_t twdm_channel_count; /**< The number of Channel_Profile PLOAM messages with distinct Channel Profile indices that an ONU can expect to receive while listening to this downstream wavelength channel */
+} bcmolt_system_profile;
+
+/** TRX Delimiter. 
+ */
+typedef struct bcmolt_trx_delimiter
+{
+    uint8_t pattern[3];     /**< pattern. */
+    uint8_t size;           /**< Size in bytes. */
+    uint8_t window_size;    /**< Window size. */
+} bcmolt_trx_delimiter;
+
+/** TRX Energy detect. 
+ */
+typedef struct bcmolt_trx_energy_detect
+{
+    bcmolt_energy_detect_source ranging_ed_source;      /**< Ranging ED source. */
+    bcmolt_energy_detect_source delimiter_ed_source;    /**< Delimiter ED source. */
+    uint8_t minimum_threshold;  /**< Minimum threshold. */
+    uint8_t maximum_threshold;  /**< Maximum threshold. */
+    uint8_t ed_pattern;         /**< ED pattern. */
+    uint8_t ed_pattern_size;    /**< ED pattern size. */
+    uint8_t window_size;        /**< Window size. */
+    bcmos_bool inversion;       /**< Inversion. */
+    uint8_t no_ed_threshold;    /**< no ed threshold. */
+} bcmolt_trx_energy_detect;
+
+/** TRX Preamble. 
+ */
+typedef struct bcmolt_trx_preamble
+{
+    uint8_t type_1_size;                /**< Type 1 size. */
+    uint8_t type_2_size;                /**< Type 2 size. */
+    uint8_t type_3_pre_ranging_size;    /**< Type 3 pre ranging size. */
+    uint8_t type_3_post_ranging_size;   /**< Type 3 post ranging size. */
+    uint8_t type_3_pattern;             /**< Type 3 pattern. */
+} bcmolt_trx_preamble;
+
+/** TRX RX configuration. 
+ */
+typedef struct bcmolt_trx_rx_configuration
+{
+    uint8_t wait_window_size;           /**< Wait Window size. */
+    uint8_t ranging_access_window_size; /**< Ranging access window size. */
+} bcmolt_trx_rx_configuration;
+
+/** Variable-length list of U32. 
+ */
+typedef struct bcmolt_u32_list_u32_max_500_hex
+{
+    uint32_t len;   /**< List length. */
+    uint32_t *val;  /**< List contents. */
+} bcmolt_u32_list_u32_max_500_hex;
+
+/** Variable-length list of U8. 
+ */
+typedef struct bcmolt_u8_list_u16_hex
+{
+    uint16_t len;   /**< List length. */
+    uint8_t *val;   /**< List contents. */
+} bcmolt_u8_list_u16_hex;
+
+/** Variable-length list of U8. 
+ */
+typedef struct bcmolt_u8_list_u32
+{
+    uint32_t len;   /**< List length. */
+    uint8_t *val;   /**< List contents. */
+} bcmolt_u8_list_u32;
+
+/** Variable-length list of U8. 
+ */
+typedef struct bcmolt_u8_list_u32_max_2048
+{
+    uint32_t len;   /**< List length. */
+    uint8_t *val;   /**< List contents. */
+} bcmolt_u8_list_u32_max_2048;
+
+/** UBD Info. 
+ */
+typedef struct bcmolt_ubd_info
+{
+    uint16_t actual_polling_interval;   /**< Units: 65.536us */
+    bcmolt_time_quanta actual_grant_threshold_tq;               /**< Actual Grant Threshold (TQ). */
+    bcmolt_actual_schedulershaper actual_min_schedulershaper;   /**< Actual Min Scheduler/Shaper. */
+    bcmolt_actual_schedulershaper actual_max_schedulershaper;   /**< Actual Max Scheduler/Shaper. */
+} bcmolt_ubd_info;
+
+/** The upstream bandwidth distribution for this LLID. 
+ */
+typedef struct bcmolt_upstream_bandwidth_distribution
+{
+    bcmolt_polling_interval polling_interval_us;    /**< The amount of time between when this LLID last reported upstream data and when it will next be polled (approximate: rounded down to the nearest 65.536 us). */
+    bcmolt_time_quanta grant_threshold_tq;          /**< Used to determine the maximum grant size that will be issued to this LLID (in TQ; rounded up to the nearest 128TQ; 1TQ = 16ns = 2Bytes@1G or 20Bytes@10G). */
+    bcmolt_solicited_scheduler min_schedulershaper; /**< Min Scheduler/Shaper. */
+    bcmolt_solicited_scheduler max_schedulershaper; /**< Max Scheduler/Shaper. */
+    bcmolt_time_quanta tdm_grant_size_tq;           /**< Size of TDM grants (in TQ). */
+    uint32_t tdm_grant_interval_us;                 /**< Interval between TDM grants (in us). */
+} bcmolt_upstream_bandwidth_distribution;
+
+/** VLAN tag. 
+ */
+typedef struct bcmolt_vlan_tag
+{
+    bcmolt_vlan_id vlan_id; /**< VLAN ID. */
+    uint8_t pbit;           /**< Pbit. */
+} bcmolt_vlan_tag;
+
+/** XGPON Alloc With State. 
+ */
+typedef struct bcmolt_xgpon_alloc_with_state
+{
+    bcmolt_xgpon_alloc_id alloc_id; /**< Alloc ID. */
+    bcmolt_alloc_state state;       /**< State. */
+} bcmolt_xgpon_alloc_with_state;
+
+/** Variable-length list of xgpon_alloc_with_state. 
+ */
+typedef struct bcmolt_xgpon_alloc_with_state_list_u16_max_32
+{
+    uint16_t len;                       /**< List length. */
+    bcmolt_xgpon_alloc_with_state *val; /**< List contents. */
+} bcmolt_xgpon_alloc_with_state_list_u16_max_32;
+
+/** xgpon ed state. 
+ */
+typedef struct bcmolt_xgpon_ed_state
+{
+    bcmos_bool reset_on_ed_fail;    /**< reset on ED fail. */
+    bcmos_bool reset_on_ed_success; /**< reset on ED success. */
+} bcmolt_xgpon_ed_state;
+
+/** Variable-length list of xgpon_gem_id. 
+ */
+typedef struct bcmolt_xgpon_gem_id_list_u8_max_16
+{
+    uint8_t len;                /**< List length. */
+    bcmolt_xgpon_gem_id *val;   /**< List contents. */
+} bcmolt_xgpon_gem_id_list_u8_max_16;
+
+/** XGPON GEM Port With State. 
+ */
+typedef struct bcmolt_xgpon_gem_port_with_state
+{
+    bcmolt_xgpon_gem_id gem_id;         /**< GEM ID. */
+    bcmolt_xgpon_gem_port_state state;  /**< State. */
+} bcmolt_xgpon_gem_port_with_state;
+
+/** Variable-length list of xgpon_gem_port_with_state. 
+ */
+typedef struct bcmolt_xgpon_gem_port_with_state_list_u16_max_128
+{
+    uint16_t len;   /**< List length. */
+    bcmolt_xgpon_gem_port_with_state *val;  /**< List contents. */
+} bcmolt_xgpon_gem_port_with_state_list_u16_max_128;
+
+/** Variable-length list of xgpon_gem_port_with_state. 
+ */
+typedef struct bcmolt_xgpon_gem_port_with_state_list_u16_max_256
+{
+    uint16_t len;   /**< List length. */
+    bcmolt_xgpon_gem_port_with_state *val;  /**< List contents. */
+} bcmolt_xgpon_gem_port_with_state_list_u16_max_256;
+
+/** XGPON Key Exchange. 
+ */
+typedef struct bcmolt_xgpon_key_exchange
+{
+    uint32_t interval;              /**< Key Exchange process interval in milliseconds */
+    bcmolt_control_state control;   /**< Enable\disable periodic process of Key Exchange for active ONUs */
+    bcmolt_control_state encrypted_ports_only;  /**< Perform key exchange only to ONUs with GEM ports that have downstream encryption enabled */
+} bcmolt_xgpon_key_exchange;
+
+/** XGPON Multicast key. 
+ */
+typedef struct bcmolt_xgpon_multicast_key
+{
+    bcmolt_aes_key key;     /**< AES encryption key for multicsat XGEM port IDs */
+    bcmos_bool key_control; /**< Enable\Disable encryption on multicast XGEM ports */
+} bcmolt_xgpon_multicast_key;
+
+/** XGPON NI Debug parameters 
+ */
+typedef struct bcmolt_xgpon_ni_debug
+{
+    bcmos_bool increase_available_cbr_bw;   /**< Use increase available CBR bandwidth for better BW utilization */
+    uint16_t inter_burst_gap_in_bytes;      /**< Gap between two consecutive bursts for the same ONU */
+    uint16_t number_of_gem_ports_per_onu;   /**< Number of gem ports per onu */
+} bcmolt_xgpon_ni_debug;
+
+/** XGPON ONU Activation. 
+ */
+typedef struct bcmolt_xgpon_onu_activation
+{
+    bcmolt_control_state key_exchange;  /**< Perform single key exchange during activation. */
+    bcmolt_control_state fail_due_to_regis_auto_fail;   /**< Deactivate ONU due to registration authentication failure */
+} bcmolt_xgpon_onu_activation;
+
+/** XGPON ONU AES KEY. 
+ */
+typedef struct bcmolt_xgpon_onu_aes_key
+{
+    bcmolt_aes_key encryption_key;  /**< encryption key. */
+    uint8_t key_index;              /**< key index. */
+} bcmolt_xgpon_onu_aes_key;
+
+/** XGPON ONU alarm status. 
+ */
+typedef struct bcmolt_xgpon_onu_alarm_state
+{
+    bcmolt_status losi;             /**< Loss of signal. */
+    bcmolt_status lobi;             /**< Loss of burst. */
+    bcmolt_status lopci;            /**< Loss of PLOAM channel. */
+    bcmolt_status lopci_mic_error;  /**< Mic error on ploam channel. */
+    bcmolt_status looci;            /**< Loss of OMCI channel. */
+    bcmolt_status tiwi;             /**< Transmission interference Alarm. */
+    bcmolt_status dowi;             /**< Drift of Window. */
+    bcmolt_status sufi;             /**< Start UP Failure. */
+    bcmolt_status sfi;              /**< Signal Fail. */
+    bcmolt_status sdi;              /**< Signal Degraded. */
+    bcmolt_status dfi;              /**< Deactivation Failure. */
+    bcmolt_status dgi;              /**< Dying gasp. */
+    bcmolt_status pqsi;             /**< Ploam queue status. */
+} bcmolt_xgpon_onu_alarm_state;
+
+/** XGPON ONU alarms. 
+ */
+typedef struct bcmolt_xgpon_onu_alarms
+{
+    bcmolt_status losi;             /**< LOSi. */
+    bcmolt_status lobi;             /**< LOBi. */
+    bcmolt_status lopci_miss;       /**< LOPCi miss. */
+    bcmolt_status lopci_mic_error;  /**< LOPCi mic error. */
+} bcmolt_xgpon_onu_alarms;
+
+/** XGPON ONU alarms thresholds. 
+ */
+typedef struct bcmolt_xgpon_onu_alarms_thresholds
+{
+    uint8_t losi;   /**< Threshold for asserting LOSi alarm. */
+    uint8_t lobi;   /**< Threshold for asserting LOBi alarm. */
+    uint8_t looci;  /**< Threshold for asserting LOOCi alarm. */
+    uint8_t lopci;  /**< Threshold for asserting LOPCi alarm.  */
+} bcmolt_xgpon_onu_alarms_thresholds;
+
+/** XGPON ONU EQD. 
+ */
+typedef struct bcmolt_xgpon_onu_eqd
+{
+    bcmolt_xgpon_onu_id onu_id; /**< ONU ID. */
+    uint32_t eqd;               /**< EQD. */
+} bcmolt_xgpon_onu_eqd;
+
+/** Variable-length list of xgpon_onu_eqd. 
+ */
+typedef struct bcmolt_xgpon_onu_eqd_list_u32
+{
+    uint32_t len;               /**< List length. */
+    bcmolt_xgpon_onu_eqd *val;  /**< List contents. */
+} bcmolt_xgpon_onu_eqd_list_u32;
+
+/** XGPON ONU registration keys. 
+ */
+typedef struct bcmolt_xgpon_onu_registration_keys
+{
+    bcmolt_aes_key ploam_ik;    /**< ploam ik. */
+    bcmolt_aes_key omci_ik;     /**< omci ik. */
+    bcmolt_aes_key omci_k1;     /**< omci k1. */
+    bcmolt_aes_key omci_k2;     /**< omci k2. */
+    bcmolt_aes_key kek;         /**< kek. */
+} bcmolt_xgpon_onu_registration_keys;
+
+/** XGPON ONU With State. 
+ */
+typedef struct bcmolt_xgpon_onu_with_state
+{
+    bcmolt_xgpon_onu_id onu_id; /**< ONU ID. */
+    bcmolt_onu_state state;     /**< State. */
+} bcmolt_xgpon_onu_with_state;
+
+/** Variable-length list of xgpon_onu_with_state. 
+ */
+typedef struct bcmolt_xgpon_onu_with_state_list_u16_max_510
+{
+    uint16_t len;                       /**< List length. */
+    bcmolt_xgpon_onu_with_state *val;   /**< List contents. */
+} bcmolt_xgpon_onu_with_state_list_u16_max_510;
+
+/** XGPON PLOAM handling. 
+ */
+typedef struct bcmolt_xgpon_ploam_handling
+{
+    uint32_t ack_timeout;               /**< Timeout for receiving ACK ploam */
+    uint8_t retrans_ranging_time;       /**< Number of Ranging Time ploam retransmissions in case of ACK timeout */
+    uint8_t retrans_assign_alloc_id;    /**< Number of Assign Alloc ID ploam retransmissions in case of ACK timeout */
+    uint8_t retrans_key_control;        /**< Number of Key Control ploam retransmissions in case of ACK timeout */
+    uint8_t retrans_request_registration;   /**< Number of Request Registration ploam retransmissions in case of ACK timeout */
+} bcmolt_xgpon_ploam_handling;
+
+/** XGPON protection switching configuration. 
+ */
+typedef struct bcmolt_xgpon_protection_switching
+{
+    uint16_t timeout;           /**< LOS switch over timeout in milliseconds */
+    bcmolt_gpio_pin gpio_pin;   /**< GPIO pin for input/output signal */
+    bcmos_bool fast_ranging;    /**< fast ranging  */
+} bcmolt_xgpon_protection_switching;
+
+/** xgpon protection switching debug. 
+ */
+typedef struct bcmolt_xgpon_protection_switching_debug
+{
+    uint16_t data_map_delay_ms;             /**< delay to wait after sending ranging time delta before running the data map   */
+    bcmos_bool rerange_send_ranging_time;   /**< Should the SM send the current ranging time before doing the re-ranging  */
+    uint16_t rerange_send_ranging_time_delay;   /**< the delay between sending the ranging time and starting the rerange  */
+} bcmolt_xgpon_protection_switching_debug;
+
+/** XGPON RSSI normal configuration. 
+ */
+typedef struct bcmolt_xgpon_rssi_normal_config
+{
+    bcmolt_polarity polarity;   /**< RSSI signal polarity */
+    uint8_t location;           /**< RSSI signal location in words */
+    bcmolt_sign location_sign;  /**< RSSI signal location sign */
+    uint16_t pulse_width;       /**< RSSI pulse width in words */
+    uint16_t minimum_burst;     /**< Data minimum burst size in words */
+} bcmolt_xgpon_rssi_normal_config;
+
+/** xgpon rssi ranging config. 
+ */
+typedef struct bcmolt_xgpon_rssi_ranging_config
+{
+    bcmos_bool start_on_ed;         /**< start on ED. */
+    uint8_t frame_delay;            /**< frame delay from ED */
+    uint16_t word_delay;            /**< word delay from ED */
+    uint8_t frame_delay_after_ed;   /**< frame delay from start  of ranging window */
+    uint16_t word_delay_after_ed;   /**< word delay from start  of ranging window */
+} bcmolt_xgpon_rssi_ranging_config;
+
+/** xgpon rx ranging SM patterns. 
+ */
+typedef struct bcmolt_xgpon_rx_ranging_sm_pattern
+{
+    uint32_t trx_reset_pattern_first;   /**< trx reset pattern first. */
+    uint32_t trx_reset_pattern_middle;  /**< trx reset pattern middle. */
+    uint32_t trx_reset_pattern_last;    /**< trx reset pattern last. */
+    uint8_t trx_reset_middle_repeats;   /**< trx reset middle repeats. */
+    uint8_t trx_reset_location;         /**< trx reset location. */
+    uint32_t bcdr_reset_pattern_first;  /**< bcdr reset pattern first. */
+    uint32_t bcdr_reset_pattern_middle; /**< bcdr reset pattern middle. */
+    uint32_t bcdr_reset_pattern_last;   /**< bcdr reset pattern last. */
+    uint8_t bcdr_reset_middle_repeats;  /**< bcdr reset middle repeats. */
+    uint8_t bcdr_reset_location;        /**< bcdr reset location. */
+    bcmos_bool bcdr_reset_polarity;     /**< bcdr reset polarity. */
+} bcmolt_xgpon_rx_ranging_sm_pattern;
+
+/** xgpon serdes configuration. 
+ */
+typedef struct bcmolt_xgpon_serdes_configuration
+{
+    bcmos_bool multi_ed_mode;   /**< multi ed mode. */
+    bcmolt_xgpon_serdes_ranging_mode ranging_mode;  /**< ranging mode. */
+} bcmolt_xgpon_serdes_configuration;
+
+/** XGPON SN Acquisition. 
+ */
+typedef struct bcmolt_xgpon_sn_acquisition
+{
+    uint32_t interval;              /**< SN process interval in milliseconds */
+    bcmolt_control_state control;   /**< SN process control */
+    bcmolt_onu_post_discovery_mode onu_post_discovery_mode; /**< Automatic operation following ONU discovery */
+    bcmolt_burst_profile_index burst_profile;               /**< Burst profile index to use during SN acquisition window */
+} bcmolt_xgpon_sn_acquisition;
+
+/** xgpon_trx_debug. 
+ */
+typedef struct bcmolt_xgpon_trx_debug
+{
+    bcmolt_control_state rx_reversed_polarity;  /**< transceiver reversed polarity */
+    bcmolt_control_state neg_out_bit;           /**< turn all 1 to 0 and all 0 to 1 at the output. default is not to make negative bits */
+} bcmolt_xgpon_trx_debug;
+
+/** @} */
+#endif /* BCMOLT_MODEL_DATA_H_ */
diff --git a/bcm68620_release/release/host_driver/model/bcmolt_model_ids.h b/bcm68620_release/release/host_driver/model/bcmolt_model_ids.h
new file mode 100644
index 0000000..4a1967c
--- /dev/null
+++ b/bcm68620_release/release/host_driver/model/bcmolt_model_ids.h
@@ -0,0 +1,9624 @@
+/*
+<:copyright-BRCM:2016:proprietary:standard
+ 
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+ 
+This program is the proprietary software of Broadcom Corporation and/or its
+licensors, and may only be used, duplicated, modified or distributed pursuant
+to the terms and conditions of a separate, written license agreement executed
+between you and Broadcom (an "Authorized License").  Except as set forth in
+an Authorized License, Broadcom grants no license (express or implied), right
+to use, or waiver of any kind with respect to the Software, and Broadcom
+expressly reserves all rights in and to the Software and all intellectual
+property rights therein.  IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE
+NO RIGHT TO USE THIS SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY
+BROADCOM AND DISCONTINUE ALL USE OF THE SOFTWARE.
+ 
+Except as expressly set forth in the Authorized License,
+ 
+1. This program, including its structure, sequence and organization,
+    constitutes the valuable trade secrets of Broadcom, and you shall use
+    all reasonable efforts to protect the confidentiality thereof, and to
+    use this information only in connection with your use of Broadcom
+    integrated circuit products.
+ 
+2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
+    AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, REPRESENTATIONS OR
+    WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH
+    RESPECT TO THE SOFTWARE.  BROADCOM SPECIFICALLY DISCLAIMS ANY AND
+    ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, NONINFRINGEMENT,
+    FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, ACCURACY OR
+    COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR CORRESPONDENCE
+    TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT OF USE OR
+    PERFORMANCE OF THE SOFTWARE.
+ 
+3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR
+    ITS LICENSORS BE LIABLE FOR (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL,
+    INDIRECT, OR EXEMPLARY DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY
+    WAY RELATING TO YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN
+    IF BROADCOM HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES;
+    OR (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE
+    SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE LIMITATIONS
+    SHALL APPLY NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF ANY
+    LIMITED REMEDY.
+:>
+*/
+#ifndef BCMOLT_MODEL_IDS_H_
+#define BCMOLT_MODEL_IDS_H_
+
+/** \addtogroup api_data_types 
+ * @{ 
+ */
+
+/** Identifiers for all properties contained in the ae_ni_cfg group. 
+ */
+typedef enum bcmolt_ae_ni_cfg_id
+{
+    BCMOLT_AE_NI_CFG_ID__BEGIN          = 0,
+    BCMOLT_AE_NI_CFG_ID_MAC_ADDRESS     = 0,                /**< MAC Address. */
+    BCMOLT_AE_NI_CFG_ID_AE_NI_EN        = 1,                /**< AE NI enable state. */
+    BCMOLT_AE_NI_CFG_ID_MTU_10G         = 2,                /**< MTU. */
+    BCMOLT_AE_NI_CFG_ID_PRBS_GENERATOR  = 3,                /**< PRBS Generator. */
+    BCMOLT_AE_NI_CFG_ID_PRBS_CHECKER    = 4,                /**< PRBS Checker. */
+    BCMOLT_AE_NI_CFG_ID_PRBS_STATUS     = 5,                /**< PRBS status. */
+    BCMOLT_AE_NI_CFG_ID__NUM_OF                             /**< Number of enum entries, not an entry itself. */
+} bcmolt_ae_ni_cfg_id;
+
+/** Identifiers for all properties contained in the ae_ni_key group. 
+ */
+typedef enum bcmolt_ae_ni_key_id
+{
+    BCMOLT_AE_NI_KEY_ID__BEGIN          = 0,
+    BCMOLT_AE_NI_KEY_ID_AE_NI           = 0,                /**< AE NI number. */
+    BCMOLT_AE_NI_KEY_ID__NUM_OF                             /**< Number of enum entries, not an entry itself. */
+} bcmolt_ae_ni_key_id;
+
+/** Identifiers for all properties contained in the ae_ni_set_ae_ni_en_state 
+ * group. 
+ */
+typedef enum bcmolt_ae_ni_set_ae_ni_en_state_id
+{
+    BCMOLT_AE_NI_SET_AE_NI_EN_STATE_ID__BEGIN   = 0,
+    BCMOLT_AE_NI_SET_AE_NI_EN_STATE_ID_NEW_STATE= 0,        /**< New AE NI enable state. */
+    BCMOLT_AE_NI_SET_AE_NI_EN_STATE_ID__NUM_OF              /**< Number of enum entries, not an entry itself. */
+} bcmolt_ae_ni_set_ae_ni_en_state_id;
+
+/** Identifiers for all properties contained in the ae_path_ds_auto_cfg group. 
+ */
+typedef enum bcmolt_ae_path_ds_auto_cfg_id
+{
+    BCMOLT_AE_PATH_DS_AUTO_CFG_ID__BEGIN            = 0,
+    BCMOLT_AE_PATH_DS_AUTO_CFG_ID_STAT_ALARM_CLEARED= 0,    /**< Stat Alarm Cleared. */
+    BCMOLT_AE_PATH_DS_AUTO_CFG_ID_STAT_ALARM_RAISED = 1,    /**< Stat Alarm Raised. */
+    BCMOLT_AE_PATH_DS_AUTO_CFG_ID__NUM_OF                   /**< Number of enum entries, not an entry itself. */
+} bcmolt_ae_path_ds_auto_cfg_id;
+
+/** Identifiers for all properties contained in the ae_path_ds_key group. 
+ */
+typedef enum bcmolt_ae_path_ds_key_id
+{
+    BCMOLT_AE_PATH_DS_KEY_ID__BEGIN                 = 0,
+    BCMOLT_AE_PATH_DS_KEY_ID_AE_NI                  = 0,    /**< AE NI (Active Ethernet Network Interface) number. */
+    BCMOLT_AE_PATH_DS_KEY_ID__NUM_OF                        /**< Number of enum entries, not an entry itself. */
+} bcmolt_ae_path_ds_key_id;
+
+/** Identifiers for all properties contained in the 
+ * ae_path_ds_stat_alarm_cleared group. 
+ */
+typedef enum bcmolt_ae_path_ds_stat_alarm_cleared_id
+{
+    BCMOLT_AE_PATH_DS_STAT_ALARM_CLEARED_ID__BEGIN  = 0,
+    BCMOLT_AE_PATH_DS_STAT_ALARM_CLEARED_ID_STAT    = 0,    /**< Statistic ID. */
+    BCMOLT_AE_PATH_DS_STAT_ALARM_CLEARED_ID__NUM_OF         /**< Number of enum entries, not an entry itself. */
+} bcmolt_ae_path_ds_stat_alarm_cleared_id;
+
+/** Identifiers for all properties contained in the ae_path_ds_stat_alarm_raised 
+ * group. 
+ */
+typedef enum bcmolt_ae_path_ds_stat_alarm_raised_id
+{
+    BCMOLT_AE_PATH_DS_STAT_ALARM_RAISED_ID__BEGIN   = 0,
+    BCMOLT_AE_PATH_DS_STAT_ALARM_RAISED_ID_STAT     = 0,    /**< Statistic ID. */
+    BCMOLT_AE_PATH_DS_STAT_ALARM_RAISED_ID__NUM_OF          /**< Number of enum entries, not an entry itself. */
+} bcmolt_ae_path_ds_stat_alarm_raised_id;
+
+/** Identifiers for all properties contained in the ae_path_ds_stat_cfg group. 
+ */
+typedef enum bcmolt_ae_path_ds_stat_cfg_id
+{
+    BCMOLT_AE_PATH_DS_STAT_CFG_ID__BEGIN            = 0,
+    BCMOLT_AE_PATH_DS_STAT_CFG_ID_CFG               = 0,    /**< Configuration. */
+    BCMOLT_AE_PATH_DS_STAT_CFG_ID__NUM_OF                   /**< Number of enum entries, not an entry itself. */
+} bcmolt_ae_path_ds_stat_cfg_id;
+
+/** Identifiers for all properties contained in the ae_path_ds_stat group. 
+ */
+typedef enum bcmolt_ae_path_ds_stat_id
+{
+    BCMOLT_AE_PATH_DS_STAT_ID__BEGIN                = 0,
+    BCMOLT_AE_PATH_DS_STAT_ID_BYTES                 = 0,    /**< Bytes. */
+    BCMOLT_AE_PATH_DS_STAT_ID_FRAMES                = 1,    /**< Frames. */
+    BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_64             = 2,    /**< 64 Byte Frames. */
+    BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_65_127         = 3,    /**< 65-127 Byte Frames. */
+    BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_128_255        = 4,    /**< 128-255 Byte Frames. */
+    BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_256_511        = 5,    /**< 256-511 Byte Frames. */
+    BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_512_1023       = 6,    /**< 512-1023 Byte Frames. */
+    BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_1024_1518      = 7,    /**< 1024-1518 Byte Frames. */
+    BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_1519_2047      = 8,    /**< 1519-2047 Byte Frames. */
+    BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_2048_4095      = 9,    /**< 2048_4095 Byte Frames. */
+    BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_4096_9216      = 10,   /**< 4096-9216 Byte Frames. */
+    BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_9217_16383     = 11,   /**< 9217-16383 Byte Frames. */
+    BCMOLT_AE_PATH_DS_STAT_ID_BROADCAST_FRAMES      = 12,   /**< Broadcast Frames. */
+    BCMOLT_AE_PATH_DS_STAT_ID_DATA_BYTES            = 13,   /**< Data Bytes. */
+    BCMOLT_AE_PATH_DS_STAT_ID_MULTICAST_FRAMES      = 14,   /**< Mulitcast Frames. */
+    BCMOLT_AE_PATH_DS_STAT_ID_UNICAST_FRAMES        = 15,   /**< Unicast Frames. */
+    BCMOLT_AE_PATH_DS_STAT_ID_ABORT_FRAMES          = 16,   /**< Abort Frames. */
+    BCMOLT_AE_PATH_DS_STAT_ID__NUM_OF                       /**< Number of enum entries, not an entry itself. */
+} bcmolt_ae_path_ds_stat_id;
+
+/** Identifiers for all properties contained in the ae_path_us_auto_cfg group. 
+ */
+typedef enum bcmolt_ae_path_us_auto_cfg_id
+{
+    BCMOLT_AE_PATH_US_AUTO_CFG_ID__BEGIN            = 0,
+    BCMOLT_AE_PATH_US_AUTO_CFG_ID_STAT_ALARM_CLEARED= 0,    /**< Stat Alarm Cleared. */
+    BCMOLT_AE_PATH_US_AUTO_CFG_ID_STAT_ALARM_RAISED = 1,    /**< Stat Alarm Raised. */
+    BCMOLT_AE_PATH_US_AUTO_CFG_ID__NUM_OF                   /**< Number of enum entries, not an entry itself. */
+} bcmolt_ae_path_us_auto_cfg_id;
+
+/** Identifiers for all properties contained in the ae_path_us_key group. 
+ */
+typedef enum bcmolt_ae_path_us_key_id
+{
+    BCMOLT_AE_PATH_US_KEY_ID__BEGIN                 = 0,
+    BCMOLT_AE_PATH_US_KEY_ID_AE_NI                  = 0,    /**< AE NI. */
+    BCMOLT_AE_PATH_US_KEY_ID__NUM_OF                        /**< Number of enum entries, not an entry itself. */
+} bcmolt_ae_path_us_key_id;
+
+/** Identifiers for all properties contained in the 
+ * ae_path_us_stat_alarm_cleared group. 
+ */
+typedef enum bcmolt_ae_path_us_stat_alarm_cleared_id
+{
+    BCMOLT_AE_PATH_US_STAT_ALARM_CLEARED_ID__BEGIN  = 0,
+    BCMOLT_AE_PATH_US_STAT_ALARM_CLEARED_ID_STAT    = 0,    /**< Statistic ID. */
+    BCMOLT_AE_PATH_US_STAT_ALARM_CLEARED_ID__NUM_OF         /**< Number of enum entries, not an entry itself. */
+} bcmolt_ae_path_us_stat_alarm_cleared_id;
+
+/** Identifiers for all properties contained in the ae_path_us_stat_alarm_raised 
+ * group. 
+ */
+typedef enum bcmolt_ae_path_us_stat_alarm_raised_id
+{
+    BCMOLT_AE_PATH_US_STAT_ALARM_RAISED_ID__BEGIN   = 0,
+    BCMOLT_AE_PATH_US_STAT_ALARM_RAISED_ID_STAT     = 0,    /**< Statistic ID. */
+    BCMOLT_AE_PATH_US_STAT_ALARM_RAISED_ID__NUM_OF          /**< Number of enum entries, not an entry itself. */
+} bcmolt_ae_path_us_stat_alarm_raised_id;
+
+/** Identifiers for all properties contained in the ae_path_us_stat_cfg group. 
+ */
+typedef enum bcmolt_ae_path_us_stat_cfg_id
+{
+    BCMOLT_AE_PATH_US_STAT_CFG_ID__BEGIN            = 0,
+    BCMOLT_AE_PATH_US_STAT_CFG_ID_CFG               = 0,    /**< Configuration. */
+    BCMOLT_AE_PATH_US_STAT_CFG_ID__NUM_OF                   /**< Number of enum entries, not an entry itself. */
+} bcmolt_ae_path_us_stat_cfg_id;
+
+/** Identifiers for all properties contained in the ae_path_us_stat group. 
+ */
+typedef enum bcmolt_ae_path_us_stat_id
+{
+    BCMOLT_AE_PATH_US_STAT_ID__BEGIN                = 0,
+    BCMOLT_AE_PATH_US_STAT_ID_BYTES                 = 0,    /**< Bytes. */
+    BCMOLT_AE_PATH_US_STAT_ID_FRAMES                = 1,    /**< Frames. */
+    BCMOLT_AE_PATH_US_STAT_ID_FRAMES_64             = 2,    /**< 64 Byte Frames. */
+    BCMOLT_AE_PATH_US_STAT_ID_FRAMES_65_127         = 3,    /**< 65-127 Byte Frames. */
+    BCMOLT_AE_PATH_US_STAT_ID_FRAMES_128_255        = 4,    /**< 128-255 Byte Frames. */
+    BCMOLT_AE_PATH_US_STAT_ID_FRAMES_256_511        = 5,    /**< 256-511 Byte Frames. */
+    BCMOLT_AE_PATH_US_STAT_ID_FRAMES_512_1023       = 6,    /**< 512-1023 Byte Frames. */
+    BCMOLT_AE_PATH_US_STAT_ID_FRAMES_1024_1518      = 7,    /**< 1024-1518 Byte Frames. */
+    BCMOLT_AE_PATH_US_STAT_ID_FRAMES_1519_2047      = 8,    /**< 1519-2047 Byte Frames. */
+    BCMOLT_AE_PATH_US_STAT_ID_FRAMES_2048_4095      = 9,    /**< 2048_4095 Byte Frames. */
+    BCMOLT_AE_PATH_US_STAT_ID_FRAMES_4096_9216      = 10,   /**< 4096-9216 Byte Frames. */
+    BCMOLT_AE_PATH_US_STAT_ID_FRAMES_9217_16383     = 11,   /**< 9217-16383 Byte Frames. */
+    BCMOLT_AE_PATH_US_STAT_ID_BROADCAST_FRAMES      = 12,   /**< Broadcast Frames. */
+    BCMOLT_AE_PATH_US_STAT_ID_DATA_BYTES            = 13,   /**< Data Bytes. */
+    BCMOLT_AE_PATH_US_STAT_ID_MULTICAST_FRAMES      = 14,   /**< Mulitcast Frames. */
+    BCMOLT_AE_PATH_US_STAT_ID_UNICAST_FRAMES        = 15,   /**< Unicast Frames. */
+    BCMOLT_AE_PATH_US_STAT_ID_ABORT_FRAMES          = 16,   /**< Abort Frames. */
+    BCMOLT_AE_PATH_US_STAT_ID_FCS_ERROR             = 17,   /**< FCS Error. */
+    BCMOLT_AE_PATH_US_STAT_ID_OVERSIZE_ERROR        = 18,   /**< Oversize Error. */
+    BCMOLT_AE_PATH_US_STAT_ID_RUNT_ERROR            = 19,   /**< Runt Error. */
+    BCMOLT_AE_PATH_US_STAT_ID__NUM_OF                       /**< Number of enum entries, not an entry itself. */
+} bcmolt_ae_path_us_stat_id;
+
+/** Identifiers for all properties contained in the channel_cfg group. 
+ */
+typedef enum bcmolt_channel_cfg_id
+{
+    BCMOLT_CHANNEL_CFG_ID__BEGIN                    = 0,
+    BCMOLT_CHANNEL_CFG_ID_OPERATION_CONTROL         = 0,    /**< Operation control. */
+    BCMOLT_CHANNEL_CFG_ID_TOL                       = 1,    /**< TOL. */
+    BCMOLT_CHANNEL_CFG_ID_SYSTEM_PROFILE            = 2,    /**< System profile. */
+    BCMOLT_CHANNEL_CFG_ID_CHANNEL_PROFILE           = 3,    /**< Channel profile. */
+    BCMOLT_CHANNEL_CFG_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_channel_cfg_id;
+
+/** Identifiers for all properties contained in the channel_key group. 
+ */
+typedef enum bcmolt_channel_key_id
+{
+    BCMOLT_CHANNEL_KEY_ID__BEGIN                    = 0,
+    BCMOLT_CHANNEL_KEY_ID_PON_NI                    = 0,    /**< PON network interface. */
+    BCMOLT_CHANNEL_KEY_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_channel_key_id;
+
+/** Identifiers for all properties contained in the debug_auto_cfg group. 
+ */
+typedef enum bcmolt_debug_auto_cfg_id
+{
+    BCMOLT_DEBUG_AUTO_CFG_ID__BEGIN                 = 0,
+    BCMOLT_DEBUG_AUTO_CFG_ID_CLI_OUTPUT             = 0,    /**< cli_output. */
+    BCMOLT_DEBUG_AUTO_CFG_ID_FILE_ALMOST_FULL       = 1,    /**< file_almost_full. */
+    BCMOLT_DEBUG_AUTO_CFG_ID__NUM_OF                        /**< Number of enum entries, not an entry itself. */
+} bcmolt_debug_auto_cfg_id;
+
+/** Identifiers for all properties contained in the debug_cfg group. 
+ */
+typedef enum bcmolt_debug_cfg_id
+{
+    BCMOLT_DEBUG_CFG_ID__BEGIN                      = 0,
+    BCMOLT_DEBUG_CFG_ID_CONSOLE_REDIRECTION         = 0,    /**< Console_redirection. */
+    BCMOLT_DEBUG_CFG_ID_INDICATIONS_DROPPED         = 1,    /**< Indications Dropped. */
+    BCMOLT_DEBUG_CFG_ID_FILE_USED_PERCENT           = 2,    /**< File used percent. */
+    BCMOLT_DEBUG_CFG_ID_API_CAPTURE_CFG             = 3,    /**< API Capture Cfg. */
+    BCMOLT_DEBUG_CFG_ID_API_CAPTURE_STATS           = 4,    /**< API Capture Stats. */
+    BCMOLT_DEBUG_CFG_ID_API_CAPTURE_BUFFER_READ     = 5,    /**< API Capture Buffer Read. */
+    BCMOLT_DEBUG_CFG_ID_API_CAPTURE_BUFFER          = 6,    /**< API Capture Buffer. */
+    BCMOLT_DEBUG_CFG_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_debug_cfg_id;
+
+/** Identifiers for all properties contained in the debug_cli_input group. 
+ */
+typedef enum bcmolt_debug_cli_input_id
+{
+    BCMOLT_DEBUG_CLI_INPUT_ID__BEGIN                = 0,
+    BCMOLT_DEBUG_CLI_INPUT_ID_DATA                  = 0,    /**< data. */
+    BCMOLT_DEBUG_CLI_INPUT_ID__NUM_OF                       /**< Number of enum entries, not an entry itself. */
+} bcmolt_debug_cli_input_id;
+
+/** Identifiers for all properties contained in the debug_cli_output group. 
+ */
+typedef enum bcmolt_debug_cli_output_id
+{
+    BCMOLT_DEBUG_CLI_OUTPUT_ID__BEGIN               = 0,
+    BCMOLT_DEBUG_CLI_OUTPUT_ID_DATA                 = 0,    /**< data. */
+    BCMOLT_DEBUG_CLI_OUTPUT_ID__NUM_OF                      /**< Number of enum entries, not an entry itself. */
+} bcmolt_debug_cli_output_id;
+
+/** Identifiers for all properties contained in the debug_file_almost_full 
+ * group. 
+ */
+typedef enum bcmolt_debug_file_almost_full_id
+{
+    BCMOLT_DEBUG_FILE_ALMOST_FULL_ID__NUM_OF                /**< Number of enum entries, not an entry itself. */
+} bcmolt_debug_file_almost_full_id;
+
+/** Identifiers for all properties contained in the debug_key group. 
+ */
+typedef enum bcmolt_debug_key_id
+{
+    BCMOLT_DEBUG_KEY_ID__BEGIN                      = 0,
+    BCMOLT_DEBUG_KEY_ID_RESERVED                    = 0,    /**< Reserved. */
+    BCMOLT_DEBUG_KEY_ID__NUM_OF                 /**< Number of enum entries, not an entry itself. */
+} bcmolt_debug_key_id;
+
+/** Identifiers for all properties contained in the debug_reset_api_capture 
+ * group. 
+ */
+typedef enum bcmolt_debug_reset_api_capture_id
+{
+    BCMOLT_DEBUG_RESET_API_CAPTURE_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_debug_reset_api_capture_id;
+
+/** Identifiers for all properties contained in the debug_start_api_capture 
+ * group. 
+ */
+typedef enum bcmolt_debug_start_api_capture_id
+{
+    BCMOLT_DEBUG_START_API_CAPTURE_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_debug_start_api_capture_id;
+
+/** Identifiers for all properties contained in the debug_stop_api_capture 
+ * group. 
+ */
+typedef enum bcmolt_debug_stop_api_capture_id
+{
+    BCMOLT_DEBUG_STOP_API_CAPTURE_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_debug_stop_api_capture_id;
+
+/** Identifiers for all properties contained in the device_auto_cfg group. 
+ */
+typedef enum bcmolt_device_auto_cfg_id
+{
+    BCMOLT_DEVICE_AUTO_CFG_ID__BEGIN                    = 0,
+    BCMOLT_DEVICE_AUTO_CFG_ID_CONNECTION_COMPLETE       = 0,    /**< Connection Complete. */
+    BCMOLT_DEVICE_AUTO_CFG_ID_CONNECTION_ESTABLISHED    = 1,    /**< Connection Established (Internal). */
+    BCMOLT_DEVICE_AUTO_CFG_ID_CONNECTION_FAILURE        = 2,    /**< Connection Failure. */
+    BCMOLT_DEVICE_AUTO_CFG_ID_DDR_TEST_COMPLETE         = 3,    /**< DDR Test Complete. */
+    BCMOLT_DEVICE_AUTO_CFG_ID_DEVICE_KEEP_ALIVE         = 4,    /**< Device Keep Alive (Internal). */
+    BCMOLT_DEVICE_AUTO_CFG_ID_DEVICE_READY              = 5,    /**< Device Ready (Internal). */
+    BCMOLT_DEVICE_AUTO_CFG_ID_DISCONNECTION_COMPLETE    = 6,    /**< Disconnection Complete. */
+    BCMOLT_DEVICE_AUTO_CFG_ID_IMAGE_TRANSFER_COMPLETE   = 7,    /**< Image Transfer Complete. */
+    BCMOLT_DEVICE_AUTO_CFG_ID_INDICATIONS_DROPPED       = 8,    /**< Indications Dropped. */
+    BCMOLT_DEVICE_AUTO_CFG_ID_SW_ERROR                  = 9,    /**< sw error. */
+    BCMOLT_DEVICE_AUTO_CFG_ID_SW_EXCEPTION              = 10,   /**< sw exception. */
+    BCMOLT_DEVICE_AUTO_CFG_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_device_auto_cfg_id;
+
+/** Identifiers for all properties contained in the device_cfg group. 
+ */
+typedef enum bcmolt_device_cfg_id
+{
+    BCMOLT_DEVICE_CFG_ID__BEGIN                             = 0,
+    BCMOLT_DEVICE_CFG_ID_SYSTEM_MODE                        = 0,    /**< system_mode. */
+    BCMOLT_DEVICE_CFG_ID_KEEPALIVE_INTERVAL                 = 1,    /**< Device Keepalive Interval. */
+    BCMOLT_DEVICE_CFG_ID_KEEPALIVE_TOLERANCE                = 2,    /**< Device Keepalive tolerance . */
+    BCMOLT_DEVICE_CFG_ID_FIRMWARE_SW_VERSION                = 3,    /**< Firmware SW Version. */
+    BCMOLT_DEVICE_CFG_ID_HOST_SW_VERSION                    = 4,    /**< Host SW Version. */
+    BCMOLT_DEVICE_CFG_ID_CHIP_REVISION                      = 5,    /**< Chip Revision. */
+    BCMOLT_DEVICE_CFG_ID_STATE                              = 6,    /**< Device state. */
+    BCMOLT_DEVICE_CFG_ID_DEBUG                              = 7,    /**< debug parameters. */
+    BCMOLT_DEVICE_CFG_ID_NNI_SPEED                          = 8,    /**< NNI Speed. */
+    BCMOLT_DEVICE_CFG_ID_PROTECTION_SWITCHING_EXT_IRQ       = 9,    /**< Protection Switching External IRQ. */
+    BCMOLT_DEVICE_CFG_ID_EPON_CLOCK_TRANSPORT_SAMPLE_DELAY  = 10,   /**< EPON Clock Transport Sample Delay. */
+    BCMOLT_DEVICE_CFG_ID_INDICATION_SHAPING                 = 11,   /**< Indication Shaping. */
+    BCMOLT_DEVICE_CFG_ID_CHIP_TEMPERATURE                   = 12,   /**< chip temperature . */
+    BCMOLT_DEVICE_CFG_ID_GPON_XGPON_TOD_ENABLE              = 13,   /**< GPON/XGPON ToD enable. */
+    BCMOLT_DEVICE_CFG_ID_GPON_XGPON_TOD_GPIO_PIN            = 14,   /**< GPON/XGPON ToD GPIO pin. */
+    BCMOLT_DEVICE_CFG_ID_GPON_XGPON_TOD_CONNECTED_INTERNALLY= 15,   /**< GPON/XGPON is ToD internally. */
+    BCMOLT_DEVICE_CFG_ID_EPON_8021_AS_TOD_FORMAT            = 16,   /**< EPON 802.1AS ToD Format. */
+    BCMOLT_DEVICE_CFG_ID_EPON_SHAPER_MODE                   = 17,   /**< EPON Shaper Mode. */
+    BCMOLT_DEVICE_CFG_ID_EMBEDDED_IMAGE_LIST                = 18,   /**< Embedded image list. */
+    BCMOLT_DEVICE_CFG_ID_CHIP_VOLTAGE                       = 19,   /**< chip voltage. */
+    BCMOLT_DEVICE_CFG_ID_EPON_TOD_STRING                    = 20,   /**< EPON ToD String. */
+    BCMOLT_DEVICE_CFG_ID_XGPON_NUM_OF_ONUS                  = 21,   /**< xgpon num of onus. */
+    BCMOLT_DEVICE_CFG_ID_DEVICE_IP_ADDRESS                  = 22,   /**< Device IP Address. */
+    BCMOLT_DEVICE_CFG_ID_DEVICE_UDP_PORT                    = 23,   /**< Device UDP port. */
+    BCMOLT_DEVICE_CFG_ID_TOD_UART_BAUDRATE                  = 24,   /**< UART baudrate. */
+    BCMOLT_DEVICE_CFG_ID_GPON_XGPON_TOD_STRING_LENGTH       = 25,   /**< GPON/XGPON ToD string length. */
+    BCMOLT_DEVICE_CFG_ID__NUM_OF        /**< Number of enum entries, not an entry itself. */
+} bcmolt_device_cfg_id;
+
+/** Identifiers for all properties contained in the device_connect group. 
+ */
+typedef enum bcmolt_device_connect_id
+{
+    BCMOLT_DEVICE_CONNECT_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_device_connect_id;
+
+/** Identifiers for all properties contained in the device_connection_complete 
+ * group. 
+ */
+typedef enum bcmolt_device_connection_complete_id
+{
+    BCMOLT_DEVICE_CONNECTION_COMPLETE_ID__BEGIN             = 0,
+    BCMOLT_DEVICE_CONNECTION_COMPLETE_ID_STANDALONE         = 0,    /**< Standalone. */
+    BCMOLT_DEVICE_CONNECTION_COMPLETE_ID__NUM_OF                    /**< Number of enum entries, not an entry itself. */
+} bcmolt_device_connection_complete_id;
+
+/** Identifiers for all properties contained in the 
+ * device_connection_established group. 
+ */
+typedef enum bcmolt_device_connection_established_id
+{
+    BCMOLT_DEVICE_CONNECTION_ESTABLISHED_ID__NUM_OF                 /**< Number of enum entries, not an entry itself. */
+} bcmolt_device_connection_established_id;
+
+/** Identifiers for all properties contained in the device_connection_failure 
+ * group. 
+ */
+typedef enum bcmolt_device_connection_failure_id
+{
+    BCMOLT_DEVICE_CONNECTION_FAILURE_ID__BEGIN              = 0,
+    BCMOLT_DEVICE_CONNECTION_FAILURE_ID_REASON              = 0,    /**< Connection fail reason. */
+    BCMOLT_DEVICE_CONNECTION_FAILURE_ID__NUM_OF                     /**< Number of enum entries, not an entry itself. */
+} bcmolt_device_connection_failure_id;
+
+/** Identifiers for all properties contained in the device_ddr_test_complete 
+ * group. 
+ */
+typedef enum bcmolt_device_ddr_test_complete_id
+{
+    BCMOLT_DEVICE_DDR_TEST_COMPLETE_ID__BEGIN               = 0,
+    BCMOLT_DEVICE_DDR_TEST_COMPLETE_ID_DDR_TEST             = 0,    /**< DDR Test. */
+    BCMOLT_DEVICE_DDR_TEST_COMPLETE_ID__NUM_OF                      /**< Number of enum entries, not an entry itself. */
+} bcmolt_device_ddr_test_complete_id;
+
+/** Identifiers for all properties contained in the device_device_keep_alive 
+ * group. 
+ */
+typedef enum bcmolt_device_device_keep_alive_id
+{
+    BCMOLT_DEVICE_DEVICE_KEEP_ALIVE_ID__BEGIN               = 0,
+    BCMOLT_DEVICE_DEVICE_KEEP_ALIVE_ID_SEQUENCE_NUMBER      = 0,    /**< sequence number. */
+    BCMOLT_DEVICE_DEVICE_KEEP_ALIVE_ID_TIME_STAMP           = 1,    /**< time stamp. */
+    BCMOLT_DEVICE_DEVICE_KEEP_ALIVE_ID__NUM_OF                      /**< Number of enum entries, not an entry itself. */
+} bcmolt_device_device_keep_alive_id;
+
+/** Identifiers for all properties contained in the device_device_ready group. 
+ */
+typedef enum bcmolt_device_device_ready_id
+{
+    BCMOLT_DEVICE_DEVICE_READY_ID__BEGIN                    = 0,
+    BCMOLT_DEVICE_DEVICE_READY_ID_FIRMWARE_SW_VERSION       = 0,    /**< Software Version. */
+    BCMOLT_DEVICE_DEVICE_READY_ID_SYSTEM_MODE               = 1,    /**< System Mode. */
+    BCMOLT_DEVICE_DEVICE_READY_ID_NNI_SPEED                 = 2,    /**< NNI Speed. */
+    BCMOLT_DEVICE_DEVICE_READY_ID_CHIP_REVISION             = 3,    /**< Chip Revision. */
+    BCMOLT_DEVICE_DEVICE_READY_ID_TOD_ENABLE                = 4,    /**< ToD control. */
+    BCMOLT_DEVICE_DEVICE_READY_ID_TOD_GPIO_PIN              = 5,    /**< GPIO pin is used when ToD UART is not connected to the embedded, and TOD value is obtained by the host. */
+    BCMOLT_DEVICE_DEVICE_READY_ID__NUM_OF           /**< Number of enum entries, not an entry itself. */
+} bcmolt_device_device_ready_id;
+
+/** Identifiers for all properties contained in the device_disconnect group. 
+ */
+typedef enum bcmolt_device_disconnect_id
+{
+    BCMOLT_DEVICE_DISCONNECT_ID__NUM_OF             /**< Number of enum entries, not an entry itself. */
+} bcmolt_device_disconnect_id;
+
+/** Identifiers for all properties contained in the 
+ * device_disconnection_complete group. 
+ */
+typedef enum bcmolt_device_disconnection_complete_id
+{
+    BCMOLT_DEVICE_DISCONNECTION_COMPLETE_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_device_disconnection_complete_id;
+
+/** Identifiers for all properties contained in the device_host_keep_alive 
+ * group. 
+ */
+typedef enum bcmolt_device_host_keep_alive_id
+{
+    BCMOLT_DEVICE_HOST_KEEP_ALIVE_ID__BEGIN                 = 0,
+    BCMOLT_DEVICE_HOST_KEEP_ALIVE_ID_SEQUENCE_NUMBER        = 0,    /**< sequence number. */
+    BCMOLT_DEVICE_HOST_KEEP_ALIVE_ID_TIME_STAMP             = 1,    /**< time stamp. */
+    BCMOLT_DEVICE_HOST_KEEP_ALIVE_ID__NUM_OF                        /**< Number of enum entries, not an entry itself. */
+} bcmolt_device_host_keep_alive_id;
+
+/** Identifiers for all properties contained in the 
+ * device_image_transfer_complete group. 
+ */
+typedef enum bcmolt_device_image_transfer_complete_id
+{
+    BCMOLT_DEVICE_IMAGE_TRANSFER_COMPLETE_ID__BEGIN         = 0,
+    BCMOLT_DEVICE_IMAGE_TRANSFER_COMPLETE_ID_IMAGE_TYPE     = 0,    /**< Image type. */
+    BCMOLT_DEVICE_IMAGE_TRANSFER_COMPLETE_ID_BLOCK_NUMBER   = 1,    /**< Block number. */
+    BCMOLT_DEVICE_IMAGE_TRANSFER_COMPLETE_ID_STATUS         = 2,    /**< Status. */
+    BCMOLT_DEVICE_IMAGE_TRANSFER_COMPLETE_ID__NUM_OF                /**< Number of enum entries, not an entry itself. */
+} bcmolt_device_image_transfer_complete_id;
+
+/** Identifiers for all properties contained in the device_image_transfer_data 
+ * group. 
+ */
+typedef enum bcmolt_device_image_transfer_data_id
+{
+    BCMOLT_DEVICE_IMAGE_TRANSFER_DATA_ID__BEGIN             = 0,
+    BCMOLT_DEVICE_IMAGE_TRANSFER_DATA_ID_BLOCK_NUMBER       = 0,    /**< Block number. */
+    BCMOLT_DEVICE_IMAGE_TRANSFER_DATA_ID_MORE_DATA          = 1,    /**< More Data. */
+    BCMOLT_DEVICE_IMAGE_TRANSFER_DATA_ID_DATA               = 2,    /**< Data. */
+    BCMOLT_DEVICE_IMAGE_TRANSFER_DATA_ID__NUM_OF                    /**< Number of enum entries, not an entry itself. */
+} bcmolt_device_image_transfer_data_id;
+
+/** Identifiers for all properties contained in the device_image_transfer_start 
+ * group. 
+ */
+typedef enum bcmolt_device_image_transfer_start_id
+{
+    BCMOLT_DEVICE_IMAGE_TRANSFER_START_ID__BEGIN            = 0,
+    BCMOLT_DEVICE_IMAGE_TRANSFER_START_ID_IMAGE_TYPE        = 0,    /**< Image type. */
+    BCMOLT_DEVICE_IMAGE_TRANSFER_START_ID_IMAGE_SIZE        = 1,    /**< Image Size. */
+    BCMOLT_DEVICE_IMAGE_TRANSFER_START_ID_CRC32             = 2,    /**< CRC32. */
+    BCMOLT_DEVICE_IMAGE_TRANSFER_START_ID_IMAGE_NAME        = 3,    /**< Image name. */
+    BCMOLT_DEVICE_IMAGE_TRANSFER_START_ID__NUM_OF                   /**< Number of enum entries, not an entry itself. */
+} bcmolt_device_image_transfer_start_id;
+
+/** Identifiers for all properties contained in the device_indications_dropped 
+ * group. 
+ */
+typedef enum bcmolt_device_indications_dropped_id
+{
+    BCMOLT_DEVICE_INDICATIONS_DROPPED_ID__BEGIN             = 0,
+    BCMOLT_DEVICE_INDICATIONS_DROPPED_ID_TOTAL_COUNT        = 0,    /**< Total Count. */
+    BCMOLT_DEVICE_INDICATIONS_DROPPED_ID__NUM_OF                    /**< Number of enum entries, not an entry itself. */
+} bcmolt_device_indications_dropped_id;
+
+/** Identifiers for all properties contained in the device_key group. 
+ */
+typedef enum bcmolt_device_key_id
+{
+    BCMOLT_DEVICE_KEY_ID__BEGIN                             = 0,
+    BCMOLT_DEVICE_KEY_ID_RESERVED                           = 0,    /**< Reserved. */
+    BCMOLT_DEVICE_KEY_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_device_key_id;
+
+/** Identifiers for all properties contained in the device_reset group. 
+ */
+typedef enum bcmolt_device_reset_id
+{
+    BCMOLT_DEVICE_RESET_ID__BEGIN                           = 0,
+    BCMOLT_DEVICE_RESET_ID_MODE                             = 0,    /**< Mode. */
+    BCMOLT_DEVICE_RESET_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_device_reset_id;
+
+/** Identifiers for all properties contained in the device_run_ddr_test group. 
+ */
+typedef enum bcmolt_device_run_ddr_test_id
+{
+    BCMOLT_DEVICE_RUN_DDR_TEST_ID__BEGIN                    = 0,
+    BCMOLT_DEVICE_RUN_DDR_TEST_ID_CPU                       = 0,    /**< CPU. */
+    BCMOLT_DEVICE_RUN_DDR_TEST_ID_RAS_0                     = 1,    /**< RAS 0. */
+    BCMOLT_DEVICE_RUN_DDR_TEST_ID_RAS_1                     = 2,    /**< RAS 1. */
+    BCMOLT_DEVICE_RUN_DDR_TEST_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_device_run_ddr_test_id;
+
+/** Identifiers for all properties contained in the device_sw_error group. 
+ */
+typedef enum bcmolt_device_sw_error_id
+{
+    BCMOLT_DEVICE_SW_ERROR_ID__BEGIN                        = 0,
+    BCMOLT_DEVICE_SW_ERROR_ID_TASK_NAME                     = 0,    /**< task name. */
+    BCMOLT_DEVICE_SW_ERROR_ID_FILE_NAME                     = 1,    /**< file name. */
+    BCMOLT_DEVICE_SW_ERROR_ID_LINE_NUMBER                   = 2,    /**< line number. */
+    BCMOLT_DEVICE_SW_ERROR_ID_PON_NI                        = 3,    /**< pon_ni. */
+    BCMOLT_DEVICE_SW_ERROR_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_device_sw_error_id;
+
+/** Identifiers for all properties contained in the device_sw_exception group. 
+ */
+typedef enum bcmolt_device_sw_exception_id
+{
+    BCMOLT_DEVICE_SW_EXCEPTION_ID__BEGIN                    = 0,
+    BCMOLT_DEVICE_SW_EXCEPTION_ID_CPU_ID                    = 0,    /**< CPU ID. */
+    BCMOLT_DEVICE_SW_EXCEPTION_ID_TEXT                      = 1,    /**< text. */
+    BCMOLT_DEVICE_SW_EXCEPTION_ID__NUM_OF           /**< Number of enum entries, not an entry itself. */
+} bcmolt_device_sw_exception_id;
+
+/** Identifiers for all properties contained in the device_sw_upgrade_activate 
+ * group. 
+ */
+typedef enum bcmolt_device_sw_upgrade_activate_id
+{
+    BCMOLT_DEVICE_SW_UPGRADE_ACTIVATE_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_device_sw_upgrade_activate_id;
+
+/** Identifiers for all properties contained in the epon_denied_link_auto_cfg 
+ * group. 
+ */
+typedef enum bcmolt_epon_denied_link_auto_cfg_id
+{
+    BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID__BEGIN                      = 0,
+    BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_LASER_ON_OFF_VIOLATION      = 0,    /**< Laser On/Off Violation. */
+    BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_LLID_POOL_EMPTY_VIOLATION   = 1,    /**< LLID Pool Empty Violation. */
+    BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_MAX_LINK_VIOLATION          = 2,    /**< Max Link Violation. */
+    BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_OVERHEAD_PROFILE_VIOLATION  = 3,    /**< Overhead Profile Violation. */
+    BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_RANGE_VIOLATION             = 4,    /**< Range Violation. */
+    BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_ROGUE_VIOLATION             = 5,    /**< Rogue ONU Detected. */
+    BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_SYSTEM_RESOURCE_VIOLATION   = 6,    /**< System Resource Violation. */
+    BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_TDM_CHANNELS_EXHAUSTED      = 7,    /**< TDM Channels Exhausted. */
+    BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_UNKNOWN_LINK_VIOLATION      = 8,    /**< Unknown Link Violation. */
+    BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_UPSTREAM_BANDWIDTH_VIOLATION= 9,    /**< Upstream Bandwidth Violation. */
+    BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_denied_link_auto_cfg_id;
+
+/** Identifiers for all properties contained in the epon_denied_link_cfg group. 
+ */
+typedef enum bcmolt_epon_denied_link_cfg_id
+{
+    BCMOLT_EPON_DENIED_LINK_CFG_ID__BEGIN                           = 0,
+    BCMOLT_EPON_DENIED_LINK_CFG_ID_ALARM_STATE                      = 0,    /**< Alarm State. */
+    BCMOLT_EPON_DENIED_LINK_CFG_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_denied_link_cfg_id;
+
+/** Identifiers for all properties contained in the epon_denied_link_key group. 
+ */
+typedef enum bcmolt_epon_denied_link_key_id
+{
+    BCMOLT_EPON_DENIED_LINK_KEY_ID__BEGIN                           = 0,
+    BCMOLT_EPON_DENIED_LINK_KEY_ID_EPON_NI                          = 0,    /**< EPON NI Identifier. */
+    BCMOLT_EPON_DENIED_LINK_KEY_ID_MAC_ADDRESS                      = 1,    /**< MAC Address. */
+    BCMOLT_EPON_DENIED_LINK_KEY_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_denied_link_key_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_denied_link_laser_on_off_violation group. 
+ */
+typedef enum bcmolt_epon_denied_link_laser_on_off_violation_id
+{
+    BCMOLT_EPON_DENIED_LINK_LASER_ON_OFF_VIOLATION_ID__BEGIN        = 0,
+    BCMOLT_EPON_DENIED_LINK_LASER_ON_OFF_VIOLATION_ID_ALARM_STATUS  = 0,        /**< Alarm Status. */
+    BCMOLT_EPON_DENIED_LINK_LASER_ON_OFF_VIOLATION_ID__NUM_OF                   /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_denied_link_laser_on_off_violation_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_denied_link_llid_pool_empty_violation group. 
+ */
+typedef enum bcmolt_epon_denied_link_llid_pool_empty_violation_id
+{
+    BCMOLT_EPON_DENIED_LINK_LLID_POOL_EMPTY_VIOLATION_ID__BEGIN         = 0,
+    BCMOLT_EPON_DENIED_LINK_LLID_POOL_EMPTY_VIOLATION_ID_ALARM_STATUS   = 0,    /**< Alarm Status. */
+    BCMOLT_EPON_DENIED_LINK_LLID_POOL_EMPTY_VIOLATION_ID__NUM_OF                /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_denied_link_llid_pool_empty_violation_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_denied_link_max_link_violation group. 
+ */
+typedef enum bcmolt_epon_denied_link_max_link_violation_id
+{
+    BCMOLT_EPON_DENIED_LINK_MAX_LINK_VIOLATION_ID__BEGIN                = 0,
+    BCMOLT_EPON_DENIED_LINK_MAX_LINK_VIOLATION_ID_ALARM_STATUS          = 0,    /**< Alarm Status. */
+    BCMOLT_EPON_DENIED_LINK_MAX_LINK_VIOLATION_ID__NUM_OF                       /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_denied_link_max_link_violation_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_denied_link_overhead_profile_violation group. 
+ */
+typedef enum bcmolt_epon_denied_link_overhead_profile_violation_id
+{
+    BCMOLT_EPON_DENIED_LINK_OVERHEAD_PROFILE_VIOLATION_ID__BEGIN        = 0,
+    BCMOLT_EPON_DENIED_LINK_OVERHEAD_PROFILE_VIOLATION_ID_ALARM_STATUS  = 0,    /**< Alarm status. */
+    BCMOLT_EPON_DENIED_LINK_OVERHEAD_PROFILE_VIOLATION_ID__NUM_OF               /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_denied_link_overhead_profile_violation_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_denied_link_range_violation group. 
+ */
+typedef enum bcmolt_epon_denied_link_range_violation_id
+{
+    BCMOLT_EPON_DENIED_LINK_RANGE_VIOLATION_ID__BEGIN                   = 0,
+    BCMOLT_EPON_DENIED_LINK_RANGE_VIOLATION_ID_ALARM_STATUS             = 0,    /**< Alarm Status. */
+    BCMOLT_EPON_DENIED_LINK_RANGE_VIOLATION_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_denied_link_range_violation_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_denied_link_rogue_violation group. 
+ */
+typedef enum bcmolt_epon_denied_link_rogue_violation_id
+{
+    BCMOLT_EPON_DENIED_LINK_ROGUE_VIOLATION_ID__BEGIN                   = 0,
+    BCMOLT_EPON_DENIED_LINK_ROGUE_VIOLATION_ID_ALARM_STATUS             = 0,    /**< Alarm Status. */
+    BCMOLT_EPON_DENIED_LINK_ROGUE_VIOLATION_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_denied_link_rogue_violation_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_denied_link_system_resource_violation group. 
+ */
+typedef enum bcmolt_epon_denied_link_system_resource_violation_id
+{
+    BCMOLT_EPON_DENIED_LINK_SYSTEM_RESOURCE_VIOLATION_ID__BEGIN         = 0,
+    BCMOLT_EPON_DENIED_LINK_SYSTEM_RESOURCE_VIOLATION_ID_ALARM_STATUS   = 0,    /**< Alarm Status. */
+    BCMOLT_EPON_DENIED_LINK_SYSTEM_RESOURCE_VIOLATION_ID__NUM_OF                /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_denied_link_system_resource_violation_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_denied_link_tdm_channels_exhausted group. 
+ */
+typedef enum bcmolt_epon_denied_link_tdm_channels_exhausted_id
+{
+    BCMOLT_EPON_DENIED_LINK_TDM_CHANNELS_EXHAUSTED_ID__BEGIN            = 0,
+    BCMOLT_EPON_DENIED_LINK_TDM_CHANNELS_EXHAUSTED_ID_ALARM_STATUS      = 0,    /**< Alarm Status. */
+    BCMOLT_EPON_DENIED_LINK_TDM_CHANNELS_EXHAUSTED_ID__NUM_OF                   /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_denied_link_tdm_channels_exhausted_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_denied_link_unknown_link_violation group. 
+ */
+typedef enum bcmolt_epon_denied_link_unknown_link_violation_id
+{
+    BCMOLT_EPON_DENIED_LINK_UNKNOWN_LINK_VIOLATION_ID__BEGIN            = 0,
+    BCMOLT_EPON_DENIED_LINK_UNKNOWN_LINK_VIOLATION_ID_ALARM_STATUS      = 0,    /**< Alarm Status. */
+    BCMOLT_EPON_DENIED_LINK_UNKNOWN_LINK_VIOLATION_ID__NUM_OF                   /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_denied_link_unknown_link_violation_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_denied_link_upstream_bandwidth_violation group. 
+ */
+typedef enum bcmolt_epon_denied_link_upstream_bandwidth_violation_id
+{
+    BCMOLT_EPON_DENIED_LINK_UPSTREAM_BANDWIDTH_VIOLATION_ID__BEGIN      = 0,
+    BCMOLT_EPON_DENIED_LINK_UPSTREAM_BANDWIDTH_VIOLATION_ID_ALARM_STATUS= 0,    /**< Alarm Status. */
+    BCMOLT_EPON_DENIED_LINK_UPSTREAM_BANDWIDTH_VIOLATION_ID__NUM_OF             /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_denied_link_upstream_bandwidth_violation_id;
+
+/** Identifiers for all properties contained in the epon_link_auto_cfg group. 
+ */
+typedef enum bcmolt_epon_link_auto_cfg_id
+{
+    BCMOLT_EPON_LINK_AUTO_CFG_ID__BEGIN                                 = 0,
+    BCMOLT_EPON_LINK_AUTO_CFG_ID_DUPLICATE_MPCP_REGISTRATION_REQUEST    = 0,    /**< Duplicate MPCP Registration Request. */
+    BCMOLT_EPON_LINK_AUTO_CFG_ID_ENCRYPTION_ENABLED                     = 1,    /**< Encryption Enabled. */
+    BCMOLT_EPON_LINK_AUTO_CFG_ID_KEY_EXCHANGE_FAILURE                   = 2,    /**< Key Exchange Failure. */
+    BCMOLT_EPON_LINK_AUTO_CFG_ID_KEY_EXCHANGE_STARTED                   = 3,    /**< key_exchange_started. */
+    BCMOLT_EPON_LINK_AUTO_CFG_ID_KEY_EXCHANGE_STOPPED                   = 4,    /**< key_exchange_stopped. */
+    BCMOLT_EPON_LINK_AUTO_CFG_ID_LINK_DELETED                           = 5,    /**< Link Deleted. */
+    BCMOLT_EPON_LINK_AUTO_CFG_ID_LINK_SPEED_MISMATCH                    = 6,    /**< Link attempted to register at a different speed. */
+    BCMOLT_EPON_LINK_AUTO_CFG_ID_MPCP_DEREGISTERED                      = 7,    /**< MPCP Deregistered. */
+    BCMOLT_EPON_LINK_AUTO_CFG_ID_MPCP_DISCOVERED                        = 8,    /**< MPCP Discovered. */
+    BCMOLT_EPON_LINK_AUTO_CFG_ID_MPCP_REG_ACK_TIMEOUT                   = 9,    /**< MPCP Reg Ack Timeout. */
+    BCMOLT_EPON_LINK_AUTO_CFG_ID_MPCP_REPORT_TIMEOUT                    = 10,   /**< MPCP Report Timeout. */
+    BCMOLT_EPON_LINK_AUTO_CFG_ID_OAM_KEEPALIVE_TIMEOUT                  = 11,   /**< OAM Keepalive Timeout. */
+    BCMOLT_EPON_LINK_AUTO_CFG_ID_OAM_KEEPALIVE_TIMER_STARTED            = 12,   /**< OAM keepalive timer started. */
+    BCMOLT_EPON_LINK_AUTO_CFG_ID_OAM_KEEPALIVE_TIMER_STOPPED            = 13,   /**< OAM keepalive timer stopped. */
+    BCMOLT_EPON_LINK_AUTO_CFG_ID_PREPROVISIONED_LINK_CREATED            = 14,   /**< Preprovisioned Link Created. */
+    BCMOLT_EPON_LINK_AUTO_CFG_ID_PROTECTION_SWITCH_OCCURRED             = 15,   /**< Protection Switch Occurred. */
+    BCMOLT_EPON_LINK_AUTO_CFG_ID_RANGE_VALUE_CHANGED                    = 16,   /**< Range Value Changed. */
+    BCMOLT_EPON_LINK_AUTO_CFG_ID_RERANGE_FAILURE                        = 17,   /**< Re-range failure. */
+    BCMOLT_EPON_LINK_AUTO_CFG_ID_STAT_ALARM_CLEARED                     = 18,   /**< Stat Alarm Cleared. */
+    BCMOLT_EPON_LINK_AUTO_CFG_ID_STAT_ALARM_RAISED                      = 19,   /**< Stat Alarm Raised. */
+    BCMOLT_EPON_LINK_AUTO_CFG_ID_STATIC_REGISTRATION_DONE               = 20,   /**< Static registration done. */
+    BCMOLT_EPON_LINK_AUTO_CFG_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_link_auto_cfg_id;
+
+/** Identifiers for all properties contained in the epon_link_cfg group. 
+ */
+typedef enum bcmolt_epon_link_cfg_id
+{
+    BCMOLT_EPON_LINK_CFG_ID__BEGIN                                      = 0,
+    BCMOLT_EPON_LINK_CFG_ID_LINK_RATE                                   = 0,    /**< EPON link rate. */
+    BCMOLT_EPON_LINK_CFG_ID_STATE_FLAGS                                 = 1,    /**< EPON link state flags. */
+    BCMOLT_EPON_LINK_CFG_ID_LLID                                        = 2,    /**< EPON logical link identifier. */
+    BCMOLT_EPON_LINK_CFG_ID_LASER_ON_TIME_TQ                            = 3,    /**< Laser-on time (TQ). */
+    BCMOLT_EPON_LINK_CFG_ID_LASER_OFF_TIME_TQ                           = 4,    /**< Laser-off time (TQ). */
+    BCMOLT_EPON_LINK_CFG_ID_RANGE_VALUE_TQ                              = 5,    /**< Range value (TQ). */
+    BCMOLT_EPON_LINK_CFG_ID_DISTANCE                                    = 6,    /**< Distance. */
+    BCMOLT_EPON_LINK_CFG_ID_ALARM_STATE                                 = 7,    /**< Alarm State. */
+    BCMOLT_EPON_LINK_CFG_ID_TUNNEL_ID                                   = 8,    /**< Tunnel ID. */
+    BCMOLT_EPON_LINK_CFG_ID_ONU_ID                                      = 9,    /**< Associated ONU. */
+    BCMOLT_EPON_LINK_CFG_ID_MIN_LASER_OVERHEAD                          = 10,   /**< Min Laser Overhead. */
+    BCMOLT_EPON_LINK_CFG_ID_KEY_EXCHANGE_CONFIG                         = 11,   /**< Key exchange configuration. */
+    BCMOLT_EPON_LINK_CFG_ID_EPON_ENCRYPTION                             = 12,   /**< EPON Encryption . */
+    BCMOLT_EPON_LINK_CFG_ID_FEC_ENABLE                                  = 13,   /**< FEC enable. */
+    BCMOLT_EPON_LINK_CFG_ID_OAM_HEARTBEAT_CONFIG                        = 14,   /**< OAM heartbeat configuration. */
+    BCMOLT_EPON_LINK_CFG_ID_UPSTREAM_BANDWIDTH                          = 15,   /**< Upstream Bandwidth. */
+    BCMOLT_EPON_LINK_CFG_ID_UBD_INFO                                    = 16,   /**< UBD Info. */
+    BCMOLT_EPON_LINK_CFG_ID_CLOCK_TRANSPORT_ENABLE                      = 17,   /**< Clock Transport Enable. */
+    BCMOLT_EPON_LINK_CFG_ID_PENDING_GRANTS                              = 18,   /**< Pending grants. */
+    BCMOLT_EPON_LINK_CFG_ID_LINK_TYPE                                   = 19,   /**< Link Type. */
+    BCMOLT_EPON_LINK_CFG_ID__NUM_OF         /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_link_cfg_id;
+
+/** Identifiers for all properties contained in the epon_link_delete_link group. 
+ */
+typedef enum bcmolt_epon_link_delete_link_id
+{
+    BCMOLT_EPON_LINK_DELETE_LINK_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_link_delete_link_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_link_duplicate_mpcp_registration_request group. 
+ */
+typedef enum bcmolt_epon_link_duplicate_mpcp_registration_request_id
+{
+    BCMOLT_EPON_LINK_DUPLICATE_MPCP_REGISTRATION_REQUEST_ID__BEGIN          = 0,
+    BCMOLT_EPON_LINK_DUPLICATE_MPCP_REGISTRATION_REQUEST_ID_INITIAL_RANGE_TQ= 0,    /**< Initial range. */
+    BCMOLT_EPON_LINK_DUPLICATE_MPCP_REGISTRATION_REQUEST_ID_CURRENT_RANGE_TQ= 1,    /**< Current range. */
+    BCMOLT_EPON_LINK_DUPLICATE_MPCP_REGISTRATION_REQUEST_ID__NUM_OF                 /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_link_duplicate_mpcp_registration_request_id;
+
+/** Identifiers for all properties contained in the epon_link_encryption_enabled 
+ * group. 
+ */
+typedef enum bcmolt_epon_link_encryption_enabled_id
+{
+    BCMOLT_EPON_LINK_ENCRYPTION_ENABLED_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_link_encryption_enabled_id;
+
+/** Identifiers for all properties contained in the epon_link_force_rediscovery 
+ * group. 
+ */
+typedef enum bcmolt_epon_link_force_rediscovery_id
+{
+    BCMOLT_EPON_LINK_FORCE_REDISCOVERY_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_link_force_rediscovery_id;
+
+/** Identifiers for all properties contained in the epon_link_frame_captured 
+ * group. 
+ */
+typedef enum bcmolt_epon_link_frame_captured_id
+{
+    BCMOLT_EPON_LINK_FRAME_CAPTURED_ID__BEGIN                               = 0,
+    BCMOLT_EPON_LINK_FRAME_CAPTURED_ID_FRAME                                = 0,    /**< Received frame. */
+    BCMOLT_EPON_LINK_FRAME_CAPTURED_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_link_frame_captured_id;
+
+/** Identifiers for all properties contained in the epon_link_inject_frame 
+ * group. 
+ */
+typedef enum bcmolt_epon_link_inject_frame_id
+{
+    BCMOLT_EPON_LINK_INJECT_FRAME_ID__BEGIN                                 = 0,
+    BCMOLT_EPON_LINK_INJECT_FRAME_ID_FRAME                                  = 0,    /**< Frame to transmit. */
+    BCMOLT_EPON_LINK_INJECT_FRAME_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_link_inject_frame_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_link_key_exchange_failure group. 
+ */
+typedef enum bcmolt_epon_link_key_exchange_failure_id
+{
+    BCMOLT_EPON_LINK_KEY_EXCHANGE_FAILURE_ID__BEGIN                         = 0,
+    BCMOLT_EPON_LINK_KEY_EXCHANGE_FAILURE_ID_ALARM_STATUS                   = 0,    /**< alarm status. */
+    BCMOLT_EPON_LINK_KEY_EXCHANGE_FAILURE_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_link_key_exchange_failure_id;
+
+/** Identifiers for all properties contained in the epon_link_key_exchange_start 
+ * group. 
+ */
+typedef enum bcmolt_epon_link_key_exchange_start_id
+{
+    BCMOLT_EPON_LINK_KEY_EXCHANGE_START_ID__BEGIN                           = 0,
+    BCMOLT_EPON_LINK_KEY_EXCHANGE_START_ID_PERIOD                           = 0,    /**< period. */
+    BCMOLT_EPON_LINK_KEY_EXCHANGE_START_ID__NUM_OF      /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_link_key_exchange_start_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_link_key_exchange_started group. 
+ */
+typedef enum bcmolt_epon_link_key_exchange_started_id
+{
+    BCMOLT_EPON_LINK_KEY_EXCHANGE_STARTED_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_link_key_exchange_started_id;
+
+/** Identifiers for all properties contained in the epon_link_key_exchange_stop 
+ * group. 
+ */
+typedef enum bcmolt_epon_link_key_exchange_stop_id
+{
+    BCMOLT_EPON_LINK_KEY_EXCHANGE_STOP_ID__NUM_OF       /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_link_key_exchange_stop_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_link_key_exchange_stopped group. 
+ */
+typedef enum bcmolt_epon_link_key_exchange_stopped_id
+{
+    BCMOLT_EPON_LINK_KEY_EXCHANGE_STOPPED_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_link_key_exchange_stopped_id;
+
+/** Identifiers for all properties contained in the epon_link_key group. 
+ */
+typedef enum bcmolt_epon_link_key_id
+{
+    BCMOLT_EPON_LINK_KEY_ID__BEGIN                                          = 0,
+    BCMOLT_EPON_LINK_KEY_ID_EPON_NI                                         = 0,    /**< EPON NI identifier. */
+    BCMOLT_EPON_LINK_KEY_ID_MAC_ADDRESS                                     = 1,    /**< MAC address. */
+    BCMOLT_EPON_LINK_KEY_ID__NUM_OF             /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_link_key_id;
+
+/** Identifiers for all properties contained in the epon_link_link_deleted 
+ * group. 
+ */
+typedef enum bcmolt_epon_link_link_deleted_id
+{
+    BCMOLT_EPON_LINK_LINK_DELETED_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_link_link_deleted_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_link_link_speed_mismatch group. 
+ */
+typedef enum bcmolt_epon_link_link_speed_mismatch_id
+{
+    BCMOLT_EPON_LINK_LINK_SPEED_MISMATCH_ID__BEGIN                          = 0,
+    BCMOLT_EPON_LINK_LINK_SPEED_MISMATCH_ID_PREVIOUS_RATE                   = 0,    /**< Previous rate. */
+    BCMOLT_EPON_LINK_LINK_SPEED_MISMATCH_ID_CURRENT_RATE                    = 1,    /**< Current rate. */
+    BCMOLT_EPON_LINK_LINK_SPEED_MISMATCH_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_link_link_speed_mismatch_id;
+
+/** Identifiers for all properties contained in the epon_link_mpcp_deregistered 
+ * group. 
+ */
+typedef enum bcmolt_epon_link_mpcp_deregistered_id
+{
+    BCMOLT_EPON_LINK_MPCP_DEREGISTERED_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_link_mpcp_deregistered_id;
+
+/** Identifiers for all properties contained in the epon_link_mpcp_discovered 
+ * group. 
+ */
+typedef enum bcmolt_epon_link_mpcp_discovered_id
+{
+    BCMOLT_EPON_LINK_MPCP_DISCOVERED_ID__BEGIN                              = 0,
+    BCMOLT_EPON_LINK_MPCP_DISCOVERED_ID_LINK_INFO                           = 0,    /**< Link information. */
+    BCMOLT_EPON_LINK_MPCP_DISCOVERED_ID__NUM_OF         /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_link_mpcp_discovered_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_link_mpcp_reg_ack_timeout group. 
+ */
+typedef enum bcmolt_epon_link_mpcp_reg_ack_timeout_id
+{
+    BCMOLT_EPON_LINK_MPCP_REG_ACK_TIMEOUT_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_link_mpcp_reg_ack_timeout_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_link_mpcp_report_timeout group. 
+ */
+typedef enum bcmolt_epon_link_mpcp_report_timeout_id
+{
+    BCMOLT_EPON_LINK_MPCP_REPORT_TIMEOUT_ID__BEGIN                          = 0,
+    BCMOLT_EPON_LINK_MPCP_REPORT_TIMEOUT_ID_ALARM_STATUS                    = 0,    /**< Alarm Status. */
+    BCMOLT_EPON_LINK_MPCP_REPORT_TIMEOUT_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_link_mpcp_report_timeout_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_link_oam_keepalive_timeout group. 
+ */
+typedef enum bcmolt_epon_link_oam_keepalive_timeout_id
+{
+    BCMOLT_EPON_LINK_OAM_KEEPALIVE_TIMEOUT_ID__BEGIN                        = 0,
+    BCMOLT_EPON_LINK_OAM_KEEPALIVE_TIMEOUT_ID_ALARM_STATUS                  = 0,    /**< Alarm Status. */
+    BCMOLT_EPON_LINK_OAM_KEEPALIVE_TIMEOUT_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_link_oam_keepalive_timeout_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_link_oam_keepalive_timer_start group. 
+ */
+typedef enum bcmolt_epon_link_oam_keepalive_timer_start_id
+{
+    BCMOLT_EPON_LINK_OAM_KEEPALIVE_TIMER_START_ID__BEGIN                    = 0,
+    BCMOLT_EPON_LINK_OAM_KEEPALIVE_TIMER_START_ID_SEND_PERIOD               = 0,    /**< Send period. */
+    BCMOLT_EPON_LINK_OAM_KEEPALIVE_TIMER_START_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_link_oam_keepalive_timer_start_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_link_oam_keepalive_timer_started group. 
+ */
+typedef enum bcmolt_epon_link_oam_keepalive_timer_started_id
+{
+    BCMOLT_EPON_LINK_OAM_KEEPALIVE_TIMER_STARTED_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_link_oam_keepalive_timer_started_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_link_oam_keepalive_timer_stop group. 
+ */
+typedef enum bcmolt_epon_link_oam_keepalive_timer_stop_id
+{
+    BCMOLT_EPON_LINK_OAM_KEEPALIVE_TIMER_STOP_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_link_oam_keepalive_timer_stop_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_link_oam_keepalive_timer_stopped group. 
+ */
+typedef enum bcmolt_epon_link_oam_keepalive_timer_stopped_id
+{
+    BCMOLT_EPON_LINK_OAM_KEEPALIVE_TIMER_STOPPED_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_link_oam_keepalive_timer_stopped_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_link_preprovisioned_link_created group. 
+ */
+typedef enum bcmolt_epon_link_preprovisioned_link_created_id
+{
+    BCMOLT_EPON_LINK_PREPROVISIONED_LINK_CREATED_ID__BEGIN                  = 0,
+    BCMOLT_EPON_LINK_PREPROVISIONED_LINK_CREATED_ID_LINK_INFO               = 0,    /**< Link information. */
+    BCMOLT_EPON_LINK_PREPROVISIONED_LINK_CREATED_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_link_preprovisioned_link_created_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_link_protection_switch_occurred group. 
+ */
+typedef enum bcmolt_epon_link_protection_switch_occurred_id
+{
+    BCMOLT_EPON_LINK_PROTECTION_SWITCH_OCCURRED_ID__BEGIN                   = 0,
+    BCMOLT_EPON_LINK_PROTECTION_SWITCH_OCCURRED_ID_PROTECTION_STATUS        = 0,    /**< Protection status. */
+    BCMOLT_EPON_LINK_PROTECTION_SWITCH_OCCURRED_ID_RANGE_VALUE_TQ           = 1,    /**< Range value in time quanta. */
+    BCMOLT_EPON_LINK_PROTECTION_SWITCH_OCCURRED_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_link_protection_switch_occurred_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_link_range_value_changed group. 
+ */
+typedef enum bcmolt_epon_link_range_value_changed_id
+{
+    BCMOLT_EPON_LINK_RANGE_VALUE_CHANGED_ID__BEGIN                          = 0,
+    BCMOLT_EPON_LINK_RANGE_VALUE_CHANGED_ID_RANGE_VALUE_TQ                  = 0,    /**< Range value in time quanta. */
+    BCMOLT_EPON_LINK_RANGE_VALUE_CHANGED_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_link_range_value_changed_id;
+
+/** Identifiers for all properties contained in the epon_link_rerange_failure 
+ * group. 
+ */
+typedef enum bcmolt_epon_link_rerange_failure_id
+{
+    BCMOLT_EPON_LINK_RERANGE_FAILURE_ID__NUM_OF     /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_link_rerange_failure_id;
+
+/** Identifiers for all properties contained in the epon_link_stat_alarm_cleared 
+ * group. 
+ */
+typedef enum bcmolt_epon_link_stat_alarm_cleared_id
+{
+    BCMOLT_EPON_LINK_STAT_ALARM_CLEARED_ID__BEGIN                           = 0,
+    BCMOLT_EPON_LINK_STAT_ALARM_CLEARED_ID_STAT                             = 0,    /**< Statistic ID. */
+    BCMOLT_EPON_LINK_STAT_ALARM_CLEARED_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_link_stat_alarm_cleared_id;
+
+/** Identifiers for all properties contained in the epon_link_stat_alarm_raised 
+ * group. 
+ */
+typedef enum bcmolt_epon_link_stat_alarm_raised_id
+{
+    BCMOLT_EPON_LINK_STAT_ALARM_RAISED_ID__BEGIN                            = 0,
+    BCMOLT_EPON_LINK_STAT_ALARM_RAISED_ID_STAT                              = 0,    /**< Statistic ID. */
+    BCMOLT_EPON_LINK_STAT_ALARM_RAISED_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_link_stat_alarm_raised_id;
+
+/** Identifiers for all properties contained in the epon_link_stat_cfg group. 
+ */
+typedef enum bcmolt_epon_link_stat_cfg_id
+{
+    BCMOLT_EPON_LINK_STAT_CFG_ID__BEGIN                                     = 0,
+    BCMOLT_EPON_LINK_STAT_CFG_ID_CFG                                        = 0,    /**< Configuration. */
+    BCMOLT_EPON_LINK_STAT_CFG_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_link_stat_cfg_id;
+
+/** Identifiers for all properties contained in the epon_link_stat group. 
+ */
+typedef enum bcmolt_epon_link_stat_id
+{
+    BCMOLT_EPON_LINK_STAT_ID__BEGIN                                         = 0,
+    BCMOLT_EPON_LINK_STAT_ID_RX_DATA_BYTES                                  = 0,    /**< Data Bytes RX. */
+    BCMOLT_EPON_LINK_STAT_ID_RX_DATA_FRAMES                                 = 1,    /**< Data Frames RX. */
+    BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_64                                   = 2,    /**< 64 Byte Frames RX. */
+    BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_65_127                               = 3,    /**< 65-127 Byte Frames RX. */
+    BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_128_255                              = 4,    /**< 128-255 Byte Frames RX. */
+    BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_256_511                              = 5,    /**< 256-511 Byte Frames RX. */
+    BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_512_1023                             = 6,    /**< 512-1023 Byte Frames RX. */
+    BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_1024_1518                            = 7,    /**< 1024-1518 Byte Frames RX. */
+    BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_1519_2047                            = 8,    /**< 1519-2047 Byte Frames RX. */
+    BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_2048_4095                            = 9,    /**< 2048-4095 Byte Frames RX. */
+    BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_4096_9216                            = 10,   /**< 4096-9216 Byte Frames RX. */
+    BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_9217_16383                           = 11,   /**< 9217-16383 Byte Frames RX. */
+    BCMOLT_EPON_LINK_STAT_ID_RX_OAM_BYTES                                   = 12,   /**< OAM Bytes RX. */
+    BCMOLT_EPON_LINK_STAT_ID_RX_OAM_FRAMES                                  = 13,   /**< OAM Frames RX. */
+    BCMOLT_EPON_LINK_STAT_ID_RX_MPCP_FRAMES                                 = 14,   /**< MPCP Frames RX. */
+    BCMOLT_EPON_LINK_STAT_ID_RX_BROADCAST_FRAMES                            = 15,   /**< Broadcast Frames RX. */
+    BCMOLT_EPON_LINK_STAT_ID_RX_UNICAST_FRAMES                              = 16,   /**< Unicast Frames RX. */
+    BCMOLT_EPON_LINK_STAT_ID_RX_MULTICAST_FRAMES                            = 17,   /**< Multicast Frames RX. */
+    BCMOLT_EPON_LINK_STAT_ID_RX_REPORT_FRAMES                               = 18,   /**< Report Frames RX. */
+    BCMOLT_EPON_LINK_STAT_ID_RX_FCS_ERROR                                   = 19,   /**< FCS Error RX. */
+    BCMOLT_EPON_LINK_STAT_ID_RX_OVERSIZE_ERROR                              = 20,   /**< Oversize Error RX. */
+    BCMOLT_EPON_LINK_STAT_ID_RX_RUNT_ERROR                                  = 21,   /**< Runt Error RX. */
+    BCMOLT_EPON_LINK_STAT_ID_RX_LINE_CODE_ERROR                             = 22,   /**< Line Code Error RX. */
+    BCMOLT_EPON_LINK_STAT_ID_RX_LINE_CODE_ERROR_MAX                         = 23,   /**< Line Code Error Max RX. */
+    BCMOLT_EPON_LINK_STAT_ID_TX_DATA_BYTES                                  = 24,   /**< Data Bytes TX. */
+    BCMOLT_EPON_LINK_STAT_ID_TX_DATA_FRAMES                                 = 25,   /**< Data Frames TX. */
+    BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_64                                   = 26,   /**< 64 Byte Frames TX. */
+    BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_65_127                               = 27,   /**< 65-127 Byte Frames TX. */
+    BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_128_255                              = 28,   /**< 128-255 Byte Frames TX. */
+    BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_256_511                              = 29,   /**< 256-511 Byte Frames TX. */
+    BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_512_1023                             = 30,   /**< 512-1023 Byte Frames TX. */
+    BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_1024_1518                            = 31,   /**< 1024-1518 Byte Frames TX. */
+    BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_1519_2047                            = 32,   /**< 1519-2047 Byte Frames TX. */
+    BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_2048_4095                            = 33,   /**< 2048-4095 Byte Frames TX. */
+    BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_4096_9216                            = 34,   /**< 4096-9216 Byte Frames TX. */
+    BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_9217_16383                           = 35,   /**< 9217-16383 Byte Frames TX. */
+    BCMOLT_EPON_LINK_STAT_ID_TX_OAM_BYTES                                   = 36,   /**< OAM Bytes TX. */
+    BCMOLT_EPON_LINK_STAT_ID_TX_OAM_FRAMES                                  = 37,   /**< OAM Frames TX. */
+    BCMOLT_EPON_LINK_STAT_ID_TX_MPCP_FRAMES                                 = 38,   /**< MPCP Frames TX. */
+    BCMOLT_EPON_LINK_STAT_ID_TX_BROADCAST_FRAMES                            = 39,   /**< Broadcast Frames TX. */
+    BCMOLT_EPON_LINK_STAT_ID_TX_UNICAST_FRAMES                              = 40,   /**< Unicast Frames TX. */
+    BCMOLT_EPON_LINK_STAT_ID_TX_MULTICAST_FRAMES                            = 41,   /**< Multicast Frames TX. */
+    BCMOLT_EPON_LINK_STAT_ID_TX_GATES                                       = 42,   /**< Gates TX. */
+    BCMOLT_EPON_LINK_STAT_ID__NUM_OF                        /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_link_stat_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_link_static_registration_done group. 
+ */
+typedef enum bcmolt_epon_link_static_registration_done_id
+{
+    BCMOLT_EPON_LINK_STATIC_REGISTRATION_DONE_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_link_static_registration_done_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_link_static_registration group. 
+ */
+typedef enum bcmolt_epon_link_static_registration_id
+{
+    BCMOLT_EPON_LINK_STATIC_REGISTRATION_ID__BEGIN                          = 0,
+    BCMOLT_EPON_LINK_STATIC_REGISTRATION_ID_LASERON_TIME_TQ                 = 0,    /**< Laser-on time (TQ). */
+    BCMOLT_EPON_LINK_STATIC_REGISTRATION_ID_LASEROFF_TIME_TQ                = 1,    /**< Laser-off time (TQ). */
+    BCMOLT_EPON_LINK_STATIC_REGISTRATION_ID_RANGE_VALUE_TQ                  = 2,    /**< Range value (TQ). */
+    BCMOLT_EPON_LINK_STATIC_REGISTRATION_ID_PENDING_GRANTS                  = 3,    /**< Pending Grants. */
+    BCMOLT_EPON_LINK_STATIC_REGISTRATION_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_link_static_registration_id;
+
+/** Identifiers for all properties contained in the epon_ni_add_link group. 
+ */
+typedef enum bcmolt_epon_ni_add_link_id
+{
+    BCMOLT_EPON_NI_ADD_LINK_ID__BEGIN                                       = 0,
+    BCMOLT_EPON_NI_ADD_LINK_ID_MAC_ADDRESS                                  = 0,    /**< MAC address. */
+    BCMOLT_EPON_NI_ADD_LINK_ID_RATE                                         = 1,    /**< Rate. */
+    BCMOLT_EPON_NI_ADD_LINK_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_ni_add_link_id;
+
+/** Identifiers for all properties contained in the epon_ni_add_multicast_link 
+ * group. 
+ */
+typedef enum bcmolt_epon_ni_add_multicast_link_id
+{
+    BCMOLT_EPON_NI_ADD_MULTICAST_LINK_ID__BEGIN                             = 0,
+    BCMOLT_EPON_NI_ADD_MULTICAST_LINK_ID_MAC_ADDRESS                        = 0,    /**< MAC address. */
+    BCMOLT_EPON_NI_ADD_MULTICAST_LINK_ID_RATE                               = 1,    /**< Rate. */
+    BCMOLT_EPON_NI_ADD_MULTICAST_LINK_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_ni_add_multicast_link_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_ni_add_protected_standby_link group. 
+ */
+typedef enum bcmolt_epon_ni_add_protected_standby_link_id
+{
+    BCMOLT_EPON_NI_ADD_PROTECTED_STANDBY_LINK_ID__BEGIN                     = 0,
+    BCMOLT_EPON_NI_ADD_PROTECTED_STANDBY_LINK_ID_MAC_ADDRESS                = 0,    /**< MAC address. */
+    BCMOLT_EPON_NI_ADD_PROTECTED_STANDBY_LINK_ID_WORKING_LINK_INFO          = 1,    /**< Working link info. */
+    BCMOLT_EPON_NI_ADD_PROTECTED_STANDBY_LINK_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_ni_add_protected_standby_link_id;
+
+/** Identifiers for all properties contained in the epon_ni_auto_cfg group. 
+ */
+typedef enum bcmolt_epon_ni_auto_cfg_id
+{
+    BCMOLT_EPON_NI_AUTO_CFG_ID__BEGIN                                       = 0,
+    BCMOLT_EPON_NI_AUTO_CFG_ID_AUTO_ROGUE_SCAN_10G_FAILURE                  = 0,    /**< 10G Epon Autonomous Rogue Scan failure detected. */
+    BCMOLT_EPON_NI_AUTO_CFG_ID_AUTO_ROGUE_SCAN_1G_FAILURE                   = 1,    /**< 1G Epon Autonomous Rogue Scan failure detected. */
+    BCMOLT_EPON_NI_AUTO_CFG_ID_LLID_QUARANTINED                             = 2,    /**< LLID Quarantined. */
+    BCMOLT_EPON_NI_AUTO_CFG_ID_MPCP_TIMESTAMP_CHANGED                       = 3,    /**< MPCP Timestamp Changed. */
+    BCMOLT_EPON_NI_AUTO_CFG_ID_NO_REPORTS                                   = 4,    /**< No Reports. */
+    BCMOLT_EPON_NI_AUTO_CFG_ID_ONU_UPGRADE_COMPLETE                         = 5,    /**< ONU Upgrade Complete. */
+    BCMOLT_EPON_NI_AUTO_CFG_ID_RERANGE_FAILURE                              = 6,    /**< Re-range failure. */
+    BCMOLT_EPON_NI_AUTO_CFG_ID_ROGUE_SCAN_COMPLETE                          = 7,    /**< Rogue Scan is Complete. */
+    BCMOLT_EPON_NI_AUTO_CFG_ID_RSSI_MEASUREMENT_COMPLETED                   = 8,    /**< RSSI Measurement Completed. */
+    BCMOLT_EPON_NI_AUTO_CFG_ID_STATE_CHANGE_COMPLETED                       = 9,    /**< State Change Completed. */
+    BCMOLT_EPON_NI_AUTO_CFG_ID__NUM_OF                      /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_ni_auto_cfg_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_ni_auto_rogue_scan_10g_failure group. 
+ */
+typedef enum bcmolt_epon_ni_auto_rogue_scan_10g_failure_id
+{
+    BCMOLT_EPON_NI_AUTO_ROGUE_SCAN_10G_FAILURE_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_ni_auto_rogue_scan_10g_failure_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_ni_auto_rogue_scan_1g_failure group. 
+ */
+typedef enum bcmolt_epon_ni_auto_rogue_scan_1g_failure_id
+{
+    BCMOLT_EPON_NI_AUTO_ROGUE_SCAN_1G_FAILURE_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_ni_auto_rogue_scan_1g_failure_id;
+
+/** Identifiers for all properties contained in the epon_ni_cfg group. 
+ */
+typedef enum bcmolt_epon_ni_cfg_id
+{
+    BCMOLT_EPON_NI_CFG_ID__BEGIN                                            = 0,
+    BCMOLT_EPON_NI_CFG_ID_MAC_ADDRESS                                       = 0,    /**< MAC Address. */
+    BCMOLT_EPON_NI_CFG_ID_EPON_NI_EN                                        = 1,    /**< EPON NI enable state. */
+    BCMOLT_EPON_NI_CFG_ID_REGISTRATION_BEHAVIOR                             = 2,    /**< Registration Behavior. */
+    BCMOLT_EPON_NI_CFG_ID_MTU_1G                                            = 3,    /**< 1G MTU. */
+    BCMOLT_EPON_NI_CFG_ID_MTU_10G                                           = 4,    /**< 10G MTU. */
+    BCMOLT_EPON_NI_CFG_ID_MINIMUM_FIBER_LENGTH                              = 5,    /**< Minimum Fiber Length. */
+    BCMOLT_EPON_NI_CFG_ID_MAXIMUM_FIBER_LENGTH                              = 6,    /**< Maximum Fiber Length. */
+    BCMOLT_EPON_NI_CFG_ID_GRANT_SPACING_TQ                                  = 7,    /**< Grant Spacing (TQ). */
+    BCMOLT_EPON_NI_CFG_ID_EPON_LOGICAL_LINK_OPTIONS                         = 8,    /**< EPON logical link options. */
+    BCMOLT_EPON_NI_CFG_ID_MPCP_DISCOVERY_PERIOD_MS                          = 9,    /**< MPCP discovery period in milliseconds. */
+    BCMOLT_EPON_NI_CFG_ID_ALARM_STATE                                       = 10,   /**< Alarm State. */
+    BCMOLT_EPON_NI_CFG_ID_ALL_LINKS                                         = 11,   /**< All links. */
+    BCMOLT_EPON_NI_CFG_ID_ENCRYPTION_CFG                                    = 12,   /**< EPON NI encryption configuration. */
+    BCMOLT_EPON_NI_CFG_ID_PROTECTION_SWITCHING_CFG                          = 13,   /**< Protection switching configuration. */
+    BCMOLT_EPON_NI_CFG_ID_CLOCK_TRANSPORT_CFG                               = 14,   /**< Clock transport configuration. */
+    BCMOLT_EPON_NI_CFG_ID_DROPDOWN_WEIGHTS                                  = 15,   /**< Drop-down Weights. */
+    BCMOLT_EPON_NI_CFG_ID_APPROXIMATE_SOLICITED_USAGE                       = 16,   /**< Approximate Solicited Usage. */
+    BCMOLT_EPON_NI_CFG_ID_APPROXIMATE_TDM_USAGE                             = 17,   /**< Approximate TDM Usage. */
+    BCMOLT_EPON_NI_CFG_ID_NO_REPORTS_SOAK_TIME                              = 18,   /**< No Reports soak time. */
+    BCMOLT_EPON_NI_CFG_ID_PON_AGGREGATE_SHAPER                              = 19,   /**< PON Aggregate Shaper. */
+    BCMOLT_EPON_NI_CFG_ID_ESTIMATED_PON_LATENCY_TQ                          = 20,   /**< Estimated PON Latency (TQ). */
+    BCMOLT_EPON_NI_CFG_ID_ONU_UPGRADE_PARAMS                                = 21,   /**< ONU upgrade params. */
+    BCMOLT_EPON_NI_CFG_ID_AUTO_ROGUE_DETECT_10G_EN                          = 22,   /**< 10G Epon Autonomous Rogue Detection Enable. */
+    BCMOLT_EPON_NI_CFG_ID_AUTO_ROGUE_DETECT_1G_EN                           = 23,   /**< 1G Epon Autonomous Rogue Detect Enable. */
+    BCMOLT_EPON_NI_CFG_ID_AUTO_ROGUE_DETECT_10G_THRESHOLD                   = 24,   /**< 10G Epon Auto Rogue Detect Threshold. */
+    BCMOLT_EPON_NI_CFG_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_ni_cfg_id;
+
+/** Identifiers for all properties contained in the epon_ni_issue_rssi_grant 
+ * group. 
+ */
+typedef enum bcmolt_epon_ni_issue_rssi_grant_id
+{
+    BCMOLT_EPON_NI_ISSUE_RSSI_GRANT_ID__BEGIN                               = 0,
+    BCMOLT_EPON_NI_ISSUE_RSSI_GRANT_ID_GRANTED_LINK                         = 0,    /**< Granted Link. */
+    BCMOLT_EPON_NI_ISSUE_RSSI_GRANT_ID_TRIGGER_WIDTH                        = 1,    /**< Rssi Trigger Width in ns. */
+    BCMOLT_EPON_NI_ISSUE_RSSI_GRANT_ID_TRIGGER_DELAY                        = 2,    /**< Rssi Trigger Delay in ns. */
+    BCMOLT_EPON_NI_ISSUE_RSSI_GRANT_ID_SAMPLE_PERIOD                        = 3,    /**< Rssi Sampe Period in us. */
+    BCMOLT_EPON_NI_ISSUE_RSSI_GRANT_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_ni_issue_rssi_grant_id;
+
+/** Identifiers for all properties contained in the epon_ni_key group. 
+ */
+typedef enum bcmolt_epon_ni_key_id
+{
+    BCMOLT_EPON_NI_KEY_ID__BEGIN                                            = 0,
+    BCMOLT_EPON_NI_KEY_ID_EPON_NI                                           = 0,    /**< EPON NI number. */
+    BCMOLT_EPON_NI_KEY_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_ni_key_id;
+
+/** Identifiers for all properties contained in the epon_ni_llid_quarantined 
+ * group. 
+ */
+typedef enum bcmolt_epon_ni_llid_quarantined_id
+{
+    BCMOLT_EPON_NI_LLID_QUARANTINED_ID__BEGIN                               = 0,
+    BCMOLT_EPON_NI_LLID_QUARANTINED_ID_LLID                                 = 0,    /**< LLID. */
+    BCMOLT_EPON_NI_LLID_QUARANTINED_ID_LINK_RATE                            = 1,    /**< Link Rate. */
+    BCMOLT_EPON_NI_LLID_QUARANTINED_ID_LINK_MAC                             = 2,    /**< Link MAC. */
+    BCMOLT_EPON_NI_LLID_QUARANTINED_ID_RANGE_VALUE_TQ                       = 3,    /**< Range value in time quanta. */
+    BCMOLT_EPON_NI_LLID_QUARANTINED_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_ni_llid_quarantined_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_ni_mpcp_timestamp_changed group. 
+ */
+typedef enum bcmolt_epon_ni_mpcp_timestamp_changed_id
+{
+    BCMOLT_EPON_NI_MPCP_TIMESTAMP_CHANGED_ID__BEGIN                         = 0,
+    BCMOLT_EPON_NI_MPCP_TIMESTAMP_CHANGED_ID_MPCP_TIMESTAMP                 = 0,    /**< MPCP Timestamp. */
+    BCMOLT_EPON_NI_MPCP_TIMESTAMP_CHANGED_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_ni_mpcp_timestamp_changed_id;
+
+/** Identifiers for all properties contained in the epon_ni_no_reports group. 
+ */
+typedef enum bcmolt_epon_ni_no_reports_id
+{
+    BCMOLT_EPON_NI_NO_REPORTS_ID__BEGIN                                     = 0,
+    BCMOLT_EPON_NI_NO_REPORTS_ID_ALARM_STATUS                               = 0,    /**< Alarm Status. */
+    BCMOLT_EPON_NI_NO_REPORTS_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_ni_no_reports_id;
+
+/** Identifiers for all properties contained in the epon_ni_onu_upgrade_complete 
+ * group. 
+ */
+typedef enum bcmolt_epon_ni_onu_upgrade_complete_id
+{
+    BCMOLT_EPON_NI_ONU_UPGRADE_COMPLETE_ID__BEGIN                           = 0,
+    BCMOLT_EPON_NI_ONU_UPGRADE_COMPLETE_ID_STATUS                           = 0,    /**< Status. */
+    BCMOLT_EPON_NI_ONU_UPGRADE_COMPLETE_ID_LIST_OF_FAILED_ENTITIES          = 1,    /**< List of failed entities. */
+    BCMOLT_EPON_NI_ONU_UPGRADE_COMPLETE_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_ni_onu_upgrade_complete_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_ni_protection_switching_apply_rerange_delta group. 
+ */
+typedef enum bcmolt_epon_ni_protection_switching_apply_rerange_delta_id
+{
+    BCMOLT_EPON_NI_PROTECTION_SWITCHING_APPLY_RERANGE_DELTA_ID__BEGIN       = 0,
+    BCMOLT_EPON_NI_PROTECTION_SWITCHING_APPLY_RERANGE_DELTA_ID_RERANGE_DELTA= 0,    /**< Re-range delta. */
+    BCMOLT_EPON_NI_PROTECTION_SWITCHING_APPLY_RERANGE_DELTA_ID__NUM_OF              /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_ni_protection_switching_apply_rerange_delta_id;
+
+/** Identifiers for all properties contained in the epon_ni_rerange_failure 
+ * group. 
+ */
+typedef enum bcmolt_epon_ni_rerange_failure_id
+{
+    BCMOLT_EPON_NI_RERANGE_FAILURE_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_ni_rerange_failure_id;
+
+/** Identifiers for all properties contained in the epon_ni_rogue_llid_scan 
+ * group. 
+ */
+typedef enum bcmolt_epon_ni_rogue_llid_scan_id
+{
+    BCMOLT_EPON_NI_ROGUE_LLID_SCAN_ID__BEGIN                                = 0,
+    BCMOLT_EPON_NI_ROGUE_LLID_SCAN_ID_MODE                                  = 0,    /**< Scan All. */
+    BCMOLT_EPON_NI_ROGUE_LLID_SCAN_ID_LLID                                  = 1,    /**< LLID. */
+    BCMOLT_EPON_NI_ROGUE_LLID_SCAN_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_ni_rogue_llid_scan_id;
+
+/** Identifiers for all properties contained in the epon_ni_rogue_scan_complete 
+ * group. 
+ */
+typedef enum bcmolt_epon_ni_rogue_scan_complete_id
+{
+    BCMOLT_EPON_NI_ROGUE_SCAN_COMPLETE_ID__BEGIN                            = 0,
+    BCMOLT_EPON_NI_ROGUE_SCAN_COMPLETE_ID_RETURN_IND_STATUS                 = 0,    /**< Status of completed scan. */
+    BCMOLT_EPON_NI_ROGUE_SCAN_COMPLETE_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_ni_rogue_scan_complete_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_ni_rssi_measurement_completed group. 
+ */
+typedef enum bcmolt_epon_ni_rssi_measurement_completed_id
+{
+    BCMOLT_EPON_NI_RSSI_MEASUREMENT_COMPLETED_ID__BEGIN                     = 0,
+    BCMOLT_EPON_NI_RSSI_MEASUREMENT_COMPLETED_ID_STATUS                     = 0,    /**< status. */
+    BCMOLT_EPON_NI_RSSI_MEASUREMENT_COMPLETED_ID_LLID                       = 1,    /**< LLID. */
+    BCMOLT_EPON_NI_RSSI_MEASUREMENT_COMPLETED_ID_LINK_MAC                   = 2,    /**< Link MAC . */
+    BCMOLT_EPON_NI_RSSI_MEASUREMENT_COMPLETED_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_ni_rssi_measurement_completed_id;
+
+/** Identifiers for all properties contained in the epon_ni_set_epon_ni_en_state 
+ * group. 
+ */
+typedef enum bcmolt_epon_ni_set_epon_ni_en_state_id
+{
+    BCMOLT_EPON_NI_SET_EPON_NI_EN_STATE_ID__BEGIN                           = 0,
+    BCMOLT_EPON_NI_SET_EPON_NI_EN_STATE_ID_NEW_STATE                        = 0,    /**< New EPON NI enable state. */
+    BCMOLT_EPON_NI_SET_EPON_NI_EN_STATE_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_ni_set_epon_ni_en_state_id;
+
+/** Identifiers for all properties contained in the epon_ni_start_onu_upgrade 
+ * group. 
+ */
+typedef enum bcmolt_epon_ni_start_onu_upgrade_id
+{
+    BCMOLT_EPON_NI_START_ONU_UPGRADE_ID__BEGIN                              = 0,
+    BCMOLT_EPON_NI_START_ONU_UPGRADE_ID_LIST_OF_ONU_IDS                     = 0,    /**< List of ONU IDs. */
+    BCMOLT_EPON_NI_START_ONU_UPGRADE_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_ni_start_onu_upgrade_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_ni_state_change_completed group. 
+ */
+typedef enum bcmolt_epon_ni_state_change_completed_id
+{
+    BCMOLT_EPON_NI_STATE_CHANGE_COMPLETED_ID__BEGIN                         = 0,
+    BCMOLT_EPON_NI_STATE_CHANGE_COMPLETED_ID_NEW_STATE                      = 0,    /**< New EPON NI enable state. */
+    BCMOLT_EPON_NI_STATE_CHANGE_COMPLETED_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_ni_state_change_completed_id;
+
+/** Identifiers for all properties contained in the epon_onu_10g_us_auto_cfg 
+ * group. 
+ */
+typedef enum bcmolt_epon_onu_10g_us_auto_cfg_id
+{
+    BCMOLT_EPON_ONU_10G_US_AUTO_CFG_ID__BEGIN                               = 0,
+    BCMOLT_EPON_ONU_10G_US_AUTO_CFG_ID_STAT_ALARM_CLEARED                   = 0,    /**< Stat Alarm Cleared. */
+    BCMOLT_EPON_ONU_10G_US_AUTO_CFG_ID_STAT_ALARM_RAISED                    = 1,    /**< Stat Alarm Raised. */
+    BCMOLT_EPON_ONU_10G_US_AUTO_CFG_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_onu_10g_us_auto_cfg_id;
+
+/** Identifiers for all properties contained in the epon_onu_10g_us_cfg group. 
+ */
+typedef enum bcmolt_epon_onu_10g_us_cfg_id
+{
+    BCMOLT_EPON_ONU_10G_US_CFG_ID__BEGIN                                    = 0,
+    BCMOLT_EPON_ONU_10G_US_CFG_ID_ALL_LINKS                                 = 0,    /**< All Links. */
+    BCMOLT_EPON_ONU_10G_US_CFG_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_onu_10g_us_cfg_id;
+
+/** Identifiers for all properties contained in the epon_onu_10g_us_key group. 
+ */
+typedef enum bcmolt_epon_onu_10g_us_key_id
+{
+    BCMOLT_EPON_ONU_10G_US_KEY_ID__BEGIN                                    = 0,
+    BCMOLT_EPON_ONU_10G_US_KEY_ID_EPON_NI                                   = 0,    /**< EPON NI. */
+    BCMOLT_EPON_ONU_10G_US_KEY_ID_ONU_ID                                    = 1,    /**< ONU ID. */
+    BCMOLT_EPON_ONU_10G_US_KEY_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_onu_10g_us_key_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_onu_10g_us_stat_alarm_cleared group. 
+ */
+typedef enum bcmolt_epon_onu_10g_us_stat_alarm_cleared_id
+{
+    BCMOLT_EPON_ONU_10G_US_STAT_ALARM_CLEARED_ID__BEGIN                     = 0,
+    BCMOLT_EPON_ONU_10G_US_STAT_ALARM_CLEARED_ID_STAT                       = 0,    /**< Statistic ID. */
+    BCMOLT_EPON_ONU_10G_US_STAT_ALARM_CLEARED_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_onu_10g_us_stat_alarm_cleared_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_onu_10g_us_stat_alarm_raised group. 
+ */
+typedef enum bcmolt_epon_onu_10g_us_stat_alarm_raised_id
+{
+    BCMOLT_EPON_ONU_10G_US_STAT_ALARM_RAISED_ID__BEGIN                      = 0,
+    BCMOLT_EPON_ONU_10G_US_STAT_ALARM_RAISED_ID_STAT                        = 0,    /**< Statistic ID. */
+    BCMOLT_EPON_ONU_10G_US_STAT_ALARM_RAISED_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_onu_10g_us_stat_alarm_raised_id;
+
+/** Identifiers for all properties contained in the epon_onu_10g_us_stat_cfg 
+ * group. 
+ */
+typedef enum bcmolt_epon_onu_10g_us_stat_cfg_id
+{
+    BCMOLT_EPON_ONU_10G_US_STAT_CFG_ID__BEGIN                               = 0,
+    BCMOLT_EPON_ONU_10G_US_STAT_CFG_ID_CFG                                  = 0,    /**< Configuration. */
+    BCMOLT_EPON_ONU_10G_US_STAT_CFG_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_onu_10g_us_stat_cfg_id;
+
+/** Identifiers for all properties contained in the epon_onu_10g_us_stat group. 
+ */
+typedef enum bcmolt_epon_onu_10g_us_stat_id
+{
+    BCMOLT_EPON_ONU_10G_US_STAT_ID__BEGIN                                   = 0,
+    BCMOLT_EPON_ONU_10G_US_STAT_ID_FEC_CODE_WORDS_TOTAL                     = 0,    /**< FEC Code Words Total. */
+    BCMOLT_EPON_ONU_10G_US_STAT_ID_FEC_CODE_WORDS_DECODE_FAILS              = 1,    /**< FEC Code Words Decode Fails. */
+    BCMOLT_EPON_ONU_10G_US_STAT_ID_FEC_ZEROES_CORRECTED                     = 2,    /**< FEC Zeroes Corrected. */
+    BCMOLT_EPON_ONU_10G_US_STAT_ID_FEC_ONES_CORRECTED                       = 3,    /**< FEC Ones Corrected. */
+    BCMOLT_EPON_ONU_10G_US_STAT_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_onu_10g_us_stat_id;
+
+/** Identifiers for all properties contained in the epon_onu_1g_us_auto_cfg 
+ * group. 
+ */
+typedef enum bcmolt_epon_onu_1g_us_auto_cfg_id
+{
+    BCMOLT_EPON_ONU_1G_US_AUTO_CFG_ID__BEGIN                                = 0,
+    BCMOLT_EPON_ONU_1G_US_AUTO_CFG_ID_STAT_ALARM_CLEARED                    = 0,    /**< Stat Alarm Cleared. */
+    BCMOLT_EPON_ONU_1G_US_AUTO_CFG_ID_STAT_ALARM_RAISED                     = 1,    /**< Stat Alarm Raised. */
+    BCMOLT_EPON_ONU_1G_US_AUTO_CFG_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_onu_1g_us_auto_cfg_id;
+
+/** Identifiers for all properties contained in the epon_onu_1g_us_cfg group. 
+ */
+typedef enum bcmolt_epon_onu_1g_us_cfg_id
+{
+    BCMOLT_EPON_ONU_1G_US_CFG_ID__BEGIN                                     = 0,
+    BCMOLT_EPON_ONU_1G_US_CFG_ID_ALL_LINKS                                  = 0,    /**< All Links. */
+    BCMOLT_EPON_ONU_1G_US_CFG_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_onu_1g_us_cfg_id;
+
+/** Identifiers for all properties contained in the epon_onu_1g_us_key group. 
+ */
+typedef enum bcmolt_epon_onu_1g_us_key_id
+{
+    BCMOLT_EPON_ONU_1G_US_KEY_ID__BEGIN                                     = 0,
+    BCMOLT_EPON_ONU_1G_US_KEY_ID_EPON_NI                                    = 0,    /**< EPON NI. */
+    BCMOLT_EPON_ONU_1G_US_KEY_ID_ONU_ID                                     = 1,    /**< ONU ID. */
+    BCMOLT_EPON_ONU_1G_US_KEY_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_onu_1g_us_key_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_onu_1g_us_stat_alarm_cleared group. 
+ */
+typedef enum bcmolt_epon_onu_1g_us_stat_alarm_cleared_id
+{
+    BCMOLT_EPON_ONU_1G_US_STAT_ALARM_CLEARED_ID__BEGIN                      = 0,
+    BCMOLT_EPON_ONU_1G_US_STAT_ALARM_CLEARED_ID_STAT                        = 0,    /**< Statistic ID. */
+    BCMOLT_EPON_ONU_1G_US_STAT_ALARM_CLEARED_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_onu_1g_us_stat_alarm_cleared_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_onu_1g_us_stat_alarm_raised group. 
+ */
+typedef enum bcmolt_epon_onu_1g_us_stat_alarm_raised_id
+{
+    BCMOLT_EPON_ONU_1G_US_STAT_ALARM_RAISED_ID__BEGIN                       = 0,
+    BCMOLT_EPON_ONU_1G_US_STAT_ALARM_RAISED_ID_STAT                         = 0,    /**< Statistic ID. */
+    BCMOLT_EPON_ONU_1G_US_STAT_ALARM_RAISED_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_onu_1g_us_stat_alarm_raised_id;
+
+/** Identifiers for all properties contained in the epon_onu_1g_us_stat_cfg 
+ * group. 
+ */
+typedef enum bcmolt_epon_onu_1g_us_stat_cfg_id
+{
+    BCMOLT_EPON_ONU_1G_US_STAT_CFG_ID__BEGIN                                = 0,
+    BCMOLT_EPON_ONU_1G_US_STAT_CFG_ID_CFG                                   = 0,    /**< Configuration. */
+    BCMOLT_EPON_ONU_1G_US_STAT_CFG_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_onu_1g_us_stat_cfg_id;
+
+/** Identifiers for all properties contained in the epon_onu_1g_us_stat group. 
+ */
+typedef enum bcmolt_epon_onu_1g_us_stat_id
+{
+    BCMOLT_EPON_ONU_1G_US_STAT_ID__BEGIN                                    = 0,
+    BCMOLT_EPON_ONU_1G_US_STAT_ID_GOOD_FRAMES                               = 0,    /**< Good frames. */
+    BCMOLT_EPON_ONU_1G_US_STAT_ID_GOOD_BYTES                                = 1,    /**< Good bytes. */
+    BCMOLT_EPON_ONU_1G_US_STAT_ID_OVERSZ_FRAMES                             = 2,    /**< Oversized frames. */
+    BCMOLT_EPON_ONU_1G_US_STAT_ID_NON_FEC_GOOD_FRAMES                       = 3,    /**< Non-FEC Good Frames. */
+    BCMOLT_EPON_ONU_1G_US_STAT_ID_NON_FEC_GOOD_BYTES                        = 4,    /**< Non-FEC Good Bytes. */
+    BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_GOOD_FRAMES                           = 5,    /**< FEC Good Frames. */
+    BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_GOOD_BYTES                            = 6,    /**< FEC Good Bytes. */
+    BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_FRAMES_EXC_ERRS                       = 7,    /**< FEC Frames which exceeded 8 symbol errors. */
+    BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_BLKS_NO_ERRS                          = 8,    /**< FEC Blocks with no errors. */
+    BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_BLKS_CORR_ERRS                        = 9,    /**< FEC Blocks with correctable errors. */
+    BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_BLKS_UNCORR_ERRS                      = 10,   /**< FEC Blocks with uncorrectable errors. */
+    BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_CORR_BYTES                            = 11,   /**< FEC Corrected Bytes. */
+    BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_CORR_ZEROES                           = 12,   /**< FEC Corrected Zeroes. */
+    BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_CORR_ONES                             = 13,   /**< FEC Corrected Ones. */
+    BCMOLT_EPON_ONU_1G_US_STAT_ID_UNDERSZ_FRAMES                            = 14,   /**< Undersize frames. */
+    BCMOLT_EPON_ONU_1G_US_STAT_ID_ERRORSZ_FRAMES                            = 15,   /**< Errored frame . */
+    BCMOLT_EPON_ONU_1G_US_STAT_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_onu_1g_us_stat_id;
+
+/** Identifiers for all properties contained in the epon_path_10g_ds_auto_cfg 
+ * group. 
+ */
+typedef enum bcmolt_epon_path_10g_ds_auto_cfg_id
+{
+    BCMOLT_EPON_PATH_10G_DS_AUTO_CFG_ID__BEGIN                              = 0,
+    BCMOLT_EPON_PATH_10G_DS_AUTO_CFG_ID_STAT_ALARM_CLEARED                  = 0,    /**< Stat Alarm Cleared. */
+    BCMOLT_EPON_PATH_10G_DS_AUTO_CFG_ID_STAT_ALARM_RAISED                   = 1,    /**< Stat Alarm Raised. */
+    BCMOLT_EPON_PATH_10G_DS_AUTO_CFG_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_path_10g_ds_auto_cfg_id;
+
+/** Identifiers for all properties contained in the epon_path_10g_ds_cfg group. 
+ */
+typedef enum bcmolt_epon_path_10g_ds_cfg_id
+{
+    BCMOLT_EPON_PATH_10G_DS_CFG_ID__BEGIN                                   = 0,
+    BCMOLT_EPON_PATH_10G_DS_CFG_ID_FEC_STATE                                = 0,    /**< Path FEC state. */
+    BCMOLT_EPON_PATH_10G_DS_CFG_ID_PRBS_GENERATOR                           = 1,    /**< PRBS Generator. */
+    BCMOLT_EPON_PATH_10G_DS_CFG_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_path_10g_ds_cfg_id;
+
+/** Identifiers for all properties contained in the epon_path_10g_ds_key group. 
+ */
+typedef enum bcmolt_epon_path_10g_ds_key_id
+{
+    BCMOLT_EPON_PATH_10G_DS_KEY_ID__BEGIN                                   = 0,
+    BCMOLT_EPON_PATH_10G_DS_KEY_ID_EPON_NI                                  = 0,    /**< EPON NI (EPON Network Interface) number. */
+    BCMOLT_EPON_PATH_10G_DS_KEY_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_path_10g_ds_key_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_path_10g_ds_stat_alarm_cleared group. 
+ */
+typedef enum bcmolt_epon_path_10g_ds_stat_alarm_cleared_id
+{
+    BCMOLT_EPON_PATH_10G_DS_STAT_ALARM_CLEARED_ID__BEGIN                    = 0,
+    BCMOLT_EPON_PATH_10G_DS_STAT_ALARM_CLEARED_ID_STAT                      = 0,    /**< Statistic ID. */
+    BCMOLT_EPON_PATH_10G_DS_STAT_ALARM_CLEARED_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_path_10g_ds_stat_alarm_cleared_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_path_10g_ds_stat_alarm_raised group. 
+ */
+typedef enum bcmolt_epon_path_10g_ds_stat_alarm_raised_id
+{
+    BCMOLT_EPON_PATH_10G_DS_STAT_ALARM_RAISED_ID__BEGIN                     = 0,
+    BCMOLT_EPON_PATH_10G_DS_STAT_ALARM_RAISED_ID_STAT                       = 0,    /**< Statistic ID. */
+    BCMOLT_EPON_PATH_10G_DS_STAT_ALARM_RAISED_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_path_10g_ds_stat_alarm_raised_id;
+
+/** Identifiers for all properties contained in the epon_path_10g_ds_stat_cfg 
+ * group. 
+ */
+typedef enum bcmolt_epon_path_10g_ds_stat_cfg_id
+{
+    BCMOLT_EPON_PATH_10G_DS_STAT_CFG_ID__BEGIN                              = 0,
+    BCMOLT_EPON_PATH_10G_DS_STAT_CFG_ID_CFG                                 = 0,    /**< Configuration. */
+    BCMOLT_EPON_PATH_10G_DS_STAT_CFG_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_path_10g_ds_stat_cfg_id;
+
+/** Identifiers for all properties contained in the epon_path_10g_ds_stat group. 
+ */
+typedef enum bcmolt_epon_path_10g_ds_stat_id
+{
+    BCMOLT_EPON_PATH_10G_DS_STAT_ID__BEGIN                                  = 0,
+    BCMOLT_EPON_PATH_10G_DS_STAT_ID_BYTES                                   = 0,    /**< Bytes. */
+    BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES                                  = 1,    /**< Frames. */
+    BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_64                               = 2,    /**< 64 Byte Frames. */
+    BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_65_127                           = 3,    /**< 65-127 Byte Frames. */
+    BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_128_255                          = 4,    /**< 128-255 Byte Frames. */
+    BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_256_511                          = 5,    /**< 256-511 Byte Frames. */
+    BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_512_1023                         = 6,    /**< 512-1023 Byte Frames. */
+    BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_1024_1518                        = 7,    /**< 1024-1518 Byte Frames. */
+    BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_1519_2047                        = 8,    /**< 1519-2047 Byte Frames. */
+    BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_2048_4095                        = 9,    /**< 2048_4095 Byte Frames. */
+    BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_4096_9216                        = 10,   /**< 4096-9216 Byte Frames. */
+    BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_9217_16383                       = 11,   /**< 9217-16383 Byte Frames. */
+    BCMOLT_EPON_PATH_10G_DS_STAT_ID_BROADCAST_FRAMES                        = 12,   /**< Broadcast Frames. */
+    BCMOLT_EPON_PATH_10G_DS_STAT_ID_DATA_BYTES                              = 13,   /**< Data Bytes. */
+    BCMOLT_EPON_PATH_10G_DS_STAT_ID_MULTICAST_FRAMES                        = 14,   /**< Mulitcast Frames. */
+    BCMOLT_EPON_PATH_10G_DS_STAT_ID_UNICAST_FRAMES                          = 15,   /**< Unicast Frames. */
+    BCMOLT_EPON_PATH_10G_DS_STAT_ID_OAM_BYTES                               = 16,   /**< OAM Bytes. */
+    BCMOLT_EPON_PATH_10G_DS_STAT_ID_OAM_FRAMES                              = 17,   /**< OAM Frames. */
+    BCMOLT_EPON_PATH_10G_DS_STAT_ID_GATE_FRAMES                             = 18,   /**< Gate Frames. */
+    BCMOLT_EPON_PATH_10G_DS_STAT_ID_MPCP_FRAMES                             = 19,   /**< MPCP Frames. */
+    BCMOLT_EPON_PATH_10G_DS_STAT_ID_ABORT_FRAMES                            = 20,   /**< Abort Frames. */
+    BCMOLT_EPON_PATH_10G_DS_STAT_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_path_10g_ds_stat_id;
+
+/** Identifiers for all properties contained in the epon_path_10g_us_auto_cfg 
+ * group. 
+ */
+typedef enum bcmolt_epon_path_10g_us_auto_cfg_id
+{
+    BCMOLT_EPON_PATH_10G_US_AUTO_CFG_ID__BEGIN                              = 0,
+    BCMOLT_EPON_PATH_10G_US_AUTO_CFG_ID_STAT_ALARM_CLEARED                  = 0,    /**< Stat Alarm Cleared. */
+    BCMOLT_EPON_PATH_10G_US_AUTO_CFG_ID_STAT_ALARM_RAISED                   = 1,    /**< Stat Alarm Raised. */
+    BCMOLT_EPON_PATH_10G_US_AUTO_CFG_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_path_10g_us_auto_cfg_id;
+
+/** Identifiers for all properties contained in the epon_path_10g_us_cfg group. 
+ */
+typedef enum bcmolt_epon_path_10g_us_cfg_id
+{
+    BCMOLT_EPON_PATH_10G_US_CFG_ID__BEGIN                                   = 0,
+    BCMOLT_EPON_PATH_10G_US_CFG_ID_FEC_STATE                                = 0,    /**< Path FEC state. */
+    BCMOLT_EPON_PATH_10G_US_CFG_ID_SYNC_TIME_TQ                             = 1,    /**< Sync Time (TQ). */
+    BCMOLT_EPON_PATH_10G_US_CFG_ID_PRBS_CHECKER                             = 2,    /**< PRBS Checker. */
+    BCMOLT_EPON_PATH_10G_US_CFG_ID_PRBS_STATUS                              = 3,    /**< PRBS status. */
+    BCMOLT_EPON_PATH_10G_US_CFG_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_path_10g_us_cfg_id;
+
+/** Identifiers for all properties contained in the epon_path_10g_us_key group. 
+ */
+typedef enum bcmolt_epon_path_10g_us_key_id
+{
+    BCMOLT_EPON_PATH_10G_US_KEY_ID__BEGIN                                   = 0,
+    BCMOLT_EPON_PATH_10G_US_KEY_ID_EPON_NI                                  = 0,    /**< EPON NI. */
+    BCMOLT_EPON_PATH_10G_US_KEY_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_path_10g_us_key_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_path_10g_us_stat_alarm_cleared group. 
+ */
+typedef enum bcmolt_epon_path_10g_us_stat_alarm_cleared_id
+{
+    BCMOLT_EPON_PATH_10G_US_STAT_ALARM_CLEARED_ID__BEGIN                    = 0,
+    BCMOLT_EPON_PATH_10G_US_STAT_ALARM_CLEARED_ID_STAT                      = 0,    /**< Statistic ID. */
+    BCMOLT_EPON_PATH_10G_US_STAT_ALARM_CLEARED_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_path_10g_us_stat_alarm_cleared_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_path_10g_us_stat_alarm_raised group. 
+ */
+typedef enum bcmolt_epon_path_10g_us_stat_alarm_raised_id
+{
+    BCMOLT_EPON_PATH_10G_US_STAT_ALARM_RAISED_ID__BEGIN                     = 0,
+    BCMOLT_EPON_PATH_10G_US_STAT_ALARM_RAISED_ID_STAT                       = 0,    /**< Statistic ID. */
+    BCMOLT_EPON_PATH_10G_US_STAT_ALARM_RAISED_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_path_10g_us_stat_alarm_raised_id;
+
+/** Identifiers for all properties contained in the epon_path_10g_us_stat_cfg 
+ * group. 
+ */
+typedef enum bcmolt_epon_path_10g_us_stat_cfg_id
+{
+    BCMOLT_EPON_PATH_10G_US_STAT_CFG_ID__BEGIN                              = 0,
+    BCMOLT_EPON_PATH_10G_US_STAT_CFG_ID_CFG                                 = 0,    /**< Configuration. */
+    BCMOLT_EPON_PATH_10G_US_STAT_CFG_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_path_10g_us_stat_cfg_id;
+
+/** Identifiers for all properties contained in the epon_path_10g_us_stat group. 
+ */
+typedef enum bcmolt_epon_path_10g_us_stat_id
+{
+    BCMOLT_EPON_PATH_10G_US_STAT_ID__BEGIN                                  = 0,
+    BCMOLT_EPON_PATH_10G_US_STAT_ID_BYTES                                   = 0,    /**< Bytes. */
+    BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES                                  = 1,    /**< Frames. */
+    BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_64                               = 2,    /**< 64 Byte Frames. */
+    BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_65_127                           = 3,    /**< 65-127 Byte Frames. */
+    BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_128_255                          = 4,    /**< 128-255 Byte Frames. */
+    BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_256_511                          = 5,    /**< 256-511 Byte Frames. */
+    BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_512_1023                         = 6,    /**< 512-1023 Byte Frames. */
+    BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_1024_1518                        = 7,    /**< 1024-1518 Byte Frames. */
+    BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_1519_2047                        = 8,    /**< 1519-2047 Byte Frames. */
+    BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_2048_4095                        = 9,    /**< 2048_4095 Byte Frames. */
+    BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_4096_9216                        = 10,   /**< 4096-9216 Byte Frames. */
+    BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_9217_16383                       = 11,   /**< 9217-16383 Byte Frames. */
+    BCMOLT_EPON_PATH_10G_US_STAT_ID_BROADCAST_FRAMES                        = 12,   /**< Broadcast Frames. */
+    BCMOLT_EPON_PATH_10G_US_STAT_ID_DATA_BYTES                              = 13,   /**< Data Bytes. */
+    BCMOLT_EPON_PATH_10G_US_STAT_ID_MULTICAST_FRAMES                        = 14,   /**< Mulitcast Frames. */
+    BCMOLT_EPON_PATH_10G_US_STAT_ID_UNICAST_FRAMES                          = 15,   /**< Unicast Frames. */
+    BCMOLT_EPON_PATH_10G_US_STAT_ID_MPCP_FRAMES                             = 16,   /**< MPCP Frames. */
+    BCMOLT_EPON_PATH_10G_US_STAT_ID_OAM_BYTES                               = 17,   /**< OAM Bytes. */
+    BCMOLT_EPON_PATH_10G_US_STAT_ID_OAM_FRAMES                              = 18,   /**< OAM Frames. */
+    BCMOLT_EPON_PATH_10G_US_STAT_ID_REPORT_FRAMES                           = 19,   /**< Report Frames. */
+    BCMOLT_EPON_PATH_10G_US_STAT_ID_ABORT_FRAMES                            = 20,   /**< Abort Frames. */
+    BCMOLT_EPON_PATH_10G_US_STAT_ID_FCS_ERROR                               = 21,   /**< FCS Error. */
+    BCMOLT_EPON_PATH_10G_US_STAT_ID_CRC_8_ERROR                             = 22,   /**< CRC8 Error. */
+    BCMOLT_EPON_PATH_10G_US_STAT_ID_OUT_OF_SLOT                             = 23,   /**< Out of Slot. */
+    BCMOLT_EPON_PATH_10G_US_STAT_ID_OVERSIZE_ERROR                          = 24,   /**< Oversize Error. */
+    BCMOLT_EPON_PATH_10G_US_STAT_ID_RUNT_ERROR                              = 25,   /**< Runt Error. */
+    BCMOLT_EPON_PATH_10G_US_STAT_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_path_10g_us_stat_id;
+
+/** Identifiers for all properties contained in the epon_path_1g_ds_auto_cfg 
+ * group. 
+ */
+typedef enum bcmolt_epon_path_1g_ds_auto_cfg_id
+{
+    BCMOLT_EPON_PATH_1G_DS_AUTO_CFG_ID__BEGIN                               = 0,
+    BCMOLT_EPON_PATH_1G_DS_AUTO_CFG_ID_STAT_ALARM_CLEARED                   = 0,    /**< Stat Alarm Cleared. */
+    BCMOLT_EPON_PATH_1G_DS_AUTO_CFG_ID_STAT_ALARM_RAISED                    = 1,    /**< Stat Alarm Raised. */
+    BCMOLT_EPON_PATH_1G_DS_AUTO_CFG_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_path_1g_ds_auto_cfg_id;
+
+/** Identifiers for all properties contained in the epon_path_1g_ds_cfg group. 
+ */
+typedef enum bcmolt_epon_path_1g_ds_cfg_id
+{
+    BCMOLT_EPON_PATH_1G_DS_CFG_ID__BEGIN                                    = 0,
+    BCMOLT_EPON_PATH_1G_DS_CFG_ID_DEFAULT_FEC_STATE                         = 0,    /**< Default FEC state. */
+    BCMOLT_EPON_PATH_1G_DS_CFG_ID_RAMAN_MODE                                = 1,    /**< Raman mode. */
+    BCMOLT_EPON_PATH_1G_DS_CFG_ID_TURBO_2G_MODE                             = 2,    /**< Turbo 2G mode. */
+    BCMOLT_EPON_PATH_1G_DS_CFG_ID_PRBS_GENERATOR                            = 3,    /**< PRBS Generator. */
+    BCMOLT_EPON_PATH_1G_DS_CFG_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_path_1g_ds_cfg_id;
+
+/** Identifiers for all properties contained in the epon_path_1g_ds_key group. 
+ */
+typedef enum bcmolt_epon_path_1g_ds_key_id
+{
+    BCMOLT_EPON_PATH_1G_DS_KEY_ID__BEGIN                                    = 0,
+    BCMOLT_EPON_PATH_1G_DS_KEY_ID_EPON_NI                                   = 0,    /**< EPON NI. */
+    BCMOLT_EPON_PATH_1G_DS_KEY_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_path_1g_ds_key_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_path_1g_ds_stat_alarm_cleared group. 
+ */
+typedef enum bcmolt_epon_path_1g_ds_stat_alarm_cleared_id
+{
+    BCMOLT_EPON_PATH_1G_DS_STAT_ALARM_CLEARED_ID__BEGIN                     = 0,
+    BCMOLT_EPON_PATH_1G_DS_STAT_ALARM_CLEARED_ID_STAT                       = 0,    /**< Statistic ID. */
+    BCMOLT_EPON_PATH_1G_DS_STAT_ALARM_CLEARED_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_path_1g_ds_stat_alarm_cleared_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_path_1g_ds_stat_alarm_raised group. 
+ */
+typedef enum bcmolt_epon_path_1g_ds_stat_alarm_raised_id
+{
+    BCMOLT_EPON_PATH_1G_DS_STAT_ALARM_RAISED_ID__BEGIN                      = 0,
+    BCMOLT_EPON_PATH_1G_DS_STAT_ALARM_RAISED_ID_STAT                        = 0,    /**< Statistic ID. */
+    BCMOLT_EPON_PATH_1G_DS_STAT_ALARM_RAISED_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_path_1g_ds_stat_alarm_raised_id;
+
+/** Identifiers for all properties contained in the epon_path_1g_ds_stat_cfg 
+ * group. 
+ */
+typedef enum bcmolt_epon_path_1g_ds_stat_cfg_id
+{
+    BCMOLT_EPON_PATH_1G_DS_STAT_CFG_ID__BEGIN                               = 0,
+    BCMOLT_EPON_PATH_1G_DS_STAT_CFG_ID_CFG                                  = 0,    /**< Configuration. */
+    BCMOLT_EPON_PATH_1G_DS_STAT_CFG_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_path_1g_ds_stat_cfg_id;
+
+/** Identifiers for all properties contained in the epon_path_1g_ds_stat group. 
+ */
+typedef enum bcmolt_epon_path_1g_ds_stat_id
+{
+    BCMOLT_EPON_PATH_1G_DS_STAT_ID__BEGIN                                   = 0,
+    BCMOLT_EPON_PATH_1G_DS_STAT_ID_BYTES                                    = 0,    /**< Bytes. */
+    BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES                                   = 1,    /**< Frames. */
+    BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_64                                = 2,    /**< 64 Byte Frames. */
+    BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_65_127                            = 3,    /**< 65-127 Byte Frames. */
+    BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_128_255                           = 4,    /**< 128-255 Byte Frames. */
+    BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_256_511                           = 5,    /**< 256-511 Byte Frames. */
+    BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_512_1023                          = 6,    /**< 512-1023 Byte Frames. */
+    BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_1024_1518                         = 7,    /**< 1024-1518 Byte Frames. */
+    BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_1519_2047                         = 8,    /**< 1519-2047 Byte Frames. */
+    BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_2048_4095                         = 9,    /**< 2048_4095 Byte Frames. */
+    BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_4096_9216                         = 10,   /**< 4096-9216 Byte Frames. */
+    BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_9217_16383                        = 11,   /**< 9217-16383 Byte Frames. */
+    BCMOLT_EPON_PATH_1G_DS_STAT_ID_BROADCAST_FRAMES                         = 12,   /**< Broadcast Frames. */
+    BCMOLT_EPON_PATH_1G_DS_STAT_ID_DATA_BYTES                               = 13,   /**< Data Bytes. */
+    BCMOLT_EPON_PATH_1G_DS_STAT_ID_MULTICAST_FRAMES                         = 14,   /**< Mulitcast Frames. */
+    BCMOLT_EPON_PATH_1G_DS_STAT_ID_UNICAST_FRAMES                           = 15,   /**< Unicast Frames. */
+    BCMOLT_EPON_PATH_1G_DS_STAT_ID_OAM_BYTES                                = 16,   /**< OAM Bytes. */
+    BCMOLT_EPON_PATH_1G_DS_STAT_ID_OAM_FRAMES                               = 17,   /**< OAM Frames. */
+    BCMOLT_EPON_PATH_1G_DS_STAT_ID_GATE_FRAMES                              = 18,   /**< Gate Frames. */
+    BCMOLT_EPON_PATH_1G_DS_STAT_ID_MPCP_FRAMES                              = 19,   /**< MPCP Frames. */
+    BCMOLT_EPON_PATH_1G_DS_STAT_ID_ABORT_FRAMES                             = 20,   /**< Abort Frames. */
+    BCMOLT_EPON_PATH_1G_DS_STAT_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_path_1g_ds_stat_id;
+
+/** Identifiers for all properties contained in the epon_path_1g_us_auto_cfg 
+ * group. 
+ */
+typedef enum bcmolt_epon_path_1g_us_auto_cfg_id
+{
+    BCMOLT_EPON_PATH_1G_US_AUTO_CFG_ID__BEGIN                               = 0,
+    BCMOLT_EPON_PATH_1G_US_AUTO_CFG_ID_STAT_ALARM_CLEARED                   = 0,    /**< Stat Alarm Cleared. */
+    BCMOLT_EPON_PATH_1G_US_AUTO_CFG_ID_STAT_ALARM_RAISED                    = 1,    /**< Stat Alarm Raised. */
+    BCMOLT_EPON_PATH_1G_US_AUTO_CFG_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_path_1g_us_auto_cfg_id;
+
+/** Identifiers for all properties contained in the epon_path_1g_us_cfg group. 
+ */
+typedef enum bcmolt_epon_path_1g_us_cfg_id
+{
+    BCMOLT_EPON_PATH_1G_US_CFG_ID__BEGIN                                    = 0,
+    BCMOLT_EPON_PATH_1G_US_CFG_ID_DEFAULT_FEC_STATE                         = 0,    /**< Default FEC state. */
+    BCMOLT_EPON_PATH_1G_US_CFG_ID_SYNC_TIME_TQ                              = 1,    /**< Sync Time (TQ). */
+    BCMOLT_EPON_PATH_1G_US_CFG_ID_PRBS_CHECKER                              = 2,    /**< PRBS Checker. */
+    BCMOLT_EPON_PATH_1G_US_CFG_ID_PRBS_STATUS                               = 3,    /**< PRBS status. */
+    BCMOLT_EPON_PATH_1G_US_CFG_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_path_1g_us_cfg_id;
+
+/** Identifiers for all properties contained in the epon_path_1g_us_key group. 
+ */
+typedef enum bcmolt_epon_path_1g_us_key_id
+{
+    BCMOLT_EPON_PATH_1G_US_KEY_ID__BEGIN                                    = 0,
+    BCMOLT_EPON_PATH_1G_US_KEY_ID_EPON_NI                                   = 0,    /**< EPON NI. */
+    BCMOLT_EPON_PATH_1G_US_KEY_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_path_1g_us_key_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_path_1g_us_stat_alarm_cleared group. 
+ */
+typedef enum bcmolt_epon_path_1g_us_stat_alarm_cleared_id
+{
+    BCMOLT_EPON_PATH_1G_US_STAT_ALARM_CLEARED_ID__BEGIN                     = 0,
+    BCMOLT_EPON_PATH_1G_US_STAT_ALARM_CLEARED_ID_STAT                       = 0,    /**< Statistic ID. */
+    BCMOLT_EPON_PATH_1G_US_STAT_ALARM_CLEARED_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_path_1g_us_stat_alarm_cleared_id;
+
+/** Identifiers for all properties contained in the 
+ * epon_path_1g_us_stat_alarm_raised group. 
+ */
+typedef enum bcmolt_epon_path_1g_us_stat_alarm_raised_id
+{
+    BCMOLT_EPON_PATH_1G_US_STAT_ALARM_RAISED_ID__BEGIN                      = 0,
+    BCMOLT_EPON_PATH_1G_US_STAT_ALARM_RAISED_ID_STAT                        = 0,    /**< Statistic ID. */
+    BCMOLT_EPON_PATH_1G_US_STAT_ALARM_RAISED_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_path_1g_us_stat_alarm_raised_id;
+
+/** Identifiers for all properties contained in the epon_path_1g_us_stat_cfg 
+ * group. 
+ */
+typedef enum bcmolt_epon_path_1g_us_stat_cfg_id
+{
+    BCMOLT_EPON_PATH_1G_US_STAT_CFG_ID__BEGIN                               = 0,
+    BCMOLT_EPON_PATH_1G_US_STAT_CFG_ID_CFG                                  = 0,    /**< Configuration. */
+    BCMOLT_EPON_PATH_1G_US_STAT_CFG_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_path_1g_us_stat_cfg_id;
+
+/** Identifiers for all properties contained in the epon_path_1g_us_stat group. 
+ */
+typedef enum bcmolt_epon_path_1g_us_stat_id
+{
+    BCMOLT_EPON_PATH_1G_US_STAT_ID__BEGIN                                   = 0,
+    BCMOLT_EPON_PATH_1G_US_STAT_ID_BYTES                                    = 0,    /**< Bytes. */
+    BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES                                   = 1,    /**< Frames. */
+    BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_64                                = 2,    /**< 64 Byte Frames. */
+    BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_65_127                            = 3,    /**< 65-127 Byte Frames. */
+    BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_128_255                           = 4,    /**< 128-255 Byte Frames. */
+    BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_256_511                           = 5,    /**< 256-511 Byte Frames. */
+    BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_512_1023                          = 6,    /**< 512-1023 Byte Frames. */
+    BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_1024_1518                         = 7,    /**< 1024-1518 Byte Frames. */
+    BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_1519_2047                         = 8,    /**< 1519-2047 Byte Frames. */
+    BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_2048_4095                         = 9,    /**< 2048_4095 Byte Frames. */
+    BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_4096_9216                         = 10,   /**< 4096-9216 Byte Frames. */
+    BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_9217_16383                        = 11,   /**< 9217-16383 Byte Frames. */
+    BCMOLT_EPON_PATH_1G_US_STAT_ID_BROADCAST_FRAMES                         = 12,   /**< Broadcast Frames. */
+    BCMOLT_EPON_PATH_1G_US_STAT_ID_DATA_BYTES                               = 13,   /**< Data Bytes. */
+    BCMOLT_EPON_PATH_1G_US_STAT_ID_MULTICAST_FRAMES                         = 14,   /**< Mulitcast Frames. */
+    BCMOLT_EPON_PATH_1G_US_STAT_ID_UNICAST_FRAMES                           = 15,   /**< Unicast Frames. */
+    BCMOLT_EPON_PATH_1G_US_STAT_ID_MPCP_FRAMES                              = 16,   /**< MPCP Frames. */
+    BCMOLT_EPON_PATH_1G_US_STAT_ID_OAM_BYTES                                = 17,   /**< OAM Bytes. */
+    BCMOLT_EPON_PATH_1G_US_STAT_ID_OAM_FRAMES                               = 18,   /**< OAM Frames. */
+    BCMOLT_EPON_PATH_1G_US_STAT_ID_REPORT_FRAMES                            = 19,   /**< Report Frames. */
+    BCMOLT_EPON_PATH_1G_US_STAT_ID_ABORT_FRAMES                             = 20,   /**< Abort Frames. */
+    BCMOLT_EPON_PATH_1G_US_STAT_ID_FCS_ERROR                                = 21,   /**< FCS Error. */
+    BCMOLT_EPON_PATH_1G_US_STAT_ID_CRC_8_ERROR                              = 22,   /**< CRC8 Error. */
+    BCMOLT_EPON_PATH_1G_US_STAT_ID_OUT_OF_SLOT                              = 23,   /**< Out of Slot. */
+    BCMOLT_EPON_PATH_1G_US_STAT_ID_OVERSIZE_ERROR                           = 24,   /**< Oversize Error. */
+    BCMOLT_EPON_PATH_1G_US_STAT_ID_RUNT_ERROR                               = 25,   /**< Runt Error. */
+    BCMOLT_EPON_PATH_1G_US_STAT_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_path_1g_us_stat_id;
+
+/** Identifiers for all properties contained in the epon_rp_cfg group. 
+ */
+typedef enum bcmolt_epon_rp_cfg_id
+{
+    BCMOLT_EPON_RP_CFG_ID__BEGIN                                            = 0,
+    BCMOLT_EPON_RP_CFG_ID_BASE_LLID                                         = 0,    /**< Base logical link identifier. */
+    BCMOLT_EPON_RP_CFG_ID_MPCP_DISC_EN                                      = 1,    /**< MPCP discovery enable. */
+    BCMOLT_EPON_RP_CFG_ID_MPCP_DISC_GNT_LEN_TQ                              = 2,    /**< MPCP discovery grant length TQ. */
+    BCMOLT_EPON_RP_CFG_ID_MPCP_REPORT_TIMEOUT                               = 3,    /**< MPCP report timeout mS. */
+    BCMOLT_EPON_RP_CFG_ID_MAX_MPCP_REG_PER_DISC_WINDOW                      = 4,    /**< Maximum MPCP registrations per discovery window. */
+    BCMOLT_EPON_RP_CFG_ID_MAX_LINKS                                         = 5,    /**< Maximum number of links. */
+    BCMOLT_EPON_RP_CFG_ID_DEFAULT_UPSTREAM_BANDWIDTH                        = 6,    /**< Default Upstream Bandwidth. */
+    BCMOLT_EPON_RP_CFG_ID_RATE_OF_REFRACTION                                = 7,    /**< Rate of Refraction. */
+    BCMOLT_EPON_RP_CFG_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_rp_cfg_id;
+
+/** Identifiers for all properties contained in the epon_rp_key group. 
+ */
+typedef enum bcmolt_epon_rp_key_id
+{
+    BCMOLT_EPON_RP_KEY_ID__BEGIN                                            = 0,
+    BCMOLT_EPON_RP_KEY_ID_EPON_NI                                           = 0,    /**< EPON NI number. */
+    BCMOLT_EPON_RP_KEY_ID_LINK_RATE                                         = 1,    /**< Link rate. */
+    BCMOLT_EPON_RP_KEY_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_rp_key_id;
+
+/** Identifiers for all properties contained in the gpio_cfg group. 
+ */
+typedef enum bcmolt_gpio_cfg_id
+{
+    BCMOLT_GPIO_CFG_ID__BEGIN                                               = 0,
+    BCMOLT_GPIO_CFG_ID_DIRECTION                                            = 0,    /**< Direction. */
+    BCMOLT_GPIO_CFG_ID_VALUE                                                = 1,    /**< Value. */
+    BCMOLT_GPIO_CFG_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpio_cfg_id;
+
+/** Identifiers for all properties contained in the gpio_key group. 
+ */
+typedef enum bcmolt_gpio_key_id
+{
+    BCMOLT_GPIO_KEY_ID__BEGIN                                               = 0,
+    BCMOLT_GPIO_KEY_ID_RESERVED                                             = 0,    /**< Reserved. */
+    BCMOLT_GPIO_KEY_ID_GPIO_ID                                              = 1,    /**< GPIO ID. */
+    BCMOLT_GPIO_KEY_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpio_key_id;
+
+/** Identifiers for all properties contained in the gpon_alloc_auto_cfg group. 
+ */
+typedef enum bcmolt_gpon_alloc_auto_cfg_id
+{
+    BCMOLT_GPON_ALLOC_AUTO_CFG_ID__BEGIN                                    = 0,
+    BCMOLT_GPON_ALLOC_AUTO_CFG_ID_CONFIGURATION_COMPLETED                   = 0,    /**< Configuration Completed. */
+    BCMOLT_GPON_ALLOC_AUTO_CFG_ID_GET_ALLOC_STATS_COMPLETED                 = 1,    /**< Get alloc ID statistics completed. */
+    BCMOLT_GPON_ALLOC_AUTO_CFG_ID_STAT_ALARM_CLEARED                        = 2,    /**< Stat Alarm Cleared. */
+    BCMOLT_GPON_ALLOC_AUTO_CFG_ID_STAT_ALARM_RAISED                         = 3,    /**< Stat Alarm Raised. */
+    BCMOLT_GPON_ALLOC_AUTO_CFG_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_alloc_auto_cfg_id;
+
+/** Identifiers for all properties contained in the gpon_alloc_cfg group. 
+ */
+typedef enum bcmolt_gpon_alloc_cfg_id
+{
+    BCMOLT_GPON_ALLOC_CFG_ID__BEGIN                                         = 0,
+    BCMOLT_GPON_ALLOC_CFG_ID_STATE                                          = 0,    /**< Alloc ID state. */
+    BCMOLT_GPON_ALLOC_CFG_ID_SLA                                            = 1,    /**< Alloc ID SLA. */
+    BCMOLT_GPON_ALLOC_CFG_ID_ONU_ID                                         = 2,    /**< onu_id. */
+    BCMOLT_GPON_ALLOC_CFG_ID_COLLECT_STATS                                  = 3,    /**< Enable statistics collection on the alloc id. */
+    BCMOLT_GPON_ALLOC_CFG_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_alloc_cfg_id;
+
+/** Identifiers for all properties contained in the 
+ * gpon_alloc_configuration_completed group. 
+ */
+typedef enum bcmolt_gpon_alloc_configuration_completed_id
+{
+    BCMOLT_GPON_ALLOC_CONFIGURATION_COMPLETED_ID__BEGIN                     = 0,
+    BCMOLT_GPON_ALLOC_CONFIGURATION_COMPLETED_ID_STATUS                     = 0,    /**< Status. */
+    BCMOLT_GPON_ALLOC_CONFIGURATION_COMPLETED_ID_NEW_STATE                  = 1,    /**< new state. */
+    BCMOLT_GPON_ALLOC_CONFIGURATION_COMPLETED_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_alloc_configuration_completed_id;
+
+/** Identifiers for all properties contained in the 
+ * gpon_alloc_get_alloc_stats_completed group. 
+ */
+typedef enum bcmolt_gpon_alloc_get_alloc_stats_completed_id
+{
+    BCMOLT_GPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID__BEGIN                   = 0,
+    BCMOLT_GPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_STATUS                   = 0,    /**< status. */
+    BCMOLT_GPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_AVERAGE_NSR_USED         = 1,    /**< Average NSR used bytes. */
+    BCMOLT_GPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_AVERAGE_NSR_ALLOCATED    = 2,    /**< Average NSR allocated bytes. */
+    BCMOLT_GPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_AVERAGE_SR_REPORT        = 3,    /**< Average SR report. */
+    BCMOLT_GPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_alloc_get_alloc_stats_completed_id;
+
+/** Identifiers for all properties contained in the gpon_alloc_get_stats group. 
+ */
+typedef enum bcmolt_gpon_alloc_get_stats_id
+{
+    BCMOLT_GPON_ALLOC_GET_STATS_ID__BEGIN                                   = 0,
+    BCMOLT_GPON_ALLOC_GET_STATS_ID_NUM_OF_CYCLES                            = 0,    /**< Number of cycles. */
+    BCMOLT_GPON_ALLOC_GET_STATS_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_alloc_get_stats_id;
+
+/** Identifiers for all properties contained in the gpon_alloc_key group. 
+ */
+typedef enum bcmolt_gpon_alloc_key_id
+{
+    BCMOLT_GPON_ALLOC_KEY_ID__BEGIN                                         = 0,
+    BCMOLT_GPON_ALLOC_KEY_ID_PON_NI                                         = 0,    /**< PON network interface. */
+    BCMOLT_GPON_ALLOC_KEY_ID_ALLOC_ID                                       = 1,    /**< Alloc ID. */
+    BCMOLT_GPON_ALLOC_KEY_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_alloc_key_id;
+
+/** Identifiers for all properties contained in the gpon_alloc_set_state group. 
+ */
+typedef enum bcmolt_gpon_alloc_set_state_id
+{
+    BCMOLT_GPON_ALLOC_SET_STATE_ID__BEGIN                                   = 0,
+    BCMOLT_GPON_ALLOC_SET_STATE_ID_STATE                                    = 0,    /**< State. */
+    BCMOLT_GPON_ALLOC_SET_STATE_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_alloc_set_state_id;
+
+/** Identifiers for all properties contained in the 
+ * gpon_alloc_stat_alarm_cleared group. 
+ */
+typedef enum bcmolt_gpon_alloc_stat_alarm_cleared_id
+{
+    BCMOLT_GPON_ALLOC_STAT_ALARM_CLEARED_ID__BEGIN                          = 0,
+    BCMOLT_GPON_ALLOC_STAT_ALARM_CLEARED_ID_STAT                            = 0,    /**< Statistic ID. */
+    BCMOLT_GPON_ALLOC_STAT_ALARM_CLEARED_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_alloc_stat_alarm_cleared_id;
+
+/** Identifiers for all properties contained in the gpon_alloc_stat_alarm_raised 
+ * group. 
+ */
+typedef enum bcmolt_gpon_alloc_stat_alarm_raised_id
+{
+    BCMOLT_GPON_ALLOC_STAT_ALARM_RAISED_ID__BEGIN                           = 0,
+    BCMOLT_GPON_ALLOC_STAT_ALARM_RAISED_ID_STAT                             = 0,    /**< Statistic ID. */
+    BCMOLT_GPON_ALLOC_STAT_ALARM_RAISED_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_alloc_stat_alarm_raised_id;
+
+/** Identifiers for all properties contained in the gpon_alloc_stat_cfg group. 
+ */
+typedef enum bcmolt_gpon_alloc_stat_cfg_id
+{
+    BCMOLT_GPON_ALLOC_STAT_CFG_ID__BEGIN                                    = 0,
+    BCMOLT_GPON_ALLOC_STAT_CFG_ID_CFG                                       = 0,    /**< Configuration. */
+    BCMOLT_GPON_ALLOC_STAT_CFG_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_alloc_stat_cfg_id;
+
+/** Identifiers for all properties contained in the gpon_alloc_stat group. 
+ */
+typedef enum bcmolt_gpon_alloc_stat_id
+{
+    BCMOLT_GPON_ALLOC_STAT_ID__BEGIN                                        = 0,
+    BCMOLT_GPON_ALLOC_STAT_ID_RX_BYTES                                      = 0,    /**< Received Bytes. */
+    BCMOLT_GPON_ALLOC_STAT_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_alloc_stat_id;
+
+/** Identifiers for all properties contained in the gpon_gem_port_auto_cfg 
+ * group. 
+ */
+typedef enum bcmolt_gpon_gem_port_auto_cfg_id
+{
+    BCMOLT_GPON_GEM_PORT_AUTO_CFG_ID__BEGIN                                 = 0,
+    BCMOLT_GPON_GEM_PORT_AUTO_CFG_ID_CONFIGURATION_COMPLETED                = 0,    /**< Configuration Completed. */
+    BCMOLT_GPON_GEM_PORT_AUTO_CFG_ID_STAT_ALARM_CLEARED                     = 1,    /**< Stat Alarm Cleared. */
+    BCMOLT_GPON_GEM_PORT_AUTO_CFG_ID_STAT_ALARM_RAISED                      = 2,    /**< Stat Alarm Raised. */
+    BCMOLT_GPON_GEM_PORT_AUTO_CFG_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_gem_port_auto_cfg_id;
+
+/** Identifiers for all properties contained in the gpon_gem_port_cfg group. 
+ */
+typedef enum bcmolt_gpon_gem_port_cfg_id
+{
+    BCMOLT_GPON_GEM_PORT_CFG_ID__BEGIN                                      = 0,
+    BCMOLT_GPON_GEM_PORT_CFG_ID_CONFIGURATION                               = 0,    /**< Configuration. */
+    BCMOLT_GPON_GEM_PORT_CFG_ID_ONU_ID                                      = 1,    /**< ONU ID. */
+    BCMOLT_GPON_GEM_PORT_CFG_ID_GEM_PORT_STATE                              = 2,    /**< gem port state. */
+    BCMOLT_GPON_GEM_PORT_CFG_ID_DOWNSTREAM_ENCRYPTION_MODE                  = 3,    /**< Downstream encryption mode. */
+    BCMOLT_GPON_GEM_PORT_CFG_ID_UPSTREAM_DESTINATION_QUEUE                  = 4,    /**< Upstream destination queue. */
+    BCMOLT_GPON_GEM_PORT_CFG_ID_CONTROL                                     = 5,    /**< control. */
+    BCMOLT_GPON_GEM_PORT_CFG_ID_DEBUG_FLOW_CONFIG                           = 6,    /**< Debug flow config. */
+    BCMOLT_GPON_GEM_PORT_CFG_ID_MAC_TABLE_ENTRY_LIMIT                       = 7,    /**< MAC table entry limit. */
+    BCMOLT_GPON_GEM_PORT_CFG_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_gem_port_cfg_id;
+
+/** Identifiers for all properties contained in the 
+ * gpon_gem_port_configuration_completed group. 
+ */
+typedef enum bcmolt_gpon_gem_port_configuration_completed_id
+{
+    BCMOLT_GPON_GEM_PORT_CONFIGURATION_COMPLETED_ID__BEGIN                  = 0,
+    BCMOLT_GPON_GEM_PORT_CONFIGURATION_COMPLETED_ID_STATUS                  = 0,    /**< status. */
+    BCMOLT_GPON_GEM_PORT_CONFIGURATION_COMPLETED_ID_NEW_STATE               = 1,    /**< new state. */
+    BCMOLT_GPON_GEM_PORT_CONFIGURATION_COMPLETED_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_gem_port_configuration_completed_id;
+
+/** Identifiers for all properties contained in the gpon_gem_port_key group. 
+ */
+typedef enum bcmolt_gpon_gem_port_key_id
+{
+    BCMOLT_GPON_GEM_PORT_KEY_ID__BEGIN                                      = 0,
+    BCMOLT_GPON_GEM_PORT_KEY_ID_PON_NI                                      = 0,    /**< PON network interface. */
+    BCMOLT_GPON_GEM_PORT_KEY_ID_GEM_PORT_ID                                 = 1,    /**< GEM Port ID. */
+    BCMOLT_GPON_GEM_PORT_KEY_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_gem_port_key_id;
+
+/** Identifiers for all properties contained in the gpon_gem_port_set_state 
+ * group. 
+ */
+typedef enum bcmolt_gpon_gem_port_set_state_id
+{
+    BCMOLT_GPON_GEM_PORT_SET_STATE_ID__BEGIN                                = 0,
+    BCMOLT_GPON_GEM_PORT_SET_STATE_ID_STATE                                 = 0,    /**< State. */
+    BCMOLT_GPON_GEM_PORT_SET_STATE_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_gem_port_set_state_id;
+
+/** Identifiers for all properties contained in the 
+ * gpon_gem_port_stat_alarm_cleared group. 
+ */
+typedef enum bcmolt_gpon_gem_port_stat_alarm_cleared_id
+{
+    BCMOLT_GPON_GEM_PORT_STAT_ALARM_CLEARED_ID__BEGIN                       = 0,
+    BCMOLT_GPON_GEM_PORT_STAT_ALARM_CLEARED_ID_STAT                         = 0,    /**< Statistic ID. */
+    BCMOLT_GPON_GEM_PORT_STAT_ALARM_CLEARED_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_gem_port_stat_alarm_cleared_id;
+
+/** Identifiers for all properties contained in the 
+ * gpon_gem_port_stat_alarm_raised group. 
+ */
+typedef enum bcmolt_gpon_gem_port_stat_alarm_raised_id
+{
+    BCMOLT_GPON_GEM_PORT_STAT_ALARM_RAISED_ID__BEGIN                        = 0,
+    BCMOLT_GPON_GEM_PORT_STAT_ALARM_RAISED_ID_STAT                          = 0,    /**< Statistic ID. */
+    BCMOLT_GPON_GEM_PORT_STAT_ALARM_RAISED_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_gem_port_stat_alarm_raised_id;
+
+/** Identifiers for all properties contained in the gpon_gem_port_stat_cfg 
+ * group. 
+ */
+typedef enum bcmolt_gpon_gem_port_stat_cfg_id
+{
+    BCMOLT_GPON_GEM_PORT_STAT_CFG_ID__BEGIN                                 = 0,
+    BCMOLT_GPON_GEM_PORT_STAT_CFG_ID_CFG                                    = 0,    /**< Configuration. */
+    BCMOLT_GPON_GEM_PORT_STAT_CFG_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_gem_port_stat_cfg_id;
+
+/** Identifiers for all properties contained in the gpon_gem_port_stat group. 
+ */
+typedef enum bcmolt_gpon_gem_port_stat_id
+{
+    BCMOLT_GPON_GEM_PORT_STAT_ID__BEGIN                                     = 0,
+    BCMOLT_GPON_GEM_PORT_STAT_ID_RX_PACKETS                                 = 0,    /**< Received GEM frames. */
+    BCMOLT_GPON_GEM_PORT_STAT_ID_RX_BYTES                                   = 1,    /**< Received bytes. */
+    BCMOLT_GPON_GEM_PORT_STAT_ID_TX_PACKETS                                 = 2,    /**< Transmitted GEM frames. */
+    BCMOLT_GPON_GEM_PORT_STAT_ID_TX_BYTES                                   = 3,    /**< Transmitted bytes. */
+    BCMOLT_GPON_GEM_PORT_STAT_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_gem_port_stat_id;
+
+/** Identifiers for all properties contained in the gpon_iwf_auto_cfg group. 
+ */
+typedef enum bcmolt_gpon_iwf_auto_cfg_id
+{
+    BCMOLT_GPON_IWF_AUTO_CFG_ID__BEGIN                                      = 0,
+    BCMOLT_GPON_IWF_AUTO_CFG_ID_FLUSH_MAC_TABLE_COMPLETED                   = 0,    /**< Flush MAC Table Completed. */
+    BCMOLT_GPON_IWF_AUTO_CFG_ID_SCAN_MAC_TABLE_COMPLETED                    = 1,    /**< Scan MAC Table Completed. */
+    BCMOLT_GPON_IWF_AUTO_CFG_ID_STAT_ALARM_CLEARED                          = 2,    /**< Stat Alarm Cleared. */
+    BCMOLT_GPON_IWF_AUTO_CFG_ID_STAT_ALARM_RAISED                           = 3,    /**< Stat Alarm Raised. */
+    BCMOLT_GPON_IWF_AUTO_CFG_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_iwf_auto_cfg_id;
+
+/** Identifiers for all properties contained in the gpon_iwf_cfg group. 
+ */
+typedef enum bcmolt_gpon_iwf_cfg_id
+{
+    BCMOLT_GPON_IWF_CFG_ID__BEGIN                                           = 0,
+    BCMOLT_GPON_IWF_CFG_ID_IWF_MODE                                         = 0,    /**< IWF mode. */
+    BCMOLT_GPON_IWF_CFG_ID_US_TPID_PER_FLOW                                 = 1,    /**< US tpid per flow. */
+    BCMOLT_GPON_IWF_CFG_ID_US_OTAG_DIRECT_TPID                              = 2,    /**< US otag direct tpid. */
+    BCMOLT_GPON_IWF_CFG_ID_US_OTAG_DIRECT_PBIT                              = 3,    /**< US otag direct pbit. */
+    BCMOLT_GPON_IWF_CFG_ID_DS_TPID                                          = 4,    /**< DS tpid. */
+    BCMOLT_GPON_IWF_CFG_ID_MAC_TABLE_CONFIGURATION                          = 5,    /**< MAC table configuration. */
+    BCMOLT_GPON_IWF_CFG_ID_DEBUG_FLOW_CONFIGURATION                         = 6,    /**< Debug flow configuration. */
+    BCMOLT_GPON_IWF_CFG_ID_MAC_TABLE_COUNT                                  = 7,    /**< MAC table entry count. */
+    BCMOLT_GPON_IWF_CFG_ID_FORBIDDEN_VLAN_FLOW_GEM_RANGE_START              = 8,    /**< Vlan, flow, Gem forbidden range start value. */
+    BCMOLT_GPON_IWF_CFG_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_iwf_cfg_id;
+
+/** Identifiers for all properties contained in the gpon_iwf_ds_egress_flow_cfg 
+ * group. 
+ */
+typedef enum bcmolt_gpon_iwf_ds_egress_flow_cfg_id
+{
+    BCMOLT_GPON_IWF_DS_EGRESS_FLOW_CFG_ID__BEGIN                            = 0,
+    BCMOLT_GPON_IWF_DS_EGRESS_FLOW_CFG_ID_GEM_PORT                          = 0,    /**< GEM port. */
+    BCMOLT_GPON_IWF_DS_EGRESS_FLOW_CFG_ID_PBIT_CONTROL                      = 1,    /**< Pbit control. */
+    BCMOLT_GPON_IWF_DS_EGRESS_FLOW_CFG_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_iwf_ds_egress_flow_cfg_id;
+
+/** Identifiers for all properties contained in the gpon_iwf_ds_egress_flow_key 
+ * group. 
+ */
+typedef enum bcmolt_gpon_iwf_ds_egress_flow_key_id
+{
+    BCMOLT_GPON_IWF_DS_EGRESS_FLOW_KEY_ID__BEGIN                            = 0,
+    BCMOLT_GPON_IWF_DS_EGRESS_FLOW_KEY_ID_PON_NI                            = 0,    /**< PON network interface. */
+    BCMOLT_GPON_IWF_DS_EGRESS_FLOW_KEY_ID_FLOW_ID                           = 1,    /**< Flow ID. */
+    BCMOLT_GPON_IWF_DS_EGRESS_FLOW_KEY_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_iwf_ds_egress_flow_key_id;
+
+/** Identifiers for all properties contained in the gpon_iwf_ds_ingress_flow_cfg 
+ * group. 
+ */
+typedef enum bcmolt_gpon_iwf_ds_ingress_flow_cfg_id
+{
+    BCMOLT_GPON_IWF_DS_INGRESS_FLOW_CFG_ID__BEGIN                           = 0,
+    BCMOLT_GPON_IWF_DS_INGRESS_FLOW_CFG_ID_MAPPING_METHOD                   = 0,    /**< Mapping method. */
+    BCMOLT_GPON_IWF_DS_INGRESS_FLOW_CFG_ID_MAPPING_TAG                      = 1,    /**< Mapping tag. */
+    BCMOLT_GPON_IWF_DS_INGRESS_FLOW_CFG_ID_VLAN_ACTION                      = 2,    /**< VLAN action. */
+    BCMOLT_GPON_IWF_DS_INGRESS_FLOW_CFG_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_iwf_ds_ingress_flow_cfg_id;
+
+/** Identifiers for all properties contained in the gpon_iwf_ds_ingress_flow_key 
+ * group. 
+ */
+typedef enum bcmolt_gpon_iwf_ds_ingress_flow_key_id
+{
+    BCMOLT_GPON_IWF_DS_INGRESS_FLOW_KEY_ID__BEGIN                           = 0,
+    BCMOLT_GPON_IWF_DS_INGRESS_FLOW_KEY_ID_PON_NI                           = 0,    /**< PON network interface. */
+    BCMOLT_GPON_IWF_DS_INGRESS_FLOW_KEY_ID_VLAN_ID                          = 1,    /**< vlan ID. */
+    BCMOLT_GPON_IWF_DS_INGRESS_FLOW_KEY_ID__NUM_OF          /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_iwf_ds_ingress_flow_key_id;
+
+/** Identifiers for all properties contained in the 
+ * gpon_iwf_flush_mac_table_completed group. 
+ */
+typedef enum bcmolt_gpon_iwf_flush_mac_table_completed_id
+{
+    BCMOLT_GPON_IWF_FLUSH_MAC_TABLE_COMPLETED_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_iwf_flush_mac_table_completed_id;
+
+/** Identifiers for all properties contained in the gpon_iwf_flush_mac_table 
+ * group. 
+ */
+typedef enum bcmolt_gpon_iwf_flush_mac_table_id
+{
+    BCMOLT_GPON_IWF_FLUSH_MAC_TABLE_ID__BEGIN                               = 0,
+    BCMOLT_GPON_IWF_FLUSH_MAC_TABLE_ID_CONTROL                              = 0,    /**< control. */
+    BCMOLT_GPON_IWF_FLUSH_MAC_TABLE_ID_VID                                  = 1,    /**< VID. */
+    BCMOLT_GPON_IWF_FLUSH_MAC_TABLE_ID_FLOW_ID                              = 2,    /**< FLOW ID. */
+    BCMOLT_GPON_IWF_FLUSH_MAC_TABLE_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_iwf_flush_mac_table_id;
+
+/** Identifiers for all properties contained in the gpon_iwf_key group. 
+ */
+typedef enum bcmolt_gpon_iwf_key_id
+{
+    BCMOLT_GPON_IWF_KEY_ID__BEGIN                                           = 0,
+    BCMOLT_GPON_IWF_KEY_ID_PON_NI                                           = 0,    /**< PON network interface. */
+    BCMOLT_GPON_IWF_KEY_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_iwf_key_id;
+
+/** Identifiers for all properties contained in the gpon_iwf_mac_table_auto_cfg 
+ * group. 
+ */
+typedef enum bcmolt_gpon_iwf_mac_table_auto_cfg_id
+{
+    BCMOLT_GPON_IWF_MAC_TABLE_AUTO_CFG_ID__BEGIN                            = 0,
+    BCMOLT_GPON_IWF_MAC_TABLE_AUTO_CFG_ID_MAC_AGED                          = 0,    /**< MAC Aged. */
+    BCMOLT_GPON_IWF_MAC_TABLE_AUTO_CFG_ID_MAC_DROPPED                       = 1,    /**< MAC Dropped. */
+    BCMOLT_GPON_IWF_MAC_TABLE_AUTO_CFG_ID_MAC_MOVE                          = 2,    /**< MAC Move. */
+    BCMOLT_GPON_IWF_MAC_TABLE_AUTO_CFG_ID_NEW_MAC                           = 3,    /**< New MAC. */
+    BCMOLT_GPON_IWF_MAC_TABLE_AUTO_CFG_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_iwf_mac_table_auto_cfg_id;
+
+/** Identifiers for all properties contained in the gpon_iwf_mac_table_cfg 
+ * group. 
+ */
+typedef enum bcmolt_gpon_iwf_mac_table_cfg_id
+{
+    BCMOLT_GPON_IWF_MAC_TABLE_CFG_ID__BEGIN                                 = 0,
+    BCMOLT_GPON_IWF_MAC_TABLE_CFG_ID_FLOW_ID                                = 0,    /**< Flow ID. */
+    BCMOLT_GPON_IWF_MAC_TABLE_CFG_ID_STAT                                   = 1,    /**< static. */
+    BCMOLT_GPON_IWF_MAC_TABLE_CFG_ID_GEM_PORT_ID                            = 2,    /**< GEM Port ID. */
+    BCMOLT_GPON_IWF_MAC_TABLE_CFG_ID_ONU_ID                                 = 3,    /**< ONU ID. */
+    BCMOLT_GPON_IWF_MAC_TABLE_CFG_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_iwf_mac_table_cfg_id;
+
+/** Identifiers for all properties contained in the gpon_iwf_mac_table_key 
+ * group. 
+ */
+typedef enum bcmolt_gpon_iwf_mac_table_key_id
+{
+    BCMOLT_GPON_IWF_MAC_TABLE_KEY_ID__BEGIN                                 = 0,
+    BCMOLT_GPON_IWF_MAC_TABLE_KEY_ID_PON_NI                                 = 0,    /**< PON network interface. */
+    BCMOLT_GPON_IWF_MAC_TABLE_KEY_ID_MAC_ADDRESS                            = 1,    /**< MAC address. */
+    BCMOLT_GPON_IWF_MAC_TABLE_KEY_ID_VLAN                                   = 2,    /**< VLAN. */
+    BCMOLT_GPON_IWF_MAC_TABLE_KEY_ID__NUM_OF        /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_iwf_mac_table_key_id;
+
+/** Identifiers for all properties contained in the gpon_iwf_mac_table_mac_aged 
+ * group. 
+ */
+typedef enum bcmolt_gpon_iwf_mac_table_mac_aged_id
+{
+    BCMOLT_GPON_IWF_MAC_TABLE_MAC_AGED_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_iwf_mac_table_mac_aged_id;
+
+/** Identifiers for all properties contained in the 
+ * gpon_iwf_mac_table_mac_dropped group. 
+ */
+typedef enum bcmolt_gpon_iwf_mac_table_mac_dropped_id
+{
+    BCMOLT_GPON_IWF_MAC_TABLE_MAC_DROPPED_ID__BEGIN                         = 0,
+    BCMOLT_GPON_IWF_MAC_TABLE_MAC_DROPPED_ID_FLOW_ID                        = 0,    /**< flow ID. */
+    BCMOLT_GPON_IWF_MAC_TABLE_MAC_DROPPED_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_iwf_mac_table_mac_dropped_id;
+
+/** Identifiers for all properties contained in the gpon_iwf_mac_table_mac_move 
+ * group. 
+ */
+typedef enum bcmolt_gpon_iwf_mac_table_mac_move_id
+{
+    BCMOLT_GPON_IWF_MAC_TABLE_MAC_MOVE_ID__BEGIN                            = 0,
+    BCMOLT_GPON_IWF_MAC_TABLE_MAC_MOVE_ID_OLD_FLOW_ID                       = 0,    /**< old flow ID. */
+    BCMOLT_GPON_IWF_MAC_TABLE_MAC_MOVE_ID_NEW_FLOW_ID                       = 1,    /**< new flow id. */
+    BCMOLT_GPON_IWF_MAC_TABLE_MAC_MOVE_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_iwf_mac_table_mac_move_id;
+
+/** Identifiers for all properties contained in the gpon_iwf_mac_table_new_mac 
+ * group. 
+ */
+typedef enum bcmolt_gpon_iwf_mac_table_new_mac_id
+{
+    BCMOLT_GPON_IWF_MAC_TABLE_NEW_MAC_ID__BEGIN                             = 0,
+    BCMOLT_GPON_IWF_MAC_TABLE_NEW_MAC_ID_FLOW_ID                            = 0,    /**< flow ID. */
+    BCMOLT_GPON_IWF_MAC_TABLE_NEW_MAC_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_iwf_mac_table_new_mac_id;
+
+/** Identifiers for all properties contained in the 
+ * gpon_iwf_scan_mac_table_completed group. 
+ */
+typedef enum bcmolt_gpon_iwf_scan_mac_table_completed_id
+{
+    BCMOLT_GPON_IWF_SCAN_MAC_TABLE_COMPLETED_ID__BEGIN                      = 0,
+    BCMOLT_GPON_IWF_SCAN_MAC_TABLE_COMPLETED_ID_MAC_ADDRESS                 = 0,    /**< MAC Address. */
+    BCMOLT_GPON_IWF_SCAN_MAC_TABLE_COMPLETED_ID_ENTRIES                     = 1,    /**< Entries. */
+    BCMOLT_GPON_IWF_SCAN_MAC_TABLE_COMPLETED_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_iwf_scan_mac_table_completed_id;
+
+/** Identifiers for all properties contained in the gpon_iwf_scan_mac_table 
+ * group. 
+ */
+typedef enum bcmolt_gpon_iwf_scan_mac_table_id
+{
+    BCMOLT_GPON_IWF_SCAN_MAC_TABLE_ID__BEGIN                                = 0,
+    BCMOLT_GPON_IWF_SCAN_MAC_TABLE_ID_MAC_ADDRESS                           = 0,    /**< MAC Address. */
+    BCMOLT_GPON_IWF_SCAN_MAC_TABLE_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_iwf_scan_mac_table_id;
+
+/** Identifiers for all properties contained in the gpon_iwf_stat_alarm_cleared 
+ * group. 
+ */
+typedef enum bcmolt_gpon_iwf_stat_alarm_cleared_id
+{
+    BCMOLT_GPON_IWF_STAT_ALARM_CLEARED_ID__BEGIN                            = 0,
+    BCMOLT_GPON_IWF_STAT_ALARM_CLEARED_ID_STAT                              = 0,    /**< Statistic ID. */
+    BCMOLT_GPON_IWF_STAT_ALARM_CLEARED_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_iwf_stat_alarm_cleared_id;
+
+/** Identifiers for all properties contained in the gpon_iwf_stat_alarm_raised 
+ * group. 
+ */
+typedef enum bcmolt_gpon_iwf_stat_alarm_raised_id
+{
+    BCMOLT_GPON_IWF_STAT_ALARM_RAISED_ID__BEGIN                             = 0,
+    BCMOLT_GPON_IWF_STAT_ALARM_RAISED_ID_STAT                               = 0,    /**< Statistic ID. */
+    BCMOLT_GPON_IWF_STAT_ALARM_RAISED_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_iwf_stat_alarm_raised_id;
+
+/** Identifiers for all properties contained in the gpon_iwf_stat_cfg group. 
+ */
+typedef enum bcmolt_gpon_iwf_stat_cfg_id
+{
+    BCMOLT_GPON_IWF_STAT_CFG_ID__BEGIN                                      = 0,
+    BCMOLT_GPON_IWF_STAT_CFG_ID_CFG                                         = 0,    /**< Configuration. */
+    BCMOLT_GPON_IWF_STAT_CFG_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_iwf_stat_cfg_id;
+
+/** Identifiers for all properties contained in the gpon_iwf_stat group. 
+ */
+typedef enum bcmolt_gpon_iwf_stat_id
+{
+    BCMOLT_GPON_IWF_STAT_ID__BEGIN                                          = 0,
+    BCMOLT_GPON_IWF_STAT_ID_DS_HIT_EVENT                                    = 0,    /**< DS hit event. */
+    BCMOLT_GPON_IWF_STAT_ID_DS_MISS_EVENT                                   = 1,    /**< DS miss event. */
+    BCMOLT_GPON_IWF_STAT_ID_DS_DROP_DUE_TO_MISS_EVENT                       = 2,    /**< DS drop due to miss event. */
+    BCMOLT_GPON_IWF_STAT_ID_DS_DROP_DUE_TO_HIT_EVENT                        = 3,    /**< DS drop due to hit event. */
+    BCMOLT_GPON_IWF_STAT_ID_DS_DROP_TO_DISABLED_GEM                         = 4,    /**< DS drop to disabled GEM. */
+    BCMOLT_GPON_IWF_STAT_ID_NEW_MAC_DISCOVERED                              = 5,    /**< New MAC discovered. */
+    BCMOLT_GPON_IWF_STAT_ID_MOVE_EVENT                                      = 6,    /**< Move event. */
+    BCMOLT_GPON_IWF_STAT_ID_NEW_MAC_DROP_DUE_TO_FIFO_FULL                   = 7,    /**< New MAC drop due to fifo full. */
+    BCMOLT_GPON_IWF_STAT_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_iwf_stat_id;
+
+/** Identifiers for all properties contained in the gpon_iwf_us_flow_cfg group. 
+ */
+typedef enum bcmolt_gpon_iwf_us_flow_cfg_id
+{
+    BCMOLT_GPON_IWF_US_FLOW_CFG_ID__BEGIN                                   = 0,
+    BCMOLT_GPON_IWF_US_FLOW_CFG_ID_FLOW_ID                                  = 0,    /**< Flow ID. */
+    BCMOLT_GPON_IWF_US_FLOW_CFG_ID_MAC_LEARNING                             = 1,    /**< MAC learning. */
+    BCMOLT_GPON_IWF_US_FLOW_CFG_ID_VLAN_ACTION                              = 2,    /**< VLAN action. */
+    BCMOLT_GPON_IWF_US_FLOW_CFG_ID_VLAN_TAG                                 = 3,    /**< Vlan tag. */
+    BCMOLT_GPON_IWF_US_FLOW_CFG_ID_TPID_INDEX                               = 4,    /**< TPID index. */
+    BCMOLT_GPON_IWF_US_FLOW_CFG_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_iwf_us_flow_cfg_id;
+
+/** Identifiers for all properties contained in the gpon_iwf_us_flow_key group. 
+ */
+typedef enum bcmolt_gpon_iwf_us_flow_key_id
+{
+    BCMOLT_GPON_IWF_US_FLOW_KEY_ID__BEGIN                                   = 0,
+    BCMOLT_GPON_IWF_US_FLOW_KEY_ID_PON_NI                                   = 0,    /**< PON network interface. */
+    BCMOLT_GPON_IWF_US_FLOW_KEY_ID_GEM_PORT_ID                              = 1,    /**< GEM Port  ID. */
+    BCMOLT_GPON_IWF_US_FLOW_KEY_ID__NUM_OF                  /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_iwf_us_flow_key_id;
+
+/** Identifiers for all properties contained in the 
+ * gpon_ni_activate_all_onus_completed group. 
+ */
+typedef enum bcmolt_gpon_ni_activate_all_onus_completed_id
+{
+    BCMOLT_GPON_NI_ACTIVATE_ALL_ONUS_COMPLETED_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_ni_activate_all_onus_completed_id;
+
+/** Identifiers for all properties contained in the gpon_ni_auto_cfg group. 
+ */
+typedef enum bcmolt_gpon_ni_auto_cfg_id
+{
+    BCMOLT_GPON_NI_AUTO_CFG_ID__BEGIN                                       = 0,
+    BCMOLT_GPON_NI_AUTO_CFG_ID_ACTIVATE_ALL_ONUS_COMPLETED                  = 0,    /**< activate all onus completed. */
+    BCMOLT_GPON_NI_AUTO_CFG_ID_CPU_PACKETS_FAILURE                          = 1,    /**< CPU Packets Failure. */
+    BCMOLT_GPON_NI_AUTO_CFG_ID_DEACTIVATE_ALL_ONUS_COMPLETED                = 2,    /**< deactivate all onus completed. */
+    BCMOLT_GPON_NI_AUTO_CFG_ID_DISABLE_ALL_ONUS_COMPLETED                   = 3,    /**< disable all onus completed. */
+    BCMOLT_GPON_NI_AUTO_CFG_ID_ENABLE_ALL_ONUS_COMPLETED                    = 4,    /**< enable all onus completed. */
+    BCMOLT_GPON_NI_AUTO_CFG_ID_LOS                                          = 5,    /**< LOS. */
+    BCMOLT_GPON_NI_AUTO_CFG_ID_ONU_DISCOVERED                               = 6,    /**< ONU Discovered. */
+    BCMOLT_GPON_NI_AUTO_CFG_ID_ONU_UPGRADE_COMPLETE                         = 7,    /**< ONU Upgrade Complete. */
+    BCMOLT_GPON_NI_AUTO_CFG_ID_PROTECTION_SWITCHING_ONUS_RANGED             = 8,    /**< Protection Switching ONUs Ranged. */
+    BCMOLT_GPON_NI_AUTO_CFG_ID_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED    = 9,    /**< Protection Switching Switchover Completed. */
+    BCMOLT_GPON_NI_AUTO_CFG_ID_PROTECTION_SWITCHING_TRAFFIC_RESUME          = 10,   /**< Protection Switching Traffic Resume. */
+    BCMOLT_GPON_NI_AUTO_CFG_ID_ROGUE_DETECTION_COMPLETED                    = 11,   /**< Rogue detection completed. */
+    BCMOLT_GPON_NI_AUTO_CFG_ID_ROGUE_ONU_SPECIAL_MAP_CYCLE_START            = 12,   /**< Rogue ONU special map cycle start. */
+    BCMOLT_GPON_NI_AUTO_CFG_ID_SERIAL_NUMBER_ACQUISITION_CYCLE_START        = 13,   /**< Serial Number Acquisition Cycle Start. */
+    BCMOLT_GPON_NI_AUTO_CFG_ID_STANDBY_PON_MONITORING_CYCLE_COMPLETED       = 14,   /**< Standby PON Monitoring Cycle Completed. */
+    BCMOLT_GPON_NI_AUTO_CFG_ID_STAT_ALARM_CLEARED                           = 15,   /**< Stat Alarm Cleared. */
+    BCMOLT_GPON_NI_AUTO_CFG_ID_STAT_ALARM_RAISED                            = 16,   /**< Stat Alarm Raised. */
+    BCMOLT_GPON_NI_AUTO_CFG_ID_STATE_CHANGE_COMPLETED                       = 17,   /**< State Change Completed. */
+    BCMOLT_GPON_NI_AUTO_CFG_ID_TOD_REQUEST_COMPLETED                        = 18,   /**< TOD request completed. */
+    BCMOLT_GPON_NI_AUTO_CFG_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_ni_auto_cfg_id;
+
+/** Identifiers for all properties contained in the 
+ * gpon_ni_broadcast_ploam_packet group. 
+ */
+typedef enum bcmolt_gpon_ni_broadcast_ploam_packet_id
+{
+    BCMOLT_GPON_NI_BROADCAST_PLOAM_PACKET_ID__BEGIN                         = 0,
+    BCMOLT_GPON_NI_BROADCAST_PLOAM_PACKET_ID_PLOAM                          = 0,    /**< ploam. */
+    BCMOLT_GPON_NI_BROADCAST_PLOAM_PACKET_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_ni_broadcast_ploam_packet_id;
+
+/** Identifiers for all properties contained in the gpon_ni_cfg group. 
+ */
+typedef enum bcmolt_gpon_ni_cfg_id
+{
+    BCMOLT_GPON_NI_CFG_ID__BEGIN                                            = 0,
+    BCMOLT_GPON_NI_CFG_ID_PON_STATUS                                        = 0,    /**< PON status. */
+    BCMOLT_GPON_NI_CFG_ID_AVAILABLE_BANDWIDTH                               = 1,    /**< Available Bandwidth. */
+    BCMOLT_GPON_NI_CFG_ID_NUMBER_OF_ACTIVE_ONUS                             = 2,    /**< number of active onus. */
+    BCMOLT_GPON_NI_CFG_ID_NUMBER_OF_ACTIVE_STANDBY_ONUS                     = 3,    /**< number of active standby onus. */
+    BCMOLT_GPON_NI_CFG_ID_PRBS_STATUS                                       = 4,    /**< PRBS status. */
+    BCMOLT_GPON_NI_CFG_ID_PON_DISTANCE                                      = 5,    /**< Pon distance. */
+    BCMOLT_GPON_NI_CFG_ID_RANGING_WINDOW_SIZE                               = 6,    /**< Ranging window size. */
+    BCMOLT_GPON_NI_CFG_ID_PREASSIGNED_EQUALIZATION_DELAY                    = 7,    /**< Pre-assigned Equalization Delay [bits]. */
+    BCMOLT_GPON_NI_CFG_ID_EQD_CYCLES_NUMBER                                 = 8,    /**< EqD measurement cycles number. */
+    BCMOLT_GPON_NI_CFG_ID_POWER_LEVEL                                       = 9,    /**< Power level. */
+    BCMOLT_GPON_NI_CFG_ID_DS_FEC_MODE                                       = 10,   /**< DS FEC mode. */
+    BCMOLT_GPON_NI_CFG_ID_DRIFT_CONTROL                                     = 11,   /**< Drift control. */
+    BCMOLT_GPON_NI_CFG_ID_DS_BER_REPORTING_INTERVAL                         = 12,   /**< DS BER reporting interval in ms. */
+    BCMOLT_GPON_NI_CFG_ID_LOS_ALARM_THRESHOLD                               = 13,   /**< LOS alarm threshold. */
+    BCMOLT_GPON_NI_CFG_ID_LOS_INITIAL_VALUE                                 = 14,   /**< LOS initial value. */
+    BCMOLT_GPON_NI_CFG_ID_ONU_ALARMS_THRESHOLDS                             = 15,   /**< ONU alarms thresholds. */
+    BCMOLT_GPON_NI_CFG_ID_BER_MONITOR                                       = 16,   /**< BER monitoring params. */
+    BCMOLT_GPON_NI_CFG_ID_PLOAM_ACK_TIMEOUT                                 = 17,   /**< Ploam ACK timeout. */
+    BCMOLT_GPON_NI_CFG_ID_ONU_ACTIVATION                                    = 18,   /**< ONU activation. */
+    BCMOLT_GPON_NI_CFG_ID_SN_ACQUISITION                                    = 19,   /**< SN Acquisition . */
+    BCMOLT_GPON_NI_CFG_ID_KEY_EXCHANGE                                      = 20,   /**< Key exchange. */
+    BCMOLT_GPON_NI_CFG_ID_PROTECTION_SWITCHING                              = 21,   /**< Protection switching. */
+    BCMOLT_GPON_NI_CFG_ID_CBR_RT_ALLOCATION_PROFILE                         = 22,   /**< CBR RT Allocation profile. */
+    BCMOLT_GPON_NI_CFG_ID_CBR_NRT_ALLOCATION_PROFILE                        = 23,   /**< CBR NRT Allocation Profile. */
+    BCMOLT_GPON_NI_CFG_ID_DBA                                               = 24,   /**< DBA. */
+    BCMOLT_GPON_NI_CFG_ID_POWER_MANAGEMENT                                  = 25,   /**< Power Management. */
+    BCMOLT_GPON_NI_CFG_ID_ROGUE_ONU_DETECTION_PROCESS                       = 26,   /**< Rogue ONU detection process. */
+    BCMOLT_GPON_NI_CFG_ID_PERIODIC_STANDBY_PON_MONITORING                   = 27,   /**< Periodic Standby PON monitoring. */
+    BCMOLT_GPON_NI_CFG_ID_PRBS_CHECKER                                      = 28,   /**< PRBS Checker. */
+    BCMOLT_GPON_NI_CFG_ID_PRBS_GENERATOR                                    = 29,   /**< PRBS Generator. */
+    BCMOLT_GPON_NI_CFG_ID_MIN_DATA_ALLOC_ID                                 = 30,   /**< Minimum Data Alloc ID. */
+    BCMOLT_GPON_NI_CFG_ID_AUTOMATIC_ONU_DEACTIVATION                        = 31,   /**< Automatic ONU deactivation. */
+    BCMOLT_GPON_NI_CFG_ID_US_BANDWIDTH_LIMIT                                = 32,   /**< US bandwidth Limit. */
+    BCMOLT_GPON_NI_CFG_ID_ALL_ONUS                                          = 33,   /**< all ONUs. */
+    BCMOLT_GPON_NI_CFG_ID_ALL_MCAST_GEM_PORTS                               = 34,   /**< all multicast GEM ports. */
+    BCMOLT_GPON_NI_CFG_ID_DEBUG                                             = 35,   /**< PON NI debug parameters. */
+    BCMOLT_GPON_NI_CFG_ID_ONU_UPGRADE_PARAMS                                = 36,   /**< ONU upgrade params. */
+    BCMOLT_GPON_NI_CFG_ID_PS_C_WAIT_BEFORE_DEACTIVATION_TIMEOUT             = 37,   /**< protection switching type c wait before deactivation timeout. */
+    BCMOLT_GPON_NI_CFG_ID_BIP32_INDICATION_CONTROL                          = 38,   /**< bip32 indication control. */
+    BCMOLT_GPON_NI_CFG_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_ni_cfg_id;
+
+/** Identifiers for all properties contained in the gpon_ni_cpu_packets_failure 
+ * group. 
+ */
+typedef enum bcmolt_gpon_ni_cpu_packets_failure_id
+{
+    BCMOLT_GPON_NI_CPU_PACKETS_FAILURE_ID__BEGIN                            = 0,
+    BCMOLT_GPON_NI_CPU_PACKETS_FAILURE_ID_ERROR                             = 0,    /**< Error. */
+    BCMOLT_GPON_NI_CPU_PACKETS_FAILURE_ID_GEM_PORT_ID                       = 1,    /**< GEM Port ID. */
+    BCMOLT_GPON_NI_CPU_PACKETS_FAILURE_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_ni_cpu_packets_failure_id;
+
+/** Identifiers for all properties contained in the gpon_ni_cpu_packets group. 
+ */
+typedef enum bcmolt_gpon_ni_cpu_packets_id
+{
+    BCMOLT_GPON_NI_CPU_PACKETS_ID__BEGIN                                    = 0,
+    BCMOLT_GPON_NI_CPU_PACKETS_ID_PACKET_TYPE                               = 0,    /**< packet type. */
+    BCMOLT_GPON_NI_CPU_PACKETS_ID_CALC_CRC                                  = 1,    /**< calc crc. */
+    BCMOLT_GPON_NI_CPU_PACKETS_ID_GEM_PORT_LIST                             = 2,    /**< gem port list. */
+    BCMOLT_GPON_NI_CPU_PACKETS_ID_BUFFER                                    = 3,    /**< buffer. */
+    BCMOLT_GPON_NI_CPU_PACKETS_ID__NUM_OF                   /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_ni_cpu_packets_id;
+
+/** Identifiers for all properties contained in the 
+ * gpon_ni_deactivate_all_onus_completed group. 
+ */
+typedef enum bcmolt_gpon_ni_deactivate_all_onus_completed_id
+{
+    BCMOLT_GPON_NI_DEACTIVATE_ALL_ONUS_COMPLETED_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_ni_deactivate_all_onus_completed_id;
+
+/** Identifiers for all properties contained in the 
+ * gpon_ni_disable_all_onus_completed group. 
+ */
+typedef enum bcmolt_gpon_ni_disable_all_onus_completed_id
+{
+    BCMOLT_GPON_NI_DISABLE_ALL_ONUS_COMPLETED_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_ni_disable_all_onus_completed_id;
+
+/** Identifiers for all properties contained in the 
+ * gpon_ni_disable_serial_number group. 
+ */
+typedef enum bcmolt_gpon_ni_disable_serial_number_id
+{
+    BCMOLT_GPON_NI_DISABLE_SERIAL_NUMBER_ID__BEGIN                          = 0,
+    BCMOLT_GPON_NI_DISABLE_SERIAL_NUMBER_ID_CONTROL                         = 0,    /**< control. */
+    BCMOLT_GPON_NI_DISABLE_SERIAL_NUMBER_ID_SERIAL_NUMBER                   = 1,    /**< serial number. */
+    BCMOLT_GPON_NI_DISABLE_SERIAL_NUMBER_ID__NUM_OF     /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_ni_disable_serial_number_id;
+
+/** Identifiers for all properties contained in the 
+ * gpon_ni_enable_all_onus_completed group. 
+ */
+typedef enum bcmolt_gpon_ni_enable_all_onus_completed_id
+{
+    BCMOLT_GPON_NI_ENABLE_ALL_ONUS_COMPLETED_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_ni_enable_all_onus_completed_id;
+
+/** Identifiers for all properties contained in the gpon_ni_key group. 
+ */
+typedef enum bcmolt_gpon_ni_key_id
+{
+    BCMOLT_GPON_NI_KEY_ID__BEGIN                                            = 0,
+    BCMOLT_GPON_NI_KEY_ID_PON_NI                                            = 0,    /**< PON network interface. */
+    BCMOLT_GPON_NI_KEY_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_ni_key_id;
+
+/** Identifiers for all properties contained in the gpon_ni_los group. 
+ */
+typedef enum bcmolt_gpon_ni_los_id
+{
+    BCMOLT_GPON_NI_LOS_ID__BEGIN                                            = 0,
+    BCMOLT_GPON_NI_LOS_ID_STATUS                                            = 0,    /**< status. */
+    BCMOLT_GPON_NI_LOS_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_ni_los_id;
+
+/** Identifiers for all properties contained in the gpon_ni_onu_discovered 
+ * group. 
+ */
+typedef enum bcmolt_gpon_ni_onu_discovered_id
+{
+    BCMOLT_GPON_NI_ONU_DISCOVERED_ID__BEGIN                                 = 0,
+    BCMOLT_GPON_NI_ONU_DISCOVERED_ID_SERIAL_NUMBER                          = 0,    /**< serial number. */
+    BCMOLT_GPON_NI_ONU_DISCOVERED_ID_RANGING_TIME                           = 1,    /**< ranging time. */
+    BCMOLT_GPON_NI_ONU_DISCOVERED_ID_ONU_ID                                 = 2,    /**< onu_id. */
+    BCMOLT_GPON_NI_ONU_DISCOVERED_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_ni_onu_discovered_id;
+
+/** Identifiers for all properties contained in the gpon_ni_onu_upgrade_complete 
+ * group. 
+ */
+typedef enum bcmolt_gpon_ni_onu_upgrade_complete_id
+{
+    BCMOLT_GPON_NI_ONU_UPGRADE_COMPLETE_ID__BEGIN                           = 0,
+    BCMOLT_GPON_NI_ONU_UPGRADE_COMPLETE_ID_STATUS                           = 0,    /**< Status. */
+    BCMOLT_GPON_NI_ONU_UPGRADE_COMPLETE_ID_LIST_OF_FAILED_ENTITIES          = 1,    /**< List of failed entities. */
+    BCMOLT_GPON_NI_ONU_UPGRADE_COMPLETE_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_ni_onu_upgrade_complete_id;
+
+/** Identifiers for all properties contained in the 
+ * gpon_ni_protection_switching_onus_ranged group. 
+ */
+typedef enum bcmolt_gpon_ni_protection_switching_onus_ranged_id
+{
+    BCMOLT_GPON_NI_PROTECTION_SWITCHING_ONUS_RANGED_ID__BEGIN               = 0,
+    BCMOLT_GPON_NI_PROTECTION_SWITCHING_ONUS_RANGED_ID_ONUS                 = 0,            /**< ONUs. */
+    BCMOLT_GPON_NI_PROTECTION_SWITCHING_ONUS_RANGED_ID__NUM_OF                              /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_ni_protection_switching_onus_ranged_id;
+
+/** Identifiers for all properties contained in the 
+ * gpon_ni_protection_switching_switchover_completed group. 
+ */
+typedef enum bcmolt_gpon_ni_protection_switching_switchover_completed_id
+{
+    BCMOLT_GPON_NI_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED_ID__BEGIN      = 0,
+    BCMOLT_GPON_NI_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED_ID_RESULT      = 0,            /**< Result. */
+    BCMOLT_GPON_NI_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED_ID__NUM_OF                     /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_ni_protection_switching_switchover_completed_id;
+
+/** Identifiers for all properties contained in the 
+ * gpon_ni_protection_switching_traffic_resume group. 
+ */
+typedef enum bcmolt_gpon_ni_protection_switching_traffic_resume_id
+{
+    BCMOLT_GPON_NI_PROTECTION_SWITCHING_TRAFFIC_RESUME_ID__BEGIN            = 0,
+    BCMOLT_GPON_NI_PROTECTION_SWITCHING_TRAFFIC_RESUME_ID_RESULT            = 0,            /**< Result. */
+    BCMOLT_GPON_NI_PROTECTION_SWITCHING_TRAFFIC_RESUME_ID__NUM_OF                           /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_ni_protection_switching_traffic_resume_id;
+
+/** Identifiers for all properties contained in the 
+ * gpon_ni_protection_switching_type_c_set_multiple_onu_state group. 
+ */
+typedef enum bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_id
+{
+    BCMOLT_GPON_NI_PROTECTION_SWITCHING_TYPE_C_SET_MULTIPLE_ONU_STATE_ID__BEGIN     = 0,
+    BCMOLT_GPON_NI_PROTECTION_SWITCHING_TYPE_C_SET_MULTIPLE_ONU_STATE_ID_ONU_STATE  = 0,    /**< onu state. */
+    BCMOLT_GPON_NI_PROTECTION_SWITCHING_TYPE_C_SET_MULTIPLE_ONU_STATE_ID_ONU_LIST   = 1,    /**< onu list. */
+    BCMOLT_GPON_NI_PROTECTION_SWITCHING_TYPE_C_SET_MULTIPLE_ONU_STATE_ID__NUM_OF            /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_id;
+
+/** Identifiers for all properties contained in the gpon_ni_reset group. 
+ */
+typedef enum bcmolt_gpon_ni_reset_id
+{
+    BCMOLT_GPON_NI_RESET_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_ni_reset_id;
+
+/** Identifiers for all properties contained in the 
+ * gpon_ni_rogue_detection_completed group. 
+ */
+typedef enum bcmolt_gpon_ni_rogue_detection_completed_id
+{
+    BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID__BEGIN                              = 0,
+    BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_WINDOW_TYPE                         = 0,    /**< Window type. */
+    BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_MEASUREMENT_STATUS                  = 1,    /**< Measurement status. */
+    BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_ALLOC_ID                            = 2,    /**< Alloc ID. */
+    BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_ONU_ID                              = 3,    /**< ONU ID. */
+    BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_IS_DELINEATION                      = 4,    /**< Is delineation. */
+    BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_IS_ED                               = 5,    /**< Is ED. */
+    BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_RX_DATA                             = 6,    /**< Received data. */
+    BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_PLOAM_RECEIVED_ONU_ID               = 7,    /**< ploam_received_onu_id. */
+    BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_PLOAM_RECEIVED_CRC_ERROR            = 8,    /**< ploam_received_crc_error. */
+    BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_ni_rogue_detection_completed_id;
+
+/** Identifiers for all properties contained in the 
+ * gpon_ni_rogue_detection_window group. 
+ */
+typedef enum bcmolt_gpon_ni_rogue_detection_window_id
+{
+    BCMOLT_GPON_NI_ROGUE_DETECTION_WINDOW_ID__BEGIN                                 = 0,
+    BCMOLT_GPON_NI_ROGUE_DETECTION_WINDOW_ID_WINDOW_TYPE                            = 0,    /**< Window type. */
+    BCMOLT_GPON_NI_ROGUE_DETECTION_WINDOW_ID_ALLOC_ID                               = 1,    /**< Alloc ID. */
+    BCMOLT_GPON_NI_ROGUE_DETECTION_WINDOW_ID_ONU_ID                                 = 2,    /**< ONU ID. */
+    BCMOLT_GPON_NI_ROGUE_DETECTION_WINDOW_ID_SECOND_RANGING_WINDOW                  = 3,    /**< Second ranging window. */
+    BCMOLT_GPON_NI_ROGUE_DETECTION_WINDOW_ID__NUM_OF                /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_ni_rogue_detection_window_id;
+
+/** Identifiers for all properties contained in the 
+ * gpon_ni_rogue_onu_special_map_cycle_start group. 
+ */
+typedef enum bcmolt_gpon_ni_rogue_onu_special_map_cycle_start_id
+{
+    BCMOLT_GPON_NI_ROGUE_ONU_SPECIAL_MAP_CYCLE_START_ID__NUM_OF     /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_ni_rogue_onu_special_map_cycle_start_id;
+
+/** Identifiers for all properties contained in the 
+ * gpon_ni_serial_number_acquisition_cycle_start group. 
+ */
+typedef enum bcmolt_gpon_ni_serial_number_acquisition_cycle_start_id
+{
+    BCMOLT_GPON_NI_SERIAL_NUMBER_ACQUISITION_CYCLE_START_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_ni_serial_number_acquisition_cycle_start_id;
+
+/** Identifiers for all properties contained in the gpon_ni_set_onu_state group. 
+ */
+typedef enum bcmolt_gpon_ni_set_onu_state_id
+{
+    BCMOLT_GPON_NI_SET_ONU_STATE_ID__BEGIN                                          = 0,
+    BCMOLT_GPON_NI_SET_ONU_STATE_ID_ONU_STATE                                       = 0,    /**< ONU state. */
+    BCMOLT_GPON_NI_SET_ONU_STATE_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_ni_set_onu_state_id;
+
+/** Identifiers for all properties contained in the gpon_ni_set_pon_state group. 
+ */
+typedef enum bcmolt_gpon_ni_set_pon_state_id
+{
+    BCMOLT_GPON_NI_SET_PON_STATE_ID__BEGIN                                          = 0,
+    BCMOLT_GPON_NI_SET_PON_STATE_ID_PON_STATE                                       = 0,    /**< PON state. */
+    BCMOLT_GPON_NI_SET_PON_STATE_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_ni_set_pon_state_id;
+
+/** Identifiers for all properties contained in the 
+ * gpon_ni_single_request_standby_pon_monitoring group. 
+ */
+typedef enum bcmolt_gpon_ni_single_request_standby_pon_monitoring_id
+{
+    BCMOLT_GPON_NI_SINGLE_REQUEST_STANDBY_PON_MONITORING_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_ni_single_request_standby_pon_monitoring_id;
+
+/** Identifiers for all properties contained in the 
+ * gpon_ni_standby_pon_monitoring_cycle_completed group. 
+ */
+typedef enum bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_id
+{
+    BCMOLT_GPON_NI_STANDBY_PON_MONITORING_CYCLE_COMPLETED_ID__BEGIN                         = 0,
+    BCMOLT_GPON_NI_STANDBY_PON_MONITORING_CYCLE_COMPLETED_ID_NUMBER_OF_DETECTED_DELIMITER   = 0,    /**< number of detected delimiter. */
+    BCMOLT_GPON_NI_STANDBY_PON_MONITORING_CYCLE_COMPLETED_ID_ENERGY_DETECT_SIGNAL           = 1,    /**< energy detect signal. */
+    BCMOLT_GPON_NI_STANDBY_PON_MONITORING_CYCLE_COMPLETED_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_id;
+
+/** Identifiers for all properties contained in the gpon_ni_start_onu_upgrade 
+ * group. 
+ */
+typedef enum bcmolt_gpon_ni_start_onu_upgrade_id
+{
+    BCMOLT_GPON_NI_START_ONU_UPGRADE_ID__BEGIN                                              = 0,
+    BCMOLT_GPON_NI_START_ONU_UPGRADE_ID_LIST_OF_ONU_IDS                                     = 0,    /**< List of ONU IDs. */
+    BCMOLT_GPON_NI_START_ONU_UPGRADE_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_ni_start_onu_upgrade_id;
+
+/** Identifiers for all properties contained in the gpon_ni_stat_alarm_cleared 
+ * group. 
+ */
+typedef enum bcmolt_gpon_ni_stat_alarm_cleared_id
+{
+    BCMOLT_GPON_NI_STAT_ALARM_CLEARED_ID__BEGIN                                             = 0,
+    BCMOLT_GPON_NI_STAT_ALARM_CLEARED_ID_STAT                                               = 0,    /**< Statistic ID. */
+    BCMOLT_GPON_NI_STAT_ALARM_CLEARED_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_ni_stat_alarm_cleared_id;
+
+/** Identifiers for all properties contained in the gpon_ni_stat_alarm_raised 
+ * group. 
+ */
+typedef enum bcmolt_gpon_ni_stat_alarm_raised_id
+{
+    BCMOLT_GPON_NI_STAT_ALARM_RAISED_ID__BEGIN                                              = 0,
+    BCMOLT_GPON_NI_STAT_ALARM_RAISED_ID_STAT                                                = 0,    /**< Statistic ID. */
+    BCMOLT_GPON_NI_STAT_ALARM_RAISED_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_ni_stat_alarm_raised_id;
+
+/** Identifiers for all properties contained in the gpon_ni_stat_cfg group. 
+ */
+typedef enum bcmolt_gpon_ni_stat_cfg_id
+{
+    BCMOLT_GPON_NI_STAT_CFG_ID__BEGIN                                                       = 0,
+    BCMOLT_GPON_NI_STAT_CFG_ID_CFG                                                          = 0,    /**< Configuration. */
+    BCMOLT_GPON_NI_STAT_CFG_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_ni_stat_cfg_id;
+
+/** Identifiers for all properties contained in the gpon_ni_stat group. 
+ */
+typedef enum bcmolt_gpon_ni_stat_id
+{
+    BCMOLT_GPON_NI_STAT_ID__BEGIN                                                           = 0,
+    BCMOLT_GPON_NI_STAT_ID_FEC_CODEWORDS                                                    = 0,    /**< Received FEC codewords. */
+    BCMOLT_GPON_NI_STAT_ID_FEC_CODEWORDS_UNCORRECTED                                        = 1,    /**< Received uncorrected FEC codewords. */
+    BCMOLT_GPON_NI_STAT_ID_BIP8_BYTES                                                       = 2,    /**< Received bytes protected by bip8. */
+    BCMOLT_GPON_NI_STAT_ID_BIP8_ERRORS                                                      = 3,    /**< Received bip8 errors. */
+    BCMOLT_GPON_NI_STAT_ID_RX_GEM_PACKETS                                                   = 4,    /**< Received GEM frames. */
+    BCMOLT_GPON_NI_STAT_ID_RX_GEM_DROPPED                                                   = 5,    /**< Received dropped GEM ID packets. */
+    BCMOLT_GPON_NI_STAT_ID_RX_GEM_IDLE                                                      = 6,    /**< Received idle GEM frames. */
+    BCMOLT_GPON_NI_STAT_ID_RX_GEM_CORRECTED                                                 = 7,    /**< Received corrected GEM frames. */
+    BCMOLT_GPON_NI_STAT_ID_RX_GEM_ILLEGAL                                                   = 8,    /**< Received illegal GEM frames. */
+    BCMOLT_GPON_NI_STAT_ID_RX_ALLOCATIONS_VALID                                             = 9,    /**< Received valid allocations. */
+    BCMOLT_GPON_NI_STAT_ID_RX_ALLOCATIONS_INVALID                                           = 10,   /**< Received invalid allocations. */
+    BCMOLT_GPON_NI_STAT_ID_RX_ALLOCATIONS_DISABLED                                          = 11,   /**< Received disabled allocations. */
+    BCMOLT_GPON_NI_STAT_ID_RX_PLOAMS                                                        = 12,   /**< Received Ploams. */
+    BCMOLT_GPON_NI_STAT_ID_RX_PLOAMS_NON_IDLE                                               = 13,   /**< Received non idle Ploams. */
+    BCMOLT_GPON_NI_STAT_ID_RX_PLOAMS_ERROR                                                  = 14,   /**< Received error Ploams. */
+    BCMOLT_GPON_NI_STAT_ID_RX_PLOAMS_DROPPED                                                = 15,   /**< Received dropped Ploams. */
+    BCMOLT_GPON_NI_STAT_ID_RX_CPU                                                           = 16,   /**< Received CPU packets. */
+    BCMOLT_GPON_NI_STAT_ID_RX_OMCI                                                          = 17,   /**< Received OMCI packets. */
+    BCMOLT_GPON_NI_STAT_ID_RX_OMCI_PACKETS_CRC_ERROR                                        = 18,   /**< Received OMCI packets with CRC errors. */
+    BCMOLT_GPON_NI_STAT_ID_RX_DROPPED_TOO_SHORT                                             = 19,   /**< Received packets dropped due to length too short. */
+    BCMOLT_GPON_NI_STAT_ID_RX_DROPPED_TOO_LONG                                              = 20,   /**< Received packet dropped due to length too long. */
+    BCMOLT_GPON_NI_STAT_ID_RX_CRC_ERRORS                                                    = 21,   /**< Received packet dropped due to crc error. */
+    BCMOLT_GPON_NI_STAT_ID_RX_KEY_ERRORS                                                    = 22,   /**< Received packet dropped due to key error. */
+    BCMOLT_GPON_NI_STAT_ID_RX_FRAGMENTS_ERRORS                                              = 23,   /**< Received packet dropped due to fragmentation error. */
+    BCMOLT_GPON_NI_STAT_ID_RX_PACKETS_DROPPED                                               = 24,   /**< Global dropped packets. */
+    BCMOLT_GPON_NI_STAT_ID_TX_GEM                                                           = 25,   /**< Transmitted GEM frames. */
+    BCMOLT_GPON_NI_STAT_ID_TX_PLOAMS                                                        = 26,   /**< Transmitted Ploams. */
+    BCMOLT_GPON_NI_STAT_ID_TX_GEM_FRAGMENTS                                                 = 27,   /**< Transmitted GEM fragments. */
+    BCMOLT_GPON_NI_STAT_ID_TX_CPU                                                           = 28,   /**< Transmitted CPU packets. */
+    BCMOLT_GPON_NI_STAT_ID_TX_OMCI                                                          = 29,   /**< Transmitted OMCI packets. */
+    BCMOLT_GPON_NI_STAT_ID_TX_CPU_OMCI_PACKETS_DROPPED                                      = 30,   /**< Transmit packets dropped due to illegal length. */
+    BCMOLT_GPON_NI_STAT_ID_TX_DROPPED_ILLEGAL_LENGTH                                        = 31,   /**< Transmitted packet dropped due to illegal length. */
+    BCMOLT_GPON_NI_STAT_ID_TX_DROPPED_TPID_MISS                                             = 32,   /**< Dropped because of TPID miss. */
+    BCMOLT_GPON_NI_STAT_ID_TX_DROPPED_VID_MISS                                              = 33,   /**< Dropped because of VID miss. */
+    BCMOLT_GPON_NI_STAT_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_ni_stat_id;
+
+/** Identifiers for all properties contained in the 
+ * gpon_ni_state_change_completed group. 
+ */
+typedef enum bcmolt_gpon_ni_state_change_completed_id
+{
+    BCMOLT_GPON_NI_STATE_CHANGE_COMPLETED_ID__BEGIN                                         = 0,
+    BCMOLT_GPON_NI_STATE_CHANGE_COMPLETED_ID_RESULT                                         = 0,    /**< Result. */
+    BCMOLT_GPON_NI_STATE_CHANGE_COMPLETED_ID_PREVIOUS_STATE                                 = 1,    /**< Previous state. */
+    BCMOLT_GPON_NI_STATE_CHANGE_COMPLETED_ID_NEW_STATE                                      = 2,    /**< New state. */
+    BCMOLT_GPON_NI_STATE_CHANGE_COMPLETED_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_ni_state_change_completed_id;
+
+/** Identifiers for all properties contained in the 
+ * gpon_ni_tod_request_completed group. 
+ */
+typedef enum bcmolt_gpon_ni_tod_request_completed_id
+{
+    BCMOLT_GPON_NI_TOD_REQUEST_COMPLETED_ID__BEGIN                                          = 0,
+    BCMOLT_GPON_NI_TOD_REQUEST_COMPLETED_ID_TOD_STRING                                      = 0,    /**< tod_string. */
+    BCMOLT_GPON_NI_TOD_REQUEST_COMPLETED_ID_SFC                                             = 1,    /**< sfc. */
+    BCMOLT_GPON_NI_TOD_REQUEST_COMPLETED_ID_RTC_OFFSET_SEC                                  = 2,    /**< rtc_offset_sec. */
+    BCMOLT_GPON_NI_TOD_REQUEST_COMPLETED_ID_RTC_OFFSET_NSEC                                 = 3,    /**< rtc_offset_nsec. */
+    BCMOLT_GPON_NI_TOD_REQUEST_COMPLETED_ID_STATUS                                          = 4,    /**< status. */
+    BCMOLT_GPON_NI_TOD_REQUEST_COMPLETED_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_ni_tod_request_completed_id;
+
+/** Identifiers for all properties contained in the gpon_ni_tod_request group. 
+ */
+typedef enum bcmolt_gpon_ni_tod_request_id
+{
+    BCMOLT_GPON_NI_TOD_REQUEST_ID__NUM_OF           /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_ni_tod_request_id;
+
+/** Identifiers for all properties contained in the gpon_onu_auto_cfg group. 
+ */
+typedef enum bcmolt_gpon_onu_auto_cfg_id
+{
+    BCMOLT_GPON_ONU_AUTO_CFG_ID__BEGIN                                                      = 0,
+    BCMOLT_GPON_ONU_AUTO_CFG_ID_BER_INTERVAL_CONFIGURATION_COMPLETED                        = 0,    /**< BER Interval Configuration Completed. */
+    BCMOLT_GPON_ONU_AUTO_CFG_ID_DFI                                                         = 1,    /**< Receive Dying-Gasp of ONUi. */
+    BCMOLT_GPON_ONU_AUTO_CFG_ID_DGI                                                         = 2,    /**< Receive Dying-Gasp of ONUi. */
+    BCMOLT_GPON_ONU_AUTO_CFG_ID_DOWI                                                        = 3,    /**< Drift of Window of ONUi. */
+    BCMOLT_GPON_ONU_AUTO_CFG_ID_ERR                                                         = 4,    /**< ERR. */
+    BCMOLT_GPON_ONU_AUTO_CFG_ID_INVALID_DBRU_REPORT                                         = 5,    /**< Invalid DBRu Report. */
+    BCMOLT_GPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_COMPLETED                                      = 6,    /**< Key Exchange Completed. */
+    BCMOLT_GPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_CYCLE_SKIPPED                                  = 7,    /**< Key Exchange Cycle Skipped. */
+    BCMOLT_GPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_DECRYPT_REQUIRED                               = 8,    /**< Key Exchange Decrypt Required. */
+    BCMOLT_GPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_KEY_MISMATCH                                   = 9,    /**< Key Exchange Key Mismatch. */
+    BCMOLT_GPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_KEY_REQUEST_TIMEOUT                            = 10,   /**< Key Exchange Key Request Timeout. */
+    BCMOLT_GPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_UNCONSECUTIVE_INDEX                            = 11,   /**< Key Exchange Unconsecutive Index. */
+    BCMOLT_GPON_ONU_AUTO_CFG_ID_LOAI                                                        = 12,   /**< LOAi. */
+    BCMOLT_GPON_ONU_AUTO_CFG_ID_LOKI                                                        = 13,   /**< LOki. */
+    BCMOLT_GPON_ONU_AUTO_CFG_ID_MEMI                                                        = 14,   /**< MEMi. */
+    BCMOLT_GPON_ONU_AUTO_CFG_ID_OMCI_PORT_ID_CONFIGURATION_COMPLETED                        = 15,   /**< OMCI PORT ID Configuration Completed. */
+    BCMOLT_GPON_ONU_AUTO_CFG_ID_ONU_ACTIVATION_COMPLETED                                    = 16,   /**< ONU Activation Completed. */
+    BCMOLT_GPON_ONU_AUTO_CFG_ID_ONU_ACTIVATION_STANDBY_COMPLETED                            = 17,   /**< onu activation standby completed. */
+    BCMOLT_GPON_ONU_AUTO_CFG_ID_ONU_ALARM                                                   = 18,   /**< ONU Alarm. */
+    BCMOLT_GPON_ONU_AUTO_CFG_ID_ONU_DEACTIVATION_COMPLETED                                  = 19,   /**< ONU Deactivation Completed. */
+    BCMOLT_GPON_ONU_AUTO_CFG_ID_ONU_DISABLE_COMPLETED                                       = 20,   /**< ONU Disable Completed. */
+    BCMOLT_GPON_ONU_AUTO_CFG_ID_ONU_ENABLE_COMPLETED                                        = 21,   /**< ONU Enable Completed. */
+    BCMOLT_GPON_ONU_AUTO_CFG_ID_OPTICAL_REFLECTION                                          = 22,   /**< Optical Reflection. */
+    BCMOLT_GPON_ONU_AUTO_CFG_ID_PASSWORD_AUTHENTICATION_COMPLETED                           = 23,   /**< Password Authentication Completed. */
+    BCMOLT_GPON_ONU_AUTO_CFG_ID_PEE                                                         = 24,   /**< PEE. */
+    BCMOLT_GPON_ONU_AUTO_CFG_ID_POSSIBLE_DRIFT                                              = 25,   /**< Possible Drift. */
+    BCMOLT_GPON_ONU_AUTO_CFG_ID_POWER_MANAGEMENT_STATE_CHANGE                               = 26,   /**< Power Management State Change. */
+    BCMOLT_GPON_ONU_AUTO_CFG_ID_PST                                                         = 27,   /**< PST. */
+    BCMOLT_GPON_ONU_AUTO_CFG_ID_RANGING_COMPLETED                                           = 28,   /**< Ranging Completed. */
+    BCMOLT_GPON_ONU_AUTO_CFG_ID_REI                                                         = 29,   /**< REI. */
+    BCMOLT_GPON_ONU_AUTO_CFG_ID_RSSI_MEASUREMENT_COMPLETED                                  = 30,   /**< RSSI Measurement Completed. */
+    BCMOLT_GPON_ONU_AUTO_CFG_ID_SDI                                                         = 31,   /**< Signal Degraded of ONUi. */
+    BCMOLT_GPON_ONU_AUTO_CFG_ID_SFI                                                         = 32,   /**< Signal Fail of ONUi. */
+    BCMOLT_GPON_ONU_AUTO_CFG_ID_STAT_ALARM_CLEARED                                          = 33,   /**< Stat Alarm Cleared. */
+    BCMOLT_GPON_ONU_AUTO_CFG_ID_STAT_ALARM_RAISED                                           = 34,   /**< Stat Alarm Raised. */
+    BCMOLT_GPON_ONU_AUTO_CFG_ID_SUFI                                                        = 35,   /**< SUFi. */
+    BCMOLT_GPON_ONU_AUTO_CFG_ID_TIWI                                                        = 36,   /**< Transmission Interference Warning. */
+    BCMOLT_GPON_ONU_AUTO_CFG_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_auto_cfg_id;
+
+/** Identifiers for all properties contained in the 
+ * gpon_onu_ber_interval_configuration_completed group. 
+ */
+typedef enum bcmolt_gpon_onu_ber_interval_configuration_completed_id
+{
+    BCMOLT_GPON_ONU_BER_INTERVAL_CONFIGURATION_COMPLETED_ID__BEGIN                          = 0,
+    BCMOLT_GPON_ONU_BER_INTERVAL_CONFIGURATION_COMPLETED_ID_BER_INTERVAL                    = 0,    /**< BER interval in ms. */
+    BCMOLT_GPON_ONU_BER_INTERVAL_CONFIGURATION_COMPLETED_ID_RESULT                          = 1,    /**< Result. */
+    BCMOLT_GPON_ONU_BER_INTERVAL_CONFIGURATION_COMPLETED_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_ber_interval_configuration_completed_id;
+
+/** Identifiers for all properties contained in the gpon_onu_cfg group. 
+ */
+typedef enum bcmolt_gpon_onu_cfg_id
+{
+    BCMOLT_GPON_ONU_CFG_ID__BEGIN                                                           = 0,
+    BCMOLT_GPON_ONU_CFG_ID_ONU_STATE                                                        = 0,    /**< onu state. */
+    BCMOLT_GPON_ONU_CFG_ID_SERIAL_NUMBER                                                    = 1,    /**< Serial number. */
+    BCMOLT_GPON_ONU_CFG_ID_PASSWORD                                                         = 2,    /**< password. */
+    BCMOLT_GPON_ONU_CFG_ID_AUTO_PASSWORD_LEARNING                                           = 3,    /**< auto password learning. */
+    BCMOLT_GPON_ONU_CFG_ID_US_FEC                                                           = 4,    /**< US FEC. */
+    BCMOLT_GPON_ONU_CFG_ID_OMCI_PORT_ID                                                     = 5,    /**< OMCI port ID. */
+    BCMOLT_GPON_ONU_CFG_ID_DS_BER_REPORTING_INTERVAL                                        = 6,    /**< DS BER reporting interval in ms. */
+    BCMOLT_GPON_ONU_CFG_ID_AES_ENCRYPTION_KEY                                               = 7,    /**< AES encryption key. */
+    BCMOLT_GPON_ONU_CFG_ID_ALARM_STATE                                                      = 8,    /**< alarm state. */
+    BCMOLT_GPON_ONU_CFG_ID_RANGING_TIME                                                     = 9,    /**< ranging time. */
+    BCMOLT_GPON_ONU_CFG_ID_DISABLED_AFTER_DISCOVERY                                         = 10,   /**< Disabled after Discovery. */
+    BCMOLT_GPON_ONU_CFG_ID_DEACTIVATION_REASON                                              = 11,   /**< deactivation reason. */
+    BCMOLT_GPON_ONU_CFG_ID_ALL_GEM_PORTS                                                    = 12,   /**< all GEM ports. */
+    BCMOLT_GPON_ONU_CFG_ID_ALL_ALLOCS                                                       = 13,   /**< all allocs. */
+    BCMOLT_GPON_ONU_CFG_ID_ONU_PS_TYPE_C                                                    = 14,   /**< onu protection switching type c. */
+    BCMOLT_GPON_ONU_CFG_ID_EXTENDED_GUARD_TIME                                              = 15,   /**< Extended Guard Time. */
+    BCMOLT_GPON_ONU_CFG_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_cfg_id;
+
+/** Identifiers for all properties contained in the gpon_onu_change_power_level 
+ * group. 
+ */
+typedef enum bcmolt_gpon_onu_change_power_level_id
+{
+    BCMOLT_GPON_ONU_CHANGE_POWER_LEVEL_ID__BEGIN                                            = 0,
+    BCMOLT_GPON_ONU_CHANGE_POWER_LEVEL_ID_POWER_LEVEL_ACTION                                = 0,    /**< power level action. */
+    BCMOLT_GPON_ONU_CHANGE_POWER_LEVEL_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_change_power_level_id;
+
+/** Identifiers for all properties contained in the gpon_onu_cpu_packet group. 
+ */
+typedef enum bcmolt_gpon_onu_cpu_packet_id
+{
+    BCMOLT_GPON_ONU_CPU_PACKET_ID__BEGIN                                                    = 0,
+    BCMOLT_GPON_ONU_CPU_PACKET_ID_PORT_ID                                                   = 0,    /**< port_id. */
+    BCMOLT_GPON_ONU_CPU_PACKET_ID_CRC_OK                                                    = 1,    /**< crc_ok. */
+    BCMOLT_GPON_ONU_CPU_PACKET_ID_PACKET_SIZE                                               = 2,    /**< packet_size. */
+    BCMOLT_GPON_ONU_CPU_PACKET_ID_BUFFER                                                    = 3,    /**< buffer. */
+    BCMOLT_GPON_ONU_CPU_PACKET_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_cpu_packet_id;
+
+/** Identifiers for all properties contained in the gpon_onu_cpu_packets group. 
+ */
+typedef enum bcmolt_gpon_onu_cpu_packets_id
+{
+    BCMOLT_GPON_ONU_CPU_PACKETS_ID__BEGIN                                                   = 0,
+    BCMOLT_GPON_ONU_CPU_PACKETS_ID_PACKET_TYPE                                              = 0,    /**< packet type. */
+    BCMOLT_GPON_ONU_CPU_PACKETS_ID_CALC_CRC                                                 = 1,    /**< calc crc. */
+    BCMOLT_GPON_ONU_CPU_PACKETS_ID_NUMBER_OF_PACKETS                                        = 2,    /**< number of packets. */
+    BCMOLT_GPON_ONU_CPU_PACKETS_ID_PACKET_SIZE                                              = 3,    /**< Single packet size. */
+    BCMOLT_GPON_ONU_CPU_PACKETS_ID_BUFFER                                                   = 4,    /**< buffer. */
+    BCMOLT_GPON_ONU_CPU_PACKETS_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_cpu_packets_id;
+
+/** Identifiers for all properties contained in the gpon_onu_dfi group. 
+ */
+typedef enum bcmolt_gpon_onu_dfi_id
+{
+    BCMOLT_GPON_ONU_DFI_ID__BEGIN                                                           = 0,
+    BCMOLT_GPON_ONU_DFI_ID_ALARM_STATUS                                                     = 0,    /**< alarm status. */
+    BCMOLT_GPON_ONU_DFI_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_dfi_id;
+
+/** Identifiers for all properties contained in the gpon_onu_dgi group. 
+ */
+typedef enum bcmolt_gpon_onu_dgi_id
+{
+    BCMOLT_GPON_ONU_DGI_ID__BEGIN                                                           = 0,
+    BCMOLT_GPON_ONU_DGI_ID_ALARM_STATUS                                                     = 0,    /**< alarm status. */
+    BCMOLT_GPON_ONU_DGI_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_dgi_id;
+
+/** Identifiers for all properties contained in the gpon_onu_dowi group. 
+ */
+typedef enum bcmolt_gpon_onu_dowi_id
+{
+    BCMOLT_GPON_ONU_DOWI_ID__BEGIN                                                          = 0,
+    BCMOLT_GPON_ONU_DOWI_ID_ALARM_STATUS                                                    = 0,    /**< Alarm status. */
+    BCMOLT_GPON_ONU_DOWI_ID_DRIFT_VALUE                                                     = 1,    /**< Drift value. */
+    BCMOLT_GPON_ONU_DOWI_ID_NEW_EQD                                                         = 2,    /**< New EQD. */
+    BCMOLT_GPON_ONU_DOWI_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_dowi_id;
+
+/** Identifiers for all properties contained in the gpon_onu_err group. 
+ */
+typedef enum bcmolt_gpon_onu_err_id
+{
+    BCMOLT_GPON_ONU_ERR_ID__BEGIN                                                           = 0,
+    BCMOLT_GPON_ONU_ERR_ID_BIP8_ERRORS                                                      = 0,    /**< BIP8 errors. */
+    BCMOLT_GPON_ONU_ERR_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_err_id;
+
+/** Identifiers for all properties contained in the gpon_onu_invalid_dbru_report 
+ * group. 
+ */
+typedef enum bcmolt_gpon_onu_invalid_dbru_report_id
+{
+    BCMOLT_GPON_ONU_INVALID_DBRU_REPORT_ID__BEGIN                                           = 0,
+    BCMOLT_GPON_ONU_INVALID_DBRU_REPORT_ID_ALLOC_ID                                         = 0,    /**< Alloc-ID. */
+    BCMOLT_GPON_ONU_INVALID_DBRU_REPORT_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_invalid_dbru_report_id;
+
+/** Identifiers for all properties contained in the 
+ * gpon_onu_key_exchange_completed group. 
+ */
+typedef enum bcmolt_gpon_onu_key_exchange_completed_id
+{
+    BCMOLT_GPON_ONU_KEY_EXCHANGE_COMPLETED_ID__BEGIN                                        = 0,
+    BCMOLT_GPON_ONU_KEY_EXCHANGE_COMPLETED_ID_NEW_KEY                                       = 0,    /**< new key. */
+    BCMOLT_GPON_ONU_KEY_EXCHANGE_COMPLETED_ID__NUM_OF       /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_key_exchange_completed_id;
+
+/** Identifiers for all properties contained in the 
+ * gpon_onu_key_exchange_cycle_skipped group. 
+ */
+typedef enum bcmolt_gpon_onu_key_exchange_cycle_skipped_id
+{
+    BCMOLT_GPON_ONU_KEY_EXCHANGE_CYCLE_SKIPPED_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_key_exchange_cycle_skipped_id;
+
+/** Identifiers for all properties contained in the 
+ * gpon_onu_key_exchange_decrypt_required group. 
+ */
+typedef enum bcmolt_gpon_onu_key_exchange_decrypt_required_id
+{
+    BCMOLT_GPON_ONU_KEY_EXCHANGE_DECRYPT_REQUIRED_ID__BEGIN                                 = 0,
+    BCMOLT_GPON_ONU_KEY_EXCHANGE_DECRYPT_REQUIRED_ID_NEW_KEY                                = 0,    /**< new key. */
+    BCMOLT_GPON_ONU_KEY_EXCHANGE_DECRYPT_REQUIRED_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_key_exchange_decrypt_required_id;
+
+/** Identifiers for all properties contained in the 
+ * gpon_onu_key_exchange_key_mismatch group. 
+ */
+typedef enum bcmolt_gpon_onu_key_exchange_key_mismatch_id
+{
+    BCMOLT_GPON_ONU_KEY_EXCHANGE_KEY_MISMATCH_ID__BEGIN                                     = 0,
+    BCMOLT_GPON_ONU_KEY_EXCHANGE_KEY_MISMATCH_ID_EXPECTED_KEY                               = 0,    /**< expected key. */
+    BCMOLT_GPON_ONU_KEY_EXCHANGE_KEY_MISMATCH_ID_RECEIVED_KEY                               = 1,    /**< received key. */
+    BCMOLT_GPON_ONU_KEY_EXCHANGE_KEY_MISMATCH_ID__NUM_OF        /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_key_exchange_key_mismatch_id;
+
+/** Identifiers for all properties contained in the 
+ * gpon_onu_key_exchange_key_request_timeout group. 
+ */
+typedef enum bcmolt_gpon_onu_key_exchange_key_request_timeout_id
+{
+    BCMOLT_GPON_ONU_KEY_EXCHANGE_KEY_REQUEST_TIMEOUT_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_key_exchange_key_request_timeout_id;
+
+/** Identifiers for all properties contained in the 
+ * gpon_onu_key_exchange_unconsecutive_index group. 
+ */
+typedef enum bcmolt_gpon_onu_key_exchange_unconsecutive_index_id
+{
+    BCMOLT_GPON_ONU_KEY_EXCHANGE_UNCONSECUTIVE_INDEX_ID__BEGIN                              = 0,
+    BCMOLT_GPON_ONU_KEY_EXCHANGE_UNCONSECUTIVE_INDEX_ID_EXPECTED_INDEX                      = 0,    /**< expected index. */
+    BCMOLT_GPON_ONU_KEY_EXCHANGE_UNCONSECUTIVE_INDEX_ID_ACTUAL_INDEX                        = 1,    /**< actual index. */
+    BCMOLT_GPON_ONU_KEY_EXCHANGE_UNCONSECUTIVE_INDEX_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_key_exchange_unconsecutive_index_id;
+
+/** Identifiers for all properties contained in the gpon_onu_key group. 
+ */
+typedef enum bcmolt_gpon_onu_key_id
+{
+    BCMOLT_GPON_ONU_KEY_ID__BEGIN                                                           = 0,
+    BCMOLT_GPON_ONU_KEY_ID_PON_NI                                                           = 0,    /**< PON network interface. */
+    BCMOLT_GPON_ONU_KEY_ID_ONU_ID                                                           = 1,    /**< ONU ID. */
+    BCMOLT_GPON_ONU_KEY_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_key_id;
+
+/** Identifiers for all properties contained in the gpon_onu_loai group. 
+ */
+typedef enum bcmolt_gpon_onu_loai_id
+{
+    BCMOLT_GPON_ONU_LOAI_ID__BEGIN                                                          = 0,
+    BCMOLT_GPON_ONU_LOAI_ID_ALARM_STATUS                                                    = 0,    /**< alarm status. */
+    BCMOLT_GPON_ONU_LOAI_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_loai_id;
+
+/** Identifiers for all properties contained in the gpon_onu_loki group. 
+ */
+typedef enum bcmolt_gpon_onu_loki_id
+{
+    BCMOLT_GPON_ONU_LOKI_ID__BEGIN                                                          = 0,
+    BCMOLT_GPON_ONU_LOKI_ID_ALARM_STATUS                                                    = 0,    /**< alarm status. */
+    BCMOLT_GPON_ONU_LOKI_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_loki_id;
+
+/** Identifiers for all properties contained in the gpon_onu_memi group. 
+ */
+typedef enum bcmolt_gpon_onu_memi_id
+{
+    BCMOLT_GPON_ONU_MEMI_ID__BEGIN                                                          = 0,
+    BCMOLT_GPON_ONU_MEMI_ID_PLOAM_BUFFER                                                    = 0,    /**< PLOAM buffer. */
+    BCMOLT_GPON_ONU_MEMI_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_memi_id;
+
+/** Identifiers for all properties contained in the gpon_onu_omci_packet group. 
+ */
+typedef enum bcmolt_gpon_onu_omci_packet_id
+{
+    BCMOLT_GPON_ONU_OMCI_PACKET_ID__BEGIN                                                   = 0,
+    BCMOLT_GPON_ONU_OMCI_PACKET_ID_PORT_ID                                                  = 0,    /**< port_id. */
+    BCMOLT_GPON_ONU_OMCI_PACKET_ID_CRC_OK                                                   = 1,    /**< crc_ok. */
+    BCMOLT_GPON_ONU_OMCI_PACKET_ID_PACKET_SIZE                                              = 2,    /**< packet_size. */
+    BCMOLT_GPON_ONU_OMCI_PACKET_ID_BUFFER                                                   = 3,    /**< buffer. */
+    BCMOLT_GPON_ONU_OMCI_PACKET_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_omci_packet_id;
+
+/** Identifiers for all properties contained in the 
+ * gpon_onu_omci_port_id_configuration_completed group. 
+ */
+typedef enum bcmolt_gpon_onu_omci_port_id_configuration_completed_id
+{
+    BCMOLT_GPON_ONU_OMCI_PORT_ID_CONFIGURATION_COMPLETED_ID__BEGIN                          = 0,
+    BCMOLT_GPON_ONU_OMCI_PORT_ID_CONFIGURATION_COMPLETED_ID_GEM_PORT                        = 0,    /**< GEM Port ID. */
+    BCMOLT_GPON_ONU_OMCI_PORT_ID_CONFIGURATION_COMPLETED_ID_STATUS                          = 1,    /**< status. */
+    BCMOLT_GPON_ONU_OMCI_PORT_ID_CONFIGURATION_COMPLETED_ID_OPERATION                       = 2,    /**< Operation. */
+    BCMOLT_GPON_ONU_OMCI_PORT_ID_CONFIGURATION_COMPLETED_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_omci_port_id_configuration_completed_id;
+
+/** Identifiers for all properties contained in the 
+ * gpon_onu_onu_activation_completed group. 
+ */
+typedef enum bcmolt_gpon_onu_onu_activation_completed_id
+{
+    BCMOLT_GPON_ONU_ONU_ACTIVATION_COMPLETED_ID__BEGIN                                      = 0,
+    BCMOLT_GPON_ONU_ONU_ACTIVATION_COMPLETED_ID_STATUS                                      = 0,    /**< status. */
+    BCMOLT_GPON_ONU_ONU_ACTIVATION_COMPLETED_ID_FAIL_REASON                                 = 1,    /**< fail reason. */
+    BCMOLT_GPON_ONU_ONU_ACTIVATION_COMPLETED_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_onu_activation_completed_id;
+
+/** Identifiers for all properties contained in the 
+ * gpon_onu_onu_activation_standby_completed group. 
+ */
+typedef enum bcmolt_gpon_onu_onu_activation_standby_completed_id
+{
+    BCMOLT_GPON_ONU_ONU_ACTIVATION_STANDBY_COMPLETED_ID__BEGIN                              = 0,
+    BCMOLT_GPON_ONU_ONU_ACTIVATION_STANDBY_COMPLETED_ID_RESULT                              = 0,    /**< result. */
+    BCMOLT_GPON_ONU_ONU_ACTIVATION_STANDBY_COMPLETED_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_onu_activation_standby_completed_id;
+
+/** Identifiers for all properties contained in the gpon_onu_onu_alarm group. 
+ */
+typedef enum bcmolt_gpon_onu_onu_alarm_id
+{
+    BCMOLT_GPON_ONU_ONU_ALARM_ID__BEGIN                                                     = 0,
+    BCMOLT_GPON_ONU_ONU_ALARM_ID_ONU_ALARM                                                  = 0,    /**< onu alarm. */
+    BCMOLT_GPON_ONU_ONU_ALARM_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_onu_alarm_id;
+
+/** Identifiers for all properties contained in the 
+ * gpon_onu_onu_deactivation_completed group. 
+ */
+typedef enum bcmolt_gpon_onu_onu_deactivation_completed_id
+{
+    BCMOLT_GPON_ONU_ONU_DEACTIVATION_COMPLETED_ID__BEGIN                                    = 0,
+    BCMOLT_GPON_ONU_ONU_DEACTIVATION_COMPLETED_ID_STATUS                                    = 0,    /**< status. */
+    BCMOLT_GPON_ONU_ONU_DEACTIVATION_COMPLETED_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_onu_deactivation_completed_id;
+
+/** Identifiers for all properties contained in the 
+ * gpon_onu_onu_disable_completed group. 
+ */
+typedef enum bcmolt_gpon_onu_onu_disable_completed_id
+{
+    BCMOLT_GPON_ONU_ONU_DISABLE_COMPLETED_ID__BEGIN                                         = 0,
+    BCMOLT_GPON_ONU_ONU_DISABLE_COMPLETED_ID_SERIAL_NUMBER                                  = 0,    /**< serial number. */
+    BCMOLT_GPON_ONU_ONU_DISABLE_COMPLETED_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_onu_disable_completed_id;
+
+/** Identifiers for all properties contained in the 
+ * gpon_onu_onu_enable_completed group. 
+ */
+typedef enum bcmolt_gpon_onu_onu_enable_completed_id
+{
+    BCMOLT_GPON_ONU_ONU_ENABLE_COMPLETED_ID__BEGIN                                          = 0,
+    BCMOLT_GPON_ONU_ONU_ENABLE_COMPLETED_ID_SERIAL_NUMBER                                   = 0,    /**< serial number. */
+    BCMOLT_GPON_ONU_ONU_ENABLE_COMPLETED_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_onu_enable_completed_id;
+
+/** Identifiers for all properties contained in the gpon_onu_optical_reflection 
+ * group. 
+ */
+typedef enum bcmolt_gpon_onu_optical_reflection_id
+{
+    BCMOLT_GPON_ONU_OPTICAL_REFLECTION_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_optical_reflection_id;
+
+/** Identifiers for all properties contained in the 
+ * gpon_onu_password_authentication_completed group. 
+ */
+typedef enum bcmolt_gpon_onu_password_authentication_completed_id
+{
+    BCMOLT_GPON_ONU_PASSWORD_AUTHENTICATION_COMPLETED_ID__BEGIN                             = 0,
+    BCMOLT_GPON_ONU_PASSWORD_AUTHENTICATION_COMPLETED_ID_STATUS                             = 0,    /**< status. */
+    BCMOLT_GPON_ONU_PASSWORD_AUTHENTICATION_COMPLETED_ID_FAIL_REASON                        = 1,    /**< fail reason. */
+    BCMOLT_GPON_ONU_PASSWORD_AUTHENTICATION_COMPLETED_ID_PASSWORD                           = 2,    /**< password. */
+    BCMOLT_GPON_ONU_PASSWORD_AUTHENTICATION_COMPLETED_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_password_authentication_completed_id;
+
+/** Identifiers for all properties contained in the gpon_onu_pee group. 
+ */
+typedef enum bcmolt_gpon_onu_pee_id
+{
+    BCMOLT_GPON_ONU_PEE_ID__BEGIN                                                           = 0,
+    BCMOLT_GPON_ONU_PEE_ID_ALARM_STATUS                                                     = 0,    /**< alarm status. */
+    BCMOLT_GPON_ONU_PEE_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_pee_id;
+
+/** Identifiers for all properties contained in the gpon_onu_ploam_packet group. 
+ */
+typedef enum bcmolt_gpon_onu_ploam_packet_id
+{
+    BCMOLT_GPON_ONU_PLOAM_PACKET_ID__BEGIN                                                  = 0,
+    BCMOLT_GPON_ONU_PLOAM_PACKET_ID_PLOAM                                                   = 0,    /**< ploam. */
+    BCMOLT_GPON_ONU_PLOAM_PACKET_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_ploam_packet_id;
+
+/** Identifiers for all properties contained in the gpon_onu_possible_drift 
+ * group. 
+ */
+typedef enum bcmolt_gpon_onu_possible_drift_id
+{
+    BCMOLT_GPON_ONU_POSSIBLE_DRIFT_ID__BEGIN                                                = 0,
+    BCMOLT_GPON_ONU_POSSIBLE_DRIFT_ID_ALARM_STATUS                                          = 0,    /**< Alarm Status. */
+    BCMOLT_GPON_ONU_POSSIBLE_DRIFT_ID_ESTIMATED_DRIFT                                       = 1,    /**< Estimated Drift. */
+    BCMOLT_GPON_ONU_POSSIBLE_DRIFT_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_possible_drift_id;
+
+/** Identifiers for all properties contained in the 
+ * gpon_onu_power_management_state_change group. 
+ */
+typedef enum bcmolt_gpon_onu_power_management_state_change_id
+{
+    BCMOLT_GPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID__BEGIN                                 = 0,
+    BCMOLT_GPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_OLD_STATE                              = 0,    /**< Old State. */
+    BCMOLT_GPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_NEW_STATE                              = 1,    /**< New State. */
+    BCMOLT_GPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_REASON                                 = 2,    /**< Reason. */
+    BCMOLT_GPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_power_management_state_change_id;
+
+/** Identifiers for all properties contained in the gpon_onu_pst group. 
+ */
+typedef enum bcmolt_gpon_onu_pst_id
+{
+    BCMOLT_GPON_ONU_PST_ID__BEGIN                                                           = 0,
+    BCMOLT_GPON_ONU_PST_ID_LINK_NUMBER                                                      = 0,    /**< link number. */
+    BCMOLT_GPON_ONU_PST_ID_K1                                                               = 1,    /**< K1. */
+    BCMOLT_GPON_ONU_PST_ID_K2                                                               = 2,    /**< K2. */
+    BCMOLT_GPON_ONU_PST_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_pst_id;
+
+/** Identifiers for all properties contained in the gpon_onu_ranging_completed 
+ * group. 
+ */
+typedef enum bcmolt_gpon_onu_ranging_completed_id
+{
+    BCMOLT_GPON_ONU_RANGING_COMPLETED_ID__BEGIN                                             = 0,
+    BCMOLT_GPON_ONU_RANGING_COMPLETED_ID_STATUS                                             = 0,    /**< status. */
+    BCMOLT_GPON_ONU_RANGING_COMPLETED_ID_FAIL_REASON                                        = 1,    /**< fail reason. */
+    BCMOLT_GPON_ONU_RANGING_COMPLETED_ID_NUMBER_OF_PLOAMS                                   = 2,    /**< number of PLOAMs. */
+    BCMOLT_GPON_ONU_RANGING_COMPLETED_ID_EQD                                                = 3,    /**< EQD. */
+    BCMOLT_GPON_ONU_RANGING_COMPLETED_ID_POWER_LEVEL                                        = 4,    /**< Power Level. */
+    BCMOLT_GPON_ONU_RANGING_COMPLETED_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_ranging_completed_id;
+
+/** Identifiers for all properties contained in the gpon_onu_rei group. 
+ */
+typedef enum bcmolt_gpon_onu_rei_id
+{
+    BCMOLT_GPON_ONU_REI_ID__BEGIN                                                           = 0,
+    BCMOLT_GPON_ONU_REI_ID_BIP8_ERRORS                                                      = 0,    /**< BIP8 errors. */
+    BCMOLT_GPON_ONU_REI_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_rei_id;
+
+/** Identifiers for all properties contained in the 
+ * gpon_onu_rssi_measurement_completed group. 
+ */
+typedef enum bcmolt_gpon_onu_rssi_measurement_completed_id
+{
+    BCMOLT_GPON_ONU_RSSI_MEASUREMENT_COMPLETED_ID__BEGIN                                    = 0,
+    BCMOLT_GPON_ONU_RSSI_MEASUREMENT_COMPLETED_ID_STATUS                                    = 0,    /**< status. */
+    BCMOLT_GPON_ONU_RSSI_MEASUREMENT_COMPLETED_ID_FAIL_REASON                               = 1,    /**< fail reason. */
+    BCMOLT_GPON_ONU_RSSI_MEASUREMENT_COMPLETED_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_rssi_measurement_completed_id;
+
+/** Identifiers for all properties contained in the gpon_onu_rssi_measurement 
+ * group. 
+ */
+typedef enum bcmolt_gpon_onu_rssi_measurement_id
+{
+    BCMOLT_GPON_ONU_RSSI_MEASUREMENT_ID__NUM_OF             /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_rssi_measurement_id;
+
+/** Identifiers for all properties contained in the gpon_onu_sdi group. 
+ */
+typedef enum bcmolt_gpon_onu_sdi_id
+{
+    BCMOLT_GPON_ONU_SDI_ID__BEGIN                                                           = 0,
+    BCMOLT_GPON_ONU_SDI_ID_ALARM_STATUS                                                     = 0,    /**< alarm status. */
+    BCMOLT_GPON_ONU_SDI_ID_BER                                                              = 1,    /**< BER. */
+    BCMOLT_GPON_ONU_SDI_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_sdi_id;
+
+/** Identifiers for all properties contained in the gpon_onu_set_onu_state 
+ * group. 
+ */
+typedef enum bcmolt_gpon_onu_set_onu_state_id
+{
+    BCMOLT_GPON_ONU_SET_ONU_STATE_ID__BEGIN                                                 = 0,
+    BCMOLT_GPON_ONU_SET_ONU_STATE_ID_ONU_STATE                                              = 0,    /**< ONU state. */
+    BCMOLT_GPON_ONU_SET_ONU_STATE_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_set_onu_state_id;
+
+/** Identifiers for all properties contained in the gpon_onu_sfi group. 
+ */
+typedef enum bcmolt_gpon_onu_sfi_id
+{
+    BCMOLT_GPON_ONU_SFI_ID__BEGIN                                                           = 0,
+    BCMOLT_GPON_ONU_SFI_ID_ALARM_STATUS                                                     = 0,    /**< alarm status. */
+    BCMOLT_GPON_ONU_SFI_ID_BER                                                              = 1,    /**< BER. */
+    BCMOLT_GPON_ONU_SFI_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_sfi_id;
+
+/** Identifiers for all properties contained in the gpon_onu_stat_alarm_cleared 
+ * group. 
+ */
+typedef enum bcmolt_gpon_onu_stat_alarm_cleared_id
+{
+    BCMOLT_GPON_ONU_STAT_ALARM_CLEARED_ID__BEGIN                                            = 0,
+    BCMOLT_GPON_ONU_STAT_ALARM_CLEARED_ID_STAT                                              = 0,    /**< Statistic ID. */
+    BCMOLT_GPON_ONU_STAT_ALARM_CLEARED_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_stat_alarm_cleared_id;
+
+/** Identifiers for all properties contained in the gpon_onu_stat_alarm_raised 
+ * group. 
+ */
+typedef enum bcmolt_gpon_onu_stat_alarm_raised_id
+{
+    BCMOLT_GPON_ONU_STAT_ALARM_RAISED_ID__BEGIN                                             = 0,
+    BCMOLT_GPON_ONU_STAT_ALARM_RAISED_ID_STAT                                               = 0,    /**< Statistic ID. */
+    BCMOLT_GPON_ONU_STAT_ALARM_RAISED_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_stat_alarm_raised_id;
+
+/** Identifiers for all properties contained in the gpon_onu_stat_cfg group. 
+ */
+typedef enum bcmolt_gpon_onu_stat_cfg_id
+{
+    BCMOLT_GPON_ONU_STAT_CFG_ID__BEGIN                                                      = 0,
+    BCMOLT_GPON_ONU_STAT_CFG_ID_CFG                                                         = 0,    /**< Configuration. */
+    BCMOLT_GPON_ONU_STAT_CFG_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_stat_cfg_id;
+
+/** Identifiers for all properties contained in the gpon_onu_stat group. 
+ */
+typedef enum bcmolt_gpon_onu_stat_id
+{
+    BCMOLT_GPON_ONU_STAT_ID__BEGIN                                                          = 0,
+    BCMOLT_GPON_ONU_STAT_ID_FEC_CODEWORDS                                                   = 0,    /**< Total received FEC codewords. */
+    BCMOLT_GPON_ONU_STAT_ID_FEC_BYTES_CORRECTED                                             = 1,    /**< FEC codewords corrected bytes. */
+    BCMOLT_GPON_ONU_STAT_ID_FEC_CODEWORDS_CORRECTED                                         = 2,    /**< FEC corrected codewords error . */
+    BCMOLT_GPON_ONU_STAT_ID_FEC_CODEWORDS_UNCORRECTED                                       = 3,    /**< FEC not corrected codewords error. */
+    BCMOLT_GPON_ONU_STAT_ID_BIP8_BYTES                                                      = 4,    /**< Received bytes for BIP8. */
+    BCMOLT_GPON_ONU_STAT_ID_BIP8_ERRORS                                                     = 5,    /**< Bit error according to BIP8. */
+    BCMOLT_GPON_ONU_STAT_ID_RX_PLOAMS_CRC_ERROR                                             = 6,    /**< Received PLOAMs with CRC error. */
+    BCMOLT_GPON_ONU_STAT_ID_RX_PLOAMS_NON_IDLE                                              = 7,    /**< Received non idle PLOAMs. */
+    BCMOLT_GPON_ONU_STAT_ID_POSITIVE_DRIFT                                                  = 8,    /**< Positive drift. */
+    BCMOLT_GPON_ONU_STAT_ID_NEGATIVE_DRIFT                                                  = 9,    /**< Negative drift. */
+    BCMOLT_GPON_ONU_STAT_ID_RX_OMCI                                                         = 10,   /**< Received OMCI packets. */
+    BCMOLT_GPON_ONU_STAT_ID_RX_OMCI_PACKETS_CRC_ERROR                                       = 11,   /**< Received OMCI packets with CRC errors. */
+    BCMOLT_GPON_ONU_STAT_ID_BER_REPORTED                                                    = 12,   /**< BER reported. */
+    BCMOLT_GPON_ONU_STAT_ID_UNRECEIVED_BURST                                                = 13,   /**< Unreceived burst. */
+    BCMOLT_GPON_ONU_STAT_ID_LCDG_ERRORS                                                     = 14,   /**< LCDG errors. */
+    BCMOLT_GPON_ONU_STAT_ID_RDI_ERRORS                                                      = 15,   /**< RDI errors. */
+    BCMOLT_GPON_ONU_STAT_ID_RX_BYTES                                                        = 16,   /**< rx bytes. */
+    BCMOLT_GPON_ONU_STAT_ID_RX_PACKETS                                                      = 17,   /**< rx packets. */
+    BCMOLT_GPON_ONU_STAT_ID_TX_BYTES                                                        = 18,   /**< tx bytes. */
+    BCMOLT_GPON_ONU_STAT_ID_TX_PACKETS                                                      = 19,   /**< tx packets. */
+    BCMOLT_GPON_ONU_STAT_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_stat_id;
+
+/** Identifiers for all properties contained in the gpon_onu_sufi group. 
+ */
+typedef enum bcmolt_gpon_onu_sufi_id
+{
+    BCMOLT_GPON_ONU_SUFI_ID__BEGIN                                                          = 0,
+    BCMOLT_GPON_ONU_SUFI_ID_ALARM_STATUS                                                    = 0,    /**< alarm status. */
+    BCMOLT_GPON_ONU_SUFI_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_sufi_id;
+
+/** Identifiers for all properties contained in the gpon_onu_tiwi group. 
+ */
+typedef enum bcmolt_gpon_onu_tiwi_id
+{
+    BCMOLT_GPON_ONU_TIWI_ID__BEGIN                                                          = 0,
+    BCMOLT_GPON_ONU_TIWI_ID_ALARM_STATUS                                                    = 0,    /**< Alarm status. */
+    BCMOLT_GPON_ONU_TIWI_ID_DRIFT_VALUE                                                     = 1,    /**< Drift value. */
+    BCMOLT_GPON_ONU_TIWI_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_tiwi_id;
+
+/** Identifiers for all properties contained in the gpon_trx_cfg group. 
+ */
+typedef enum bcmolt_gpon_trx_cfg_id
+{
+    BCMOLT_GPON_TRX_CFG_ID__BEGIN                                                           = 0,
+    BCMOLT_GPON_TRX_CFG_ID_TRANSCEIVER_TYPE                                                 = 0,    /**< transceiver type. */
+    BCMOLT_GPON_TRX_CFG_ID_LA_CONFIGURATION                                                 = 1,    /**< LA configuration. */
+    BCMOLT_GPON_TRX_CFG_ID_BCDR                                                             = 2,    /**< BCDR. */
+    BCMOLT_GPON_TRX_CFG_ID_LA_RANGING_AFTER_NO_ED_RESYNC                                    = 3,    /**< LA ranging after no ed resync . */
+    BCMOLT_GPON_TRX_CFG_ID_BCDR_RANGING_AFTER_NO_ED_RESYNC                                  = 4,    /**< BCDR ranging after no ed resync configuration. */
+    BCMOLT_GPON_TRX_CFG_ID_LA_RANGING_AFTER_ED_RESYNC                                       = 5,    /**< LA ranging after ed resync . */
+    BCMOLT_GPON_TRX_CFG_ID_BCDR_RANGING_AFTER_ED_RESYNC                                     = 6,    /**< BCDR ranging after ed resync. */
+    BCMOLT_GPON_TRX_CFG_ID_LA_RESYNC_POLARITY                                               = 7,    /**< la resync polarity. */
+    BCMOLT_GPON_TRX_CFG_ID_BCDR_RESYNC_POLARITY                                             = 8,    /**< BCDR resync polarity. */
+    BCMOLT_GPON_TRX_CFG_ID_BCDR_RANGING_RESYNC_CONDITIONS                                   = 9,    /**< bcdr ranging resync conditions. */
+    BCMOLT_GPON_TRX_CFG_ID_LA_RANGING_RESYNC_CONDITIONS                                     = 10,   /**< la ranging resync conditions. */
+    BCMOLT_GPON_TRX_CFG_ID_RX_CONFIGURATION                                                 = 11,   /**< RX configuration. */
+    BCMOLT_GPON_TRX_CFG_ID_RANGING_CONTROL_STAGES_CONFIGURATION                             = 12,   /**< ranging control stages configuration. */
+    BCMOLT_GPON_TRX_CFG_ID_ENERGY_DETECT                                                    = 13,   /**< Energy Detect. */
+    BCMOLT_GPON_TRX_CFG_ID_END_OF_BURST_DATA_PATTERN                                        = 14,   /**< end of burst data pattern . */
+    BCMOLT_GPON_TRX_CFG_ID_END_OF_BURST_RANGING_PATTERN                                     = 15,   /**< end of burst ranging pattern. */
+    BCMOLT_GPON_TRX_CFG_ID_PREAMBLE                                                         = 16,   /**< Preamble. */
+    BCMOLT_GPON_TRX_CFG_ID_DELIMITER                                                        = 17,   /**< Delimiter. */
+    BCMOLT_GPON_TRX_CFG_ID_GUARD_BITS                                                       = 18,   /**< Guard bits. */
+    BCMOLT_GPON_TRX_CFG_ID_SERDES_CONFIGURATION                                             = 19,   /**< serdes configuration. */
+    BCMOLT_GPON_TRX_CFG_ID_PLO_RANGING                                                      = 20,   /**< PLO for ranging. */
+    BCMOLT_GPON_TRX_CFG_ID_PLO_DATA                                                         = 21,   /**< PLO for data. */
+    BCMOLT_GPON_TRX_CFG_ID_RSSI_NORMAL_CONFIG                                               = 22,   /**< rssi normal config. */
+    BCMOLT_GPON_TRX_CFG_ID_RANGING_RSSI_RESYNC_CONTROL                                      = 23,   /**< ranging rssi resync control. */
+    BCMOLT_GPON_TRX_CFG_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_trx_cfg_id;
+
+/** Identifiers for all properties contained in the gpon_trx_key group. 
+ */
+typedef enum bcmolt_gpon_trx_key_id
+{
+    BCMOLT_GPON_TRX_KEY_ID__BEGIN                                                           = 0,
+    BCMOLT_GPON_TRX_KEY_ID_PON_NI                                                           = 0,    /**< PON network interface. */
+    BCMOLT_GPON_TRX_KEY_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_trx_key_id;
+
+/** Identifiers for all properties contained in the log_entry_auto_cfg group. 
+ */
+typedef enum bcmolt_log_entry_auto_cfg_id
+{
+    BCMOLT_LOG_ENTRY_AUTO_CFG_ID__BEGIN                                                     = 0,
+    BCMOLT_LOG_ENTRY_AUTO_CFG_ID_STAT_ALARM_CLEARED                                         = 0,    /**< Stat Alarm Cleared. */
+    BCMOLT_LOG_ENTRY_AUTO_CFG_ID_STAT_ALARM_RAISED                                          = 1,    /**< Stat Alarm Raised. */
+    BCMOLT_LOG_ENTRY_AUTO_CFG_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_log_entry_auto_cfg_id;
+
+/** Identifiers for all properties contained in the log_entry_cfg group. 
+ */
+typedef enum bcmolt_log_entry_cfg_id
+{
+    BCMOLT_LOG_ENTRY_CFG_ID__BEGIN                                                          = 0,
+    BCMOLT_LOG_ENTRY_CFG_ID_DEFAULT_LOG_LEVEL                                               = 0,    /**< default log level. */
+    BCMOLT_LOG_ENTRY_CFG_ID_DEFAULT_LOG_TYPE                                                = 1,    /**< default log type. */
+    BCMOLT_LOG_ENTRY_CFG_ID_LOG_LEVEL_PRINT                                                 = 2,    /**< log level print. */
+    BCMOLT_LOG_ENTRY_CFG_ID_LOG_LEVEL_SAVE                                                  = 3,    /**< log level save. */
+    BCMOLT_LOG_ENTRY_CFG_ID_LOG_TYPE                                                        = 4,    /**< log type. */
+    BCMOLT_LOG_ENTRY_CFG_ID_LOG_STYLE                                                       = 5,    /**< log_style. */
+    BCMOLT_LOG_ENTRY_CFG_ID_LOG_NAME                                                        = 6,    /**< log name. */
+    BCMOLT_LOG_ENTRY_CFG_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_log_entry_cfg_id;
+
+/** Identifiers for all properties contained in the log_entry_key group. 
+ */
+typedef enum bcmolt_log_entry_key_id
+{
+    BCMOLT_LOG_ENTRY_KEY_ID__BEGIN                                                          = 0,
+    BCMOLT_LOG_ENTRY_KEY_ID_LOG_ID                                                          = 0,    /**< log id. */
+    BCMOLT_LOG_ENTRY_KEY_ID_RESERVED                                                        = 1,    /**< reserved. */
+    BCMOLT_LOG_ENTRY_KEY_ID_NAME                                                            = 2,    /**< name. */
+    BCMOLT_LOG_ENTRY_KEY_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_log_entry_key_id;
+
+/** Identifiers for all properties contained in the log_entry_stat_alarm_cleared 
+ * group. 
+ */
+typedef enum bcmolt_log_entry_stat_alarm_cleared_id
+{
+    BCMOLT_LOG_ENTRY_STAT_ALARM_CLEARED_ID__BEGIN                                           = 0,
+    BCMOLT_LOG_ENTRY_STAT_ALARM_CLEARED_ID_STAT                                             = 0,    /**< Statistic ID. */
+    BCMOLT_LOG_ENTRY_STAT_ALARM_CLEARED_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_log_entry_stat_alarm_cleared_id;
+
+/** Identifiers for all properties contained in the log_entry_stat_alarm_raised 
+ * group. 
+ */
+typedef enum bcmolt_log_entry_stat_alarm_raised_id
+{
+    BCMOLT_LOG_ENTRY_STAT_ALARM_RAISED_ID__BEGIN                                            = 0,
+    BCMOLT_LOG_ENTRY_STAT_ALARM_RAISED_ID_STAT                                              = 0,    /**< Statistic ID. */
+    BCMOLT_LOG_ENTRY_STAT_ALARM_RAISED_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_log_entry_stat_alarm_raised_id;
+
+/** Identifiers for all properties contained in the log_entry_stat_cfg group. 
+ */
+typedef enum bcmolt_log_entry_stat_cfg_id
+{
+    BCMOLT_LOG_ENTRY_STAT_CFG_ID__BEGIN                                                     = 0,
+    BCMOLT_LOG_ENTRY_STAT_CFG_ID_CFG                                                        = 0,    /**< Configuration. */
+    BCMOLT_LOG_ENTRY_STAT_CFG_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_log_entry_stat_cfg_id;
+
+/** Identifiers for all properties contained in the log_entry_stat group. 
+ */
+typedef enum bcmolt_log_entry_stat_id
+{
+    BCMOLT_LOG_ENTRY_STAT_ID__BEGIN                                                         = 0,
+    BCMOLT_LOG_ENTRY_STAT_ID_MSG_COUNT                                                      = 0,    /**< msg count. */
+    BCMOLT_LOG_ENTRY_STAT_ID_LOST_MSG_COUNT                                                 = 1,    /**< lost msg count. */
+    BCMOLT_LOG_ENTRY_STAT_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_log_entry_stat_id;
+
+/** Identifiers for all properties contained in the logger_auto_cfg group. 
+ */
+typedef enum bcmolt_logger_auto_cfg_id
+{
+    BCMOLT_LOGGER_AUTO_CFG_ID__BEGIN                                                        = 0,
+    BCMOLT_LOGGER_AUTO_CFG_ID_STAT_ALARM_CLEARED                                            = 0,    /**< Stat Alarm Cleared. */
+    BCMOLT_LOGGER_AUTO_CFG_ID_STAT_ALARM_RAISED                                             = 1,    /**< Stat Alarm Raised. */
+    BCMOLT_LOGGER_AUTO_CFG_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_logger_auto_cfg_id;
+
+/** Identifiers for all properties contained in the logger_cfg group. 
+ */
+typedef enum bcmolt_logger_cfg_id
+{
+    BCMOLT_LOGGER_CFG_ID__BEGIN                                                             = 0,
+    BCMOLT_LOGGER_CFG_ID_BUFFER                                                             = 0,    /**< buffer. */
+    BCMOLT_LOGGER_CFG_ID_WRAP_AROUND                                                        = 1,    /**< wrap around. */
+    BCMOLT_LOGGER_CFG_ID_CLEAR_AFTER_READ                                                   = 2,    /**< clear_after_read. */
+    BCMOLT_LOGGER_CFG_ID_ENABLE_LOG                                                         = 3,    /**< enable log. */
+    BCMOLT_LOGGER_CFG_ID_LOG_NAMES                                                          = 4,    /**< log_names. */
+    BCMOLT_LOGGER_CFG_ID__NUM_OF        /**< Number of enum entries, not an entry itself. */
+} bcmolt_logger_cfg_id;
+
+/** Identifiers for all properties contained in the logger_clear_log group. 
+ */
+typedef enum bcmolt_logger_clear_log_id
+{
+    BCMOLT_LOGGER_CLEAR_LOG_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_logger_clear_log_id;
+
+/** Identifiers for all properties contained in the logger_key group. 
+ */
+typedef enum bcmolt_logger_key_id
+{
+    BCMOLT_LOGGER_KEY_ID__BEGIN                                                             = 0,
+    BCMOLT_LOGGER_KEY_ID_RESERVED                                                           = 0,    /**< reserved. */
+    BCMOLT_LOGGER_KEY_ID_FILE_ID                                                            = 1,    /**< file id. */
+    BCMOLT_LOGGER_KEY_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_logger_key_id;
+
+/** Identifiers for all properties contained in the logger_stat_alarm_cleared 
+ * group. 
+ */
+typedef enum bcmolt_logger_stat_alarm_cleared_id
+{
+    BCMOLT_LOGGER_STAT_ALARM_CLEARED_ID__BEGIN                                              = 0,
+    BCMOLT_LOGGER_STAT_ALARM_CLEARED_ID_STAT                                                = 0,    /**< Statistic ID. */
+    BCMOLT_LOGGER_STAT_ALARM_CLEARED_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_logger_stat_alarm_cleared_id;
+
+/** Identifiers for all properties contained in the logger_stat_alarm_raised 
+ * group. 
+ */
+typedef enum bcmolt_logger_stat_alarm_raised_id
+{
+    BCMOLT_LOGGER_STAT_ALARM_RAISED_ID__BEGIN                                               = 0,
+    BCMOLT_LOGGER_STAT_ALARM_RAISED_ID_STAT                                                 = 0,    /**< Statistic ID. */
+    BCMOLT_LOGGER_STAT_ALARM_RAISED_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_logger_stat_alarm_raised_id;
+
+/** Identifiers for all properties contained in the logger_stat_cfg group. 
+ */
+typedef enum bcmolt_logger_stat_cfg_id
+{
+    BCMOLT_LOGGER_STAT_CFG_ID__BEGIN                                                        = 0,
+    BCMOLT_LOGGER_STAT_CFG_ID_CFG                                                           = 0,    /**< Configuration. */
+    BCMOLT_LOGGER_STAT_CFG_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_logger_stat_cfg_id;
+
+/** Identifiers for all properties contained in the logger_stat group. 
+ */
+typedef enum bcmolt_logger_stat_id
+{
+    BCMOLT_LOGGER_STAT_ID__BEGIN                                                            = 0,
+    BCMOLT_LOGGER_STAT_ID_LINES_IN_LOG                                                      = 0,    /**< lines in log. */
+    BCMOLT_LOGGER_STAT_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_logger_stat_id;
+
+/** Identifiers for all properties contained in the nni_auto_cfg group. 
+ */
+typedef enum bcmolt_nni_auto_cfg_id
+{
+    BCMOLT_NNI_AUTO_CFG_ID__BEGIN                                                           = 0,
+    BCMOLT_NNI_AUTO_CFG_ID_STAT_ALARM_CLEARED                                               = 0,    /**< Stat Alarm Cleared. */
+    BCMOLT_NNI_AUTO_CFG_ID_STAT_ALARM_RAISED                                                = 1,    /**< Stat Alarm Raised. */
+    BCMOLT_NNI_AUTO_CFG_ID_STATUS_CHANGED                                                   = 2,    /**< Status changed. */
+    BCMOLT_NNI_AUTO_CFG_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_nni_auto_cfg_id;
+
+/** Identifiers for all properties contained in the nni_cfg group. 
+ */
+typedef enum bcmolt_nni_cfg_id
+{
+    BCMOLT_NNI_CFG_ID__BEGIN                                                                = 0,
+    BCMOLT_NNI_CFG_ID_REMOTE_LOOPBACK                                                       = 0,    /**< Remote loopback. */
+    BCMOLT_NNI_CFG_ID_LINE_LOOPBACK                                                         = 1,    /**< Line loopback. */
+    BCMOLT_NNI_CFG_ID_MAC_ADDRESS                                                           = 2,    /**< Mac Address. */
+    BCMOLT_NNI_CFG_ID_NNI_STATUS                                                            = 3,    /**< NNI Status. */
+    BCMOLT_NNI_CFG_ID_NNI_BACKUP_STATUS                                                     = 4,    /**< NNI Backup Status. */
+    BCMOLT_NNI_CFG_ID_ACTIVE_NNI                                                            = 5,    /**< Active NNI. */
+    BCMOLT_NNI_CFG_ID_NNI_STATUS_POLLING_INTERVAL_MS                                        = 6,    /**< NNI Status Polling Interval (ms). */
+    BCMOLT_NNI_CFG_ID_AUTOSWITCH                                                            = 7,    /**< Auto-Switch. */
+    BCMOLT_NNI_CFG_ID_FLOW_CONTROL                                                          = 8,    /**< Flow Control. */
+    BCMOLT_NNI_CFG_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_nni_cfg_id;
+
+/** Identifiers for all properties contained in the nni_key group. 
+ */
+typedef enum bcmolt_nni_key_id
+{
+    BCMOLT_NNI_KEY_ID__BEGIN                                                                = 0,
+    BCMOLT_NNI_KEY_ID_PON_NI                                                                = 0,    /**< PON NI. */
+    BCMOLT_NNI_KEY_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_nni_key_id;
+
+/** Identifiers for all properties contained in the nni_serdes_cfg group. 
+ */
+typedef enum bcmolt_nni_serdes_cfg_id
+{
+    BCMOLT_NNI_SERDES_CFG_ID__BEGIN                                                         = 0,
+    BCMOLT_NNI_SERDES_CFG_ID_RX_VGA                                                         = 0,    /**< Rx Vga. */
+    BCMOLT_NNI_SERDES_CFG_ID_RX_PF                                                          = 1,    /**< Rx PF. */
+    BCMOLT_NNI_SERDES_CFG_ID_RX_LFPF                                                        = 2,    /**< Rx LFPF. */
+    BCMOLT_NNI_SERDES_CFG_ID_RX_DFE1                                                        = 3,    /**< Rx DFE1. */
+    BCMOLT_NNI_SERDES_CFG_ID_RX_DFE2                                                        = 4,    /**< Rx DFE2. */
+    BCMOLT_NNI_SERDES_CFG_ID_RX_DFE3                                                        = 5,    /**< Rx DFE3. */
+    BCMOLT_NNI_SERDES_CFG_ID_RX_DFE4                                                        = 6,    /**< Rx DFE4. */
+    BCMOLT_NNI_SERDES_CFG_ID_RX_DFE5                                                        = 7,    /**< Rx DFE5. */
+    BCMOLT_NNI_SERDES_CFG_ID_TX_PRE                                                         = 8,    /**< Tx Pre. */
+    BCMOLT_NNI_SERDES_CFG_ID_TX_MAIN                                                        = 9,    /**< Tx Main. */
+    BCMOLT_NNI_SERDES_CFG_ID_TX_POST1                                                       = 10,   /**< Tx Post1. */
+    BCMOLT_NNI_SERDES_CFG_ID_TX_POST2                                                       = 11,   /**< Tx Post2. */
+    BCMOLT_NNI_SERDES_CFG_ID_TX_POST3                                                       = 12,   /**< Tx Post3. */
+    BCMOLT_NNI_SERDES_CFG_ID_TX_AMP                                                         = 13,   /**< Tx Amp. */
+    BCMOLT_NNI_SERDES_CFG_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_nni_serdes_cfg_id;
+
+/** Identifiers for all properties contained in the nni_serdes_key group. 
+ */
+typedef enum bcmolt_nni_serdes_key_id
+{
+    BCMOLT_NNI_SERDES_KEY_ID__BEGIN                                                         = 0,
+    BCMOLT_NNI_SERDES_KEY_ID_PON_NI                                                         = 0,    /**< PON NI. */
+    BCMOLT_NNI_SERDES_KEY_ID_INSTANCE                                                       = 1,    /**< Instance. */
+    BCMOLT_NNI_SERDES_KEY_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_nni_serdes_key_id;
+
+/** Identifiers for all properties contained in the nni_stat_alarm_cleared 
+ * group. 
+ */
+typedef enum bcmolt_nni_stat_alarm_cleared_id
+{
+    BCMOLT_NNI_STAT_ALARM_CLEARED_ID__BEGIN                                                 = 0,
+    BCMOLT_NNI_STAT_ALARM_CLEARED_ID_STAT                                                   = 0,    /**< Statistic ID. */
+    BCMOLT_NNI_STAT_ALARM_CLEARED_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_nni_stat_alarm_cleared_id;
+
+/** Identifiers for all properties contained in the nni_stat_alarm_raised group. 
+ */
+typedef enum bcmolt_nni_stat_alarm_raised_id
+{
+    BCMOLT_NNI_STAT_ALARM_RAISED_ID__BEGIN                                                  = 0,
+    BCMOLT_NNI_STAT_ALARM_RAISED_ID_STAT                                                    = 0,    /**< Statistic ID. */
+    BCMOLT_NNI_STAT_ALARM_RAISED_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_nni_stat_alarm_raised_id;
+
+/** Identifiers for all properties contained in the nni_stat_cfg group. 
+ */
+typedef enum bcmolt_nni_stat_cfg_id
+{
+    BCMOLT_NNI_STAT_CFG_ID__BEGIN                                                           = 0,
+    BCMOLT_NNI_STAT_CFG_ID_CFG                                                              = 0,    /**< Configuration. */
+    BCMOLT_NNI_STAT_CFG_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_nni_stat_cfg_id;
+
+/** Identifiers for all properties contained in the nni_stat group. 
+ */
+typedef enum bcmolt_nni_stat_id
+{
+    BCMOLT_NNI_STAT_ID__BEGIN                                                               = 0,
+    BCMOLT_NNI_STAT_ID_RX_FRAMES_64                                                         = 0,    /**< RX 64 Byte Frames. */
+    BCMOLT_NNI_STAT_ID_RX_FRAMES_65_127                                                     = 1,    /**< RX 65-127 Byte Frames. */
+    BCMOLT_NNI_STAT_ID_RX_FRAMES_128_255                                                    = 2,    /**< RX 128-255 Byte Frames. */
+    BCMOLT_NNI_STAT_ID_RX_FRAMES_256_511                                                    = 3,    /**< RX 256-511 Byte Frames. */
+    BCMOLT_NNI_STAT_ID_RX_FRAMES_512_1023                                                   = 4,    /**< RX 512-1023 Byte Frames. */
+    BCMOLT_NNI_STAT_ID_RX_FRAMES_1024_1518                                                  = 5,    /**< RX 1024-1518 Byte Frames. */
+    BCMOLT_NNI_STAT_ID_RX_FRAMES_1519_2047                                                  = 6,    /**< RX 1519-2047 Byte Frames. */
+    BCMOLT_NNI_STAT_ID_RX_FRAMES_2048_4095                                                  = 7,    /**< RX 2048-4095 Byte Frames. */
+    BCMOLT_NNI_STAT_ID_RX_FRAMES_4096_9216                                                  = 8,    /**< RX 4096-9216 Byte Frames. */
+    BCMOLT_NNI_STAT_ID_RX_FRAMES_9217_16383                                                 = 9,    /**< RX 9217-16383 Byte Frames. */
+    BCMOLT_NNI_STAT_ID_RX_FRAMES                                                            = 10,   /**< RX Frames. */
+    BCMOLT_NNI_STAT_ID_RX_BYTES                                                             = 11,   /**< RX Bytes. */
+    BCMOLT_NNI_STAT_ID_RX_GOOD_FRAMES                                                       = 12,   /**< RX Good Frames. */
+    BCMOLT_NNI_STAT_ID_RX_UNICAST_FRAMES                                                    = 13,   /**< RX Unicast Frames. */
+    BCMOLT_NNI_STAT_ID_RX_MULTICAST_FRAMES                                                  = 14,   /**< RX Multicast Frames. */
+    BCMOLT_NNI_STAT_ID_RX_BROADCAST_FRAMES                                                  = 15,   /**< RX Broadcast Frames. */
+    BCMOLT_NNI_STAT_ID_RX_FCS_ERRORS                                                        = 16,   /**< RX FCS Errors. */
+    BCMOLT_NNI_STAT_ID_RX_CONTROL_FRAMES                                                    = 17,   /**< RX Control Frames. */
+    BCMOLT_NNI_STAT_ID_RX_PAUSE_FRAMES                                                      = 18,   /**< RX Pause Frames. */
+    BCMOLT_NNI_STAT_ID_RX_PFC_FRAMES                                                        = 19,   /**< RX PFC Frames. */
+    BCMOLT_NNI_STAT_ID_RX_UNSUPPORTED_OPCODE                                                = 20,   /**< RX Unsupported Opcode Frames. */
+    BCMOLT_NNI_STAT_ID_RX_UNSUPPORTED_DA                                                    = 21,   /**< RX Unsupported DA Frames. */
+    BCMOLT_NNI_STAT_ID_RX_ALIGNMENT_ERRORS                                                  = 22,   /**< RX Alignment Errors. */
+    BCMOLT_NNI_STAT_ID_RX_LENGTH_OUT_OF_RANGE                                               = 23,   /**< RX Length Out of Range. */
+    BCMOLT_NNI_STAT_ID_RX_CODE_ERRORS                                                       = 24,   /**< RX Code Errors. */
+    BCMOLT_NNI_STAT_ID_RX_OVERSIZED_FRAMES                                                  = 25,   /**< RX Oversized Frames. */
+    BCMOLT_NNI_STAT_ID_RX_JABBER_FRAMES                                                     = 26,   /**< RX Jabber Frames. */
+    BCMOLT_NNI_STAT_ID_RX_MTU_CHECK_ERRORS                                                  = 27,   /**< RX MTU Check Errors. */
+    BCMOLT_NNI_STAT_ID_RX_PROMISCUOUS_FRAMES                                                = 28,   /**< RX Promiscuous Frames. */
+    BCMOLT_NNI_STAT_ID_RX_VLAN_FRAMES                                                       = 29,   /**< RX VLAN Frames. */
+    BCMOLT_NNI_STAT_ID_RX_DOUBLE_VLAN_FRAMES                                                = 30,   /**< RX Double VLAN Frames. */
+    BCMOLT_NNI_STAT_ID_RX_TRUNCATED_FRAMES                                                  = 31,   /**< RX Truncated Frames. */
+    BCMOLT_NNI_STAT_ID_RX_UNDERSIZE_FRAMES                                                  = 32,   /**< RX Undersized Frames. */
+    BCMOLT_NNI_STAT_ID_RX_FRAGMENTED_FRAMES                                                 = 33,   /**< RX Fragmented Frames. */
+    BCMOLT_NNI_STAT_ID_RX_RUNT_FRAMES                                                       = 34,   /**< RX Runt Frames. */
+    BCMOLT_NNI_STAT_ID_TX_FRAMES_64                                                         = 35,   /**< TX 64 Byte Frames. */
+    BCMOLT_NNI_STAT_ID_TX_FRAMES_65_127                                                     = 36,   /**< TX 65-127 Byte Frames. */
+    BCMOLT_NNI_STAT_ID_TX_FRAMES_128_255                                                    = 37,   /**< TX 128-255 Byte Frames. */
+    BCMOLT_NNI_STAT_ID_TX_FRAMES_256_511                                                    = 38,   /**< TX 256-511 Byte Frames. */
+    BCMOLT_NNI_STAT_ID_TX_FRAMES_512_1023                                                   = 39,   /**< TX 512-1023 Byte Frames. */
+    BCMOLT_NNI_STAT_ID_TX_FRAMES_1024_1518                                                  = 40,   /**< TX 1024-1518 Byte Frames. */
+    BCMOLT_NNI_STAT_ID_TX_FRAMES_1519_2047                                                  = 41,   /**< TX 1519-2047 Byte Frames. */
+    BCMOLT_NNI_STAT_ID_TX_FRAMES_2048_4095                                                  = 42,   /**< TX 2048-4095 Byte Frames. */
+    BCMOLT_NNI_STAT_ID_TX_FRAMES_4096_9216                                                  = 43,   /**< TX 4096-9216 Byte Frames. */
+    BCMOLT_NNI_STAT_ID_TX_FRAMES_9217_16383                                                 = 44,   /**< TX 9217-16383 Byte Frames. */
+    BCMOLT_NNI_STAT_ID_TX_FRAMES                                                            = 45,   /**< TX Frames. */
+    BCMOLT_NNI_STAT_ID_TX_BYTES                                                             = 46,   /**< TX Bytes. */
+    BCMOLT_NNI_STAT_ID_TX_GOOD_FRAMES                                                       = 47,   /**< TX Good Frames. */
+    BCMOLT_NNI_STAT_ID_TX_UNICAST_FRAMES                                                    = 48,   /**< TX Unicast Frames. */
+    BCMOLT_NNI_STAT_ID_TX_MULTICAST_FRAMES                                                  = 49,   /**< TX Multicast Frames. */
+    BCMOLT_NNI_STAT_ID_TX_BROADCAST_FRAMES                                                  = 50,   /**< TX Broadcast Frames. */
+    BCMOLT_NNI_STAT_ID_TX_PAUSE_FRAMES                                                      = 51,   /**< TX Pause Frames. */
+    BCMOLT_NNI_STAT_ID_TX_PFC_FRAMES                                                        = 52,   /**< TX PFC Frames. */
+    BCMOLT_NNI_STAT_ID_TX_JABBER_FRAMES                                                     = 53,   /**< TX Jabber Frames. */
+    BCMOLT_NNI_STAT_ID_TX_FCS_ERRORS                                                        = 54,   /**< TX FCS Errors. */
+    BCMOLT_NNI_STAT_ID_TX_CONTROL_FRAMES                                                    = 55,   /**< TX Control Frames. */
+    BCMOLT_NNI_STAT_ID_TX_OVERSIZE_FRAMES                                                   = 56,   /**< TX Oversize Frames. */
+    BCMOLT_NNI_STAT_ID_TX_FRAGMENTED_FRAMES                                                 = 57,   /**< TX Fragmented Frames. */
+    BCMOLT_NNI_STAT_ID_TX_ERROR_FRAMES                                                      = 58,   /**< TX Error Frames. */
+    BCMOLT_NNI_STAT_ID_TX_VLAN_FRAMES                                                       = 59,   /**< TX VLAN Frames. */
+    BCMOLT_NNI_STAT_ID_TX_DOUBLE_VLAN_FRAMES                                                = 60,   /**< TX Double VLAN Frames. */
+    BCMOLT_NNI_STAT_ID_TX_RUNT_FRAMES                                                       = 61,   /**< TX Runt Frames. */
+    BCMOLT_NNI_STAT_ID_TX_UNDERRUN_FRAMES                                                   = 62,   /**< TX Underrun Frames. */
+    BCMOLT_NNI_STAT_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_nni_stat_id;
+
+/** Identifiers for all properties contained in the nni_status_changed group. 
+ */
+typedef enum bcmolt_nni_status_changed_id
+{
+    BCMOLT_NNI_STATUS_CHANGED_ID__BEGIN                                                     = 0,
+    BCMOLT_NNI_STATUS_CHANGED_ID_NEW_STATUS                                                 = 0,    /**< New NNI Link Status. */
+    BCMOLT_NNI_STATUS_CHANGED_ID_LINK                                                       = 1,    /**< Link. */
+    BCMOLT_NNI_STATUS_CHANGED_ID_PREVIOUS_ACTIVE                                            = 2,    /**< Previous Active. */
+    BCMOLT_NNI_STATUS_CHANGED_ID_NEW_ACTIVE                                                 = 3,    /**< New Active. */
+    BCMOLT_NNI_STATUS_CHANGED_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_nni_status_changed_id;
+
+/** Identifiers for all properties contained in the software_error_cfg group. 
+ */
+typedef enum bcmolt_software_error_cfg_id
+{
+    BCMOLT_SOFTWARE_ERROR_CFG_ID__BEGIN                                                     = 0,
+    BCMOLT_SOFTWARE_ERROR_CFG_ID_ENTRY                                                      = 0,    /**< Entry. */
+    BCMOLT_SOFTWARE_ERROR_CFG_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_software_error_cfg_id;
+
+/** Identifiers for all properties contained in the software_error_key group. 
+ */
+typedef enum bcmolt_software_error_key_id
+{
+    BCMOLT_SOFTWARE_ERROR_KEY_ID__BEGIN                                                     = 0,
+    BCMOLT_SOFTWARE_ERROR_KEY_ID_RESERVED                                                   = 0,    /**< Reserved. */
+    BCMOLT_SOFTWARE_ERROR_KEY_ID_IDX                                                        = 1,    /**< Index. */
+    BCMOLT_SOFTWARE_ERROR_KEY_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_software_error_key_id;
+
+/** Identifiers for all properties contained in the trx_calibration_auto_cfg 
+ * group. 
+ */
+typedef enum bcmolt_trx_calibration_auto_cfg_id
+{
+    BCMOLT_TRX_CALIBRATION_AUTO_CFG_ID__BEGIN                                               = 0,
+    BCMOLT_TRX_CALIBRATION_AUTO_CFG_ID_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED               = 0,    /**< Capture window and statistic completed. */
+    BCMOLT_TRX_CALIBRATION_AUTO_CFG_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_trx_calibration_auto_cfg_id;
+
+/** Identifiers for all properties contained in the 
+ * trx_calibration_capture_window_and_statistic_completed group. 
+ */
+typedef enum bcmolt_trx_calibration_capture_window_and_statistic_completed_id
+{
+    BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID__BEGIN                 = 0,
+    BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_DATA_WINDOW            = 0,    /**< data window. */
+    BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_STROBE_WINDOW          = 1,    /**< strobe window. */
+    BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_RISE_MIN_MIN      = 2,    /**< edge rise min min. */
+    BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_RISE_MIN_MAX      = 3,    /**< edge rise min max. */
+    BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_RISE_MAX_MIN      = 4,    /**< edge rise max min. */
+    BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_RISE_MAX_MAX      = 5,    /**< edge rise max max. */
+    BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_FALL_MIN_MIN      = 6,    /**< edge fall min min . */
+    BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_FALL_MIN_MAX      = 7,    /**< edge fall min max. */
+    BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_FALL_MAX_MIN      = 8,    /**< edge fall max min. */
+    BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_FALL_MAX_MAX      = 9,    /**< edge fall max max. */
+    BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_RESULT                 = 10,   /**< result. */
+    BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID__NUM_OF                        /**< Number of enum entries, not an entry itself. */
+} bcmolt_trx_calibration_capture_window_and_statistic_completed_id;
+
+/** Identifiers for all properties contained in the trx_calibration_key group. 
+ */
+typedef enum bcmolt_trx_calibration_key_id
+{
+    BCMOLT_TRX_CALIBRATION_KEY_ID__BEGIN                                                    = 0,
+    BCMOLT_TRX_CALIBRATION_KEY_ID_RESERVED                                                  = 0,    /**< Reserved. */
+    BCMOLT_TRX_CALIBRATION_KEY_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_trx_calibration_key_id;
+
+/** Identifiers for all properties contained in the 
+ * trx_calibration_start_capture_window group. 
+ */
+typedef enum bcmolt_trx_calibration_start_capture_window_id
+{
+    BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID__BEGIN                                   = 0,
+    BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_PON_NI                                   = 0,    /**< pon_ni. */
+    BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_TRIGGER                                  = 1,    /**< trigger. */
+    BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_STROBE                                   = 2,    /**< strobe. */
+    BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_WINDOW_MODE                              = 3,    /**< window mode. */
+    BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_ONU_ID                                   = 4,    /**< onu id. */
+    BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_TRIGGER_POSITION                         = 5,    /**< trigger position. */
+    BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_STOP_DUE_TO_CORRUPT_STROBE               = 6,    /**< stop due to corrupt strobe. */
+    BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_START_OFFSET                             = 7,    /**< start offset. */
+    BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_END_OFFSET                               = 8,    /**< end offset. */
+    BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_NUMBER_OF_CYCLES                         = 9,    /**< number of cycles. */
+    BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_trx_calibration_start_capture_window_id;
+
+/** Identifiers for all properties contained in the 
+ * trx_calibration_stop_capture_window group. 
+ */
+typedef enum bcmolt_trx_calibration_stop_capture_window_id
+{
+    BCMOLT_TRX_CALIBRATION_STOP_CAPTURE_WINDOW_ID__BEGIN                                    = 0,
+    BCMOLT_TRX_CALIBRATION_STOP_CAPTURE_WINDOW_ID_PON_NI                                    = 0,    /**< pon_ni. */
+    BCMOLT_TRX_CALIBRATION_STOP_CAPTURE_WINDOW_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_trx_calibration_stop_capture_window_id;
+
+/** Identifiers for all properties contained in the xgpon_alloc_auto_cfg group. 
+ */
+typedef enum bcmolt_xgpon_alloc_auto_cfg_id
+{
+    BCMOLT_XGPON_ALLOC_AUTO_CFG_ID__BEGIN                                                   = 0,
+    BCMOLT_XGPON_ALLOC_AUTO_CFG_ID_CONFIGURATION_COMPLETED                                  = 0,    /**< Configuration Completed. */
+    BCMOLT_XGPON_ALLOC_AUTO_CFG_ID_GET_ALLOC_STATS_COMPLETED                                = 1,    /**< Get alloc ID statistics completed. */
+    BCMOLT_XGPON_ALLOC_AUTO_CFG_ID_STAT_ALARM_CLEARED                                       = 2,    /**< Stat Alarm Cleared. */
+    BCMOLT_XGPON_ALLOC_AUTO_CFG_ID_STAT_ALARM_RAISED                                        = 3,    /**< Stat Alarm Raised. */
+    BCMOLT_XGPON_ALLOC_AUTO_CFG_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_alloc_auto_cfg_id;
+
+/** Identifiers for all properties contained in the xgpon_alloc_cfg group. 
+ */
+typedef enum bcmolt_xgpon_alloc_cfg_id
+{
+    BCMOLT_XGPON_ALLOC_CFG_ID__BEGIN                                                        = 0,
+    BCMOLT_XGPON_ALLOC_CFG_ID_STATE                                                         = 0,    /**< state. */
+    BCMOLT_XGPON_ALLOC_CFG_ID_SLA                                                           = 1,    /**< sla. */
+    BCMOLT_XGPON_ALLOC_CFG_ID_ONU_ID                                                        = 2,    /**< onu_id. */
+    BCMOLT_XGPON_ALLOC_CFG_ID_COLLECT_STATS                                                 = 3,    /**< Enable statistics collection on the alloc id. */
+    BCMOLT_XGPON_ALLOC_CFG_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_alloc_cfg_id;
+
+/** Identifiers for all properties contained in the 
+ * xgpon_alloc_configuration_completed group. 
+ */
+typedef enum bcmolt_xgpon_alloc_configuration_completed_id
+{
+    BCMOLT_XGPON_ALLOC_CONFIGURATION_COMPLETED_ID__BEGIN                                    = 0,
+    BCMOLT_XGPON_ALLOC_CONFIGURATION_COMPLETED_ID_STATUS                                    = 0,    /**< status. */
+    BCMOLT_XGPON_ALLOC_CONFIGURATION_COMPLETED_ID_NEW_STATE                                 = 1,    /**< new state. */
+    BCMOLT_XGPON_ALLOC_CONFIGURATION_COMPLETED_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_alloc_configuration_completed_id;
+
+/** Identifiers for all properties contained in the 
+ * xgpon_alloc_get_alloc_stats_completed group. 
+ */
+typedef enum bcmolt_xgpon_alloc_get_alloc_stats_completed_id
+{
+    BCMOLT_XGPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID__BEGIN                                  = 0,
+    BCMOLT_XGPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_STATUS                                  = 0,    /**< status. */
+    BCMOLT_XGPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_AVERAGE_NSR_USED                        = 1,    /**< Average NSR used words. */
+    BCMOLT_XGPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_AVERAGE_NSR_ALLOCATED                   = 2,    /**< Average NSR allocated words. */
+    BCMOLT_XGPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_AVERAGE_SR_REPORT                       = 3,    /**< Average SR report. */
+    BCMOLT_XGPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_alloc_get_alloc_stats_completed_id;
+
+/** Identifiers for all properties contained in the xgpon_alloc_get_stats group. 
+ */
+typedef enum bcmolt_xgpon_alloc_get_stats_id
+{
+    BCMOLT_XGPON_ALLOC_GET_STATS_ID__BEGIN                                                  = 0,
+    BCMOLT_XGPON_ALLOC_GET_STATS_ID_NUM_OF_CYCLES                                           = 0,    /**< Number of cycles. */
+    BCMOLT_XGPON_ALLOC_GET_STATS_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_alloc_get_stats_id;
+
+/** Identifiers for all properties contained in the xgpon_alloc_key group. 
+ */
+typedef enum bcmolt_xgpon_alloc_key_id
+{
+    BCMOLT_XGPON_ALLOC_KEY_ID__BEGIN                                                        = 0,
+    BCMOLT_XGPON_ALLOC_KEY_ID_PON_NI                                                        = 0,    /**< PON network interface. */
+    BCMOLT_XGPON_ALLOC_KEY_ID_ALLOC_ID                                                      = 1,    /**< Alloc ID. */
+    BCMOLT_XGPON_ALLOC_KEY_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_alloc_key_id;
+
+/** Identifiers for all properties contained in the xgpon_alloc_set_state group. 
+ */
+typedef enum bcmolt_xgpon_alloc_set_state_id
+{
+    BCMOLT_XGPON_ALLOC_SET_STATE_ID__BEGIN                                                  = 0,
+    BCMOLT_XGPON_ALLOC_SET_STATE_ID_STATE                                                   = 0,    /**< State. */
+    BCMOLT_XGPON_ALLOC_SET_STATE_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_alloc_set_state_id;
+
+/** Identifiers for all properties contained in the 
+ * xgpon_alloc_stat_alarm_cleared group. 
+ */
+typedef enum bcmolt_xgpon_alloc_stat_alarm_cleared_id
+{
+    BCMOLT_XGPON_ALLOC_STAT_ALARM_CLEARED_ID__BEGIN                                         = 0,
+    BCMOLT_XGPON_ALLOC_STAT_ALARM_CLEARED_ID_STAT                                           = 0,    /**< Statistic ID. */
+    BCMOLT_XGPON_ALLOC_STAT_ALARM_CLEARED_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_alloc_stat_alarm_cleared_id;
+
+/** Identifiers for all properties contained in the 
+ * xgpon_alloc_stat_alarm_raised group. 
+ */
+typedef enum bcmolt_xgpon_alloc_stat_alarm_raised_id
+{
+    BCMOLT_XGPON_ALLOC_STAT_ALARM_RAISED_ID__BEGIN                                          = 0,
+    BCMOLT_XGPON_ALLOC_STAT_ALARM_RAISED_ID_STAT                                            = 0,    /**< Statistic ID. */
+    BCMOLT_XGPON_ALLOC_STAT_ALARM_RAISED_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_alloc_stat_alarm_raised_id;
+
+/** Identifiers for all properties contained in the xgpon_alloc_stat_cfg group. 
+ */
+typedef enum bcmolt_xgpon_alloc_stat_cfg_id
+{
+    BCMOLT_XGPON_ALLOC_STAT_CFG_ID__BEGIN                                                   = 0,
+    BCMOLT_XGPON_ALLOC_STAT_CFG_ID_CFG                                                      = 0,    /**< Configuration. */
+    BCMOLT_XGPON_ALLOC_STAT_CFG_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_alloc_stat_cfg_id;
+
+/** Identifiers for all properties contained in the xgpon_alloc_stat group. 
+ */
+typedef enum bcmolt_xgpon_alloc_stat_id
+{
+    BCMOLT_XGPON_ALLOC_STAT_ID__BEGIN                                                       = 0,
+    BCMOLT_XGPON_ALLOC_STAT_ID_RX_BYTES                                                     = 0,    /**< Received Bytes. */
+    BCMOLT_XGPON_ALLOC_STAT_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_alloc_stat_id;
+
+/** Identifiers for all properties contained in the xgpon_gem_port_auto_cfg 
+ * group. 
+ */
+typedef enum bcmolt_xgpon_gem_port_auto_cfg_id
+{
+    BCMOLT_XGPON_GEM_PORT_AUTO_CFG_ID__BEGIN                                                = 0,
+    BCMOLT_XGPON_GEM_PORT_AUTO_CFG_ID_STAT_ALARM_CLEARED                                    = 0,    /**< Stat Alarm Cleared. */
+    BCMOLT_XGPON_GEM_PORT_AUTO_CFG_ID_STAT_ALARM_RAISED                                     = 1,    /**< Stat Alarm Raised. */
+    BCMOLT_XGPON_GEM_PORT_AUTO_CFG_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_gem_port_auto_cfg_id;
+
+/** Identifiers for all properties contained in the xgpon_gem_port_cfg group. 
+ */
+typedef enum bcmolt_xgpon_gem_port_cfg_id
+{
+    BCMOLT_XGPON_GEM_PORT_CFG_ID__BEGIN                                                     = 0,
+    BCMOLT_XGPON_GEM_PORT_CFG_ID_CONFIGURATION                                              = 0,    /**< Configuration. */
+    BCMOLT_XGPON_GEM_PORT_CFG_ID_ONU_ID                                                     = 1,    /**< ONU ID. */
+    BCMOLT_XGPON_GEM_PORT_CFG_ID_GEM_PORT_STATE                                             = 2,    /**< gem port state. */
+    BCMOLT_XGPON_GEM_PORT_CFG_ID_ENCRYPTION_MODE                                            = 3,    /**< Encryption mode. */
+    BCMOLT_XGPON_GEM_PORT_CFG_ID_UPSTREAM_DESTINATION_QUEUE                                 = 4,    /**< Upstream destination queue. */
+    BCMOLT_XGPON_GEM_PORT_CFG_ID_CONTROL                                                    = 5,    /**< control. */
+    BCMOLT_XGPON_GEM_PORT_CFG_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_gem_port_cfg_id;
+
+/** Identifiers for all properties contained in the xgpon_gem_port_key group. 
+ */
+typedef enum bcmolt_xgpon_gem_port_key_id
+{
+    BCMOLT_XGPON_GEM_PORT_KEY_ID__BEGIN                                                     = 0,
+    BCMOLT_XGPON_GEM_PORT_KEY_ID_PON_NI                                                     = 0,    /**< PON network interface. */
+    BCMOLT_XGPON_GEM_PORT_KEY_ID_GEM_PORT_ID                                                = 1,    /**< GEM PORT ID. */
+    BCMOLT_XGPON_GEM_PORT_KEY_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_gem_port_key_id;
+
+/** Identifiers for all properties contained in the 
+ * xgpon_gem_port_stat_alarm_cleared group. 
+ */
+typedef enum bcmolt_xgpon_gem_port_stat_alarm_cleared_id
+{
+    BCMOLT_XGPON_GEM_PORT_STAT_ALARM_CLEARED_ID__BEGIN                                      = 0,
+    BCMOLT_XGPON_GEM_PORT_STAT_ALARM_CLEARED_ID_STAT                                        = 0,    /**< Statistic ID. */
+    BCMOLT_XGPON_GEM_PORT_STAT_ALARM_CLEARED_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_gem_port_stat_alarm_cleared_id;
+
+/** Identifiers for all properties contained in the 
+ * xgpon_gem_port_stat_alarm_raised group. 
+ */
+typedef enum bcmolt_xgpon_gem_port_stat_alarm_raised_id
+{
+    BCMOLT_XGPON_GEM_PORT_STAT_ALARM_RAISED_ID__BEGIN                                       = 0,
+    BCMOLT_XGPON_GEM_PORT_STAT_ALARM_RAISED_ID_STAT                                         = 0,    /**< Statistic ID. */
+    BCMOLT_XGPON_GEM_PORT_STAT_ALARM_RAISED_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_gem_port_stat_alarm_raised_id;
+
+/** Identifiers for all properties contained in the xgpon_gem_port_stat_cfg 
+ * group. 
+ */
+typedef enum bcmolt_xgpon_gem_port_stat_cfg_id
+{
+    BCMOLT_XGPON_GEM_PORT_STAT_CFG_ID__BEGIN                                                = 0,
+    BCMOLT_XGPON_GEM_PORT_STAT_CFG_ID_CFG                                                   = 0,    /**< Configuration. */
+    BCMOLT_XGPON_GEM_PORT_STAT_CFG_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_gem_port_stat_cfg_id;
+
+/** Identifiers for all properties contained in the xgpon_gem_port_stat group. 
+ */
+typedef enum bcmolt_xgpon_gem_port_stat_id
+{
+    BCMOLT_XGPON_GEM_PORT_STAT_ID__BEGIN                                                    = 0,
+    BCMOLT_XGPON_GEM_PORT_STAT_ID_TX_BYTES                                                  = 0,    /**< TX bytes. */
+    BCMOLT_XGPON_GEM_PORT_STAT_ID_TX_PACKETS                                                = 1,    /**< TX packets. */
+    BCMOLT_XGPON_GEM_PORT_STAT_ID_RX_PACKETS                                                = 2,    /**< RX packets. */
+    BCMOLT_XGPON_GEM_PORT_STAT_ID_RX_BYTES                                                  = 3,    /**< RX bytes. */
+    BCMOLT_XGPON_GEM_PORT_STAT_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_gem_port_stat_id;
+
+/** Identifiers for all properties contained in the xgpon_iwf_cfg group. 
+ */
+typedef enum bcmolt_xgpon_iwf_cfg_id
+{
+    BCMOLT_XGPON_IWF_CFG_ID__BEGIN                                                          = 0,
+    BCMOLT_XGPON_IWF_CFG_ID_US_OTAG_DIRECT_TPID                                             = 0,    /**< US otag direct tpid. */
+    BCMOLT_XGPON_IWF_CFG_ID_DS_TPID                                                         = 1,    /**< DS tpid. */
+    BCMOLT_XGPON_IWF_CFG_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_iwf_cfg_id;
+
+/** Identifiers for all properties contained in the xgpon_iwf_key group. 
+ */
+typedef enum bcmolt_xgpon_iwf_key_id
+{
+    BCMOLT_XGPON_IWF_KEY_ID__BEGIN                                                          = 0,
+    BCMOLT_XGPON_IWF_KEY_ID_PON_NI                                                          = 0,    /**< PON network interface. */
+    BCMOLT_XGPON_IWF_KEY_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_iwf_key_id;
+
+/** Identifiers for all properties contained in the 
+ * xgpon_ni_activate_all_onus_completed group. 
+ */
+typedef enum bcmolt_xgpon_ni_activate_all_onus_completed_id
+{
+    BCMOLT_XGPON_NI_ACTIVATE_ALL_ONUS_COMPLETED_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_ni_activate_all_onus_completed_id;
+
+/** Identifiers for all properties contained in the 
+ * xgpon_ni_adjust_tx_wavelength group. 
+ */
+typedef enum bcmolt_xgpon_ni_adjust_tx_wavelength_id
+{
+    BCMOLT_XGPON_NI_ADJUST_TX_WAVELENGTH_ID__BEGIN                                          = 0,
+    BCMOLT_XGPON_NI_ADJUST_TX_WAVELENGTH_ID_SERIAL_NUMBER                                   = 0,    /**< Seril number. */
+    BCMOLT_XGPON_NI_ADJUST_TX_WAVELENGTH_ID_FREQENCY_ADJUSTMENT_DIRECTION                   = 1,    /**< Frequncy adjustment direction. */
+    BCMOLT_XGPON_NI_ADJUST_TX_WAVELENGTH_ID_FREQUENCY_ADJUSTMENT_SIZE                       = 2,    /**< Frequency adjustment size. */
+    BCMOLT_XGPON_NI_ADJUST_TX_WAVELENGTH_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_ni_adjust_tx_wavelength_id;
+
+/** Identifiers for all properties contained in the xgpon_ni_auto_cfg group. 
+ */
+typedef enum bcmolt_xgpon_ni_auto_cfg_id
+{
+    BCMOLT_XGPON_NI_AUTO_CFG_ID__BEGIN                                                      = 0,
+    BCMOLT_XGPON_NI_AUTO_CFG_ID_ACTIVATE_ALL_ONUS_COMPLETED                                 = 0,    /**< activate all onus completed. */
+    BCMOLT_XGPON_NI_AUTO_CFG_ID_CPU_PACKETS_FAILURE                                         = 1,    /**< CPU Packets Failure. */
+    BCMOLT_XGPON_NI_AUTO_CFG_ID_DEACTIVATE_ALL_ONUS_COMPLETED                               = 2,    /**< deactivate all onus completed. */
+    BCMOLT_XGPON_NI_AUTO_CFG_ID_DISABLE_ALL_ONUS_COMPLETED                                  = 3,    /**< disable all onus completed. */
+    BCMOLT_XGPON_NI_AUTO_CFG_ID_ENABLE_ALL_ONUS_COMPLETED                                   = 4,    /**< enable all onus completed. */
+    BCMOLT_XGPON_NI_AUTO_CFG_ID_LOS                                                         = 5,    /**< LOS. */
+    BCMOLT_XGPON_NI_AUTO_CFG_ID_ONU_DISCOVERED                                              = 6,    /**< ONU Discovered. */
+    BCMOLT_XGPON_NI_AUTO_CFG_ID_ONU_UPGRADE_COMPLETE                                        = 7,    /**< ONU Upgrade Complete. */
+    BCMOLT_XGPON_NI_AUTO_CFG_ID_PROTECTION_SWITCHING_ONUS_RANGED                            = 8,    /**< Protection Switching ONUs Ranged. */
+    BCMOLT_XGPON_NI_AUTO_CFG_ID_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED                   = 9,    /**< Protection Switching Switchover Completed. */
+    BCMOLT_XGPON_NI_AUTO_CFG_ID_PROTECTION_SWITCHING_TRAFFIC_RESUME                         = 10,   /**< Protection Switching Traffic Resume. */
+    BCMOLT_XGPON_NI_AUTO_CFG_ID_ROGUE_DETECTION_COMPLETED                                   = 11,   /**< Rogue detection completed. */
+    BCMOLT_XGPON_NI_AUTO_CFG_ID_ROGUE_ONU_SPECIAL_MAP_CYCLE_START                           = 12,   /**< Rogue ONU special map cycle start. */
+    BCMOLT_XGPON_NI_AUTO_CFG_ID_SERIAL_NUMBER_ACQUISITION_CYCLE_START                       = 13,   /**< Serial Number Acquisition Cycle Start. */
+    BCMOLT_XGPON_NI_AUTO_CFG_ID_STANDBY_PON_MONITORING_CYCLE_COMPLETED                      = 14,   /**< Standby PON Monitoring Cycle Completed. */
+    BCMOLT_XGPON_NI_AUTO_CFG_ID_STAT_ALARM_CLEARED                                          = 15,   /**< Stat Alarm Cleared. */
+    BCMOLT_XGPON_NI_AUTO_CFG_ID_STAT_ALARM_RAISED                                           = 16,   /**< Stat Alarm Raised. */
+    BCMOLT_XGPON_NI_AUTO_CFG_ID_STATE_CHANGE_COMPLETED                                      = 17,   /**< State Change Completed. */
+    BCMOLT_XGPON_NI_AUTO_CFG_ID_TOD_REQUEST_COMPLETED                                       = 18,   /**< TOD request completed. */
+    BCMOLT_XGPON_NI_AUTO_CFG_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_ni_auto_cfg_id;
+
+/** Identifiers for all properties contained in the 
+ * xgpon_ni_broadcast_ploam_packet group. 
+ */
+typedef enum bcmolt_xgpon_ni_broadcast_ploam_packet_id
+{
+    BCMOLT_XGPON_NI_BROADCAST_PLOAM_PACKET_ID__BEGIN                                        = 0,
+    BCMOLT_XGPON_NI_BROADCAST_PLOAM_PACKET_ID_PLOAM                                         = 0,    /**< ploam. */
+    BCMOLT_XGPON_NI_BROADCAST_PLOAM_PACKET_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_ni_broadcast_ploam_packet_id;
+
+/** Identifiers for all properties contained in the xgpon_ni_cfg group. 
+ */
+typedef enum bcmolt_xgpon_ni_cfg_id
+{
+    BCMOLT_XGPON_NI_CFG_ID__BEGIN                                                           = 0,
+    BCMOLT_XGPON_NI_CFG_ID_HW_PON_ID                                                        = 0,    /**< HW pon id. */
+    BCMOLT_XGPON_NI_CFG_ID_AVAILABLE_BANDWIDTH                                              = 1,    /**< Available Bandwidth. */
+    BCMOLT_XGPON_NI_CFG_ID_NUMBER_OF_ACTIVE_ONUS                                            = 2,    /**< number of active onus. */
+    BCMOLT_XGPON_NI_CFG_ID_PON_STATUS                                                       = 3,    /**< PON status. */
+    BCMOLT_XGPON_NI_CFG_ID_PON_DISTANCE                                                     = 4,    /**< PON distance. */
+    BCMOLT_XGPON_NI_CFG_ID_RANGING_WINDOW_SIZE                                              = 5,    /**< Ranging window size. */
+    BCMOLT_XGPON_NI_CFG_ID_EQD_CYCLES_NUMBER                                                = 6,    /**< EqD measurement cycles number. */
+    BCMOLT_XGPON_NI_CFG_ID_DRIFT_CONTROL                                                    = 7,    /**< drift control. */
+    BCMOLT_XGPON_NI_CFG_ID_LOS_ALARM_THRESHOLD                                              = 8,    /**< los alarm threshold. */
+    BCMOLT_XGPON_NI_CFG_ID_LOS_INITIAL_VALUE                                                = 9,    /**< los initialization value. */
+    BCMOLT_XGPON_NI_CFG_ID_ONU_ALARMS_THRESHOLDS                                            = 10,   /**< ONU alarms thresholds. */
+    BCMOLT_XGPON_NI_CFG_ID_BER_MONITOR                                                      = 11,   /**< BER monitoring params. */
+    BCMOLT_XGPON_NI_CFG_ID_ONU_ACTIVATION                                                   = 12,   /**< ONU Activation. */
+    BCMOLT_XGPON_NI_CFG_ID_SN_ACQUISITION                                                   = 13,   /**< sn acquisition. */
+    BCMOLT_XGPON_NI_CFG_ID_KEY_EXCHANGE                                                     = 14,   /**< key exchange. */
+    BCMOLT_XGPON_NI_CFG_ID_PROTECTION_SWITCHING                                             = 15,   /**< Protection switching. */
+    BCMOLT_XGPON_NI_CFG_ID_PROTECTION_SWITCHING_DEBUG                                       = 16,   /**< protection switching debug . */
+    BCMOLT_XGPON_NI_CFG_ID_CBR_RT_ALLOCATION_PROFILE                                        = 17,   /**< CBR RT Allocation profile. */
+    BCMOLT_XGPON_NI_CFG_ID_CBR_NRT_ALLOCATION_PROFILE                                       = 18,   /**< CBR NRT Allocation Profile. */
+    BCMOLT_XGPON_NI_CFG_ID_POWER_MANAGEMENT                                                 = 19,   /**< Power Management. */
+    BCMOLT_XGPON_NI_CFG_ID_ROGUE_ONU_DETECTION_PROCESS                                      = 20,   /**< Rogue ONU detection process. */
+    BCMOLT_XGPON_NI_CFG_ID_PERIODIC_STANDBY_PON_MONITORING                                  = 21,   /**< Periodic standby PON monitoring. */
+    BCMOLT_XGPON_NI_CFG_ID_DBA_MODE                                                         = 22,   /**< DBA mode. */
+    BCMOLT_XGPON_NI_CFG_ID_PLOAM_HANDLING                                                   = 23,   /**< Ploam handling. */
+    BCMOLT_XGPON_NI_CFG_ID_MIN_DATA_ALLOC_ID                                                = 24,   /**< Minimum data alloc id. */
+    BCMOLT_XGPON_NI_CFG_ID_MIN_DATA_GEM_PORT_ID                                             = 25,   /**< Minimum data port id. */
+    BCMOLT_XGPON_NI_CFG_ID_MULTICAST_KEY                                                    = 26,   /**< multicast key. */
+    BCMOLT_XGPON_NI_CFG_ID_PRBS_CHECKER                                                     = 27,   /**< PRBS Checker. */
+    BCMOLT_XGPON_NI_CFG_ID_PRBS_GENERATOR                                                   = 28,   /**< PRBS Generator. */
+    BCMOLT_XGPON_NI_CFG_ID_PRBS_STATUS                                                      = 29,   /**< PRBS status. */
+    BCMOLT_XGPON_NI_CFG_ID_AUTOMATIC_ONU_DEACTIVATION                                       = 30,   /**< Automatic ONU deactivation. */
+    BCMOLT_XGPON_NI_CFG_ID_US_BANDWIDTH_LIMIT                                               = 31,   /**< US bandwidth Limit. */
+    BCMOLT_XGPON_NI_CFG_ID_ALL_ONUS                                                         = 32,   /**< all ONUs. */
+    BCMOLT_XGPON_NI_CFG_ID_ALL_MCAST_GEM_PORTS                                              = 33,   /**< all multicast GEM ports. */
+    BCMOLT_XGPON_NI_CFG_ID_DEBUG                                                            = 34,   /**< PON NI debug parameters. */
+    BCMOLT_XGPON_NI_CFG_ID_ONU_UPGRADE_PARAMS                                               = 35,   /**< ONU upgrade params. */
+    BCMOLT_XGPON_NI_CFG_ID_DS_FEC_MODE                                                      = 36,   /**< DS FEC mode. */
+    BCMOLT_XGPON_NI_CFG_ID_DBA_TYPE                                                         = 37,   /**< DBA type. */
+    BCMOLT_XGPON_NI_CFG_ID_ONU_TUNING                                                       = 38,   /**< onu tuning. */
+    BCMOLT_XGPON_NI_CFG_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_ni_cfg_id;
+
+/** Identifiers for all properties contained in the xgpon_ni_cpu_packets_failure 
+ * group. 
+ */
+typedef enum bcmolt_xgpon_ni_cpu_packets_failure_id
+{
+    BCMOLT_XGPON_NI_CPU_PACKETS_FAILURE_ID__BEGIN                                           = 0,
+    BCMOLT_XGPON_NI_CPU_PACKETS_FAILURE_ID_ERROR                                            = 0,    /**< Error. */
+    BCMOLT_XGPON_NI_CPU_PACKETS_FAILURE_ID_GEM_PORT_ID                                      = 1,    /**< GEM Port ID. */
+    BCMOLT_XGPON_NI_CPU_PACKETS_FAILURE_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_ni_cpu_packets_failure_id;
+
+/** Identifiers for all properties contained in the xgpon_ni_cpu_packets group. 
+ */
+typedef enum bcmolt_xgpon_ni_cpu_packets_id
+{
+    BCMOLT_XGPON_NI_CPU_PACKETS_ID__BEGIN                                                   = 0,
+    BCMOLT_XGPON_NI_CPU_PACKETS_ID_PACKET_TYPE                                              = 0,    /**< packet type. */
+    BCMOLT_XGPON_NI_CPU_PACKETS_ID_CALC_CRC                                                 = 1,    /**< calc crc. */
+    BCMOLT_XGPON_NI_CPU_PACKETS_ID_GEM_PORT_LIST                                            = 2,    /**< gem port list. */
+    BCMOLT_XGPON_NI_CPU_PACKETS_ID_BUFFER                                                   = 3,    /**< buffer. */
+    BCMOLT_XGPON_NI_CPU_PACKETS_ID__NUM_OF                      /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_ni_cpu_packets_id;
+
+/** Identifiers for all properties contained in the 
+ * xgpon_ni_deactivate_all_onus_completed group. 
+ */
+typedef enum bcmolt_xgpon_ni_deactivate_all_onus_completed_id
+{
+    BCMOLT_XGPON_NI_DEACTIVATE_ALL_ONUS_COMPLETED_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_ni_deactivate_all_onus_completed_id;
+
+/** Identifiers for all properties contained in the 
+ * xgpon_ni_disable_all_onus_completed group. 
+ */
+typedef enum bcmolt_xgpon_ni_disable_all_onus_completed_id
+{
+    BCMOLT_XGPON_NI_DISABLE_ALL_ONUS_COMPLETED_ID__NUM_OF       /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_ni_disable_all_onus_completed_id;
+
+/** Identifiers for all properties contained in the 
+ * xgpon_ni_disable_serial_number group. 
+ */
+typedef enum bcmolt_xgpon_ni_disable_serial_number_id
+{
+    BCMOLT_XGPON_NI_DISABLE_SERIAL_NUMBER_ID__BEGIN                                         = 0,
+    BCMOLT_XGPON_NI_DISABLE_SERIAL_NUMBER_ID_CONTROL                                        = 0,    /**< control. */
+    BCMOLT_XGPON_NI_DISABLE_SERIAL_NUMBER_ID_SERIAL_NUMBER                                  = 1,    /**< serial number. */
+    BCMOLT_XGPON_NI_DISABLE_SERIAL_NUMBER_ID__NUM_OF        /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_ni_disable_serial_number_id;
+
+/** Identifiers for all properties contained in the 
+ * xgpon_ni_enable_all_onus_completed group. 
+ */
+typedef enum bcmolt_xgpon_ni_enable_all_onus_completed_id
+{
+    BCMOLT_XGPON_NI_ENABLE_ALL_ONUS_COMPLETED_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_ni_enable_all_onus_completed_id;
+
+/** Identifiers for all properties contained in the xgpon_ni_key group. 
+ */
+typedef enum bcmolt_xgpon_ni_key_id
+{
+    BCMOLT_XGPON_NI_KEY_ID__BEGIN                                                           = 0,
+    BCMOLT_XGPON_NI_KEY_ID_PON_NI                                                           = 0,    /**< PON network interface. */
+    BCMOLT_XGPON_NI_KEY_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_ni_key_id;
+
+/** Identifiers for all properties contained in the xgpon_ni_los group. 
+ */
+typedef enum bcmolt_xgpon_ni_los_id
+{
+    BCMOLT_XGPON_NI_LOS_ID__BEGIN                                                           = 0,
+    BCMOLT_XGPON_NI_LOS_ID_STATUS                                                           = 0,    /**< status. */
+    BCMOLT_XGPON_NI_LOS_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_ni_los_id;
+
+/** Identifiers for all properties contained in the xgpon_ni_onu_discovered 
+ * group. 
+ */
+typedef enum bcmolt_xgpon_ni_onu_discovered_id
+{
+    BCMOLT_XGPON_NI_ONU_DISCOVERED_ID__BEGIN                                                = 0,
+    BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_SERIAL_NUMBER                                         = 0,    /**< serial number. */
+    BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_RANGING_TIME                                          = 1,    /**< ranging time. */
+    BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_ONU_ID                                                = 2,    /**< onu_id. */
+    BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_UPSTREAM_LINE_RATE_CAPABILITIES                       = 3,    /**< upstream line rate capabilities. */
+    BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_CURRENT_DOWNSTREAM_PON_ID                             = 4,    /**< current downstream pon id. */
+    BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_CURRENT_UPSTREAM_PON_ID                               = 5,    /**< current upstream pon id. */
+    BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_CALIBRATION_RECORD                                    = 6,    /**< calibration record. */
+    BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_TUNING_GRANULARITY                                    = 7,    /**< tuning granularity. */
+    BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_STEP_TUNING_TIME                                      = 8,    /**< step tuning time. */
+    BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_ATTENUATION                                           = 9,    /**< attenuetion. */
+    BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_POWER_LEVELLING_CAPABILITIES                          = 10,   /**< power levelling capabilities. */
+    BCMOLT_XGPON_NI_ONU_DISCOVERED_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_ni_onu_discovered_id;
+
+/** Identifiers for all properties contained in the 
+ * xgpon_ni_onu_upgrade_complete group. 
+ */
+typedef enum bcmolt_xgpon_ni_onu_upgrade_complete_id
+{
+    BCMOLT_XGPON_NI_ONU_UPGRADE_COMPLETE_ID__BEGIN                                          = 0,
+    BCMOLT_XGPON_NI_ONU_UPGRADE_COMPLETE_ID_STATUS                                          = 0,    /**< Status. */
+    BCMOLT_XGPON_NI_ONU_UPGRADE_COMPLETE_ID_LIST_OF_FAILED_ENTITIES                         = 1,    /**< List of failed entities. */
+    BCMOLT_XGPON_NI_ONU_UPGRADE_COMPLETE_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_ni_onu_upgrade_complete_id;
+
+/** Identifiers for all properties contained in the 
+ * xgpon_ni_protection_switching_onus_ranged group. 
+ */
+typedef enum bcmolt_xgpon_ni_protection_switching_onus_ranged_id
+{
+    BCMOLT_XGPON_NI_PROTECTION_SWITCHING_ONUS_RANGED_ID__BEGIN                              = 0,
+    BCMOLT_XGPON_NI_PROTECTION_SWITCHING_ONUS_RANGED_ID_ONUS                                = 0,    /**< ONUs. */
+    BCMOLT_XGPON_NI_PROTECTION_SWITCHING_ONUS_RANGED_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_ni_protection_switching_onus_ranged_id;
+
+/** Identifiers for all properties contained in the 
+ * xgpon_ni_protection_switching_switchover_completed group. 
+ */
+typedef enum bcmolt_xgpon_ni_protection_switching_switchover_completed_id
+{
+    BCMOLT_XGPON_NI_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED_ID__BEGIN                     = 0,
+    BCMOLT_XGPON_NI_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED_ID_RESULT                     = 0,    /**< Result. */
+    BCMOLT_XGPON_NI_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_ni_protection_switching_switchover_completed_id;
+
+/** Identifiers for all properties contained in the 
+ * xgpon_ni_protection_switching_traffic_resume group. 
+ */
+typedef enum bcmolt_xgpon_ni_protection_switching_traffic_resume_id
+{
+    BCMOLT_XGPON_NI_PROTECTION_SWITCHING_TRAFFIC_RESUME_ID__BEGIN                           = 0,
+    BCMOLT_XGPON_NI_PROTECTION_SWITCHING_TRAFFIC_RESUME_ID_RESULT                           = 0,    /**< Result. */
+    BCMOLT_XGPON_NI_PROTECTION_SWITCHING_TRAFFIC_RESUME_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_ni_protection_switching_traffic_resume_id;
+
+/** Identifiers for all properties contained in the xgpon_ni_reset group. 
+ */
+typedef enum bcmolt_xgpon_ni_reset_id
+{
+    BCMOLT_XGPON_NI_RESET_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_ni_reset_id;
+
+/** Identifiers for all properties contained in the 
+ * xgpon_ni_rogue_detection_completed group. 
+ */
+typedef enum bcmolt_xgpon_ni_rogue_detection_completed_id
+{
+    BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID__BEGIN                                     = 0,
+    BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_WINDOW_TYPE                                = 0,    /**< Window type. */
+    BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_MEASUREMENT_STATUS                         = 1,    /**< Measurement status. */
+    BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_ALLOC_ID                                   = 2,    /**< Alloc ID. */
+    BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_ONU_ID                                     = 3,    /**< ONU ID. */
+    BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_IS_DELINEATION                             = 4,    /**< Is delineation. */
+    BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_IS_ED                                      = 5,    /**< Is ED. */
+    BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_RX_DATA                                    = 6,    /**< Received data. */
+    BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_PLOAM_RECEIVED_ONU_ID                      = 7,    /**< ploam_received_onu_id. */
+    BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_PLOAM_RECEIVED_MIC_ERROR                   = 8,    /**< ploam_received_mic_error. */
+    BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_ni_rogue_detection_completed_id;
+
+/** Identifiers for all properties contained in the 
+ * xgpon_ni_rogue_detection_window group. 
+ */
+typedef enum bcmolt_xgpon_ni_rogue_detection_window_id
+{
+    BCMOLT_XGPON_NI_ROGUE_DETECTION_WINDOW_ID__BEGIN                                        = 0,
+    BCMOLT_XGPON_NI_ROGUE_DETECTION_WINDOW_ID_WINDOW_TYPE                                   = 0,    /**< Window type. */
+    BCMOLT_XGPON_NI_ROGUE_DETECTION_WINDOW_ID_ALLOC_ID                                      = 1,    /**< Alloc ID. */
+    BCMOLT_XGPON_NI_ROGUE_DETECTION_WINDOW_ID_ONU_ID                                        = 2,    /**< ONU ID. */
+    BCMOLT_XGPON_NI_ROGUE_DETECTION_WINDOW_ID_SECOND_RANGING_WINDOW                         = 3,    /**< Second ranging window. */
+    BCMOLT_XGPON_NI_ROGUE_DETECTION_WINDOW_ID__NUM_OF               /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_ni_rogue_detection_window_id;
+
+/** Identifiers for all properties contained in the 
+ * xgpon_ni_rogue_onu_special_map_cycle_start group. 
+ */
+typedef enum bcmolt_xgpon_ni_rogue_onu_special_map_cycle_start_id
+{
+    BCMOLT_XGPON_NI_ROGUE_ONU_SPECIAL_MAP_CYCLE_START_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_ni_rogue_onu_special_map_cycle_start_id;
+
+/** Identifiers for all properties contained in the xgpon_ni_run_special_bw_map 
+ * group. 
+ */
+typedef enum bcmolt_xgpon_ni_run_special_bw_map_id
+{
+    BCMOLT_XGPON_NI_RUN_SPECIAL_BW_MAP_ID__BEGIN                                            = 0,
+    BCMOLT_XGPON_NI_RUN_SPECIAL_BW_MAP_ID_NUMBER_OF_CYCLE                                   = 0,    /**< number of cycle. */
+    BCMOLT_XGPON_NI_RUN_SPECIAL_BW_MAP_ID_ALLOCATION_NUMBER                                 = 1,    /**< allocation number. */
+    BCMOLT_XGPON_NI_RUN_SPECIAL_BW_MAP_ID_BW_MAP_ARRAY                                      = 2,    /**< bw map array. */
+    BCMOLT_XGPON_NI_RUN_SPECIAL_BW_MAP_ID__NUM_OF                       /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_ni_run_special_bw_map_id;
+
+/** Identifiers for all properties contained in the 
+ * xgpon_ni_serial_number_acquisition_cycle_start group. 
+ */
+typedef enum bcmolt_xgpon_ni_serial_number_acquisition_cycle_start_id
+{
+    BCMOLT_XGPON_NI_SERIAL_NUMBER_ACQUISITION_CYCLE_START_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_ni_serial_number_acquisition_cycle_start_id;
+
+/** Identifiers for all properties contained in the xgpon_ni_set_onu_state 
+ * group. 
+ */
+typedef enum bcmolt_xgpon_ni_set_onu_state_id
+{
+    BCMOLT_XGPON_NI_SET_ONU_STATE_ID__BEGIN                                                 = 0,
+    BCMOLT_XGPON_NI_SET_ONU_STATE_ID_ONU_STATE                                              = 0,    /**< ONU state. */
+    BCMOLT_XGPON_NI_SET_ONU_STATE_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_ni_set_onu_state_id;
+
+/** Identifiers for all properties contained in the xgpon_ni_set_pon_state 
+ * group. 
+ */
+typedef enum bcmolt_xgpon_ni_set_pon_state_id
+{
+    BCMOLT_XGPON_NI_SET_PON_STATE_ID__BEGIN                                                 = 0,
+    BCMOLT_XGPON_NI_SET_PON_STATE_ID_PON_STATE                                              = 0,    /**< PON state. */
+    BCMOLT_XGPON_NI_SET_PON_STATE_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_ni_set_pon_state_id;
+
+/** Identifiers for all properties contained in the 
+ * xgpon_ni_single_request_standby_pon_monitoring group. 
+ */
+typedef enum bcmolt_xgpon_ni_single_request_standby_pon_monitoring_id
+{
+    BCMOLT_XGPON_NI_SINGLE_REQUEST_STANDBY_PON_MONITORING_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_ni_single_request_standby_pon_monitoring_id;
+
+/** Identifiers for all properties contained in the 
+ * xgpon_ni_standby_pon_monitoring_cycle_completed group. 
+ */
+typedef enum bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_id
+{
+    BCMOLT_XGPON_NI_STANDBY_PON_MONITORING_CYCLE_COMPLETED_ID__BEGIN                        = 0,
+    BCMOLT_XGPON_NI_STANDBY_PON_MONITORING_CYCLE_COMPLETED_ID_NUMBER_OF_DETECTED_DELIMITER  = 0,    /**< number of detected delimiter. */
+    BCMOLT_XGPON_NI_STANDBY_PON_MONITORING_CYCLE_COMPLETED_ID_ENERGY_DETECT_SIGNAL          = 1,    /**< energy detect signal. */
+    BCMOLT_XGPON_NI_STANDBY_PON_MONITORING_CYCLE_COMPLETED_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_id;
+
+/** Identifiers for all properties contained in the xgpon_ni_start_onu_upgrade 
+ * group. 
+ */
+typedef enum bcmolt_xgpon_ni_start_onu_upgrade_id
+{
+    BCMOLT_XGPON_NI_START_ONU_UPGRADE_ID__BEGIN                                             = 0,
+    BCMOLT_XGPON_NI_START_ONU_UPGRADE_ID_LIST_OF_ONU_IDS                                    = 0,    /**< List of ONU IDs. */
+    BCMOLT_XGPON_NI_START_ONU_UPGRADE_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_ni_start_onu_upgrade_id;
+
+/** Identifiers for all properties contained in the xgpon_ni_stat_alarm_cleared 
+ * group. 
+ */
+typedef enum bcmolt_xgpon_ni_stat_alarm_cleared_id
+{
+    BCMOLT_XGPON_NI_STAT_ALARM_CLEARED_ID__BEGIN                                            = 0,
+    BCMOLT_XGPON_NI_STAT_ALARM_CLEARED_ID_STAT                                              = 0,    /**< Statistic ID. */
+    BCMOLT_XGPON_NI_STAT_ALARM_CLEARED_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_ni_stat_alarm_cleared_id;
+
+/** Identifiers for all properties contained in the xgpon_ni_stat_alarm_raised 
+ * group. 
+ */
+typedef enum bcmolt_xgpon_ni_stat_alarm_raised_id
+{
+    BCMOLT_XGPON_NI_STAT_ALARM_RAISED_ID__BEGIN                                             = 0,
+    BCMOLT_XGPON_NI_STAT_ALARM_RAISED_ID_STAT                                               = 0,    /**< Statistic ID. */
+    BCMOLT_XGPON_NI_STAT_ALARM_RAISED_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_ni_stat_alarm_raised_id;
+
+/** Identifiers for all properties contained in the xgpon_ni_stat_cfg group. 
+ */
+typedef enum bcmolt_xgpon_ni_stat_cfg_id
+{
+    BCMOLT_XGPON_NI_STAT_CFG_ID__BEGIN                                                      = 0,
+    BCMOLT_XGPON_NI_STAT_CFG_ID_CFG                                                         = 0,    /**< Configuration. */
+    BCMOLT_XGPON_NI_STAT_CFG_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_ni_stat_cfg_id;
+
+/** Identifiers for all properties contained in the xgpon_ni_stat group. 
+ */
+typedef enum bcmolt_xgpon_ni_stat_id
+{
+    BCMOLT_XGPON_NI_STAT_ID__BEGIN                                                          = 0,
+    BCMOLT_XGPON_NI_STAT_ID_FEC_CODEWORDS                                                   = 0,    /**< Receive FEC codewords. */
+    BCMOLT_XGPON_NI_STAT_ID_BIP32_BYTES                                                     = 1,    /**< Received bytes protected by bip32. */
+    BCMOLT_XGPON_NI_STAT_ID_BIP32_ERRORS                                                    = 2,    /**< Received bip32 errors. */
+    BCMOLT_XGPON_NI_STAT_ID_RX_XGTC_HEADERS                                                 = 3,    /**< Received valid XGTC headers. */
+    BCMOLT_XGPON_NI_STAT_ID_RX_XGTC_CORRECTED                                               = 4,    /**< Received corrected XGTC headers. */
+    BCMOLT_XGPON_NI_STAT_ID_RX_XGTC_UNCORRECTED                                             = 5,    /**< Received uncorrected XGTC headers. */
+    BCMOLT_XGPON_NI_STAT_ID_RX_XGEM                                                         = 6,    /**< Received valid XGEM frames. */
+    BCMOLT_XGPON_NI_STAT_ID_RX_XGEM_DROPPED                                                 = 7,    /**< Received dropped XGEM ID frames. */
+    BCMOLT_XGPON_NI_STAT_ID_RX_XGEM_IDLE                                                    = 8,    /**< Received idle XGEM frames. */
+    BCMOLT_XGPON_NI_STAT_ID_RX_XGEM_CORRECTED                                               = 9,    /**< Received corrected XGEM frames. */
+    BCMOLT_XGPON_NI_STAT_ID_RX_CRC_ERROR                                                    = 10,   /**< Received packets with CRC error. */
+    BCMOLT_XGPON_NI_STAT_ID_RX_FRAGMENT_ERROR                                               = 11,   /**< Received fragment errors. */
+    BCMOLT_XGPON_NI_STAT_ID_RX_PACKETS_DROPPED                                              = 12,   /**< Global dropped packets. */
+    BCMOLT_XGPON_NI_STAT_ID_RX_DROPPED_TOO_SHORT                                            = 13,   /**< Received packets dropped due to length too short. */
+    BCMOLT_XGPON_NI_STAT_ID_RX_DROPPED_TOO_LONG                                             = 14,   /**< Received packet dropped due to length too long. */
+    BCMOLT_XGPON_NI_STAT_ID_RX_KEY_ERROR                                                    = 15,   /**< Received key errors. */
+    BCMOLT_XGPON_NI_STAT_ID_TX_PLOAMS                                                       = 16,   /**< Transmitted Ploams. */
+    BCMOLT_XGPON_NI_STAT_ID_RX_PLOAMS_DROPPED                                               = 17,   /**< Received dropped Ploams. */
+    BCMOLT_XGPON_NI_STAT_ID_RX_ALLOCATIONS_VALID                                            = 18,   /**< Received valid allocations. */
+    BCMOLT_XGPON_NI_STAT_ID_RX_ALLOCATIONS_INVALID                                          = 19,   /**< Received invalid allocations. */
+    BCMOLT_XGPON_NI_STAT_ID_RX_ALLOCATIONS_DISABLED                                         = 20,   /**< Received disabled allocations. */
+    BCMOLT_XGPON_NI_STAT_ID_RX_PLOAMS                                                       = 21,   /**< Received Ploams. */
+    BCMOLT_XGPON_NI_STAT_ID_RX_PLOAMS_NON_IDLE                                              = 22,   /**< Received non idle Ploams. */
+    BCMOLT_XGPON_NI_STAT_ID_RX_PLOAMS_ERROR                                                 = 23,   /**< Received error Ploams. */
+    BCMOLT_XGPON_NI_STAT_ID_RX_CPU                                                          = 24,   /**< Received CPU packets. */
+    BCMOLT_XGPON_NI_STAT_ID_RX_OMCI                                                         = 25,   /**< Received OMCI packets. */
+    BCMOLT_XGPON_NI_STAT_ID_RX_OMCI_PACKETS_CRC_ERROR                                       = 26,   /**< Received OMCI packets with CRC errors. */
+    BCMOLT_XGPON_NI_STAT_ID_TX_PACKETS                                                      = 27,   /**< Transmitted packets. */
+    BCMOLT_XGPON_NI_STAT_ID_TX_XGEM                                                         = 28,   /**< Transmitted XGEM fragments. */
+    BCMOLT_XGPON_NI_STAT_ID_TX_CPU                                                          = 29,   /**< Transmitted CPU packets. */
+    BCMOLT_XGPON_NI_STAT_ID_TX_OMCI                                                         = 30,   /**< Transmitted OMCI packets. */
+    BCMOLT_XGPON_NI_STAT_ID_TX_CPU_OMCI_PACKETS_DROPPED                                     = 31,   /**< Transmit packets dropped due to illegal length. */
+    BCMOLT_XGPON_NI_STAT_ID_TX_DROPPED_ILLEGAL_LENGTH                                       = 32,   /**< Transmit packets dropped due to illegal length. */
+    BCMOLT_XGPON_NI_STAT_ID_TX_DROPPED_TPID_MISS                                            = 33,   /**< Transmit packets dropped due to TPID miss. */
+    BCMOLT_XGPON_NI_STAT_ID_TX_DROPPED_VID_MISS                                             = 34,   /**< Transmit packets droped due to VID miss. */
+    BCMOLT_XGPON_NI_STAT_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_ni_stat_id;
+
+/** Identifiers for all properties contained in the 
+ * xgpon_ni_state_change_completed group. 
+ */
+typedef enum bcmolt_xgpon_ni_state_change_completed_id
+{
+    BCMOLT_XGPON_NI_STATE_CHANGE_COMPLETED_ID__BEGIN                                        = 0,
+    BCMOLT_XGPON_NI_STATE_CHANGE_COMPLETED_ID_RESULT                                        = 0,    /**< Result. */
+    BCMOLT_XGPON_NI_STATE_CHANGE_COMPLETED_ID_PREVIOUS_STATE                                = 1,    /**< Previous state. */
+    BCMOLT_XGPON_NI_STATE_CHANGE_COMPLETED_ID_NEW_STATE                                     = 2,    /**< new state. */
+    BCMOLT_XGPON_NI_STATE_CHANGE_COMPLETED_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_ni_state_change_completed_id;
+
+/** Identifiers for all properties contained in the 
+ * xgpon_ni_tod_request_completed group. 
+ */
+typedef enum bcmolt_xgpon_ni_tod_request_completed_id
+{
+    BCMOLT_XGPON_NI_TOD_REQUEST_COMPLETED_ID__BEGIN                                         = 0,
+    BCMOLT_XGPON_NI_TOD_REQUEST_COMPLETED_ID_TOD_STRING                                     = 0,    /**< tod_string. */
+    BCMOLT_XGPON_NI_TOD_REQUEST_COMPLETED_ID_SFC                                            = 1,    /**< sfc. */
+    BCMOLT_XGPON_NI_TOD_REQUEST_COMPLETED_ID_RTC_OFFSET_SEC                                 = 2,    /**< rtc_offset_sec. */
+    BCMOLT_XGPON_NI_TOD_REQUEST_COMPLETED_ID_RTC_OFFSET_NSEC                                = 3,    /**< rtc_offset_nsec. */
+    BCMOLT_XGPON_NI_TOD_REQUEST_COMPLETED_ID_STATUS                                         = 4,    /**< status. */
+    BCMOLT_XGPON_NI_TOD_REQUEST_COMPLETED_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_ni_tod_request_completed_id;
+
+/** Identifiers for all properties contained in the xgpon_ni_tod_request group. 
+ */
+typedef enum bcmolt_xgpon_ni_tod_request_id
+{
+    BCMOLT_XGPON_NI_TOD_REQUEST_ID__NUM_OF              /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_ni_tod_request_id;
+
+/** Identifiers for all properties contained in the 
+ * xgpon_onu_adjust_tx_wavelength group. 
+ */
+typedef enum bcmolt_xgpon_onu_adjust_tx_wavelength_id
+{
+    BCMOLT_XGPON_ONU_ADJUST_TX_WAVELENGTH_ID__BEGIN                                         = 0,
+    BCMOLT_XGPON_ONU_ADJUST_TX_WAVELENGTH_ID_FREQUENCY_ADJUSTMENT_DIRECTION                 = 0,    /**< Frequency adjustment direction. */
+    BCMOLT_XGPON_ONU_ADJUST_TX_WAVELENGTH_ID_FREQUENCY_ADJUSTMENT_SIZE                      = 1,    /**< Frequency adjustment size. */
+    BCMOLT_XGPON_ONU_ADJUST_TX_WAVELENGTH_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_adjust_tx_wavelength_id;
+
+/** Identifiers for all properties contained in the xgpon_onu_auto_cfg group. 
+ */
+typedef enum bcmolt_xgpon_onu_auto_cfg_id
+{
+    BCMOLT_XGPON_ONU_AUTO_CFG_ID__BEGIN                                                     = 0,
+    BCMOLT_XGPON_ONU_AUTO_CFG_ID_DFI                                                        = 0,    /**< Receive Dying-Gasp of ONUi. */
+    BCMOLT_XGPON_ONU_AUTO_CFG_ID_DGI                                                        = 1,    /**< Receive Dying-Gasp of ONUi. */
+    BCMOLT_XGPON_ONU_AUTO_CFG_ID_DOWI                                                       = 2,    /**< Drift of Window of ONUi. */
+    BCMOLT_XGPON_ONU_AUTO_CFG_ID_INVALID_DBRU_REPORT                                        = 3,    /**< Invalid DBRu Report. */
+    BCMOLT_XGPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_COMPLETED                                     = 4,    /**< Key Exchange Completed. */
+    BCMOLT_XGPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_CYCLE_SKIPPED                                 = 5,    /**< Key Exchange Cycle Skipped. */
+    BCMOLT_XGPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_KEY_MISMATCH                                  = 6,    /**< Key Exchange Key Mismatch. */
+    BCMOLT_XGPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_KEY_REQUEST_TIMEOUT                           = 7,    /**< Key Exchange Key Request Timeout. */
+    BCMOLT_XGPON_ONU_AUTO_CFG_ID_LOOCI                                                      = 8,    /**< LOOCi. */
+    BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_ACTIVATION_COMPLETED                                   = 9,    /**< ONU Activation Completed. */
+    BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_ALARM                                                  = 10,   /**< ONU Alarm. */
+    BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_DEACTIVATION_COMPLETED                                 = 11,   /**< ONU Deactivation Completed. */
+    BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_DISABLE_COMPLETED                                      = 12,   /**< ONU Disable Completed. */
+    BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_ENABLE_COMPLETED                                       = 13,   /**< ONU Enable Completed. */
+    BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_TUNING_IN_COMPLETED                                    = 14,   /**< ONU Tuning in completed. */
+    BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_TUNING_OUT_COMPLETED                                   = 15,   /**< ONU Tuning out completed. */
+    BCMOLT_XGPON_ONU_AUTO_CFG_ID_OPTICAL_REFLECTION                                         = 16,   /**< Optical Reflection. */
+    BCMOLT_XGPON_ONU_AUTO_CFG_ID_POSSIBLE_DRIFT                                             = 17,   /**< Possible Drift. */
+    BCMOLT_XGPON_ONU_AUTO_CFG_ID_POWER_CONSUMPTION_REPORT                                   = 18,   /**< Power consumption report. */
+    BCMOLT_XGPON_ONU_AUTO_CFG_ID_POWER_LEVEL_REPORT                                         = 19,   /**< Power level report. */
+    BCMOLT_XGPON_ONU_AUTO_CFG_ID_POWER_MANAGEMENT_STATE_CHANGE                              = 20,   /**< Power Management State Change. */
+    BCMOLT_XGPON_ONU_AUTO_CFG_ID_PQSI                                                       = 21,   /**< ploam queue status. */
+    BCMOLT_XGPON_ONU_AUTO_CFG_ID_RANGING_COMPLETED                                          = 22,   /**< Ranging Completed. */
+    BCMOLT_XGPON_ONU_AUTO_CFG_ID_REGISTRATION_ID                                            = 23,   /**< Registration ID. */
+    BCMOLT_XGPON_ONU_AUTO_CFG_ID_RSSI_MEASUREMENT_COMPLETED                                 = 24,   /**< RSSI Measurement Completed. */
+    BCMOLT_XGPON_ONU_AUTO_CFG_ID_SDI                                                        = 25,   /**< Signal Degraded of ONUi. */
+    BCMOLT_XGPON_ONU_AUTO_CFG_ID_SECURE_MUTUAL_AUTHENTICATION_FAILURE                       = 26,   /**< secure mutual authentication failure. */
+    BCMOLT_XGPON_ONU_AUTO_CFG_ID_SFI                                                        = 27,   /**< Signal Fail of ONUi. */
+    BCMOLT_XGPON_ONU_AUTO_CFG_ID_STAT_ALARM_CLEARED                                         = 28,   /**< Stat Alarm Cleared. */
+    BCMOLT_XGPON_ONU_AUTO_CFG_ID_STAT_ALARM_RAISED                                          = 29,   /**< Stat Alarm Raised. */
+    BCMOLT_XGPON_ONU_AUTO_CFG_ID_SUFI                                                       = 30,   /**< SUFi. */
+    BCMOLT_XGPON_ONU_AUTO_CFG_ID_TIWI                                                       = 31,   /**< Transmission Interference Warning. */
+    BCMOLT_XGPON_ONU_AUTO_CFG_ID_TUNING_RESPONSE                                            = 32,   /**< Tuning response. */
+    BCMOLT_XGPON_ONU_AUTO_CFG_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_auto_cfg_id;
+
+/** Identifiers for all properties contained in the xgpon_onu_cfg group. 
+ */
+typedef enum bcmolt_xgpon_onu_cfg_id
+{
+    BCMOLT_XGPON_ONU_CFG_ID__BEGIN                                                          = 0,
+    BCMOLT_XGPON_ONU_CFG_ID_ONU_STATE                                                       = 0,    /**< onu state. */
+    BCMOLT_XGPON_ONU_CFG_ID_ONU_OLD_STATE                                                   = 1,    /**< onu old state. */
+    BCMOLT_XGPON_ONU_CFG_ID_ALARM_STATE                                                     = 2,    /**< alarm state. */
+    BCMOLT_XGPON_ONU_CFG_ID_REGISTRATION_ENCRYPTION_KEYS                                    = 3,    /**< registration encryption keys. */
+    BCMOLT_XGPON_ONU_CFG_ID_CURRENT_ENCRYPTION_KEY                                          = 4,    /**< current encryption key. */
+    BCMOLT_XGPON_ONU_CFG_ID_SERIAL_NUMBER                                                   = 5,    /**< serial number. */
+    BCMOLT_XGPON_ONU_CFG_ID_REGISTRATION_ID                                                 = 6,    /**< registration id. */
+    BCMOLT_XGPON_ONU_CFG_ID_REGISTRATION_ID_AUTO_LEARNING                                   = 7,    /**< Registration ID auto learning. */
+    BCMOLT_XGPON_ONU_CFG_ID_RANGING_BURST_PROFILE                                           = 8,    /**< ranging burst profile. */
+    BCMOLT_XGPON_ONU_CFG_ID_DATA_BURST_PROFILE                                              = 9,    /**< data burst profile. */
+    BCMOLT_XGPON_ONU_CFG_ID_RANGING_TIME                                                    = 10,   /**< ranging time. */
+    BCMOLT_XGPON_ONU_CFG_ID_DISABLED_AFTER_DISCOVERY                                        = 11,   /**< Disabled after Discovery. */
+    BCMOLT_XGPON_ONU_CFG_ID_DEACTIVATION_REASON                                             = 12,   /**< deactivation reason. */
+    BCMOLT_XGPON_ONU_CFG_ID_ALL_GEM_PORTS                                                   = 13,   /**< all GEM ports. */
+    BCMOLT_XGPON_ONU_CFG_ID_ALL_ALLOCS                                                      = 14,   /**< all allocs. */
+    BCMOLT_XGPON_ONU_CFG_ID_EXTENDED_GUARD_TIME                                             = 15,   /**< Extended Guard Time. */
+    BCMOLT_XGPON_ONU_CFG_ID_US_LINE_RATE                                                    = 16,   /**< US line rate. */
+    BCMOLT_XGPON_ONU_CFG_ID_CALIBRATION_RECORD                                              = 17,   /**< Calibration record. */
+    BCMOLT_XGPON_ONU_CFG_ID_TUNING_GRANULARITY                                              = 18,   /**< Tuning granularity. */
+    BCMOLT_XGPON_ONU_CFG_ID_STEP_TUNING_TIME                                                = 19,   /**< Step tuning time. */
+    BCMOLT_XGPON_ONU_CFG_ID_POWER_LEVELLING_CAPABILITIES                                    = 20,   /**< Power levelling capabilities. */
+    BCMOLT_XGPON_ONU_CFG_ID_REQUEST_REGISTRATION_STATUS                                     = 21,   /**< Request registration status. */
+    BCMOLT_XGPON_ONU_CFG_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_cfg_id;
+
+/** Identifiers for all properties contained in the 
+ * xgpon_onu_change_power_levelling group. 
+ */
+typedef enum bcmolt_xgpon_onu_change_power_levelling_id
+{
+    BCMOLT_XGPON_ONU_CHANGE_POWER_LEVELLING_ID__BEGIN                                       = 0,
+    BCMOLT_XGPON_ONU_CHANGE_POWER_LEVELLING_ID_CONTROL                                      = 0,    /**< control. */
+    BCMOLT_XGPON_ONU_CHANGE_POWER_LEVELLING_ID_ATTENUATION                                  = 1,    /**< Attenuation. */
+    BCMOLT_XGPON_ONU_CHANGE_POWER_LEVELLING_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_change_power_levelling_id;
+
+/** Identifiers for all properties contained in the xgpon_onu_cpu_packet group. 
+ */
+typedef enum bcmolt_xgpon_onu_cpu_packet_id
+{
+    BCMOLT_XGPON_ONU_CPU_PACKET_ID__BEGIN                                                   = 0,
+    BCMOLT_XGPON_ONU_CPU_PACKET_ID_PORT_ID                                                  = 0,    /**< port id. */
+    BCMOLT_XGPON_ONU_CPU_PACKET_ID_CRC_OK                                                   = 1,    /**< crc ok. */
+    BCMOLT_XGPON_ONU_CPU_PACKET_ID_PACKET_SIZE                                              = 2,    /**< packet size. */
+    BCMOLT_XGPON_ONU_CPU_PACKET_ID_BUFFER                                                   = 3,    /**< buffer. */
+    BCMOLT_XGPON_ONU_CPU_PACKET_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_cpu_packet_id;
+
+/** Identifiers for all properties contained in the xgpon_onu_cpu_packets group. 
+ */
+typedef enum bcmolt_xgpon_onu_cpu_packets_id
+{
+    BCMOLT_XGPON_ONU_CPU_PACKETS_ID__BEGIN                                                  = 0,
+    BCMOLT_XGPON_ONU_CPU_PACKETS_ID_PACKET_TYPE                                             = 0,    /**< packet type. */
+    BCMOLT_XGPON_ONU_CPU_PACKETS_ID_CALC_CRC                                                = 1,    /**< calc crc. */
+    BCMOLT_XGPON_ONU_CPU_PACKETS_ID_NUMBER_OF_PACKETS                                       = 2,    /**< number of packets. */
+    BCMOLT_XGPON_ONU_CPU_PACKETS_ID_PACKET_SIZE                                             = 3,    /**< Single packet size. */
+    BCMOLT_XGPON_ONU_CPU_PACKETS_ID_BUFFER                                                  = 4,    /**< buffer. */
+    BCMOLT_XGPON_ONU_CPU_PACKETS_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_cpu_packets_id;
+
+/** Identifiers for all properties contained in the xgpon_onu_dfi group. 
+ */
+typedef enum bcmolt_xgpon_onu_dfi_id
+{
+    BCMOLT_XGPON_ONU_DFI_ID__BEGIN                                                          = 0,
+    BCMOLT_XGPON_ONU_DFI_ID_ALARM_STATUS                                                    = 0,    /**< alarm status. */
+    BCMOLT_XGPON_ONU_DFI_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_dfi_id;
+
+/** Identifiers for all properties contained in the xgpon_onu_dgi group. 
+ */
+typedef enum bcmolt_xgpon_onu_dgi_id
+{
+    BCMOLT_XGPON_ONU_DGI_ID__BEGIN                                                          = 0,
+    BCMOLT_XGPON_ONU_DGI_ID_ALARM_STATUS                                                    = 0,    /**< alarm status. */
+    BCMOLT_XGPON_ONU_DGI_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_dgi_id;
+
+/** Identifiers for all properties contained in the xgpon_onu_dowi group. 
+ */
+typedef enum bcmolt_xgpon_onu_dowi_id
+{
+    BCMOLT_XGPON_ONU_DOWI_ID__BEGIN                                                         = 0,
+    BCMOLT_XGPON_ONU_DOWI_ID_ALARM_STATUS                                                   = 0,    /**< Alarm status. */
+    BCMOLT_XGPON_ONU_DOWI_ID_DRIFT_VALUE                                                    = 1,    /**< Drift value. */
+    BCMOLT_XGPON_ONU_DOWI_ID_NEW_EQD                                                        = 2,    /**< New EQD. */
+    BCMOLT_XGPON_ONU_DOWI_ID__NUM_OF                    /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_dowi_id;
+
+/** Identifiers for all properties contained in the 
+ * xgpon_onu_get_power_consumption group. 
+ */
+typedef enum bcmolt_xgpon_onu_get_power_consumption_id
+{
+    BCMOLT_XGPON_ONU_GET_POWER_CONSUMPTION_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_get_power_consumption_id;
+
+/** Identifiers for all properties contained in the xgpon_onu_get_power_level 
+ * group. 
+ */
+typedef enum bcmolt_xgpon_onu_get_power_level_id
+{
+    BCMOLT_XGPON_ONU_GET_POWER_LEVEL_ID__NUM_OF         /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_get_power_level_id;
+
+/** Identifiers for all properties contained in the 
+ * xgpon_onu_invalid_dbru_report group. 
+ */
+typedef enum bcmolt_xgpon_onu_invalid_dbru_report_id
+{
+    BCMOLT_XGPON_ONU_INVALID_DBRU_REPORT_ID__BEGIN                                          = 0,
+    BCMOLT_XGPON_ONU_INVALID_DBRU_REPORT_ID_ALLOC_ID                                        = 0,    /**< Alloc-ID. */
+    BCMOLT_XGPON_ONU_INVALID_DBRU_REPORT_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_invalid_dbru_report_id;
+
+/** Identifiers for all properties contained in the 
+ * xgpon_onu_key_exchange_completed group. 
+ */
+typedef enum bcmolt_xgpon_onu_key_exchange_completed_id
+{
+    BCMOLT_XGPON_ONU_KEY_EXCHANGE_COMPLETED_ID__BEGIN                                       = 0,
+    BCMOLT_XGPON_ONU_KEY_EXCHANGE_COMPLETED_ID_NEW_KEY                                      = 0,    /**< new key. */
+    BCMOLT_XGPON_ONU_KEY_EXCHANGE_COMPLETED_ID__NUM_OF      /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_key_exchange_completed_id;
+
+/** Identifiers for all properties contained in the 
+ * xgpon_onu_key_exchange_cycle_skipped group. 
+ */
+typedef enum bcmolt_xgpon_onu_key_exchange_cycle_skipped_id
+{
+    BCMOLT_XGPON_ONU_KEY_EXCHANGE_CYCLE_SKIPPED_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_key_exchange_cycle_skipped_id;
+
+/** Identifiers for all properties contained in the 
+ * xgpon_onu_key_exchange_key_mismatch group. 
+ */
+typedef enum bcmolt_xgpon_onu_key_exchange_key_mismatch_id
+{
+    BCMOLT_XGPON_ONU_KEY_EXCHANGE_KEY_MISMATCH_ID__BEGIN                                    = 0,
+    BCMOLT_XGPON_ONU_KEY_EXCHANGE_KEY_MISMATCH_ID_EXPECTED_KEY                              = 0,    /**< expected key. */
+    BCMOLT_XGPON_ONU_KEY_EXCHANGE_KEY_MISMATCH_ID_RECEIVED_KEY                              = 1,    /**< received key. */
+    BCMOLT_XGPON_ONU_KEY_EXCHANGE_KEY_MISMATCH_ID__NUM_OF           /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_key_exchange_key_mismatch_id;
+
+/** Identifiers for all properties contained in the 
+ * xgpon_onu_key_exchange_key_request_timeout group. 
+ */
+typedef enum bcmolt_xgpon_onu_key_exchange_key_request_timeout_id
+{
+    BCMOLT_XGPON_ONU_KEY_EXCHANGE_KEY_REQUEST_TIMEOUT_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_key_exchange_key_request_timeout_id;
+
+/** Identifiers for all properties contained in the xgpon_onu_key group. 
+ */
+typedef enum bcmolt_xgpon_onu_key_id
+{
+    BCMOLT_XGPON_ONU_KEY_ID__BEGIN                                                          = 0,
+    BCMOLT_XGPON_ONU_KEY_ID_PON_NI                                                          = 0,    /**< PON network interface. */
+    BCMOLT_XGPON_ONU_KEY_ID_ONU_ID                                                          = 1,    /**< onu id. */
+    BCMOLT_XGPON_ONU_KEY_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_key_id;
+
+/** Identifiers for all properties contained in the xgpon_onu_looci group. 
+ */
+typedef enum bcmolt_xgpon_onu_looci_id
+{
+    BCMOLT_XGPON_ONU_LOOCI_ID__BEGIN                                                        = 0,
+    BCMOLT_XGPON_ONU_LOOCI_ID_ALARM_STATUS                                                  = 0,    /**< alarm status. */
+    BCMOLT_XGPON_ONU_LOOCI_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_looci_id;
+
+/** Identifiers for all properties contained in the xgpon_onu_omci_packet group. 
+ */
+typedef enum bcmolt_xgpon_onu_omci_packet_id
+{
+    BCMOLT_XGPON_ONU_OMCI_PACKET_ID__BEGIN                                                  = 0,
+    BCMOLT_XGPON_ONU_OMCI_PACKET_ID_PORT_ID                                                 = 0,    /**< port id. */
+    BCMOLT_XGPON_ONU_OMCI_PACKET_ID_CRC_OK                                                  = 1,    /**< crc ok. */
+    BCMOLT_XGPON_ONU_OMCI_PACKET_ID_PACKET_SIZE                                             = 2,    /**< packet size. */
+    BCMOLT_XGPON_ONU_OMCI_PACKET_ID_BUFFER                                                  = 3,    /**< buffer. */
+    BCMOLT_XGPON_ONU_OMCI_PACKET_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_omci_packet_id;
+
+/** Identifiers for all properties contained in the 
+ * xgpon_onu_onu_activation_completed group. 
+ */
+typedef enum bcmolt_xgpon_onu_onu_activation_completed_id
+{
+    BCMOLT_XGPON_ONU_ONU_ACTIVATION_COMPLETED_ID__BEGIN                                     = 0,
+    BCMOLT_XGPON_ONU_ONU_ACTIVATION_COMPLETED_ID_STATUS                                     = 0,    /**< status. */
+    BCMOLT_XGPON_ONU_ONU_ACTIVATION_COMPLETED_ID_FAIL_REASON                                = 1,    /**< fail reason. */
+    BCMOLT_XGPON_ONU_ONU_ACTIVATION_COMPLETED_ID_REGISTRATION_ID                            = 2,    /**< registration id. */
+    BCMOLT_XGPON_ONU_ONU_ACTIVATION_COMPLETED_ID_REGISTRATION_ENCRYPTION_KEYS               = 3,    /**< registration encryption keys. */
+    BCMOLT_XGPON_ONU_ONU_ACTIVATION_COMPLETED_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_onu_activation_completed_id;
+
+/** Identifiers for all properties contained in the xgpon_onu_onu_alarm group. 
+ */
+typedef enum bcmolt_xgpon_onu_onu_alarm_id
+{
+    BCMOLT_XGPON_ONU_ONU_ALARM_ID__BEGIN                                                    = 0,
+    BCMOLT_XGPON_ONU_ONU_ALARM_ID_ONU_ALARM                                                 = 0,    /**< onu alarm. */
+    BCMOLT_XGPON_ONU_ONU_ALARM_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_onu_alarm_id;
+
+/** Identifiers for all properties contained in the 
+ * xgpon_onu_onu_deactivation_completed group. 
+ */
+typedef enum bcmolt_xgpon_onu_onu_deactivation_completed_id
+{
+    BCMOLT_XGPON_ONU_ONU_DEACTIVATION_COMPLETED_ID__BEGIN                                   = 0,
+    BCMOLT_XGPON_ONU_ONU_DEACTIVATION_COMPLETED_ID_STATUS                                   = 0,    /**< Status. */
+    BCMOLT_XGPON_ONU_ONU_DEACTIVATION_COMPLETED_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_onu_deactivation_completed_id;
+
+/** Identifiers for all properties contained in the 
+ * xgpon_onu_onu_disable_completed group. 
+ */
+typedef enum bcmolt_xgpon_onu_onu_disable_completed_id
+{
+    BCMOLT_XGPON_ONU_ONU_DISABLE_COMPLETED_ID__BEGIN                                        = 0,
+    BCMOLT_XGPON_ONU_ONU_DISABLE_COMPLETED_ID_SERIAL_NUMBER                                 = 0,    /**< serial number. */
+    BCMOLT_XGPON_ONU_ONU_DISABLE_COMPLETED_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_onu_disable_completed_id;
+
+/** Identifiers for all properties contained in the 
+ * xgpon_onu_onu_enable_completed group. 
+ */
+typedef enum bcmolt_xgpon_onu_onu_enable_completed_id
+{
+    BCMOLT_XGPON_ONU_ONU_ENABLE_COMPLETED_ID__BEGIN                                         = 0,
+    BCMOLT_XGPON_ONU_ONU_ENABLE_COMPLETED_ID_SERIAL_NUMBER                                  = 0,    /**< serial number. */
+    BCMOLT_XGPON_ONU_ONU_ENABLE_COMPLETED_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_onu_enable_completed_id;
+
+/** Identifiers for all properties contained in the 
+ * xgpon_onu_onu_tuning_in_completed group. 
+ */
+typedef enum bcmolt_xgpon_onu_onu_tuning_in_completed_id
+{
+    BCMOLT_XGPON_ONU_ONU_TUNING_IN_COMPLETED_ID__BEGIN                                      = 0,
+    BCMOLT_XGPON_ONU_ONU_TUNING_IN_COMPLETED_ID_RESULT                                      = 0,    /**< result. */
+    BCMOLT_XGPON_ONU_ONU_TUNING_IN_COMPLETED_ID_FAIL_REASON                                 = 1,    /**< fail reason. */
+    BCMOLT_XGPON_ONU_ONU_TUNING_IN_COMPLETED_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_onu_tuning_in_completed_id;
+
+/** Identifiers for all properties contained in the xgpon_onu_onu_tuning_in 
+ * group. 
+ */
+typedef enum bcmolt_xgpon_onu_onu_tuning_in_id
+{
+    BCMOLT_XGPON_ONU_ONU_TUNING_IN_ID__NUM_OF           /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_onu_tuning_in_id;
+
+/** Identifiers for all properties contained in the 
+ * xgpon_onu_onu_tuning_out_completed group. 
+ */
+typedef enum bcmolt_xgpon_onu_onu_tuning_out_completed_id
+{
+    BCMOLT_XGPON_ONU_ONU_TUNING_OUT_COMPLETED_ID__BEGIN                                     = 0,
+    BCMOLT_XGPON_ONU_ONU_TUNING_OUT_COMPLETED_ID_RESULT                                     = 0,    /**< result. */
+    BCMOLT_XGPON_ONU_ONU_TUNING_OUT_COMPLETED_ID_FAIL_REASON                                = 1,    /**< fail reason. */
+    BCMOLT_XGPON_ONU_ONU_TUNING_OUT_COMPLETED_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_onu_tuning_out_completed_id;
+
+/** Identifiers for all properties contained in the xgpon_onu_onu_tuning_out 
+ * group. 
+ */
+typedef enum bcmolt_xgpon_onu_onu_tuning_out_id
+{
+    BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID__BEGIN                                               = 0,
+    BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID_TARGET_DS_PON_ID                                     = 0,    /**< target ds pon id. */
+    BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID_TARGET_US_PON_ID                                     = 1,    /**< target us pon id. */
+    BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID_TIME_TO_SWITCH                                       = 2,    /**< time to switch. */
+    BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID_ROLLBACK                                             = 3,    /**< rollback. */
+    BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID_STATUS                                               = 4,    /**< status. */
+    BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID__NUM_OF      /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_onu_tuning_out_id;
+
+/** Identifiers for all properties contained in the xgpon_onu_optical_reflection 
+ * group. 
+ */
+typedef enum bcmolt_xgpon_onu_optical_reflection_id
+{
+    BCMOLT_XGPON_ONU_OPTICAL_REFLECTION_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_optical_reflection_id;
+
+/** Identifiers for all properties contained in the xgpon_onu_ploam_packet 
+ * group. 
+ */
+typedef enum bcmolt_xgpon_onu_ploam_packet_id
+{
+    BCMOLT_XGPON_ONU_PLOAM_PACKET_ID__BEGIN                                                 = 0,
+    BCMOLT_XGPON_ONU_PLOAM_PACKET_ID_DEFAULT_KEY                                            = 0,    /**< default key. */
+    BCMOLT_XGPON_ONU_PLOAM_PACKET_ID_PLOAM                                                  = 1,    /**< ploam. */
+    BCMOLT_XGPON_ONU_PLOAM_PACKET_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_ploam_packet_id;
+
+/** Identifiers for all properties contained in the xgpon_onu_possible_drift 
+ * group. 
+ */
+typedef enum bcmolt_xgpon_onu_possible_drift_id
+{
+    BCMOLT_XGPON_ONU_POSSIBLE_DRIFT_ID__BEGIN                                               = 0,
+    BCMOLT_XGPON_ONU_POSSIBLE_DRIFT_ID_ALARM_STATUS                                         = 0,    /**< Alarm Status. */
+    BCMOLT_XGPON_ONU_POSSIBLE_DRIFT_ID_ESTIMATED_DRIFT                                      = 1,    /**< Estimated Drift. */
+    BCMOLT_XGPON_ONU_POSSIBLE_DRIFT_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_possible_drift_id;
+
+/** Identifiers for all properties contained in the 
+ * xgpon_onu_power_consumption_report group. 
+ */
+typedef enum bcmolt_xgpon_onu_power_consumption_report_id
+{
+    BCMOLT_XGPON_ONU_POWER_CONSUMPTION_REPORT_ID__BEGIN                                     = 0,
+    BCMOLT_XGPON_ONU_POWER_CONSUMPTION_REPORT_ID_POWER_CONSUMPTION_REPORT                   = 0,    /**< power consumption report. */
+    BCMOLT_XGPON_ONU_POWER_CONSUMPTION_REPORT_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_power_consumption_report_id;
+
+/** Identifiers for all properties contained in the xgpon_onu_power_level_report 
+ * group. 
+ */
+typedef enum bcmolt_xgpon_onu_power_level_report_id
+{
+    BCMOLT_XGPON_ONU_POWER_LEVEL_REPORT_ID__BEGIN                                           = 0,
+    BCMOLT_XGPON_ONU_POWER_LEVEL_REPORT_ID_ATTENUATION                                      = 0,    /**< Attenuation. */
+    BCMOLT_XGPON_ONU_POWER_LEVEL_REPORT_ID_POWER_LEVELLING_CAPABILITY                       = 1,    /**< Power levelling capability. */
+    BCMOLT_XGPON_ONU_POWER_LEVEL_REPORT_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_power_level_report_id;
+
+/** Identifiers for all properties contained in the 
+ * xgpon_onu_power_management_state_change group. 
+ */
+typedef enum bcmolt_xgpon_onu_power_management_state_change_id
+{
+    BCMOLT_XGPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID__BEGIN                                = 0,
+    BCMOLT_XGPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_OLD_STATE                             = 0,    /**< Old State. */
+    BCMOLT_XGPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_NEW_STATE                             = 1,    /**< New State. */
+    BCMOLT_XGPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_REASON                                = 2,    /**< Reason. */
+    BCMOLT_XGPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_power_management_state_change_id;
+
+/** Identifiers for all properties contained in the xgpon_onu_pqsi group. 
+ */
+typedef enum bcmolt_xgpon_onu_pqsi_id
+{
+    BCMOLT_XGPON_ONU_PQSI_ID__BEGIN                                                         = 0,
+    BCMOLT_XGPON_ONU_PQSI_ID_ALARM_STATUS                                                   = 0,    /**< alarm status. */
+    BCMOLT_XGPON_ONU_PQSI_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_pqsi_id;
+
+/** Identifiers for all properties contained in the xgpon_onu_ranging_completed 
+ * group. 
+ */
+typedef enum bcmolt_xgpon_onu_ranging_completed_id
+{
+    BCMOLT_XGPON_ONU_RANGING_COMPLETED_ID__BEGIN                                            = 0,
+    BCMOLT_XGPON_ONU_RANGING_COMPLETED_ID_STATUS                                            = 0,    /**< status. */
+    BCMOLT_XGPON_ONU_RANGING_COMPLETED_ID_FAIL_REASON                                       = 1,    /**< fail reason. */
+    BCMOLT_XGPON_ONU_RANGING_COMPLETED_ID_EQD                                               = 2,    /**< EQD. */
+    BCMOLT_XGPON_ONU_RANGING_COMPLETED_ID_NUMBER_OF_PLOAMS                                  = 3,    /**< number of ploams. */
+    BCMOLT_XGPON_ONU_RANGING_COMPLETED_ID_POWER_LEVEL                                       = 4,    /**< power level. */
+    BCMOLT_XGPON_ONU_RANGING_COMPLETED_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_ranging_completed_id;
+
+/** Identifiers for all properties contained in the xgpon_onu_registration_id 
+ * group. 
+ */
+typedef enum bcmolt_xgpon_onu_registration_id_id
+{
+    BCMOLT_XGPON_ONU_REGISTRATION_ID_ID__BEGIN                                              = 0,
+    BCMOLT_XGPON_ONU_REGISTRATION_ID_ID_REGISTRATION_ID                                     = 0,    /**< Registration ID. */
+    BCMOLT_XGPON_ONU_REGISTRATION_ID_ID_REQUEST_REGISTRATION_STATUS                         = 1,    /**< request registration status. */
+    BCMOLT_XGPON_ONU_REGISTRATION_ID_ID_REQUEST_REGISTRATION_FAIL_REASON                    = 2,    /**< request registration fail reason. */
+    BCMOLT_XGPON_ONU_REGISTRATION_ID_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_registration_id_id;
+
+/** Identifiers for all properties contained in the 
+ * xgpon_onu_request_registration group. 
+ */
+typedef enum bcmolt_xgpon_onu_request_registration_id
+{
+    BCMOLT_XGPON_ONU_REQUEST_REGISTRATION_ID__BEGIN                                         = 0,
+    BCMOLT_XGPON_ONU_REQUEST_REGISTRATION_ID_SMA_FLAG                                       = 0,    /**< SMA flag. */
+    BCMOLT_XGPON_ONU_REQUEST_REGISTRATION_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_request_registration_id;
+
+/** Identifiers for all properties contained in the 
+ * xgpon_onu_rssi_measurement_completed group. 
+ */
+typedef enum bcmolt_xgpon_onu_rssi_measurement_completed_id
+{
+    BCMOLT_XGPON_ONU_RSSI_MEASUREMENT_COMPLETED_ID__BEGIN                                   = 0,
+    BCMOLT_XGPON_ONU_RSSI_MEASUREMENT_COMPLETED_ID_STATUS                                   = 0,    /**< status. */
+    BCMOLT_XGPON_ONU_RSSI_MEASUREMENT_COMPLETED_ID_FAIL_REASON                              = 1,    /**< fail reason. */
+    BCMOLT_XGPON_ONU_RSSI_MEASUREMENT_COMPLETED_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_rssi_measurement_completed_id;
+
+/** Identifiers for all properties contained in the xgpon_onu_rssi_measurement 
+ * group. 
+ */
+typedef enum bcmolt_xgpon_onu_rssi_measurement_id
+{
+    BCMOLT_XGPON_ONU_RSSI_MEASUREMENT_ID__NUM_OF            /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_rssi_measurement_id;
+
+/** Identifiers for all properties contained in the xgpon_onu_sdi group. 
+ */
+typedef enum bcmolt_xgpon_onu_sdi_id
+{
+    BCMOLT_XGPON_ONU_SDI_ID__BEGIN                                                          = 0,
+    BCMOLT_XGPON_ONU_SDI_ID_ALARM_STATUS                                                    = 0,    /**< alarm status. */
+    BCMOLT_XGPON_ONU_SDI_ID_BER                                                             = 1,    /**< BER. */
+    BCMOLT_XGPON_ONU_SDI_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_sdi_id;
+
+/** Identifiers for all properties contained in the 
+ * xgpon_onu_secure_mutual_authentication_failure group. 
+ */
+typedef enum bcmolt_xgpon_onu_secure_mutual_authentication_failure_id
+{
+    BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_FAILURE_ID__BEGIN                         = 0,
+    BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_FAILURE_ID_STATUS                         = 0,    /**< status. */
+    BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_FAILURE_ID_FAIL_REASON                    = 1,    /**< secure mutual authentication fail reason. */
+    BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_FAILURE_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_secure_mutual_authentication_failure_id;
+
+/** Identifiers for all properties contained in the 
+ * xgpon_onu_secure_mutual_authentication group. 
+ */
+typedef enum bcmolt_xgpon_onu_secure_mutual_authentication_id
+{
+    BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_ID__BEGIN                                 = 0,
+    BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_ID_MASTER_KEY                             = 0,    /**< master key. */
+    BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_ID_BUFFER                                 = 1,    /**< OMCI data buffer. */
+    BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_ID_MIC                                    = 2,    /**< mic. */
+    BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_secure_mutual_authentication_id;
+
+/** Identifiers for all properties contained in the xgpon_onu_set_onu_state 
+ * group. 
+ */
+typedef enum bcmolt_xgpon_onu_set_onu_state_id
+{
+    BCMOLT_XGPON_ONU_SET_ONU_STATE_ID__BEGIN                                                = 0,
+    BCMOLT_XGPON_ONU_SET_ONU_STATE_ID_ONU_STATE                                             = 0,    /**< ONU state. */
+    BCMOLT_XGPON_ONU_SET_ONU_STATE_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_set_onu_state_id;
+
+/** Identifiers for all properties contained in the xgpon_onu_sfi group. 
+ */
+typedef enum bcmolt_xgpon_onu_sfi_id
+{
+    BCMOLT_XGPON_ONU_SFI_ID__BEGIN                                                          = 0,
+    BCMOLT_XGPON_ONU_SFI_ID_ALARM_STATUS                                                    = 0,    /**< alarm status. */
+    BCMOLT_XGPON_ONU_SFI_ID_BER                                                             = 1,    /**< BER. */
+    BCMOLT_XGPON_ONU_SFI_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_sfi_id;
+
+/** Identifiers for all properties contained in the xgpon_onu_stat_alarm_cleared 
+ * group. 
+ */
+typedef enum bcmolt_xgpon_onu_stat_alarm_cleared_id
+{
+    BCMOLT_XGPON_ONU_STAT_ALARM_CLEARED_ID__BEGIN                                           = 0,
+    BCMOLT_XGPON_ONU_STAT_ALARM_CLEARED_ID_STAT                                             = 0,    /**< Statistic ID. */
+    BCMOLT_XGPON_ONU_STAT_ALARM_CLEARED_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_stat_alarm_cleared_id;
+
+/** Identifiers for all properties contained in the xgpon_onu_stat_alarm_raised 
+ * group. 
+ */
+typedef enum bcmolt_xgpon_onu_stat_alarm_raised_id
+{
+    BCMOLT_XGPON_ONU_STAT_ALARM_RAISED_ID__BEGIN                                            = 0,
+    BCMOLT_XGPON_ONU_STAT_ALARM_RAISED_ID_STAT                                              = 0,    /**< Statistic ID. */
+    BCMOLT_XGPON_ONU_STAT_ALARM_RAISED_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_stat_alarm_raised_id;
+
+/** Identifiers for all properties contained in the xgpon_onu_stat_cfg group. 
+ */
+typedef enum bcmolt_xgpon_onu_stat_cfg_id
+{
+    BCMOLT_XGPON_ONU_STAT_CFG_ID__BEGIN                                                     = 0,
+    BCMOLT_XGPON_ONU_STAT_CFG_ID_CFG                                                        = 0,    /**< Configuration. */
+    BCMOLT_XGPON_ONU_STAT_CFG_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_stat_cfg_id;
+
+/** Identifiers for all properties contained in the xgpon_onu_stat group. 
+ */
+typedef enum bcmolt_xgpon_onu_stat_id
+{
+    BCMOLT_XGPON_ONU_STAT_ID__BEGIN                                                         = 0,
+    BCMOLT_XGPON_ONU_STAT_ID_POSITIVE_DRIFT                                                 = 0,    /**< positive drift. */
+    BCMOLT_XGPON_ONU_STAT_ID_NEGATIVE_DRIFT                                                 = 1,    /**< negative drift. */
+    BCMOLT_XGPON_ONU_STAT_ID_DELIMITER_MISS_DETECTION                                       = 2,    /**< delimiter miss detection. */
+    BCMOLT_XGPON_ONU_STAT_ID_BIP32_ERRORS                                                   = 3,    /**< bip32 errors. */
+    BCMOLT_XGPON_ONU_STAT_ID_RX_WORDS                                                       = 4,    /**< received words. */
+    BCMOLT_XGPON_ONU_STAT_ID_FEC_CORRECTED_SYMBOLS                                          = 5,    /**< fec corrected symbols. */
+    BCMOLT_XGPON_ONU_STAT_ID_FEC_CORRECTED_CODEWORDS                                        = 6,    /**< fec corrected codewords. */
+    BCMOLT_XGPON_ONU_STAT_ID_FEC_UNCORRECTABLE_CODEWORDS                                    = 7,    /**< fec uncorrectable codewords. */
+    BCMOLT_XGPON_ONU_STAT_ID_FEC_CODEWORDS                                                  = 8,    /**< fec total codewords. */
+    BCMOLT_XGPON_ONU_STAT_ID_FEC_CORRECTED_BITS                                             = 9,    /**< fec corrected bits. */
+    BCMOLT_XGPON_ONU_STAT_ID_XGEM_KEY_ERRORS                                                = 10,   /**< xgem key error. */
+    BCMOLT_XGPON_ONU_STAT_ID_XGEM_LOSS                                                      = 11,   /**< xgem loss . */
+    BCMOLT_XGPON_ONU_STAT_ID_RX_PLOAMS_MIC_ERROR                                            = 12,   /**< mic error ploam. */
+    BCMOLT_XGPON_ONU_STAT_ID_RX_PLOAMS_NON_IDLE                                             = 13,   /**< non idle ploam. */
+    BCMOLT_XGPON_ONU_STAT_ID_RX_OMCI                                                        = 14,   /**< Received OMCI packets. */
+    BCMOLT_XGPON_ONU_STAT_ID_RX_OMCI_PACKETS_CRC_ERROR                                      = 15,   /**< Received OMCI packets with CRC errors. */
+    BCMOLT_XGPON_ONU_STAT_ID_RX_BYTES                                                       = 16,   /**< rx bytes. */
+    BCMOLT_XGPON_ONU_STAT_ID_RX_PACKETS                                                     = 17,   /**< rx packets. */
+    BCMOLT_XGPON_ONU_STAT_ID_TX_BYTES                                                       = 18,   /**< tx bytes. */
+    BCMOLT_XGPON_ONU_STAT_ID_TX_PACKETS                                                     = 19,   /**< tx packets. */
+    BCMOLT_XGPON_ONU_STAT_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_stat_id;
+
+/** Identifiers for all properties contained in the xgpon_onu_sufi group. 
+ */
+typedef enum bcmolt_xgpon_onu_sufi_id
+{
+    BCMOLT_XGPON_ONU_SUFI_ID__BEGIN                                                         = 0,
+    BCMOLT_XGPON_ONU_SUFI_ID_ALARM_STATUS                                                   = 0,    /**< alarm status. */
+    BCMOLT_XGPON_ONU_SUFI_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_sufi_id;
+
+/** Identifiers for all properties contained in the xgpon_onu_tiwi group. 
+ */
+typedef enum bcmolt_xgpon_onu_tiwi_id
+{
+    BCMOLT_XGPON_ONU_TIWI_ID__BEGIN                                                         = 0,
+    BCMOLT_XGPON_ONU_TIWI_ID_ALARM_STATUS                                                   = 0,    /**< Alarm status. */
+    BCMOLT_XGPON_ONU_TIWI_ID_DRIFT_VALUE                                                    = 1,    /**< Drift value. */
+    BCMOLT_XGPON_ONU_TIWI_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_tiwi_id;
+
+/** Identifiers for all properties contained in the xgpon_onu_tuning_response 
+ * group. 
+ */
+typedef enum bcmolt_xgpon_onu_tuning_response_id
+{
+    BCMOLT_XGPON_ONU_TUNING_RESPONSE_ID__BEGIN                                              = 0,
+    BCMOLT_XGPON_ONU_TUNING_RESPONSE_ID_ACK                                                 = 0,    /**< ack. */
+    BCMOLT_XGPON_ONU_TUNING_RESPONSE_ID_RESULT                                              = 1,    /**< result. */
+    BCMOLT_XGPON_ONU_TUNING_RESPONSE_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_tuning_response_id;
+
+/** Identifiers for all properties contained in the xgpon_trx_cfg group. 
+ */
+typedef enum bcmolt_xgpon_trx_cfg_id
+{
+    BCMOLT_XGPON_TRX_CFG_ID__BEGIN                                                          = 0,
+    BCMOLT_XGPON_TRX_CFG_ID_BURST_PROFILE                                                   = 0,    /**< burst profile. */
+    BCMOLT_XGPON_TRX_CFG_ID_TRANSCEIVER_CONFIG                                              = 1,    /**< transceiver config. */
+    BCMOLT_XGPON_TRX_CFG_ID_TRANSCEIVER_TYPE                                                = 2,    /**< trx type. */
+    BCMOLT_XGPON_TRX_CFG_ID_DEBUG                                                           = 3,    /**< debug. */
+    BCMOLT_XGPON_TRX_CFG_ID_RSSI_NORMAL_CONFIG                                              = 4,    /**< rssi normal config. */
+    BCMOLT_XGPON_TRX_CFG_ID_RSSI_RANGING_CONFIG                                             = 5,    /**< rssi ranging config. */
+    BCMOLT_XGPON_TRX_CFG_ID_SERDES_CONFIGURATION                                            = 6,    /**< serdes configuration. */
+    BCMOLT_XGPON_TRX_CFG_ID_BURST_PROFILE_DELIMITER_MAX_ERRORS                              = 7,    /**< burst profile delimiter max errors. */
+    BCMOLT_XGPON_TRX_CFG_ID_RANGING_SM_PATTERNS_AT_INIT                                     = 8,    /**< ranging sm patterns at init. */
+    BCMOLT_XGPON_TRX_CFG_ID_RANGING_SM_PATTERNS_ED_FAILURE                                  = 9,    /**< ranging sm patterns ED failure. */
+    BCMOLT_XGPON_TRX_CFG_ID_RESET_ON_DEL_MISS                                               = 10,   /**< reset on del miss. */
+    BCMOLT_XGPON_TRX_CFG_ID_ED_STATE                                                        = 11,   /**< ed state. */
+    BCMOLT_XGPON_TRX_CFG_ID_INVERT_ED                                                       = 12,   /**< invert ED. */
+    BCMOLT_XGPON_TRX_CFG_ID_END_OF_BURST_RESET                                              = 13,   /**< end of burst reset. */
+    BCMOLT_XGPON_TRX_CFG_ID_TRX_RST_POLARITY                                                = 14,   /**< TRX reset polarity. */
+    BCMOLT_XGPON_TRX_CFG_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_trx_cfg_id;
+
+/** Identifiers for all properties contained in the xgpon_trx_key group. 
+ */
+typedef enum bcmolt_xgpon_trx_key_id
+{
+    BCMOLT_XGPON_TRX_KEY_ID__BEGIN                                                          = 0,
+    BCMOLT_XGPON_TRX_KEY_ID_PON_NI                                                          = 0,    /**< PON network interface. */
+    BCMOLT_XGPON_TRX_KEY_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_trx_key_id;
+
+/** Identifiers for all properties contained in the xpon_serdes_cfg group. 
+ */
+typedef enum bcmolt_xpon_serdes_cfg_id
+{
+    BCMOLT_XPON_SERDES_CFG_ID__BEGIN                                                        = 0,
+    BCMOLT_XPON_SERDES_CFG_ID_RX_VGA                                                        = 0,    /**< Rx Vga. */
+    BCMOLT_XPON_SERDES_CFG_ID_RX_PF                                                         = 1,    /**< Rx PF. */
+    BCMOLT_XPON_SERDES_CFG_ID_RX_LFPF                                                       = 2,    /**< Rx LFPF. */
+    BCMOLT_XPON_SERDES_CFG_ID_RX_DFE1                                                       = 3,    /**< Rx DFE1. */
+    BCMOLT_XPON_SERDES_CFG_ID_RX_DFE2                                                       = 4,    /**< Rx DFE2. */
+    BCMOLT_XPON_SERDES_CFG_ID_RX_DFE3                                                       = 5,    /**< Rx DFE3. */
+    BCMOLT_XPON_SERDES_CFG_ID_RX_DFE4                                                       = 6,    /**< Rx DFE4. */
+    BCMOLT_XPON_SERDES_CFG_ID_RX_DFE5                                                       = 7,    /**< Rx DFE5. */
+    BCMOLT_XPON_SERDES_CFG_ID_TX_PRE                                                        = 8,    /**< Tx Pre. */
+    BCMOLT_XPON_SERDES_CFG_ID_TX_MAIN                                                       = 9,    /**< Tx Main. */
+    BCMOLT_XPON_SERDES_CFG_ID_TX_POST1                                                      = 10,   /**< Tx Post1. */
+    BCMOLT_XPON_SERDES_CFG_ID_TX_POST2                                                      = 11,   /**< Tx Post2. */
+    BCMOLT_XPON_SERDES_CFG_ID_TX_POST3                                                      = 12,   /**< Tx Post3. */
+    BCMOLT_XPON_SERDES_CFG_ID_TX_AMP                                                        = 13,   /**< Tx Amp. */
+    BCMOLT_XPON_SERDES_CFG_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_xpon_serdes_cfg_id;
+
+/** Identifiers for all properties contained in the xpon_serdes_key group. 
+ */
+typedef enum bcmolt_xpon_serdes_key_id
+{
+    BCMOLT_XPON_SERDES_KEY_ID__BEGIN                                                        = 0,
+    BCMOLT_XPON_SERDES_KEY_ID_PON_NI                                                        = 0,    /**< PON NI. */
+    BCMOLT_XPON_SERDES_KEY_ID_INSTANCE                                                      = 1,    /**< Instance. */
+    BCMOLT_XPON_SERDES_KEY_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_xpon_serdes_key_id;
+
+/** All object tags for all objects in the system. 
+ */
+typedef enum bcmolt_obj_tag
+{
+    BCMOLT_OBJ_TAG__BEGIN,
+    BCMOLT_OBJ_TAG_EPON                                                                     = 0,
+    BCMOLT_OBJ_TAG_AE,
+    BCMOLT_OBJ_TAG_GPON,
+    BCMOLT_OBJ_TAG_XGPON,
+    BCMOLT_OBJ_TAG__NUM_OF              /**< Number of enum entries, not an entry itself. */
+} bcmolt_obj_tag;
+
+/* The following config modes are enabled for this build */
+#define BCMOLT_CONFIG_MODE_EPON 1
+
+/* The following config modes are enabled for this build */
+#define BCMOLT_CONFIG_MODE_AE   1
+
+/* The following config modes are enabled for this build */
+#define BCMOLT_CONFIG_MODE_GPON 1
+
+/* The following config modes are enabled for this build */
+#define BCMOLT_CONFIG_MODE_XGPON    1
+
+/** Identifiers for all objects in the system. 
+ */
+typedef enum bcmolt_obj_id
+{
+    BCMOLT_OBJ_ID__BEGIN,
+    BCMOLT_OBJ_ID_AE_NI                                                                     = 0,    /**< AE NI (Active Ethernet Network Interface) */
+    BCMOLT_OBJ_ID_AE_PATH_DS                                                                = 1,    /**< AE path downstream */
+    BCMOLT_OBJ_ID_AE_PATH_US                                                                = 2,    /**< AE path upstream */
+    BCMOLT_OBJ_ID_CHANNEL                                                                   = 3,    /**< Channel */
+    BCMOLT_OBJ_ID_DEBUG                                                                     = 4,    /**< Debug */
+    BCMOLT_OBJ_ID_DEVICE                                                                    = 5,    /**< Device */
+    BCMOLT_OBJ_ID_EPON_DENIED_LINK                                                          = 6,    /**< EPON Denied Link */
+    BCMOLT_OBJ_ID_EPON_LINK                                                                 = 7,    /**< EPON link */
+    BCMOLT_OBJ_ID_EPON_NI                                                                   = 8,    /**< EPON NI (EPON Network Interface) */
+    BCMOLT_OBJ_ID_EPON_ONU_10G_US                                                           = 9,    /**< EPON ONU 10G US */
+    BCMOLT_OBJ_ID_EPON_ONU_1G_US                                                            = 10,   /**< EPON ONU 1G US */
+    BCMOLT_OBJ_ID_EPON_PATH_10G_DS                                                          = 11,   /**< EPON path 10G downstream */
+    BCMOLT_OBJ_ID_EPON_PATH_10G_US                                                          = 12,   /**< EPON path 10G upstream */
+    BCMOLT_OBJ_ID_EPON_PATH_1G_DS                                                           = 13,   /**< EPON path 1G downstream */
+    BCMOLT_OBJ_ID_EPON_PATH_1G_US                                                           = 14,   /**< EPON path 1G upstream */
+    BCMOLT_OBJ_ID_EPON_RP                                                                   = 15,   /**< EPON Reconciliation Path */
+    BCMOLT_OBJ_ID_GPIO                                                                      = 16,   /**< GPIO */
+    BCMOLT_OBJ_ID_GPON_ALLOC                                                                = 17,   /**< GPON Alloc */
+    BCMOLT_OBJ_ID_GPON_GEM_PORT                                                             = 18,   /**< GPON GEM Port */
+    BCMOLT_OBJ_ID_GPON_IWF                                                                  = 19,   /**< GPON IWF */
+    BCMOLT_OBJ_ID_GPON_IWF_DS_EGRESS_FLOW                                                   = 20,   /**< GPON IWF DS egress flow */
+    BCMOLT_OBJ_ID_GPON_IWF_DS_INGRESS_FLOW                                                  = 21,   /**< GPON IWF DS ingress flow */
+    BCMOLT_OBJ_ID_GPON_IWF_MAC_TABLE                                                        = 22,   /**< GPON IWF MAC table */
+    BCMOLT_OBJ_ID_GPON_IWF_US_FLOW                                                          = 23,   /**< GPON IWF US flow */
+    BCMOLT_OBJ_ID_GPON_NI                                                                   = 24,   /**< GPON network interface */
+    BCMOLT_OBJ_ID_GPON_ONU                                                                  = 25,   /**< GPON ONU */
+    BCMOLT_OBJ_ID_GPON_TRX                                                                  = 26,   /**< GPON TRX */
+    BCMOLT_OBJ_ID_LOG_ENTRY                                                                 = 27,   /**< log entry */
+    BCMOLT_OBJ_ID_LOGGER                                                                    = 28,   /**< logger */
+    BCMOLT_OBJ_ID_NNI                                                                       = 29,   /**< NNI */
+    BCMOLT_OBJ_ID_NNI_SERDES                                                                = 30,   /**< nni_serdes */
+    BCMOLT_OBJ_ID_SOFTWARE_ERROR                                                            = 31,   /**< Software Error */
+    BCMOLT_OBJ_ID_TRX_CALIBRATION                                                           = 32,   /**< TRX Calibration */
+    BCMOLT_OBJ_ID_XGPON_ALLOC                                                               = 33,   /**< XGPON Alloc */
+    BCMOLT_OBJ_ID_XGPON_GEM_PORT                                                            = 34,   /**< XGPON GEM port */
+    BCMOLT_OBJ_ID_XGPON_IWF                                                                 = 35,   /**< XGPON IWF */
+    BCMOLT_OBJ_ID_XGPON_NI                                                                  = 36,   /**< XGPON network interface */
+    BCMOLT_OBJ_ID_XGPON_ONU                                                                 = 37,   /**< XGPON ONU */
+    BCMOLT_OBJ_ID_XGPON_TRX                                                                 = 38,   /**< XGPON TRX */
+    BCMOLT_OBJ_ID_XPON_SERDES                                                               = 39,   /**< xpon_serdes */
+    BCMOLT_OBJ_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_obj_id;
+
+/** Identifiers for all possible groups under all objects in the system. 
+ */
+typedef enum bcmolt_group_id
+{
+    BCMOLT_GROUP_ID__BEGIN,
+    BCMOLT_GROUP_ID_AE_NI_KEY                                                               = 0,    /**< AE NI (Active Ethernet Network Interface) - key */
+    BCMOLT_GROUP_ID_AE_NI_CFG                                                               = 1,    /**< AE NI (Active Ethernet Network Interface) - cfg */
+    BCMOLT_GROUP_ID_AE_NI_SET_AE_NI_EN_STATE                                                = 2,    /**< AE NI (Active Ethernet Network Interface) - Set AE NI Enable State */
+    BCMOLT_GROUP_ID_AE_PATH_DS_KEY                                                          = 3,    /**< AE path downstream - key */
+    BCMOLT_GROUP_ID_AE_PATH_DS_STAT                                                         = 4,    /**< AE path downstream - stat */
+    BCMOLT_GROUP_ID_AE_PATH_DS_STAT_CFG_BYTES                                               = 5,    /**< AE path downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_AE_PATH_DS_STAT_CFG_FRAMES                                              = 6,    /**< AE path downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_AE_PATH_DS_STAT_CFG_FRAMES_64                                           = 7,    /**< AE path downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_AE_PATH_DS_STAT_CFG_FRAMES_65_127                                       = 8,    /**< AE path downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_AE_PATH_DS_STAT_CFG_FRAMES_128_255                                      = 9,    /**< AE path downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_AE_PATH_DS_STAT_CFG_FRAMES_256_511                                      = 10,   /**< AE path downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_AE_PATH_DS_STAT_CFG_FRAMES_512_1023                                     = 11,   /**< AE path downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_AE_PATH_DS_STAT_CFG_FRAMES_1024_1518                                    = 12,   /**< AE path downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_AE_PATH_DS_STAT_CFG_FRAMES_1519_2047                                    = 13,   /**< AE path downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_AE_PATH_DS_STAT_CFG_FRAMES_2048_4095                                    = 14,   /**< AE path downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_AE_PATH_DS_STAT_CFG_FRAMES_4096_9216                                    = 15,   /**< AE path downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_AE_PATH_DS_STAT_CFG_FRAMES_9217_16383                                   = 16,   /**< AE path downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_AE_PATH_DS_STAT_CFG_BROADCAST_FRAMES                                    = 17,   /**< AE path downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_AE_PATH_DS_STAT_CFG_DATA_BYTES                                          = 18,   /**< AE path downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_AE_PATH_DS_STAT_CFG_MULTICAST_FRAMES                                    = 19,   /**< AE path downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_AE_PATH_DS_STAT_CFG_UNICAST_FRAMES                                      = 20,   /**< AE path downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_AE_PATH_DS_STAT_CFG_ABORT_FRAMES                                        = 21,   /**< AE path downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_AE_PATH_DS_STAT_ALARM_CLEARED                                           = 22,   /**< AE path downstream - Stat Alarm Cleared */
+    BCMOLT_GROUP_ID_AE_PATH_DS_STAT_ALARM_RAISED                                            = 23,   /**< AE path downstream - Stat Alarm Raised */
+    BCMOLT_GROUP_ID_AE_PATH_DS_AUTO_CFG                                                     = 24,   /**< AE path downstream - Indication Configuration */
+    BCMOLT_GROUP_ID_AE_PATH_US_KEY                                                          = 25,   /**< AE path upstream - key */
+    BCMOLT_GROUP_ID_AE_PATH_US_STAT                                                         = 26,   /**< AE path upstream - stat */
+    BCMOLT_GROUP_ID_AE_PATH_US_STAT_CFG_BYTES                                               = 27,   /**< AE path upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_AE_PATH_US_STAT_CFG_FRAMES                                              = 28,   /**< AE path upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_AE_PATH_US_STAT_CFG_FRAMES_64                                           = 29,   /**< AE path upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_AE_PATH_US_STAT_CFG_FRAMES_65_127                                       = 30,   /**< AE path upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_AE_PATH_US_STAT_CFG_FRAMES_128_255                                      = 31,   /**< AE path upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_AE_PATH_US_STAT_CFG_FRAMES_256_511                                      = 32,   /**< AE path upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_AE_PATH_US_STAT_CFG_FRAMES_512_1023                                     = 33,   /**< AE path upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_AE_PATH_US_STAT_CFG_FRAMES_1024_1518                                    = 34,   /**< AE path upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_AE_PATH_US_STAT_CFG_FRAMES_1519_2047                                    = 35,   /**< AE path upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_AE_PATH_US_STAT_CFG_FRAMES_2048_4095                                    = 36,   /**< AE path upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_AE_PATH_US_STAT_CFG_FRAMES_4096_9216                                    = 37,   /**< AE path upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_AE_PATH_US_STAT_CFG_FRAMES_9217_16383                                   = 38,   /**< AE path upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_AE_PATH_US_STAT_CFG_BROADCAST_FRAMES                                    = 39,   /**< AE path upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_AE_PATH_US_STAT_CFG_DATA_BYTES                                          = 40,   /**< AE path upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_AE_PATH_US_STAT_CFG_MULTICAST_FRAMES                                    = 41,   /**< AE path upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_AE_PATH_US_STAT_CFG_UNICAST_FRAMES                                      = 42,   /**< AE path upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_AE_PATH_US_STAT_CFG_ABORT_FRAMES                                        = 43,   /**< AE path upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_AE_PATH_US_STAT_CFG_FCS_ERROR                                           = 44,   /**< AE path upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_AE_PATH_US_STAT_CFG_OVERSIZE_ERROR                                      = 45,   /**< AE path upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_AE_PATH_US_STAT_CFG_RUNT_ERROR                                          = 46,   /**< AE path upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_AE_PATH_US_STAT_ALARM_CLEARED                                           = 47,   /**< AE path upstream - Stat Alarm Cleared */
+    BCMOLT_GROUP_ID_AE_PATH_US_STAT_ALARM_RAISED                                            = 48,   /**< AE path upstream - Stat Alarm Raised */
+    BCMOLT_GROUP_ID_AE_PATH_US_AUTO_CFG                                                     = 49,   /**< AE path upstream - Indication Configuration */
+    BCMOLT_GROUP_ID_CHANNEL_KEY                                                             = 50,   /**< Channel - key */
+    BCMOLT_GROUP_ID_CHANNEL_CFG                                                             = 51,   /**< Channel - cfg */
+    BCMOLT_GROUP_ID_DEBUG_KEY                                                               = 52,   /**< Debug - key */
+    BCMOLT_GROUP_ID_DEBUG_CFG                                                               = 53,   /**< Debug - cfg */
+    BCMOLT_GROUP_ID_DEBUG_CLI_OUTPUT                                                        = 54,   /**< Debug - cli_output */
+    BCMOLT_GROUP_ID_DEBUG_FILE_ALMOST_FULL                                                  = 55,   /**< Debug - file_almost_full */
+    BCMOLT_GROUP_ID_DEBUG_AUTO_CFG                                                          = 56,   /**< Debug - Indication Configuration */
+    BCMOLT_GROUP_ID_DEBUG_CLI_INPUT                                                         = 57,   /**< Debug - CLI_input */
+    BCMOLT_GROUP_ID_DEBUG_RESET_API_CAPTURE                                                 = 58,   /**< Debug - Reset API Capture */
+    BCMOLT_GROUP_ID_DEBUG_START_API_CAPTURE                                                 = 59,   /**< Debug - Start API Capture */
+    BCMOLT_GROUP_ID_DEBUG_STOP_API_CAPTURE                                                  = 60,   /**< Debug - Stop API Capture */
+    BCMOLT_GROUP_ID_DEVICE_KEY                                                              = 61,   /**< Device - key */
+    BCMOLT_GROUP_ID_DEVICE_CFG                                                              = 62,   /**< Device - cfg */
+    BCMOLT_GROUP_ID_DEVICE_CONNECTION_COMPLETE                                              = 63,   /**< Device - Connection Complete */
+    BCMOLT_GROUP_ID_DEVICE_CONNECTION_ESTABLISHED                                           = 64,   /**< Device - Connection Established (Internal) */
+    BCMOLT_GROUP_ID_DEVICE_CONNECTION_FAILURE                                               = 65,   /**< Device - Connection Failure */
+    BCMOLT_GROUP_ID_DEVICE_DDR_TEST_COMPLETE                                                = 66,   /**< Device - DDR Test Complete */
+    BCMOLT_GROUP_ID_DEVICE_DEVICE_KEEP_ALIVE                                                = 67,   /**< Device - Device Keep Alive (Internal) */
+    BCMOLT_GROUP_ID_DEVICE_DEVICE_READY                                                     = 68,   /**< Device - Device Ready (Internal) */
+    BCMOLT_GROUP_ID_DEVICE_DISCONNECTION_COMPLETE                                           = 69,   /**< Device - Disconnection Complete */
+    BCMOLT_GROUP_ID_DEVICE_IMAGE_TRANSFER_COMPLETE                                          = 70,   /**< Device - Image Transfer Complete */
+    BCMOLT_GROUP_ID_DEVICE_INDICATIONS_DROPPED                                              = 71,   /**< Device - Indications Dropped */
+    BCMOLT_GROUP_ID_DEVICE_SW_ERROR                                                         = 72,   /**< Device - sw error */
+    BCMOLT_GROUP_ID_DEVICE_SW_EXCEPTION                                                     = 73,   /**< Device - sw exception */
+    BCMOLT_GROUP_ID_DEVICE_AUTO_CFG                                                         = 74,   /**< Device - Indication Configuration */
+    BCMOLT_GROUP_ID_DEVICE_CONNECT                                                          = 75,   /**< Device - Connect */
+    BCMOLT_GROUP_ID_DEVICE_DISCONNECT                                                       = 76,   /**< Device - Device Disconnect */
+    BCMOLT_GROUP_ID_DEVICE_HOST_KEEP_ALIVE                                                  = 77,   /**< Device - Host Keep Alive (Internal) */
+    BCMOLT_GROUP_ID_DEVICE_IMAGE_TRANSFER_DATA                                              = 78,   /**< Device - Image Data Transfer Operation (Internal) */
+    BCMOLT_GROUP_ID_DEVICE_IMAGE_TRANSFER_START                                             = 79,   /**< Device - Start Image Transfer Operation */
+    BCMOLT_GROUP_ID_DEVICE_RESET                                                            = 80,   /**< Device - Device Reset */
+    BCMOLT_GROUP_ID_DEVICE_RUN_DDR_TEST                                                     = 81,   /**< Device - Run DDR Test */
+    BCMOLT_GROUP_ID_DEVICE_SW_UPGRADE_ACTIVATE                                              = 82,   /**< Device - SW upgrade activate */
+    BCMOLT_GROUP_ID_EPON_DENIED_LINK_KEY                                                    = 83,   /**< EPON Denied Link - key */
+    BCMOLT_GROUP_ID_EPON_DENIED_LINK_CFG                                                    = 84,   /**< EPON Denied Link - cfg */
+    BCMOLT_GROUP_ID_EPON_DENIED_LINK_LASER_ON_OFF_VIOLATION                                 = 85,   /**< EPON Denied Link - Laser On/Off Violation */
+    BCMOLT_GROUP_ID_EPON_DENIED_LINK_LLID_POOL_EMPTY_VIOLATION                              = 86,   /**< EPON Denied Link - LLID Pool Empty Violation */
+    BCMOLT_GROUP_ID_EPON_DENIED_LINK_MAX_LINK_VIOLATION                                     = 87,   /**< EPON Denied Link - Max Link Violation */
+    BCMOLT_GROUP_ID_EPON_DENIED_LINK_OVERHEAD_PROFILE_VIOLATION                             = 88,   /**< EPON Denied Link - Overhead Profile Violation */
+    BCMOLT_GROUP_ID_EPON_DENIED_LINK_RANGE_VIOLATION                                        = 89,   /**< EPON Denied Link - Range Violation */
+    BCMOLT_GROUP_ID_EPON_DENIED_LINK_ROGUE_VIOLATION                                        = 90,   /**< EPON Denied Link - Rogue ONU Detected */
+    BCMOLT_GROUP_ID_EPON_DENIED_LINK_SYSTEM_RESOURCE_VIOLATION                              = 91,   /**< EPON Denied Link - System Resource Violation */
+    BCMOLT_GROUP_ID_EPON_DENIED_LINK_TDM_CHANNELS_EXHAUSTED                                 = 92,   /**< EPON Denied Link - TDM Channels Exhausted */
+    BCMOLT_GROUP_ID_EPON_DENIED_LINK_UNKNOWN_LINK_VIOLATION                                 = 93,   /**< EPON Denied Link - Unknown Link Violation */
+    BCMOLT_GROUP_ID_EPON_DENIED_LINK_UPSTREAM_BANDWIDTH_VIOLATION                           = 94,   /**< EPON Denied Link - Upstream Bandwidth Violation */
+    BCMOLT_GROUP_ID_EPON_DENIED_LINK_AUTO_CFG                                               = 95,   /**< EPON Denied Link - Indication Configuration */
+    BCMOLT_GROUP_ID_EPON_LINK_KEY                                                           = 96,   /**< EPON link - key */
+    BCMOLT_GROUP_ID_EPON_LINK_CFG                                                           = 97,   /**< EPON link - cfg */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT                                                          = 98,   /**< EPON link - stat */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_DATA_BYTES                                        = 99,   /**< EPON link - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_DATA_FRAMES                                       = 100,  /**< EPON link - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_FRAMES_64                                         = 101,  /**< EPON link - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_FRAMES_65_127                                     = 102,  /**< EPON link - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_FRAMES_128_255                                    = 103,  /**< EPON link - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_FRAMES_256_511                                    = 104,  /**< EPON link - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_FRAMES_512_1023                                   = 105,  /**< EPON link - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_FRAMES_1024_1518                                  = 106,  /**< EPON link - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_FRAMES_1519_2047                                  = 107,  /**< EPON link - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_FRAMES_2048_4095                                  = 108,  /**< EPON link - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_FRAMES_4096_9216                                  = 109,  /**< EPON link - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_FRAMES_9217_16383                                 = 110,  /**< EPON link - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_OAM_BYTES                                         = 111,  /**< EPON link - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_OAM_FRAMES                                        = 112,  /**< EPON link - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_MPCP_FRAMES                                       = 113,  /**< EPON link - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_BROADCAST_FRAMES                                  = 114,  /**< EPON link - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_UNICAST_FRAMES                                    = 115,  /**< EPON link - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_MULTICAST_FRAMES                                  = 116,  /**< EPON link - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_REPORT_FRAMES                                     = 117,  /**< EPON link - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_FCS_ERROR                                         = 118,  /**< EPON link - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_OVERSIZE_ERROR                                    = 119,  /**< EPON link - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_RUNT_ERROR                                        = 120,  /**< EPON link - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_LINE_CODE_ERROR                                   = 121,  /**< EPON link - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_LINE_CODE_ERROR_MAX                               = 122,  /**< EPON link - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_TX_DATA_BYTES                                        = 123,  /**< EPON link - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_TX_DATA_FRAMES                                       = 124,  /**< EPON link - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_TX_FRAMES_64                                         = 125,  /**< EPON link - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_TX_FRAMES_65_127                                     = 126,  /**< EPON link - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_TX_FRAMES_128_255                                    = 127,  /**< EPON link - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_TX_FRAMES_256_511                                    = 128,  /**< EPON link - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_TX_FRAMES_512_1023                                   = 129,  /**< EPON link - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_TX_FRAMES_1024_1518                                  = 130,  /**< EPON link - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_TX_FRAMES_1519_2047                                  = 131,  /**< EPON link - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_TX_FRAMES_2048_4095                                  = 132,  /**< EPON link - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_TX_FRAMES_4096_9216                                  = 133,  /**< EPON link - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_TX_FRAMES_9217_16383                                 = 134,  /**< EPON link - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_TX_OAM_BYTES                                         = 135,  /**< EPON link - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_TX_OAM_FRAMES                                        = 136,  /**< EPON link - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_TX_MPCP_FRAMES                                       = 137,  /**< EPON link - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_TX_BROADCAST_FRAMES                                  = 138,  /**< EPON link - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_TX_UNICAST_FRAMES                                    = 139,  /**< EPON link - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_TX_MULTICAST_FRAMES                                  = 140,  /**< EPON link - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_TX_GATES                                             = 141,  /**< EPON link - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_LINK_DUPLICATE_MPCP_REGISTRATION_REQUEST                           = 142,  /**< EPON link - Duplicate MPCP Registration Request */
+    BCMOLT_GROUP_ID_EPON_LINK_ENCRYPTION_ENABLED                                            = 143,  /**< EPON link - Encryption Enabled */
+    BCMOLT_GROUP_ID_EPON_LINK_KEY_EXCHANGE_FAILURE                                          = 144,  /**< EPON link - Key Exchange Failure */
+    BCMOLT_GROUP_ID_EPON_LINK_KEY_EXCHANGE_STARTED                                          = 145,  /**< EPON link - key_exchange_started */
+    BCMOLT_GROUP_ID_EPON_LINK_KEY_EXCHANGE_STOPPED                                          = 146,  /**< EPON link - key_exchange_stopped */
+    BCMOLT_GROUP_ID_EPON_LINK_LINK_DELETED                                                  = 147,  /**< EPON link - Link Deleted */
+    BCMOLT_GROUP_ID_EPON_LINK_LINK_SPEED_MISMATCH                                           = 148,  /**< EPON link - Link attempted to register at a different speed */
+    BCMOLT_GROUP_ID_EPON_LINK_MPCP_DEREGISTERED                                             = 149,  /**< EPON link - MPCP Deregistered */
+    BCMOLT_GROUP_ID_EPON_LINK_MPCP_DISCOVERED                                               = 150,  /**< EPON link - MPCP Discovered */
+    BCMOLT_GROUP_ID_EPON_LINK_MPCP_REG_ACK_TIMEOUT                                          = 151,  /**< EPON link - MPCP Reg Ack Timeout */
+    BCMOLT_GROUP_ID_EPON_LINK_MPCP_REPORT_TIMEOUT                                           = 152,  /**< EPON link - MPCP Report Timeout */
+    BCMOLT_GROUP_ID_EPON_LINK_OAM_KEEPALIVE_TIMEOUT                                         = 153,  /**< EPON link - OAM Keepalive Timeout */
+    BCMOLT_GROUP_ID_EPON_LINK_OAM_KEEPALIVE_TIMER_STARTED                                   = 154,  /**< EPON link - OAM keepalive timer started */
+    BCMOLT_GROUP_ID_EPON_LINK_OAM_KEEPALIVE_TIMER_STOPPED                                   = 155,  /**< EPON link - OAM keepalive timer stopped */
+    BCMOLT_GROUP_ID_EPON_LINK_PREPROVISIONED_LINK_CREATED                                   = 156,  /**< EPON link - Preprovisioned Link Created */
+    BCMOLT_GROUP_ID_EPON_LINK_PROTECTION_SWITCH_OCCURRED                                    = 157,  /**< EPON link - Protection Switch Occurred */
+    BCMOLT_GROUP_ID_EPON_LINK_RANGE_VALUE_CHANGED                                           = 158,  /**< EPON link - Range Value Changed */
+    BCMOLT_GROUP_ID_EPON_LINK_RERANGE_FAILURE                                               = 159,  /**< EPON link - Re-range failure */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT_ALARM_CLEARED                                            = 160,  /**< EPON link - Stat Alarm Cleared */
+    BCMOLT_GROUP_ID_EPON_LINK_STAT_ALARM_RAISED                                             = 161,  /**< EPON link - Stat Alarm Raised */
+    BCMOLT_GROUP_ID_EPON_LINK_STATIC_REGISTRATION_DONE                                      = 162,  /**< EPON link - Static registration done */
+    BCMOLT_GROUP_ID_EPON_LINK_AUTO_CFG                                                      = 163,  /**< EPON link - Indication Configuration */
+    BCMOLT_GROUP_ID_EPON_LINK_DELETE_LINK                                                   = 164,  /**< EPON link - Delete Link */
+    BCMOLT_GROUP_ID_EPON_LINK_FORCE_REDISCOVERY                                             = 165,  /**< EPON link - Force Link Rediscovery */
+    BCMOLT_GROUP_ID_EPON_LINK_KEY_EXCHANGE_START                                            = 166,  /**< EPON link - Key exchange start */
+    BCMOLT_GROUP_ID_EPON_LINK_KEY_EXCHANGE_STOP                                             = 167,  /**< EPON link - Key exchange stop */
+    BCMOLT_GROUP_ID_EPON_LINK_OAM_KEEPALIVE_TIMER_START                                     = 168,  /**< EPON link - OAM Keepalive Timer Start */
+    BCMOLT_GROUP_ID_EPON_LINK_OAM_KEEPALIVE_TIMER_STOP                                      = 169,  /**< EPON link - OAM Keepalive Timer Stop */
+    BCMOLT_GROUP_ID_EPON_LINK_STATIC_REGISTRATION                                           = 170,  /**< EPON link - static_registration */
+    BCMOLT_GROUP_ID_EPON_LINK_INJECT_FRAME                                                  = 171,  /**< EPON link - Inject Frame */
+    BCMOLT_GROUP_ID_EPON_LINK_FRAME_CAPTURED                                                = 172,  /**< EPON link - Frame Captured */
+    BCMOLT_GROUP_ID_EPON_NI_KEY                                                             = 173,  /**< EPON NI (EPON Network Interface) - key */
+    BCMOLT_GROUP_ID_EPON_NI_CFG                                                             = 174,  /**< EPON NI (EPON Network Interface) - cfg */
+    BCMOLT_GROUP_ID_EPON_NI_AUTO_ROGUE_SCAN_10G_FAILURE                                     = 175,  /**< EPON NI (EPON Network Interface) - 10G Epon Autonomous Rogue Scan failure detected */
+    BCMOLT_GROUP_ID_EPON_NI_AUTO_ROGUE_SCAN_1G_FAILURE                                      = 176,  /**< EPON NI (EPON Network Interface) - 1G Epon Autonomous Rogue Scan failure detected */
+    BCMOLT_GROUP_ID_EPON_NI_LLID_QUARANTINED                                                = 177,  /**< EPON NI (EPON Network Interface) - LLID Quarantined */
+    BCMOLT_GROUP_ID_EPON_NI_MPCP_TIMESTAMP_CHANGED                                          = 178,  /**< EPON NI (EPON Network Interface) - MPCP Timestamp Changed */
+    BCMOLT_GROUP_ID_EPON_NI_NO_REPORTS                                                      = 179,  /**< EPON NI (EPON Network Interface) - No Reports */
+    BCMOLT_GROUP_ID_EPON_NI_ONU_UPGRADE_COMPLETE                                            = 180,  /**< EPON NI (EPON Network Interface) - ONU Upgrade Complete */
+    BCMOLT_GROUP_ID_EPON_NI_RERANGE_FAILURE                                                 = 181,  /**< EPON NI (EPON Network Interface) - Re-range failure */
+    BCMOLT_GROUP_ID_EPON_NI_ROGUE_SCAN_COMPLETE                                             = 182,  /**< EPON NI (EPON Network Interface) - Rogue Scan is Complete */
+    BCMOLT_GROUP_ID_EPON_NI_RSSI_MEASUREMENT_COMPLETED                                      = 183,  /**< EPON NI (EPON Network Interface) - RSSI Measurement Completed */
+    BCMOLT_GROUP_ID_EPON_NI_STATE_CHANGE_COMPLETED                                          = 184,  /**< EPON NI (EPON Network Interface) - State Change Completed */
+    BCMOLT_GROUP_ID_EPON_NI_AUTO_CFG                                                        = 185,  /**< EPON NI (EPON Network Interface) - Indication Configuration */
+    BCMOLT_GROUP_ID_EPON_NI_ADD_LINK                                                        = 186,  /**< EPON NI (EPON Network Interface) - Add link */
+    BCMOLT_GROUP_ID_EPON_NI_ADD_MULTICAST_LINK                                              = 187,  /**< EPON NI (EPON Network Interface) - Add Mutlticastlink */
+    BCMOLT_GROUP_ID_EPON_NI_ADD_PROTECTED_STANDBY_LINK                                      = 188,  /**< EPON NI (EPON Network Interface) - Add Protected Standby Link */
+    BCMOLT_GROUP_ID_EPON_NI_ISSUE_RSSI_GRANT                                                = 189,  /**< EPON NI (EPON Network Interface) - Issue an Rx Power Measurement Request */
+    BCMOLT_GROUP_ID_EPON_NI_PROTECTION_SWITCHING_APPLY_RERANGE_DELTA                        = 190,  /**< EPON NI (EPON Network Interface) - Protection switching apply re-range delta */
+    BCMOLT_GROUP_ID_EPON_NI_ROGUE_LLID_SCAN                                                 = 191,  /**< EPON NI (EPON Network Interface) - Run Rogue LLID Scan */
+    BCMOLT_GROUP_ID_EPON_NI_SET_EPON_NI_EN_STATE                                            = 192,  /**< EPON NI (EPON Network Interface) - Set EPON NI Enable State */
+    BCMOLT_GROUP_ID_EPON_NI_START_ONU_UPGRADE                                               = 193,  /**< EPON NI (EPON Network Interface) - Start ONU Firmware Upgrade */
+    BCMOLT_GROUP_ID_EPON_ONU_10G_US_KEY                                                     = 194,  /**< EPON ONU 10G US - key */
+    BCMOLT_GROUP_ID_EPON_ONU_10G_US_CFG                                                     = 195,  /**< EPON ONU 10G US - cfg */
+    BCMOLT_GROUP_ID_EPON_ONU_10G_US_STAT                                                    = 196,  /**< EPON ONU 10G US - stat */
+    BCMOLT_GROUP_ID_EPON_ONU_10G_US_STAT_CFG_FEC_CODE_WORDS_TOTAL                           = 197,  /**< EPON ONU 10G US - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_ONU_10G_US_STAT_CFG_FEC_CODE_WORDS_DECODE_FAILS                    = 198,  /**< EPON ONU 10G US - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_ONU_10G_US_STAT_CFG_FEC_ZEROES_CORRECTED                           = 199,  /**< EPON ONU 10G US - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_ONU_10G_US_STAT_CFG_FEC_ONES_CORRECTED                             = 200,  /**< EPON ONU 10G US - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_ONU_10G_US_STAT_ALARM_CLEARED                                      = 201,  /**< EPON ONU 10G US - Stat Alarm Cleared */
+    BCMOLT_GROUP_ID_EPON_ONU_10G_US_STAT_ALARM_RAISED                                       = 202,  /**< EPON ONU 10G US - Stat Alarm Raised */
+    BCMOLT_GROUP_ID_EPON_ONU_10G_US_AUTO_CFG                                                = 203,  /**< EPON ONU 10G US - Indication Configuration */
+    BCMOLT_GROUP_ID_EPON_ONU_1G_US_KEY                                                      = 204,  /**< EPON ONU 1G US - key */
+    BCMOLT_GROUP_ID_EPON_ONU_1G_US_CFG                                                      = 205,  /**< EPON ONU 1G US - cfg */
+    BCMOLT_GROUP_ID_EPON_ONU_1G_US_STAT                                                     = 206,  /**< EPON ONU 1G US - stat */
+    BCMOLT_GROUP_ID_EPON_ONU_1G_US_STAT_CFG_GOOD_FRAMES                                     = 207,  /**< EPON ONU 1G US - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_ONU_1G_US_STAT_CFG_GOOD_BYTES                                      = 208,  /**< EPON ONU 1G US - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_ONU_1G_US_STAT_CFG_OVERSZ_FRAMES                                   = 209,  /**< EPON ONU 1G US - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_ONU_1G_US_STAT_CFG_NON_FEC_GOOD_FRAMES                             = 210,  /**< EPON ONU 1G US - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_ONU_1G_US_STAT_CFG_NON_FEC_GOOD_BYTES                              = 211,  /**< EPON ONU 1G US - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_ONU_1G_US_STAT_CFG_FEC_GOOD_FRAMES                                 = 212,  /**< EPON ONU 1G US - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_ONU_1G_US_STAT_CFG_FEC_GOOD_BYTES                                  = 213,  /**< EPON ONU 1G US - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_ONU_1G_US_STAT_CFG_FEC_FRAMES_EXC_ERRS                             = 214,  /**< EPON ONU 1G US - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_ONU_1G_US_STAT_CFG_FEC_BLKS_NO_ERRS                                = 215,  /**< EPON ONU 1G US - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_ONU_1G_US_STAT_CFG_FEC_BLKS_CORR_ERRS                              = 216,  /**< EPON ONU 1G US - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_ONU_1G_US_STAT_CFG_FEC_BLKS_UNCORR_ERRS                            = 217,  /**< EPON ONU 1G US - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_ONU_1G_US_STAT_CFG_FEC_CORR_BYTES                                  = 218,  /**< EPON ONU 1G US - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_ONU_1G_US_STAT_CFG_FEC_CORR_ZEROES                                 = 219,  /**< EPON ONU 1G US - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_ONU_1G_US_STAT_CFG_FEC_CORR_ONES                                   = 220,  /**< EPON ONU 1G US - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_ONU_1G_US_STAT_CFG_UNDERSZ_FRAMES                                  = 221,  /**< EPON ONU 1G US - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_ONU_1G_US_STAT_CFG_ERRORSZ_FRAMES                                  = 222,  /**< EPON ONU 1G US - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_ONU_1G_US_STAT_ALARM_CLEARED                                       = 223,  /**< EPON ONU 1G US - Stat Alarm Cleared */
+    BCMOLT_GROUP_ID_EPON_ONU_1G_US_STAT_ALARM_RAISED                                        = 224,  /**< EPON ONU 1G US - Stat Alarm Raised */
+    BCMOLT_GROUP_ID_EPON_ONU_1G_US_AUTO_CFG                                                 = 225,  /**< EPON ONU 1G US - Indication Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_DS_KEY                                                    = 226,  /**< EPON path 10G downstream - key */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_DS_CFG                                                    = 227,  /**< EPON path 10G downstream - cfg */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT                                                   = 228,  /**< EPON path 10G downstream - stat */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_CFG_BYTES                                         = 229,  /**< EPON path 10G downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_CFG_FRAMES                                        = 230,  /**< EPON path 10G downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_CFG_FRAMES_64                                     = 231,  /**< EPON path 10G downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_CFG_FRAMES_65_127                                 = 232,  /**< EPON path 10G downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_CFG_FRAMES_128_255                                = 233,  /**< EPON path 10G downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_CFG_FRAMES_256_511                                = 234,  /**< EPON path 10G downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_CFG_FRAMES_512_1023                               = 235,  /**< EPON path 10G downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_CFG_FRAMES_1024_1518                              = 236,  /**< EPON path 10G downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_CFG_FRAMES_1519_2047                              = 237,  /**< EPON path 10G downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_CFG_FRAMES_2048_4095                              = 238,  /**< EPON path 10G downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_CFG_FRAMES_4096_9216                              = 239,  /**< EPON path 10G downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_CFG_FRAMES_9217_16383                             = 240,  /**< EPON path 10G downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_CFG_BROADCAST_FRAMES                              = 241,  /**< EPON path 10G downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_CFG_DATA_BYTES                                    = 242,  /**< EPON path 10G downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_CFG_MULTICAST_FRAMES                              = 243,  /**< EPON path 10G downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_CFG_UNICAST_FRAMES                                = 244,  /**< EPON path 10G downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_CFG_OAM_BYTES                                     = 245,  /**< EPON path 10G downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_CFG_OAM_FRAMES                                    = 246,  /**< EPON path 10G downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_CFG_GATE_FRAMES                                   = 247,  /**< EPON path 10G downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_CFG_MPCP_FRAMES                                   = 248,  /**< EPON path 10G downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_CFG_ABORT_FRAMES                                  = 249,  /**< EPON path 10G downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_ALARM_CLEARED                                     = 250,  /**< EPON path 10G downstream - Stat Alarm Cleared */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_ALARM_RAISED                                      = 251,  /**< EPON path 10G downstream - Stat Alarm Raised */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_DS_AUTO_CFG                                               = 252,  /**< EPON path 10G downstream - Indication Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_US_KEY                                                    = 253,  /**< EPON path 10G upstream - key */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_US_CFG                                                    = 254,  /**< EPON path 10G upstream - cfg */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT                                                   = 255,  /**< EPON path 10G upstream - stat */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_BYTES                                         = 256,  /**< EPON path 10G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_FRAMES                                        = 257,  /**< EPON path 10G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_FRAMES_64                                     = 258,  /**< EPON path 10G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_FRAMES_65_127                                 = 259,  /**< EPON path 10G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_FRAMES_128_255                                = 260,  /**< EPON path 10G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_FRAMES_256_511                                = 261,  /**< EPON path 10G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_FRAMES_512_1023                               = 262,  /**< EPON path 10G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_FRAMES_1024_1518                              = 263,  /**< EPON path 10G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_FRAMES_1519_2047                              = 264,  /**< EPON path 10G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_FRAMES_2048_4095                              = 265,  /**< EPON path 10G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_FRAMES_4096_9216                              = 266,  /**< EPON path 10G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_FRAMES_9217_16383                             = 267,  /**< EPON path 10G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_BROADCAST_FRAMES                              = 268,  /**< EPON path 10G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_DATA_BYTES                                    = 269,  /**< EPON path 10G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_MULTICAST_FRAMES                              = 270,  /**< EPON path 10G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_UNICAST_FRAMES                                = 271,  /**< EPON path 10G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_MPCP_FRAMES                                   = 272,  /**< EPON path 10G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_OAM_BYTES                                     = 273,  /**< EPON path 10G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_OAM_FRAMES                                    = 274,  /**< EPON path 10G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_REPORT_FRAMES                                 = 275,  /**< EPON path 10G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_ABORT_FRAMES                                  = 276,  /**< EPON path 10G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_FCS_ERROR                                     = 277,  /**< EPON path 10G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_CRC_8_ERROR                                   = 278,  /**< EPON path 10G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_OUT_OF_SLOT                                   = 279,  /**< EPON path 10G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_OVERSIZE_ERROR                                = 280,  /**< EPON path 10G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_RUNT_ERROR                                    = 281,  /**< EPON path 10G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_ALARM_CLEARED                                     = 282,  /**< EPON path 10G upstream - Stat Alarm Cleared */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_ALARM_RAISED                                      = 283,  /**< EPON path 10G upstream - Stat Alarm Raised */
+    BCMOLT_GROUP_ID_EPON_PATH_10G_US_AUTO_CFG                                               = 284,  /**< EPON path 10G upstream - Indication Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_DS_KEY                                                     = 285,  /**< EPON path 1G downstream - key */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_DS_CFG                                                     = 286,  /**< EPON path 1G downstream - cfg */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT                                                    = 287,  /**< EPON path 1G downstream - stat */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_CFG_BYTES                                          = 288,  /**< EPON path 1G downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_CFG_FRAMES                                         = 289,  /**< EPON path 1G downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_CFG_FRAMES_64                                      = 290,  /**< EPON path 1G downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_CFG_FRAMES_65_127                                  = 291,  /**< EPON path 1G downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_CFG_FRAMES_128_255                                 = 292,  /**< EPON path 1G downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_CFG_FRAMES_256_511                                 = 293,  /**< EPON path 1G downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_CFG_FRAMES_512_1023                                = 294,  /**< EPON path 1G downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_CFG_FRAMES_1024_1518                               = 295,  /**< EPON path 1G downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_CFG_FRAMES_1519_2047                               = 296,  /**< EPON path 1G downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_CFG_FRAMES_2048_4095                               = 297,  /**< EPON path 1G downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_CFG_FRAMES_4096_9216                               = 298,  /**< EPON path 1G downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_CFG_FRAMES_9217_16383                              = 299,  /**< EPON path 1G downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_CFG_BROADCAST_FRAMES                               = 300,  /**< EPON path 1G downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_CFG_DATA_BYTES                                     = 301,  /**< EPON path 1G downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_CFG_MULTICAST_FRAMES                               = 302,  /**< EPON path 1G downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_CFG_UNICAST_FRAMES                                 = 303,  /**< EPON path 1G downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_CFG_OAM_BYTES                                      = 304,  /**< EPON path 1G downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_CFG_OAM_FRAMES                                     = 305,  /**< EPON path 1G downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_CFG_GATE_FRAMES                                    = 306,  /**< EPON path 1G downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_CFG_MPCP_FRAMES                                    = 307,  /**< EPON path 1G downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_CFG_ABORT_FRAMES                                   = 308,  /**< EPON path 1G downstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_ALARM_CLEARED                                      = 309,  /**< EPON path 1G downstream - Stat Alarm Cleared */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_ALARM_RAISED                                       = 310,  /**< EPON path 1G downstream - Stat Alarm Raised */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_DS_AUTO_CFG                                                = 311,  /**< EPON path 1G downstream - Indication Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_US_KEY                                                     = 312,  /**< EPON path 1G upstream - key */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_US_CFG                                                     = 313,  /**< EPON path 1G upstream - cfg */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT                                                    = 314,  /**< EPON path 1G upstream - stat */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_BYTES                                          = 315,  /**< EPON path 1G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_FRAMES                                         = 316,  /**< EPON path 1G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_FRAMES_64                                      = 317,  /**< EPON path 1G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_FRAMES_65_127                                  = 318,  /**< EPON path 1G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_FRAMES_128_255                                 = 319,  /**< EPON path 1G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_FRAMES_256_511                                 = 320,  /**< EPON path 1G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_FRAMES_512_1023                                = 321,  /**< EPON path 1G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_FRAMES_1024_1518                               = 322,  /**< EPON path 1G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_FRAMES_1519_2047                               = 323,  /**< EPON path 1G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_FRAMES_2048_4095                               = 324,  /**< EPON path 1G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_FRAMES_4096_9216                               = 325,  /**< EPON path 1G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_FRAMES_9217_16383                              = 326,  /**< EPON path 1G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_BROADCAST_FRAMES                               = 327,  /**< EPON path 1G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_DATA_BYTES                                     = 328,  /**< EPON path 1G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_MULTICAST_FRAMES                               = 329,  /**< EPON path 1G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_UNICAST_FRAMES                                 = 330,  /**< EPON path 1G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_MPCP_FRAMES                                    = 331,  /**< EPON path 1G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_OAM_BYTES                                      = 332,  /**< EPON path 1G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_OAM_FRAMES                                     = 333,  /**< EPON path 1G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_REPORT_FRAMES                                  = 334,  /**< EPON path 1G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_ABORT_FRAMES                                   = 335,  /**< EPON path 1G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_FCS_ERROR                                      = 336,  /**< EPON path 1G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_CRC_8_ERROR                                    = 337,  /**< EPON path 1G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_OUT_OF_SLOT                                    = 338,  /**< EPON path 1G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_OVERSIZE_ERROR                                 = 339,  /**< EPON path 1G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_RUNT_ERROR                                     = 340,  /**< EPON path 1G upstream - Statistic Configuration */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_ALARM_CLEARED                                      = 341,  /**< EPON path 1G upstream - Stat Alarm Cleared */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_ALARM_RAISED                                       = 342,  /**< EPON path 1G upstream - Stat Alarm Raised */
+    BCMOLT_GROUP_ID_EPON_PATH_1G_US_AUTO_CFG                                                = 343,  /**< EPON path 1G upstream - Indication Configuration */
+    BCMOLT_GROUP_ID_EPON_RP_KEY                                                             = 344,  /**< EPON Reconciliation Path - key */
+    BCMOLT_GROUP_ID_EPON_RP_CFG                                                             = 345,  /**< EPON Reconciliation Path - cfg */
+    BCMOLT_GROUP_ID_GPIO_KEY                                                                = 346,  /**< GPIO - key */
+    BCMOLT_GROUP_ID_GPIO_CFG                                                                = 347,  /**< GPIO - cfg */
+    BCMOLT_GROUP_ID_GPON_ALLOC_KEY                                                          = 348,  /**< GPON Alloc - key */
+    BCMOLT_GROUP_ID_GPON_ALLOC_CFG                                                          = 349,  /**< GPON Alloc - cfg */
+    BCMOLT_GROUP_ID_GPON_ALLOC_STAT                                                         = 350,  /**< GPON Alloc - stat */
+    BCMOLT_GROUP_ID_GPON_ALLOC_STAT_CFG_RX_BYTES                                            = 351,  /**< GPON Alloc - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_ALLOC_CONFIGURATION_COMPLETED                                      = 352,  /**< GPON Alloc - Configuration Completed */
+    BCMOLT_GROUP_ID_GPON_ALLOC_GET_ALLOC_STATS_COMPLETED                                    = 353,  /**< GPON Alloc - Get alloc ID statistics completed */
+    BCMOLT_GROUP_ID_GPON_ALLOC_STAT_ALARM_CLEARED                                           = 354,  /**< GPON Alloc - Stat Alarm Cleared */
+    BCMOLT_GROUP_ID_GPON_ALLOC_STAT_ALARM_RAISED                                            = 355,  /**< GPON Alloc - Stat Alarm Raised */
+    BCMOLT_GROUP_ID_GPON_ALLOC_AUTO_CFG                                                     = 356,  /**< GPON Alloc - Indication Configuration */
+    BCMOLT_GROUP_ID_GPON_ALLOC_GET_STATS                                                    = 357,  /**< GPON Alloc - Get statistics */
+    BCMOLT_GROUP_ID_GPON_ALLOC_SET_STATE                                                    = 358,  /**< GPON Alloc - Set state */
+    BCMOLT_GROUP_ID_GPON_GEM_PORT_KEY                                                       = 359,  /**< GPON GEM Port - key */
+    BCMOLT_GROUP_ID_GPON_GEM_PORT_CFG                                                       = 360,  /**< GPON GEM Port - cfg */
+    BCMOLT_GROUP_ID_GPON_GEM_PORT_STAT                                                      = 361,  /**< GPON GEM Port - stat */
+    BCMOLT_GROUP_ID_GPON_GEM_PORT_STAT_CFG_RX_PACKETS                                       = 362,  /**< GPON GEM Port - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_GEM_PORT_STAT_CFG_RX_BYTES                                         = 363,  /**< GPON GEM Port - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_GEM_PORT_STAT_CFG_TX_PACKETS                                       = 364,  /**< GPON GEM Port - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_GEM_PORT_STAT_CFG_TX_BYTES                                         = 365,  /**< GPON GEM Port - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_GEM_PORT_CONFIGURATION_COMPLETED                                   = 366,  /**< GPON GEM Port - Configuration Completed */
+    BCMOLT_GROUP_ID_GPON_GEM_PORT_STAT_ALARM_CLEARED                                        = 367,  /**< GPON GEM Port - Stat Alarm Cleared */
+    BCMOLT_GROUP_ID_GPON_GEM_PORT_STAT_ALARM_RAISED                                         = 368,  /**< GPON GEM Port - Stat Alarm Raised */
+    BCMOLT_GROUP_ID_GPON_GEM_PORT_AUTO_CFG                                                  = 369,  /**< GPON GEM Port - Indication Configuration */
+    BCMOLT_GROUP_ID_GPON_GEM_PORT_SET_STATE                                                 = 370,  /**< GPON GEM Port - Set state */
+    BCMOLT_GROUP_ID_GPON_IWF_KEY                                                            = 371,  /**< GPON IWF - key */
+    BCMOLT_GROUP_ID_GPON_IWF_CFG                                                            = 372,  /**< GPON IWF - cfg */
+    BCMOLT_GROUP_ID_GPON_IWF_STAT                                                           = 373,  /**< GPON IWF - stat */
+    BCMOLT_GROUP_ID_GPON_IWF_STAT_CFG_DS_HIT_EVENT                                          = 374,  /**< GPON IWF - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_IWF_STAT_CFG_DS_MISS_EVENT                                         = 375,  /**< GPON IWF - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_IWF_STAT_CFG_DS_DROP_DUE_TO_MISS_EVENT                             = 376,  /**< GPON IWF - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_IWF_STAT_CFG_DS_DROP_DUE_TO_HIT_EVENT                              = 377,  /**< GPON IWF - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_IWF_STAT_CFG_DS_DROP_TO_DISABLED_GEM                               = 378,  /**< GPON IWF - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_IWF_STAT_CFG_NEW_MAC_DISCOVERED                                    = 379,  /**< GPON IWF - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_IWF_STAT_CFG_MOVE_EVENT                                            = 380,  /**< GPON IWF - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_IWF_STAT_CFG_NEW_MAC_DROP_DUE_TO_FIFO_FULL                         = 381,  /**< GPON IWF - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_IWF_FLUSH_MAC_TABLE_COMPLETED                                      = 382,  /**< GPON IWF - Flush MAC Table Completed */
+    BCMOLT_GROUP_ID_GPON_IWF_SCAN_MAC_TABLE_COMPLETED                                       = 383,  /**< GPON IWF - Scan MAC Table Completed */
+    BCMOLT_GROUP_ID_GPON_IWF_STAT_ALARM_CLEARED                                             = 384,  /**< GPON IWF - Stat Alarm Cleared */
+    BCMOLT_GROUP_ID_GPON_IWF_STAT_ALARM_RAISED                                              = 385,  /**< GPON IWF - Stat Alarm Raised */
+    BCMOLT_GROUP_ID_GPON_IWF_AUTO_CFG                                                       = 386,  /**< GPON IWF - Indication Configuration */
+    BCMOLT_GROUP_ID_GPON_IWF_FLUSH_MAC_TABLE                                                = 387,  /**< GPON IWF - Flush MAC Table */
+    BCMOLT_GROUP_ID_GPON_IWF_SCAN_MAC_TABLE                                                 = 388,  /**< GPON IWF - Scan MAC Table */
+    BCMOLT_GROUP_ID_GPON_IWF_DS_EGRESS_FLOW_KEY                                             = 389,  /**< GPON IWF DS egress flow - key */
+    BCMOLT_GROUP_ID_GPON_IWF_DS_EGRESS_FLOW_CFG                                             = 390,  /**< GPON IWF DS egress flow - cfg */
+    BCMOLT_GROUP_ID_GPON_IWF_DS_INGRESS_FLOW_KEY                                            = 391,  /**< GPON IWF DS ingress flow - key */
+    BCMOLT_GROUP_ID_GPON_IWF_DS_INGRESS_FLOW_CFG                                            = 392,  /**< GPON IWF DS ingress flow - cfg */
+    BCMOLT_GROUP_ID_GPON_IWF_MAC_TABLE_KEY                                                  = 393,  /**< GPON IWF MAC table - key */
+    BCMOLT_GROUP_ID_GPON_IWF_MAC_TABLE_CFG                                                  = 394,  /**< GPON IWF MAC table - cfg */
+    BCMOLT_GROUP_ID_GPON_IWF_MAC_TABLE_MAC_AGED                                             = 395,  /**< GPON IWF MAC table - MAC Aged */
+    BCMOLT_GROUP_ID_GPON_IWF_MAC_TABLE_MAC_DROPPED                                          = 396,  /**< GPON IWF MAC table - MAC Dropped */
+    BCMOLT_GROUP_ID_GPON_IWF_MAC_TABLE_MAC_MOVE                                             = 397,  /**< GPON IWF MAC table - MAC Move */
+    BCMOLT_GROUP_ID_GPON_IWF_MAC_TABLE_NEW_MAC                                              = 398,  /**< GPON IWF MAC table - New MAC */
+    BCMOLT_GROUP_ID_GPON_IWF_MAC_TABLE_AUTO_CFG                                             = 399,  /**< GPON IWF MAC table - Indication Configuration */
+    BCMOLT_GROUP_ID_GPON_IWF_US_FLOW_KEY                                                    = 400,  /**< GPON IWF US flow - key */
+    BCMOLT_GROUP_ID_GPON_IWF_US_FLOW_CFG                                                    = 401,  /**< GPON IWF US flow - cfg */
+    BCMOLT_GROUP_ID_GPON_NI_KEY                                                             = 402,  /**< GPON network interface - key */
+    BCMOLT_GROUP_ID_GPON_NI_CFG                                                             = 403,  /**< GPON network interface - cfg */
+    BCMOLT_GROUP_ID_GPON_NI_STAT                                                            = 404,  /**< GPON network interface - stat */
+    BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_FEC_CODEWORDS                                          = 405,  /**< GPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_FEC_CODEWORDS_UNCORRECTED                              = 406,  /**< GPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_BIP8_BYTES                                             = 407,  /**< GPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_BIP8_ERRORS                                            = 408,  /**< GPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_RX_GEM_PACKETS                                         = 409,  /**< GPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_RX_GEM_DROPPED                                         = 410,  /**< GPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_RX_GEM_IDLE                                            = 411,  /**< GPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_RX_GEM_CORRECTED                                       = 412,  /**< GPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_RX_GEM_ILLEGAL                                         = 413,  /**< GPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_RX_ALLOCATIONS_VALID                                   = 414,  /**< GPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_RX_ALLOCATIONS_INVALID                                 = 415,  /**< GPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_RX_ALLOCATIONS_DISABLED                                = 416,  /**< GPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_RX_PLOAMS                                              = 417,  /**< GPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_RX_PLOAMS_NON_IDLE                                     = 418,  /**< GPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_RX_PLOAMS_ERROR                                        = 419,  /**< GPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_RX_PLOAMS_DROPPED                                      = 420,  /**< GPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_RX_CPU                                                 = 421,  /**< GPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_RX_OMCI                                                = 422,  /**< GPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_RX_OMCI_PACKETS_CRC_ERROR                              = 423,  /**< GPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_RX_DROPPED_TOO_SHORT                                   = 424,  /**< GPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_RX_DROPPED_TOO_LONG                                    = 425,  /**< GPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_RX_CRC_ERRORS                                          = 426,  /**< GPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_RX_KEY_ERRORS                                          = 427,  /**< GPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_RX_FRAGMENTS_ERRORS                                    = 428,  /**< GPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_RX_PACKETS_DROPPED                                     = 429,  /**< GPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_TX_GEM                                                 = 430,  /**< GPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_TX_PLOAMS                                              = 431,  /**< GPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_TX_GEM_FRAGMENTS                                       = 432,  /**< GPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_TX_CPU                                                 = 433,  /**< GPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_TX_OMCI                                                = 434,  /**< GPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_TX_CPU_OMCI_PACKETS_DROPPED                            = 435,  /**< GPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_TX_DROPPED_ILLEGAL_LENGTH                              = 436,  /**< GPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_TX_DROPPED_TPID_MISS                                   = 437,  /**< GPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_TX_DROPPED_VID_MISS                                    = 438,  /**< GPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_NI_ACTIVATE_ALL_ONUS_COMPLETED                                     = 439,  /**< GPON network interface - activate all onus completed */
+    BCMOLT_GROUP_ID_GPON_NI_CPU_PACKETS_FAILURE                                             = 440,  /**< GPON network interface - CPU Packets Failure */
+    BCMOLT_GROUP_ID_GPON_NI_DEACTIVATE_ALL_ONUS_COMPLETED                                   = 441,  /**< GPON network interface - deactivate all onus completed */
+    BCMOLT_GROUP_ID_GPON_NI_DISABLE_ALL_ONUS_COMPLETED                                      = 442,  /**< GPON network interface - disable all onus completed */
+    BCMOLT_GROUP_ID_GPON_NI_ENABLE_ALL_ONUS_COMPLETED                                       = 443,  /**< GPON network interface - enable all onus completed */
+    BCMOLT_GROUP_ID_GPON_NI_LOS                                                             = 444,  /**< GPON network interface - LOS */
+    BCMOLT_GROUP_ID_GPON_NI_ONU_DISCOVERED                                                  = 445,  /**< GPON network interface - ONU Discovered */
+    BCMOLT_GROUP_ID_GPON_NI_ONU_UPGRADE_COMPLETE                                            = 446,  /**< GPON network interface - ONU Upgrade Complete */
+    BCMOLT_GROUP_ID_GPON_NI_PROTECTION_SWITCHING_ONUS_RANGED                                = 447,  /**< GPON network interface - Protection Switching ONUs Ranged */
+    BCMOLT_GROUP_ID_GPON_NI_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED                       = 448,  /**< GPON network interface - Protection Switching Switchover Completed */
+    BCMOLT_GROUP_ID_GPON_NI_PROTECTION_SWITCHING_TRAFFIC_RESUME                             = 449,  /**< GPON network interface - Protection Switching Traffic Resume */
+    BCMOLT_GROUP_ID_GPON_NI_ROGUE_DETECTION_COMPLETED                                       = 450,  /**< GPON network interface - Rogue detection completed */
+    BCMOLT_GROUP_ID_GPON_NI_ROGUE_ONU_SPECIAL_MAP_CYCLE_START                               = 451,  /**< GPON network interface - Rogue ONU special map cycle start */
+    BCMOLT_GROUP_ID_GPON_NI_SERIAL_NUMBER_ACQUISITION_CYCLE_START                           = 452,  /**< GPON network interface - Serial Number Acquisition Cycle Start */
+    BCMOLT_GROUP_ID_GPON_NI_STANDBY_PON_MONITORING_CYCLE_COMPLETED                          = 453,  /**< GPON network interface - Standby PON Monitoring Cycle Completed */
+    BCMOLT_GROUP_ID_GPON_NI_STAT_ALARM_CLEARED                                              = 454,  /**< GPON network interface - Stat Alarm Cleared */
+    BCMOLT_GROUP_ID_GPON_NI_STAT_ALARM_RAISED                                               = 455,  /**< GPON network interface - Stat Alarm Raised */
+    BCMOLT_GROUP_ID_GPON_NI_STATE_CHANGE_COMPLETED                                          = 456,  /**< GPON network interface - State Change Completed */
+    BCMOLT_GROUP_ID_GPON_NI_TOD_REQUEST_COMPLETED                                           = 457,  /**< GPON network interface - TOD request completed */
+    BCMOLT_GROUP_ID_GPON_NI_AUTO_CFG                                                        = 458,  /**< GPON network interface - Indication Configuration */
+    BCMOLT_GROUP_ID_GPON_NI_DISABLE_SERIAL_NUMBER                                           = 459,  /**< GPON network interface - Disable Serial Number */
+    BCMOLT_GROUP_ID_GPON_NI_PROTECTION_SWITCHING_TYPE_C_SET_MULTIPLE_ONU_STATE              = 460,  /**< GPON network interface - protection switching type c set multiple onu state */
+    BCMOLT_GROUP_ID_GPON_NI_RESET                                                           = 461,  /**< GPON network interface - Reset */
+    BCMOLT_GROUP_ID_GPON_NI_ROGUE_DETECTION_WINDOW                                          = 462,  /**< GPON network interface - Rogue Detection Window */
+    BCMOLT_GROUP_ID_GPON_NI_SET_ONU_STATE                                                   = 463,  /**< GPON network interface - Set ONU State */
+    BCMOLT_GROUP_ID_GPON_NI_SET_PON_STATE                                                   = 464,  /**< GPON network interface - Set PON State */
+    BCMOLT_GROUP_ID_GPON_NI_SINGLE_REQUEST_STANDBY_PON_MONITORING                           = 465,  /**< GPON network interface - Single request for standby PON monitoring */
+    BCMOLT_GROUP_ID_GPON_NI_START_ONU_UPGRADE                                               = 466,  /**< GPON network interface - Start ONU Firmware Upgrade */
+    BCMOLT_GROUP_ID_GPON_NI_TOD_REQUEST                                                     = 467,  /**< GPON network interface - TOD request */
+    BCMOLT_GROUP_ID_GPON_NI_BROADCAST_PLOAM_PACKET                                          = 468,  /**< GPON network interface - Broadcast PLOAM Packet */
+    BCMOLT_GROUP_ID_GPON_NI_CPU_PACKETS                                                     = 469,  /**< GPON network interface - GPON CPU Packets */
+    BCMOLT_GROUP_ID_GPON_ONU_KEY                                                            = 470,  /**< GPON ONU - key */
+    BCMOLT_GROUP_ID_GPON_ONU_CFG                                                            = 471,  /**< GPON ONU - cfg */
+    BCMOLT_GROUP_ID_GPON_ONU_STAT                                                           = 472,  /**< GPON ONU - stat */
+    BCMOLT_GROUP_ID_GPON_ONU_STAT_CFG_FEC_CODEWORDS                                         = 473,  /**< GPON ONU - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_ONU_STAT_CFG_FEC_BYTES_CORRECTED                                   = 474,  /**< GPON ONU - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_ONU_STAT_CFG_FEC_CODEWORDS_CORRECTED                               = 475,  /**< GPON ONU - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_ONU_STAT_CFG_FEC_CODEWORDS_UNCORRECTED                             = 476,  /**< GPON ONU - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_ONU_STAT_CFG_BIP8_BYTES                                            = 477,  /**< GPON ONU - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_ONU_STAT_CFG_BIP8_ERRORS                                           = 478,  /**< GPON ONU - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_ONU_STAT_CFG_RX_PLOAMS_CRC_ERROR                                   = 479,  /**< GPON ONU - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_ONU_STAT_CFG_RX_PLOAMS_NON_IDLE                                    = 480,  /**< GPON ONU - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_ONU_STAT_CFG_POSITIVE_DRIFT                                        = 481,  /**< GPON ONU - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_ONU_STAT_CFG_NEGATIVE_DRIFT                                        = 482,  /**< GPON ONU - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_ONU_STAT_CFG_RX_OMCI                                               = 483,  /**< GPON ONU - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_ONU_STAT_CFG_RX_OMCI_PACKETS_CRC_ERROR                             = 484,  /**< GPON ONU - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_ONU_STAT_CFG_BER_REPORTED                                          = 485,  /**< GPON ONU - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_ONU_STAT_CFG_UNRECEIVED_BURST                                      = 486,  /**< GPON ONU - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_ONU_STAT_CFG_LCDG_ERRORS                                           = 487,  /**< GPON ONU - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_ONU_STAT_CFG_RDI_ERRORS                                            = 488,  /**< GPON ONU - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_ONU_STAT_CFG_RX_BYTES                                              = 489,  /**< GPON ONU - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_ONU_STAT_CFG_RX_PACKETS                                            = 490,  /**< GPON ONU - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_ONU_STAT_CFG_TX_BYTES                                              = 491,  /**< GPON ONU - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_ONU_STAT_CFG_TX_PACKETS                                            = 492,  /**< GPON ONU - Statistic Configuration */
+    BCMOLT_GROUP_ID_GPON_ONU_BER_INTERVAL_CONFIGURATION_COMPLETED                           = 493,  /**< GPON ONU - BER Interval Configuration Completed */
+    BCMOLT_GROUP_ID_GPON_ONU_DFI                                                            = 494,  /**< GPON ONU - Receive Dying-Gasp of ONUi */
+    BCMOLT_GROUP_ID_GPON_ONU_DGI                                                            = 495,  /**< GPON ONU - Receive Dying-Gasp of ONUi */
+    BCMOLT_GROUP_ID_GPON_ONU_DOWI                                                           = 496,  /**< GPON ONU - Drift of Window of ONUi */
+    BCMOLT_GROUP_ID_GPON_ONU_ERR                                                            = 497,  /**< GPON ONU - ERR */
+    BCMOLT_GROUP_ID_GPON_ONU_INVALID_DBRU_REPORT                                            = 498,  /**< GPON ONU - Invalid DBRu Report */
+    BCMOLT_GROUP_ID_GPON_ONU_KEY_EXCHANGE_COMPLETED                                         = 499,  /**< GPON ONU - Key Exchange Completed */
+    BCMOLT_GROUP_ID_GPON_ONU_KEY_EXCHANGE_CYCLE_SKIPPED                                     = 500,  /**< GPON ONU - Key Exchange Cycle Skipped */
+    BCMOLT_GROUP_ID_GPON_ONU_KEY_EXCHANGE_DECRYPT_REQUIRED                                  = 501,  /**< GPON ONU - Key Exchange Decrypt Required */
+    BCMOLT_GROUP_ID_GPON_ONU_KEY_EXCHANGE_KEY_MISMATCH                                      = 502,  /**< GPON ONU - Key Exchange Key Mismatch */
+    BCMOLT_GROUP_ID_GPON_ONU_KEY_EXCHANGE_KEY_REQUEST_TIMEOUT                               = 503,  /**< GPON ONU - Key Exchange Key Request Timeout */
+    BCMOLT_GROUP_ID_GPON_ONU_KEY_EXCHANGE_UNCONSECUTIVE_INDEX                               = 504,  /**< GPON ONU - Key Exchange Unconsecutive Index */
+    BCMOLT_GROUP_ID_GPON_ONU_LOAI                                                           = 505,  /**< GPON ONU - LOAi */
+    BCMOLT_GROUP_ID_GPON_ONU_LOKI                                                           = 506,  /**< GPON ONU - LOki */
+    BCMOLT_GROUP_ID_GPON_ONU_MEMI                                                           = 507,  /**< GPON ONU - MEMi */
+    BCMOLT_GROUP_ID_GPON_ONU_OMCI_PORT_ID_CONFIGURATION_COMPLETED                           = 508,  /**< GPON ONU - OMCI PORT ID Configuration Completed */
+    BCMOLT_GROUP_ID_GPON_ONU_ONU_ACTIVATION_COMPLETED                                       = 509,  /**< GPON ONU - ONU Activation Completed */
+    BCMOLT_GROUP_ID_GPON_ONU_ONU_ACTIVATION_STANDBY_COMPLETED                               = 510,  /**< GPON ONU - onu activation standby completed */
+    BCMOLT_GROUP_ID_GPON_ONU_ONU_ALARM                                                      = 511,  /**< GPON ONU - ONU Alarm */
+    BCMOLT_GROUP_ID_GPON_ONU_ONU_DEACTIVATION_COMPLETED                                     = 512,  /**< GPON ONU - ONU Deactivation Completed */
+    BCMOLT_GROUP_ID_GPON_ONU_ONU_DISABLE_COMPLETED                                          = 513,  /**< GPON ONU - ONU Disable Completed */
+    BCMOLT_GROUP_ID_GPON_ONU_ONU_ENABLE_COMPLETED                                           = 514,  /**< GPON ONU - ONU Enable Completed */
+    BCMOLT_GROUP_ID_GPON_ONU_OPTICAL_REFLECTION                                             = 515,  /**< GPON ONU - Optical Reflection */
+    BCMOLT_GROUP_ID_GPON_ONU_PASSWORD_AUTHENTICATION_COMPLETED                              = 516,  /**< GPON ONU - Password Authentication Completed */
+    BCMOLT_GROUP_ID_GPON_ONU_PEE                                                            = 517,  /**< GPON ONU - PEE */
+    BCMOLT_GROUP_ID_GPON_ONU_POSSIBLE_DRIFT                                                 = 518,  /**< GPON ONU - Possible Drift */
+    BCMOLT_GROUP_ID_GPON_ONU_POWER_MANAGEMENT_STATE_CHANGE                                  = 519,  /**< GPON ONU - Power Management State Change */
+    BCMOLT_GROUP_ID_GPON_ONU_PST                                                            = 520,  /**< GPON ONU - PST */
+    BCMOLT_GROUP_ID_GPON_ONU_RANGING_COMPLETED                                              = 521,  /**< GPON ONU - Ranging Completed */
+    BCMOLT_GROUP_ID_GPON_ONU_REI                                                            = 522,  /**< GPON ONU - REI */
+    BCMOLT_GROUP_ID_GPON_ONU_RSSI_MEASUREMENT_COMPLETED                                     = 523,  /**< GPON ONU - RSSI Measurement Completed */
+    BCMOLT_GROUP_ID_GPON_ONU_SDI                                                            = 524,  /**< GPON ONU - Signal Degraded of ONUi */
+    BCMOLT_GROUP_ID_GPON_ONU_SFI                                                            = 525,  /**< GPON ONU - Signal Fail of ONUi */
+    BCMOLT_GROUP_ID_GPON_ONU_STAT_ALARM_CLEARED                                             = 526,  /**< GPON ONU - Stat Alarm Cleared */
+    BCMOLT_GROUP_ID_GPON_ONU_STAT_ALARM_RAISED                                              = 527,  /**< GPON ONU - Stat Alarm Raised */
+    BCMOLT_GROUP_ID_GPON_ONU_SUFI                                                           = 528,  /**< GPON ONU - SUFi */
+    BCMOLT_GROUP_ID_GPON_ONU_TIWI                                                           = 529,  /**< GPON ONU - Transmission Interference Warning */
+    BCMOLT_GROUP_ID_GPON_ONU_AUTO_CFG                                                       = 530,  /**< GPON ONU - Indication Configuration */
+    BCMOLT_GROUP_ID_GPON_ONU_CHANGE_POWER_LEVEL                                             = 531,  /**< GPON ONU - Change Power Level */
+    BCMOLT_GROUP_ID_GPON_ONU_RSSI_MEASUREMENT                                               = 532,  /**< GPON ONU - RSSI Measurement */
+    BCMOLT_GROUP_ID_GPON_ONU_SET_ONU_STATE                                                  = 533,  /**< GPON ONU - Set ONU State */
+    BCMOLT_GROUP_ID_GPON_ONU_CPU_PACKETS                                                    = 534,  /**< GPON ONU - GPON CPU Packets */
+    BCMOLT_GROUP_ID_GPON_ONU_PLOAM_PACKET                                                   = 535,  /**< GPON ONU - PLOAM Packet */
+    BCMOLT_GROUP_ID_GPON_ONU_CPU_PACKET                                                     = 536,  /**< GPON ONU - GPON CPU packet */
+    BCMOLT_GROUP_ID_GPON_ONU_OMCI_PACKET                                                    = 537,  /**< GPON ONU - GPON OMCI packet */
+    BCMOLT_GROUP_ID_GPON_TRX_KEY                                                            = 538,  /**< GPON TRX - key */
+    BCMOLT_GROUP_ID_GPON_TRX_CFG                                                            = 539,  /**< GPON TRX - cfg */
+    BCMOLT_GROUP_ID_LOG_ENTRY_KEY                                                           = 540,  /**< log entry - key */
+    BCMOLT_GROUP_ID_LOG_ENTRY_CFG                                                           = 541,  /**< log entry - cfg */
+    BCMOLT_GROUP_ID_LOG_ENTRY_STAT                                                          = 542,  /**< log entry - stat */
+    BCMOLT_GROUP_ID_LOG_ENTRY_STAT_CFG_MSG_COUNT                                            = 543,  /**< log entry - Statistic Configuration */
+    BCMOLT_GROUP_ID_LOG_ENTRY_STAT_CFG_LOST_MSG_COUNT                                       = 544,  /**< log entry - Statistic Configuration */
+    BCMOLT_GROUP_ID_LOG_ENTRY_STAT_ALARM_CLEARED                                            = 545,  /**< log entry - Stat Alarm Cleared */
+    BCMOLT_GROUP_ID_LOG_ENTRY_STAT_ALARM_RAISED                                             = 546,  /**< log entry - Stat Alarm Raised */
+    BCMOLT_GROUP_ID_LOG_ENTRY_AUTO_CFG                                                      = 547,  /**< log entry - Indication Configuration */
+    BCMOLT_GROUP_ID_LOGGER_KEY                                                              = 548,  /**< logger - key */
+    BCMOLT_GROUP_ID_LOGGER_CFG                                                              = 549,  /**< logger - cfg */
+    BCMOLT_GROUP_ID_LOGGER_STAT                                                             = 550,  /**< logger - stat */
+    BCMOLT_GROUP_ID_LOGGER_STAT_CFG_LINES_IN_LOG                                            = 551,  /**< logger - Statistic Configuration */
+    BCMOLT_GROUP_ID_LOGGER_STAT_ALARM_CLEARED                                               = 552,  /**< logger - Stat Alarm Cleared */
+    BCMOLT_GROUP_ID_LOGGER_STAT_ALARM_RAISED                                                = 553,  /**< logger - Stat Alarm Raised */
+    BCMOLT_GROUP_ID_LOGGER_AUTO_CFG                                                         = 554,  /**< logger - Indication Configuration */
+    BCMOLT_GROUP_ID_LOGGER_CLEAR_LOG                                                        = 555,  /**< logger - clear log */
+    BCMOLT_GROUP_ID_NNI_KEY                                                                 = 556,  /**< NNI - key */
+    BCMOLT_GROUP_ID_NNI_CFG                                                                 = 557,  /**< NNI - cfg */
+    BCMOLT_GROUP_ID_NNI_STAT                                                                = 558,  /**< NNI - stat */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_FRAMES_64                                               = 559,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_FRAMES_65_127                                           = 560,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_FRAMES_128_255                                          = 561,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_FRAMES_256_511                                          = 562,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_FRAMES_512_1023                                         = 563,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_FRAMES_1024_1518                                        = 564,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_FRAMES_1519_2047                                        = 565,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_FRAMES_2048_4095                                        = 566,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_FRAMES_4096_9216                                        = 567,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_FRAMES_9217_16383                                       = 568,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_FRAMES                                                  = 569,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_BYTES                                                   = 570,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_GOOD_FRAMES                                             = 571,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_UNICAST_FRAMES                                          = 572,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_MULTICAST_FRAMES                                        = 573,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_BROADCAST_FRAMES                                        = 574,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_FCS_ERRORS                                              = 575,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_CONTROL_FRAMES                                          = 576,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_PAUSE_FRAMES                                            = 577,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_PFC_FRAMES                                              = 578,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_UNSUPPORTED_OPCODE                                      = 579,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_UNSUPPORTED_DA                                          = 580,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_ALIGNMENT_ERRORS                                        = 581,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_LENGTH_OUT_OF_RANGE                                     = 582,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_CODE_ERRORS                                             = 583,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_OVERSIZED_FRAMES                                        = 584,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_JABBER_FRAMES                                           = 585,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_MTU_CHECK_ERRORS                                        = 586,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_PROMISCUOUS_FRAMES                                      = 587,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_VLAN_FRAMES                                             = 588,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_DOUBLE_VLAN_FRAMES                                      = 589,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_TRUNCATED_FRAMES                                        = 590,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_UNDERSIZE_FRAMES                                        = 591,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_FRAGMENTED_FRAMES                                       = 592,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_RUNT_FRAMES                                             = 593,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_FRAMES_64                                               = 594,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_FRAMES_65_127                                           = 595,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_FRAMES_128_255                                          = 596,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_FRAMES_256_511                                          = 597,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_FRAMES_512_1023                                         = 598,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_FRAMES_1024_1518                                        = 599,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_FRAMES_1519_2047                                        = 600,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_FRAMES_2048_4095                                        = 601,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_FRAMES_4096_9216                                        = 602,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_FRAMES_9217_16383                                       = 603,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_FRAMES                                                  = 604,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_BYTES                                                   = 605,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_GOOD_FRAMES                                             = 606,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_UNICAST_FRAMES                                          = 607,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_MULTICAST_FRAMES                                        = 608,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_BROADCAST_FRAMES                                        = 609,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_PAUSE_FRAMES                                            = 610,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_PFC_FRAMES                                              = 611,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_JABBER_FRAMES                                           = 612,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_FCS_ERRORS                                              = 613,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_CONTROL_FRAMES                                          = 614,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_OVERSIZE_FRAMES                                         = 615,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_FRAGMENTED_FRAMES                                       = 616,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_ERROR_FRAMES                                            = 617,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_VLAN_FRAMES                                             = 618,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_DOUBLE_VLAN_FRAMES                                      = 619,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_RUNT_FRAMES                                             = 620,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_UNDERRUN_FRAMES                                         = 621,  /**< NNI - Statistic Configuration */
+    BCMOLT_GROUP_ID_NNI_STAT_ALARM_CLEARED                                                  = 622,  /**< NNI - Stat Alarm Cleared */
+    BCMOLT_GROUP_ID_NNI_STAT_ALARM_RAISED                                                   = 623,  /**< NNI - Stat Alarm Raised */
+    BCMOLT_GROUP_ID_NNI_STATUS_CHANGED                                                      = 624,  /**< NNI - Status changed */
+    BCMOLT_GROUP_ID_NNI_AUTO_CFG                                                            = 625,  /**< NNI - Indication Configuration */
+    BCMOLT_GROUP_ID_NNI_SERDES_KEY                                                          = 626,  /**< nni_serdes - key */
+    BCMOLT_GROUP_ID_NNI_SERDES_CFG                                                          = 627,  /**< nni_serdes - cfg */
+    BCMOLT_GROUP_ID_SOFTWARE_ERROR_KEY                                                      = 628,  /**< Software Error - key */
+    BCMOLT_GROUP_ID_SOFTWARE_ERROR_CFG                                                      = 629,  /**< Software Error - cfg */
+    BCMOLT_GROUP_ID_TRX_CALIBRATION_KEY                                                     = 630,  /**< TRX Calibration - key */
+    BCMOLT_GROUP_ID_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED                  = 631,  /**< TRX Calibration - Capture window and statistic completed */
+    BCMOLT_GROUP_ID_TRX_CALIBRATION_AUTO_CFG                                                = 632,  /**< TRX Calibration - Indication Configuration */
+    BCMOLT_GROUP_ID_TRX_CALIBRATION_START_CAPTURE_WINDOW                                    = 633,  /**< TRX Calibration - start capture window */
+    BCMOLT_GROUP_ID_TRX_CALIBRATION_STOP_CAPTURE_WINDOW                                     = 634,  /**< TRX Calibration - stop capture window */
+    BCMOLT_GROUP_ID_XGPON_ALLOC_KEY                                                         = 635,  /**< XGPON Alloc - key */
+    BCMOLT_GROUP_ID_XGPON_ALLOC_CFG                                                         = 636,  /**< XGPON Alloc - cfg */
+    BCMOLT_GROUP_ID_XGPON_ALLOC_STAT                                                        = 637,  /**< XGPON Alloc - stat */
+    BCMOLT_GROUP_ID_XGPON_ALLOC_STAT_CFG_RX_BYTES                                           = 638,  /**< XGPON Alloc - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_ALLOC_CONFIGURATION_COMPLETED                                     = 639,  /**< XGPON Alloc - Configuration Completed */
+    BCMOLT_GROUP_ID_XGPON_ALLOC_GET_ALLOC_STATS_COMPLETED                                   = 640,  /**< XGPON Alloc - Get alloc ID statistics completed */
+    BCMOLT_GROUP_ID_XGPON_ALLOC_STAT_ALARM_CLEARED                                          = 641,  /**< XGPON Alloc - Stat Alarm Cleared */
+    BCMOLT_GROUP_ID_XGPON_ALLOC_STAT_ALARM_RAISED                                           = 642,  /**< XGPON Alloc - Stat Alarm Raised */
+    BCMOLT_GROUP_ID_XGPON_ALLOC_AUTO_CFG                                                    = 643,  /**< XGPON Alloc - Indication Configuration */
+    BCMOLT_GROUP_ID_XGPON_ALLOC_GET_STATS                                                   = 644,  /**< XGPON Alloc - Get statistics */
+    BCMOLT_GROUP_ID_XGPON_ALLOC_SET_STATE                                                   = 645,  /**< XGPON Alloc - Set state */
+    BCMOLT_GROUP_ID_XGPON_GEM_PORT_KEY                                                      = 646,  /**< XGPON GEM port - key */
+    BCMOLT_GROUP_ID_XGPON_GEM_PORT_CFG                                                      = 647,  /**< XGPON GEM port - cfg */
+    BCMOLT_GROUP_ID_XGPON_GEM_PORT_STAT                                                     = 648,  /**< XGPON GEM port - stat */
+    BCMOLT_GROUP_ID_XGPON_GEM_PORT_STAT_CFG_TX_BYTES                                        = 649,  /**< XGPON GEM port - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_GEM_PORT_STAT_CFG_TX_PACKETS                                      = 650,  /**< XGPON GEM port - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_GEM_PORT_STAT_CFG_RX_PACKETS                                      = 651,  /**< XGPON GEM port - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_GEM_PORT_STAT_CFG_RX_BYTES                                        = 652,  /**< XGPON GEM port - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_GEM_PORT_STAT_ALARM_CLEARED                                       = 653,  /**< XGPON GEM port - Stat Alarm Cleared */
+    BCMOLT_GROUP_ID_XGPON_GEM_PORT_STAT_ALARM_RAISED                                        = 654,  /**< XGPON GEM port - Stat Alarm Raised */
+    BCMOLT_GROUP_ID_XGPON_GEM_PORT_AUTO_CFG                                                 = 655,  /**< XGPON GEM port - Indication Configuration */
+    BCMOLT_GROUP_ID_XGPON_IWF_KEY                                                           = 656,  /**< XGPON IWF - key */
+    BCMOLT_GROUP_ID_XGPON_IWF_CFG                                                           = 657,  /**< XGPON IWF - cfg */
+    BCMOLT_GROUP_ID_XGPON_NI_KEY                                                            = 658,  /**< XGPON network interface - key */
+    BCMOLT_GROUP_ID_XGPON_NI_CFG                                                            = 659,  /**< XGPON network interface - cfg */
+    BCMOLT_GROUP_ID_XGPON_NI_STAT                                                           = 660,  /**< XGPON network interface - stat */
+    BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_FEC_CODEWORDS                                         = 661,  /**< XGPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_BIP32_BYTES                                           = 662,  /**< XGPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_BIP32_ERRORS                                          = 663,  /**< XGPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_XGTC_HEADERS                                       = 664,  /**< XGPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_XGTC_CORRECTED                                     = 665,  /**< XGPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_XGTC_UNCORRECTED                                   = 666,  /**< XGPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_XGEM                                               = 667,  /**< XGPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_XGEM_DROPPED                                       = 668,  /**< XGPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_XGEM_IDLE                                          = 669,  /**< XGPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_XGEM_CORRECTED                                     = 670,  /**< XGPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_CRC_ERROR                                          = 671,  /**< XGPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_FRAGMENT_ERROR                                     = 672,  /**< XGPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_PACKETS_DROPPED                                    = 673,  /**< XGPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_DROPPED_TOO_SHORT                                  = 674,  /**< XGPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_DROPPED_TOO_LONG                                   = 675,  /**< XGPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_KEY_ERROR                                          = 676,  /**< XGPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_TX_PLOAMS                                             = 677,  /**< XGPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_PLOAMS_DROPPED                                     = 678,  /**< XGPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_ALLOCATIONS_VALID                                  = 679,  /**< XGPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_ALLOCATIONS_INVALID                                = 680,  /**< XGPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_ALLOCATIONS_DISABLED                               = 681,  /**< XGPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_PLOAMS                                             = 682,  /**< XGPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_PLOAMS_NON_IDLE                                    = 683,  /**< XGPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_PLOAMS_ERROR                                       = 684,  /**< XGPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_CPU                                                = 685,  /**< XGPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_OMCI                                               = 686,  /**< XGPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_OMCI_PACKETS_CRC_ERROR                             = 687,  /**< XGPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_TX_PACKETS                                            = 688,  /**< XGPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_TX_XGEM                                               = 689,  /**< XGPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_TX_CPU                                                = 690,  /**< XGPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_TX_OMCI                                               = 691,  /**< XGPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_TX_CPU_OMCI_PACKETS_DROPPED                           = 692,  /**< XGPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_TX_DROPPED_ILLEGAL_LENGTH                             = 693,  /**< XGPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_TX_DROPPED_TPID_MISS                                  = 694,  /**< XGPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_TX_DROPPED_VID_MISS                                   = 695,  /**< XGPON network interface - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_NI_ACTIVATE_ALL_ONUS_COMPLETED                                    = 696,  /**< XGPON network interface - activate all onus completed */
+    BCMOLT_GROUP_ID_XGPON_NI_CPU_PACKETS_FAILURE                                            = 697,  /**< XGPON network interface - CPU Packets Failure */
+    BCMOLT_GROUP_ID_XGPON_NI_DEACTIVATE_ALL_ONUS_COMPLETED                                  = 698,  /**< XGPON network interface - deactivate all onus completed */
+    BCMOLT_GROUP_ID_XGPON_NI_DISABLE_ALL_ONUS_COMPLETED                                     = 699,  /**< XGPON network interface - disable all onus completed */
+    BCMOLT_GROUP_ID_XGPON_NI_ENABLE_ALL_ONUS_COMPLETED                                      = 700,  /**< XGPON network interface - enable all onus completed */
+    BCMOLT_GROUP_ID_XGPON_NI_LOS                                                            = 701,  /**< XGPON network interface - LOS */
+    BCMOLT_GROUP_ID_XGPON_NI_ONU_DISCOVERED                                                 = 702,  /**< XGPON network interface - ONU Discovered */
+    BCMOLT_GROUP_ID_XGPON_NI_ONU_UPGRADE_COMPLETE                                           = 703,  /**< XGPON network interface - ONU Upgrade Complete */
+    BCMOLT_GROUP_ID_XGPON_NI_PROTECTION_SWITCHING_ONUS_RANGED                               = 704,  /**< XGPON network interface - Protection Switching ONUs Ranged */
+    BCMOLT_GROUP_ID_XGPON_NI_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED                      = 705,  /**< XGPON network interface - Protection Switching Switchover Completed */
+    BCMOLT_GROUP_ID_XGPON_NI_PROTECTION_SWITCHING_TRAFFIC_RESUME                            = 706,  /**< XGPON network interface - Protection Switching Traffic Resume */
+    BCMOLT_GROUP_ID_XGPON_NI_ROGUE_DETECTION_COMPLETED                                      = 707,  /**< XGPON network interface - Rogue detection completed */
+    BCMOLT_GROUP_ID_XGPON_NI_ROGUE_ONU_SPECIAL_MAP_CYCLE_START                              = 708,  /**< XGPON network interface - Rogue ONU special map cycle start */
+    BCMOLT_GROUP_ID_XGPON_NI_SERIAL_NUMBER_ACQUISITION_CYCLE_START                          = 709,  /**< XGPON network interface - Serial Number Acquisition Cycle Start */
+    BCMOLT_GROUP_ID_XGPON_NI_STANDBY_PON_MONITORING_CYCLE_COMPLETED                         = 710,  /**< XGPON network interface - Standby PON Monitoring Cycle Completed */
+    BCMOLT_GROUP_ID_XGPON_NI_STAT_ALARM_CLEARED                                             = 711,  /**< XGPON network interface - Stat Alarm Cleared */
+    BCMOLT_GROUP_ID_XGPON_NI_STAT_ALARM_RAISED                                              = 712,  /**< XGPON network interface - Stat Alarm Raised */
+    BCMOLT_GROUP_ID_XGPON_NI_STATE_CHANGE_COMPLETED                                         = 713,  /**< XGPON network interface - State Change Completed */
+    BCMOLT_GROUP_ID_XGPON_NI_TOD_REQUEST_COMPLETED                                          = 714,  /**< XGPON network interface - TOD request completed */
+    BCMOLT_GROUP_ID_XGPON_NI_AUTO_CFG                                                       = 715,  /**< XGPON network interface - Indication Configuration */
+    BCMOLT_GROUP_ID_XGPON_NI_ADJUST_TX_WAVELENGTH                                           = 716,  /**< XGPON network interface - Adjust Tx Wavelengh */
+    BCMOLT_GROUP_ID_XGPON_NI_DISABLE_SERIAL_NUMBER                                          = 717,  /**< XGPON network interface - Disable Serial Number */
+    BCMOLT_GROUP_ID_XGPON_NI_RESET                                                          = 718,  /**< XGPON network interface - Reset */
+    BCMOLT_GROUP_ID_XGPON_NI_ROGUE_DETECTION_WINDOW                                         = 719,  /**< XGPON network interface - Rogue Detection Window */
+    BCMOLT_GROUP_ID_XGPON_NI_RUN_SPECIAL_BW_MAP                                             = 720,  /**< XGPON network interface - Run Special BW Map */
+    BCMOLT_GROUP_ID_XGPON_NI_SET_ONU_STATE                                                  = 721,  /**< XGPON network interface - Set ONU State */
+    BCMOLT_GROUP_ID_XGPON_NI_SET_PON_STATE                                                  = 722,  /**< XGPON network interface - Set PON State */
+    BCMOLT_GROUP_ID_XGPON_NI_SINGLE_REQUEST_STANDBY_PON_MONITORING                          = 723,  /**< XGPON network interface - Single request standby PON Monitoring */
+    BCMOLT_GROUP_ID_XGPON_NI_START_ONU_UPGRADE                                              = 724,  /**< XGPON network interface - Start ONU Firmware Upgrade */
+    BCMOLT_GROUP_ID_XGPON_NI_TOD_REQUEST                                                    = 725,  /**< XGPON network interface - TOD request */
+    BCMOLT_GROUP_ID_XGPON_NI_BROADCAST_PLOAM_PACKET                                         = 726,  /**< XGPON network interface - Broadcast PLOAM Packet */
+    BCMOLT_GROUP_ID_XGPON_NI_CPU_PACKETS                                                    = 727,  /**< XGPON network interface - XGPON CPU packets */
+    BCMOLT_GROUP_ID_XGPON_ONU_KEY                                                           = 728,  /**< XGPON ONU - key */
+    BCMOLT_GROUP_ID_XGPON_ONU_CFG                                                           = 729,  /**< XGPON ONU - cfg */
+    BCMOLT_GROUP_ID_XGPON_ONU_STAT                                                          = 730,  /**< XGPON ONU - stat */
+    BCMOLT_GROUP_ID_XGPON_ONU_STAT_CFG_POSITIVE_DRIFT                                       = 731,  /**< XGPON ONU - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_ONU_STAT_CFG_NEGATIVE_DRIFT                                       = 732,  /**< XGPON ONU - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_ONU_STAT_CFG_DELIMITER_MISS_DETECTION                             = 733,  /**< XGPON ONU - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_ONU_STAT_CFG_BIP32_ERRORS                                         = 734,  /**< XGPON ONU - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_ONU_STAT_CFG_RX_WORDS                                             = 735,  /**< XGPON ONU - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_ONU_STAT_CFG_FEC_CORRECTED_SYMBOLS                                = 736,  /**< XGPON ONU - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_ONU_STAT_CFG_FEC_CORRECTED_CODEWORDS                              = 737,  /**< XGPON ONU - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_ONU_STAT_CFG_FEC_UNCORRECTABLE_CODEWORDS                          = 738,  /**< XGPON ONU - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_ONU_STAT_CFG_FEC_CODEWORDS                                        = 739,  /**< XGPON ONU - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_ONU_STAT_CFG_FEC_CORRECTED_BITS                                   = 740,  /**< XGPON ONU - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_ONU_STAT_CFG_XGEM_KEY_ERRORS                                      = 741,  /**< XGPON ONU - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_ONU_STAT_CFG_XGEM_LOSS                                            = 742,  /**< XGPON ONU - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_ONU_STAT_CFG_RX_PLOAMS_MIC_ERROR                                  = 743,  /**< XGPON ONU - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_ONU_STAT_CFG_RX_PLOAMS_NON_IDLE                                   = 744,  /**< XGPON ONU - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_ONU_STAT_CFG_RX_OMCI                                              = 745,  /**< XGPON ONU - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_ONU_STAT_CFG_RX_OMCI_PACKETS_CRC_ERROR                            = 746,  /**< XGPON ONU - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_ONU_STAT_CFG_RX_BYTES                                             = 747,  /**< XGPON ONU - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_ONU_STAT_CFG_RX_PACKETS                                           = 748,  /**< XGPON ONU - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_ONU_STAT_CFG_TX_BYTES                                             = 749,  /**< XGPON ONU - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_ONU_STAT_CFG_TX_PACKETS                                           = 750,  /**< XGPON ONU - Statistic Configuration */
+    BCMOLT_GROUP_ID_XGPON_ONU_DFI                                                           = 751,  /**< XGPON ONU - Receive Dying-Gasp of ONUi */
+    BCMOLT_GROUP_ID_XGPON_ONU_DGI                                                           = 752,  /**< XGPON ONU - Receive Dying-Gasp of ONUi */
+    BCMOLT_GROUP_ID_XGPON_ONU_DOWI                                                          = 753,  /**< XGPON ONU - Drift of Window of ONUi */
+    BCMOLT_GROUP_ID_XGPON_ONU_INVALID_DBRU_REPORT                                           = 754,  /**< XGPON ONU - Invalid DBRu Report */
+    BCMOLT_GROUP_ID_XGPON_ONU_KEY_EXCHANGE_COMPLETED                                        = 755,  /**< XGPON ONU - Key Exchange Completed */
+    BCMOLT_GROUP_ID_XGPON_ONU_KEY_EXCHANGE_CYCLE_SKIPPED                                    = 756,  /**< XGPON ONU - Key Exchange Cycle Skipped */
+    BCMOLT_GROUP_ID_XGPON_ONU_KEY_EXCHANGE_KEY_MISMATCH                                     = 757,  /**< XGPON ONU - Key Exchange Key Mismatch */
+    BCMOLT_GROUP_ID_XGPON_ONU_KEY_EXCHANGE_KEY_REQUEST_TIMEOUT                              = 758,  /**< XGPON ONU - Key Exchange Key Request Timeout */
+    BCMOLT_GROUP_ID_XGPON_ONU_LOOCI                                                         = 759,  /**< XGPON ONU - LOOCi */
+    BCMOLT_GROUP_ID_XGPON_ONU_ONU_ACTIVATION_COMPLETED                                      = 760,  /**< XGPON ONU - ONU Activation Completed */
+    BCMOLT_GROUP_ID_XGPON_ONU_ONU_ALARM                                                     = 761,  /**< XGPON ONU - ONU Alarm */
+    BCMOLT_GROUP_ID_XGPON_ONU_ONU_DEACTIVATION_COMPLETED                                    = 762,  /**< XGPON ONU - ONU Deactivation Completed */
+    BCMOLT_GROUP_ID_XGPON_ONU_ONU_DISABLE_COMPLETED                                         = 763,  /**< XGPON ONU - ONU Disable Completed */
+    BCMOLT_GROUP_ID_XGPON_ONU_ONU_ENABLE_COMPLETED                                          = 764,  /**< XGPON ONU - ONU Enable Completed */
+    BCMOLT_GROUP_ID_XGPON_ONU_ONU_TUNING_IN_COMPLETED                                       = 765,  /**< XGPON ONU - ONU Tuning in completed */
+    BCMOLT_GROUP_ID_XGPON_ONU_ONU_TUNING_OUT_COMPLETED                                      = 766,  /**< XGPON ONU - ONU Tuning out completed */
+    BCMOLT_GROUP_ID_XGPON_ONU_OPTICAL_REFLECTION                                            = 767,  /**< XGPON ONU - Optical Reflection */
+    BCMOLT_GROUP_ID_XGPON_ONU_POSSIBLE_DRIFT                                                = 768,  /**< XGPON ONU - Possible Drift */
+    BCMOLT_GROUP_ID_XGPON_ONU_POWER_CONSUMPTION_REPORT                                      = 769,  /**< XGPON ONU - Power consumption report */
+    BCMOLT_GROUP_ID_XGPON_ONU_POWER_LEVEL_REPORT                                            = 770,  /**< XGPON ONU - Power level report */
+    BCMOLT_GROUP_ID_XGPON_ONU_POWER_MANAGEMENT_STATE_CHANGE                                 = 771,  /**< XGPON ONU - Power Management State Change */
+    BCMOLT_GROUP_ID_XGPON_ONU_PQSI                                                          = 772,  /**< XGPON ONU - ploam queue status */
+    BCMOLT_GROUP_ID_XGPON_ONU_RANGING_COMPLETED                                             = 773,  /**< XGPON ONU - Ranging Completed */
+    BCMOLT_GROUP_ID_XGPON_ONU_REGISTRATION_ID                                               = 774,  /**< XGPON ONU - Registration ID */
+    BCMOLT_GROUP_ID_XGPON_ONU_RSSI_MEASUREMENT_COMPLETED                                    = 775,  /**< XGPON ONU - RSSI Measurement Completed */
+    BCMOLT_GROUP_ID_XGPON_ONU_SDI                                                           = 776,  /**< XGPON ONU - Signal Degraded of ONUi */
+    BCMOLT_GROUP_ID_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_FAILURE                          = 777,  /**< XGPON ONU - secure mutual authentication failure */
+    BCMOLT_GROUP_ID_XGPON_ONU_SFI                                                           = 778,  /**< XGPON ONU - Signal Fail of ONUi */
+    BCMOLT_GROUP_ID_XGPON_ONU_STAT_ALARM_CLEARED                                            = 779,  /**< XGPON ONU - Stat Alarm Cleared */
+    BCMOLT_GROUP_ID_XGPON_ONU_STAT_ALARM_RAISED                                             = 780,  /**< XGPON ONU - Stat Alarm Raised */
+    BCMOLT_GROUP_ID_XGPON_ONU_SUFI                                                          = 781,  /**< XGPON ONU - SUFi */
+    BCMOLT_GROUP_ID_XGPON_ONU_TIWI                                                          = 782,  /**< XGPON ONU - Transmission Interference Warning */
+    BCMOLT_GROUP_ID_XGPON_ONU_TUNING_RESPONSE                                               = 783,  /**< XGPON ONU - Tuning response */
+    BCMOLT_GROUP_ID_XGPON_ONU_AUTO_CFG                                                      = 784,  /**< XGPON ONU - Indication Configuration */
+    BCMOLT_GROUP_ID_XGPON_ONU_ADJUST_TX_WAVELENGTH                                          = 785,  /**< XGPON ONU - Adjust Tx wavelength */
+    BCMOLT_GROUP_ID_XGPON_ONU_CHANGE_POWER_LEVELLING                                        = 786,  /**< XGPON ONU - Change power levelling */
+    BCMOLT_GROUP_ID_XGPON_ONU_GET_POWER_CONSUMPTION                                         = 787,  /**< XGPON ONU - Get power consumption */
+    BCMOLT_GROUP_ID_XGPON_ONU_GET_POWER_LEVEL                                               = 788,  /**< XGPON ONU - Get power level */
+    BCMOLT_GROUP_ID_XGPON_ONU_ONU_TUNING_IN                                                 = 789,  /**< XGPON ONU - ONU Tuning in */
+    BCMOLT_GROUP_ID_XGPON_ONU_ONU_TUNING_OUT                                                = 790,  /**< XGPON ONU - ONU Tuning out */
+    BCMOLT_GROUP_ID_XGPON_ONU_REQUEST_REGISTRATION                                          = 791,  /**< XGPON ONU - Request registration */
+    BCMOLT_GROUP_ID_XGPON_ONU_RSSI_MEASUREMENT                                              = 792,  /**< XGPON ONU - RSSI Measurement */
+    BCMOLT_GROUP_ID_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION                                  = 793,  /**< XGPON ONU - Secure mutual authentication */
+    BCMOLT_GROUP_ID_XGPON_ONU_SET_ONU_STATE                                                 = 794,  /**< XGPON ONU - Set ONU State */
+    BCMOLT_GROUP_ID_XGPON_ONU_CPU_PACKETS                                                   = 795,  /**< XGPON ONU - XGPON CPU packets */
+    BCMOLT_GROUP_ID_XGPON_ONU_PLOAM_PACKET                                                  = 796,  /**< XGPON ONU - PLOAM Packet */
+    BCMOLT_GROUP_ID_XGPON_ONU_CPU_PACKET                                                    = 797,  /**< XGPON ONU - XGPON CPU packet */
+    BCMOLT_GROUP_ID_XGPON_ONU_OMCI_PACKET                                                   = 798,  /**< XGPON ONU - XGPON OMCI packet */
+    BCMOLT_GROUP_ID_XGPON_TRX_KEY                                                           = 799,  /**< XGPON TRX - key */
+    BCMOLT_GROUP_ID_XGPON_TRX_CFG                                                           = 800,  /**< XGPON TRX - cfg */
+    BCMOLT_GROUP_ID_XPON_SERDES_KEY                                                         = 801,  /**< xpon_serdes - key */
+    BCMOLT_GROUP_ID_XPON_SERDES_CFG                                                         = 802,  /**< xpon_serdes - cfg */
+    BCMOLT_GROUP_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_group_id;
+
+/** List of all ae_ni groups of type oper. 
+ */
+typedef enum bcmolt_ae_ni_oper_id
+{
+    BCMOLT_AE_NI_OPER_ID__BEGIN,
+    BCMOLT_AE_NI_OPER_ID_SET_AE_NI_EN_STATE                                                 = 0,    /**< Set AE NI Enable State. */
+    BCMOLT_AE_NI_OPER_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_ae_ni_oper_id;
+
+/** List of all ae_path_ds groups of type auto. 
+ */
+typedef enum bcmolt_ae_path_ds_auto_id
+{
+    BCMOLT_AE_PATH_DS_AUTO_ID__BEGIN,
+    BCMOLT_AE_PATH_DS_AUTO_ID_STAT_ALARM_CLEARED                                            = 0,    /**< Stat Alarm Cleared. */
+    BCMOLT_AE_PATH_DS_AUTO_ID_STAT_ALARM_RAISED,    /**< Stat Alarm Raised. */
+    BCMOLT_AE_PATH_DS_AUTO_ID__NUM_OF               /**< Number of enum entries, not an entry itself. */
+} bcmolt_ae_path_ds_auto_id;
+
+/** List of all ae_path_us groups of type auto. 
+ */
+typedef enum bcmolt_ae_path_us_auto_id
+{
+    BCMOLT_AE_PATH_US_AUTO_ID__BEGIN,
+    BCMOLT_AE_PATH_US_AUTO_ID_STAT_ALARM_CLEARED                                            = 0,    /**< Stat Alarm Cleared. */
+    BCMOLT_AE_PATH_US_AUTO_ID_STAT_ALARM_RAISED,    /**< Stat Alarm Raised. */
+    BCMOLT_AE_PATH_US_AUTO_ID__NUM_OF               /**< Number of enum entries, not an entry itself. */
+} bcmolt_ae_path_us_auto_id;
+
+/** List of all debug groups of type auto. 
+ */
+typedef enum bcmolt_debug_auto_id
+{
+    BCMOLT_DEBUG_AUTO_ID__BEGIN,
+    BCMOLT_DEBUG_AUTO_ID_CLI_OUTPUT                                                         = 0,    /**< cli_output. */
+    BCMOLT_DEBUG_AUTO_ID_FILE_ALMOST_FULL,  /**< file_almost_full. */
+    BCMOLT_DEBUG_AUTO_ID__NUM_OF            /**< Number of enum entries, not an entry itself. */
+} bcmolt_debug_auto_id;
+
+/** List of all debug groups of type oper. 
+ */
+typedef enum bcmolt_debug_oper_id
+{
+    BCMOLT_DEBUG_OPER_ID__BEGIN,
+    BCMOLT_DEBUG_OPER_ID_CLI_INPUT                                                          = 0,    /**< CLI_input. */
+    BCMOLT_DEBUG_OPER_ID_RESET_API_CAPTURE, /**< Reset API Capture. */
+    BCMOLT_DEBUG_OPER_ID_START_API_CAPTURE, /**< Start API Capture. */
+    BCMOLT_DEBUG_OPER_ID_STOP_API_CAPTURE,  /**< Stop API Capture. */
+    BCMOLT_DEBUG_OPER_ID__NUM_OF            /**< Number of enum entries, not an entry itself. */
+} bcmolt_debug_oper_id;
+
+/** List of all device groups of type auto. 
+ */
+typedef enum bcmolt_device_auto_id
+{
+    BCMOLT_DEVICE_AUTO_ID__BEGIN,
+    BCMOLT_DEVICE_AUTO_ID_CONNECTION_COMPLETE                                               = 0,    /**< Connection Complete. */
+    BCMOLT_DEVICE_AUTO_ID_CONNECTION_ESTABLISHED,   /**< Connection Established (Internal). */
+    BCMOLT_DEVICE_AUTO_ID_CONNECTION_FAILURE,       /**< Connection Failure. */
+    BCMOLT_DEVICE_AUTO_ID_DDR_TEST_COMPLETE,        /**< DDR Test Complete. */
+    BCMOLT_DEVICE_AUTO_ID_DEVICE_KEEP_ALIVE,        /**< Device Keep Alive (Internal). */
+    BCMOLT_DEVICE_AUTO_ID_DEVICE_READY,             /**< Device Ready (Internal). */
+    BCMOLT_DEVICE_AUTO_ID_DISCONNECTION_COMPLETE,   /**< Disconnection Complete. */
+    BCMOLT_DEVICE_AUTO_ID_IMAGE_TRANSFER_COMPLETE,  /**< Image Transfer Complete. */
+    BCMOLT_DEVICE_AUTO_ID_INDICATIONS_DROPPED,      /**< Indications Dropped. */
+    BCMOLT_DEVICE_AUTO_ID_SW_ERROR,                 /**< sw error. */
+    BCMOLT_DEVICE_AUTO_ID_SW_EXCEPTION,             /**< sw exception. */
+    BCMOLT_DEVICE_AUTO_ID__NUM_OF                   /**< Number of enum entries, not an entry itself. */
+} bcmolt_device_auto_id;
+
+/** List of all device groups of type oper. 
+ */
+typedef enum bcmolt_device_oper_id
+{
+    BCMOLT_DEVICE_OPER_ID__BEGIN,
+    BCMOLT_DEVICE_OPER_ID_CONNECT                                                           = 0,    /**< Connect. */
+    BCMOLT_DEVICE_OPER_ID_DISCONNECT,           /**< Device Disconnect. */
+    BCMOLT_DEVICE_OPER_ID_HOST_KEEP_ALIVE,      /**< Host Keep Alive (Internal). */
+    BCMOLT_DEVICE_OPER_ID_IMAGE_TRANSFER_DATA,  /**< Image Data Transfer Operation (Internal). */
+    BCMOLT_DEVICE_OPER_ID_IMAGE_TRANSFER_START, /**< Start Image Transfer Operation. */
+    BCMOLT_DEVICE_OPER_ID_RESET,                /**< Device Reset. */
+    BCMOLT_DEVICE_OPER_ID_RUN_DDR_TEST,         /**< Run DDR Test. */
+    BCMOLT_DEVICE_OPER_ID_SW_UPGRADE_ACTIVATE,  /**< SW upgrade activate. */
+    BCMOLT_DEVICE_OPER_ID__NUM_OF               /**< Number of enum entries, not an entry itself. */
+} bcmolt_device_oper_id;
+
+/** List of all epon_denied_link groups of type auto. 
+ */
+typedef enum bcmolt_epon_denied_link_auto_id
+{
+    BCMOLT_EPON_DENIED_LINK_AUTO_ID__BEGIN,
+    BCMOLT_EPON_DENIED_LINK_AUTO_ID_LASER_ON_OFF_VIOLATION                                  = 0,    /**< Laser On/Off Violation. */
+    BCMOLT_EPON_DENIED_LINK_AUTO_ID_LLID_POOL_EMPTY_VIOLATION,      /**< LLID Pool Empty Violation. */
+    BCMOLT_EPON_DENIED_LINK_AUTO_ID_MAX_LINK_VIOLATION,             /**< Max Link Violation. */
+    BCMOLT_EPON_DENIED_LINK_AUTO_ID_OVERHEAD_PROFILE_VIOLATION,     /**< Overhead Profile Violation. */
+    BCMOLT_EPON_DENIED_LINK_AUTO_ID_RANGE_VIOLATION,                /**< Range Violation. */
+    BCMOLT_EPON_DENIED_LINK_AUTO_ID_ROGUE_VIOLATION,                /**< Rogue ONU Detected. */
+    BCMOLT_EPON_DENIED_LINK_AUTO_ID_SYSTEM_RESOURCE_VIOLATION,      /**< System Resource Violation. */
+    BCMOLT_EPON_DENIED_LINK_AUTO_ID_TDM_CHANNELS_EXHAUSTED,         /**< TDM Channels Exhausted. */
+    BCMOLT_EPON_DENIED_LINK_AUTO_ID_UNKNOWN_LINK_VIOLATION,         /**< Unknown Link Violation. */
+    BCMOLT_EPON_DENIED_LINK_AUTO_ID_UPSTREAM_BANDWIDTH_VIOLATION,   /**< Upstream Bandwidth Violation. */
+    BCMOLT_EPON_DENIED_LINK_AUTO_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_denied_link_auto_id;
+
+/** List of all epon_link groups of type auto. 
+ */
+typedef enum bcmolt_epon_link_auto_id
+{
+    BCMOLT_EPON_LINK_AUTO_ID__BEGIN,
+    BCMOLT_EPON_LINK_AUTO_ID_DUPLICATE_MPCP_REGISTRATION_REQUEST                            = 0,    /**< Duplicate MPCP Registration Request. */
+    BCMOLT_EPON_LINK_AUTO_ID_ENCRYPTION_ENABLED,            /**< Encryption Enabled. */
+    BCMOLT_EPON_LINK_AUTO_ID_KEY_EXCHANGE_FAILURE,          /**< Key Exchange Failure. */
+    BCMOLT_EPON_LINK_AUTO_ID_KEY_EXCHANGE_STARTED,          /**< key_exchange_started. */
+    BCMOLT_EPON_LINK_AUTO_ID_KEY_EXCHANGE_STOPPED,          /**< key_exchange_stopped. */
+    BCMOLT_EPON_LINK_AUTO_ID_LINK_DELETED,                  /**< Link Deleted. */
+    BCMOLT_EPON_LINK_AUTO_ID_LINK_SPEED_MISMATCH,           /**< Link attempted to register at a different speed. */
+    BCMOLT_EPON_LINK_AUTO_ID_MPCP_DEREGISTERED,             /**< MPCP Deregistered. */
+    BCMOLT_EPON_LINK_AUTO_ID_MPCP_DISCOVERED,               /**< MPCP Discovered. */
+    BCMOLT_EPON_LINK_AUTO_ID_MPCP_REG_ACK_TIMEOUT,          /**< MPCP Reg Ack Timeout. */
+    BCMOLT_EPON_LINK_AUTO_ID_MPCP_REPORT_TIMEOUT,           /**< MPCP Report Timeout. */
+    BCMOLT_EPON_LINK_AUTO_ID_OAM_KEEPALIVE_TIMEOUT,         /**< OAM Keepalive Timeout. */
+    BCMOLT_EPON_LINK_AUTO_ID_OAM_KEEPALIVE_TIMER_STARTED,   /**< OAM keepalive timer started. */
+    BCMOLT_EPON_LINK_AUTO_ID_OAM_KEEPALIVE_TIMER_STOPPED,   /**< OAM keepalive timer stopped. */
+    BCMOLT_EPON_LINK_AUTO_ID_PREPROVISIONED_LINK_CREATED,   /**< Preprovisioned Link Created. */
+    BCMOLT_EPON_LINK_AUTO_ID_PROTECTION_SWITCH_OCCURRED,    /**< Protection Switch Occurred. */
+    BCMOLT_EPON_LINK_AUTO_ID_RANGE_VALUE_CHANGED,           /**< Range Value Changed. */
+    BCMOLT_EPON_LINK_AUTO_ID_RERANGE_FAILURE,               /**< Re-range failure. */
+    BCMOLT_EPON_LINK_AUTO_ID_STAT_ALARM_CLEARED,            /**< Stat Alarm Cleared. */
+    BCMOLT_EPON_LINK_AUTO_ID_STAT_ALARM_RAISED,             /**< Stat Alarm Raised. */
+    BCMOLT_EPON_LINK_AUTO_ID_STATIC_REGISTRATION_DONE,      /**< Static registration done. */
+    BCMOLT_EPON_LINK_AUTO_ID__NUM_OF                        /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_link_auto_id;
+
+/** List of all epon_link groups of type oper. 
+ */
+typedef enum bcmolt_epon_link_oper_id
+{
+    BCMOLT_EPON_LINK_OPER_ID__BEGIN,
+    BCMOLT_EPON_LINK_OPER_ID_DELETE_LINK                                                    = 0,    /**< Delete Link. */
+    BCMOLT_EPON_LINK_OPER_ID_FORCE_REDISCOVERY,         /**< Force Link Rediscovery. */
+    BCMOLT_EPON_LINK_OPER_ID_KEY_EXCHANGE_START,        /**< Key exchange start. */
+    BCMOLT_EPON_LINK_OPER_ID_KEY_EXCHANGE_STOP,         /**< Key exchange stop. */
+    BCMOLT_EPON_LINK_OPER_ID_OAM_KEEPALIVE_TIMER_START, /**< OAM Keepalive Timer Start. */
+    BCMOLT_EPON_LINK_OPER_ID_OAM_KEEPALIVE_TIMER_STOP,  /**< OAM Keepalive Timer Stop. */
+    BCMOLT_EPON_LINK_OPER_ID_STATIC_REGISTRATION,       /**< static_registration. */
+    BCMOLT_EPON_LINK_OPER_ID__NUM_OF                    /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_link_oper_id;
+
+/** List of all epon_link groups of type proxy. 
+ */
+typedef enum bcmolt_epon_link_proxy_id
+{
+    BCMOLT_EPON_LINK_PROXY_ID__BEGIN,
+    BCMOLT_EPON_LINK_PROXY_ID_INJECT_FRAME                                                  = 0,    /**< Inject Frame. */
+    BCMOLT_EPON_LINK_PROXY_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_link_proxy_id;
+
+/** List of all epon_link groups of type proxy_rx. 
+ */
+typedef enum bcmolt_epon_link_proxy_rx_id
+{
+    BCMOLT_EPON_LINK_PROXY_RX_ID__BEGIN,
+    BCMOLT_EPON_LINK_PROXY_RX_ID_FRAME_CAPTURED                                             = 0,    /**< Frame Captured. */
+    BCMOLT_EPON_LINK_PROXY_RX_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_link_proxy_rx_id;
+
+/** List of all epon_ni groups of type auto. 
+ */
+typedef enum bcmolt_epon_ni_auto_id
+{
+    BCMOLT_EPON_NI_AUTO_ID__BEGIN,
+    BCMOLT_EPON_NI_AUTO_ID_AUTO_ROGUE_SCAN_10G_FAILURE                                      = 0,    /**< 10G Epon Autonomous Rogue Scan failure detected. */
+    BCMOLT_EPON_NI_AUTO_ID_AUTO_ROGUE_SCAN_1G_FAILURE,  /**< 1G Epon Autonomous Rogue Scan failure detected. */
+    BCMOLT_EPON_NI_AUTO_ID_LLID_QUARANTINED,            /**< LLID Quarantined. */
+    BCMOLT_EPON_NI_AUTO_ID_MPCP_TIMESTAMP_CHANGED,      /**< MPCP Timestamp Changed. */
+    BCMOLT_EPON_NI_AUTO_ID_NO_REPORTS,                  /**< No Reports. */
+    BCMOLT_EPON_NI_AUTO_ID_ONU_UPGRADE_COMPLETE,        /**< ONU Upgrade Complete. */
+    BCMOLT_EPON_NI_AUTO_ID_RERANGE_FAILURE,             /**< Re-range failure. */
+    BCMOLT_EPON_NI_AUTO_ID_ROGUE_SCAN_COMPLETE,         /**< Rogue Scan is Complete. */
+    BCMOLT_EPON_NI_AUTO_ID_RSSI_MEASUREMENT_COMPLETED,  /**< RSSI Measurement Completed. */
+    BCMOLT_EPON_NI_AUTO_ID_STATE_CHANGE_COMPLETED,      /**< State Change Completed. */
+    BCMOLT_EPON_NI_AUTO_ID__NUM_OF                      /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_ni_auto_id;
+
+/** List of all epon_ni groups of type oper. 
+ */
+typedef enum bcmolt_epon_ni_oper_id
+{
+    BCMOLT_EPON_NI_OPER_ID__BEGIN,
+    BCMOLT_EPON_NI_OPER_ID_ADD_LINK                                                         = 0,    /**< Add link. */
+    BCMOLT_EPON_NI_OPER_ID_ADD_MULTICAST_LINK,          /**< Add Mutlticastlink. */
+    BCMOLT_EPON_NI_OPER_ID_ADD_PROTECTED_STANDBY_LINK,  /**< Add Protected Standby Link. */
+    BCMOLT_EPON_NI_OPER_ID_ISSUE_RSSI_GRANT,            /**< Issue an Rx Power Measurement Request. */
+    BCMOLT_EPON_NI_OPER_ID_PROTECTION_SWITCHING_APPLY_RERANGE_DELTA,    /**< Protection switching apply re-range delta. */
+    BCMOLT_EPON_NI_OPER_ID_ROGUE_LLID_SCAN,         /**< Run Rogue LLID Scan. */
+    BCMOLT_EPON_NI_OPER_ID_SET_EPON_NI_EN_STATE,    /**< Set EPON NI Enable State. */
+    BCMOLT_EPON_NI_OPER_ID_START_ONU_UPGRADE,       /**< Start ONU Firmware Upgrade. */
+    BCMOLT_EPON_NI_OPER_ID__NUM_OF                  /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_ni_oper_id;
+
+/** List of all epon_onu_10g_us groups of type auto. 
+ */
+typedef enum bcmolt_epon_onu_10g_us_auto_id
+{
+    BCMOLT_EPON_ONU_10G_US_AUTO_ID__BEGIN,
+    BCMOLT_EPON_ONU_10G_US_AUTO_ID_STAT_ALARM_CLEARED                                       = 0,    /**< Stat Alarm Cleared. */
+    BCMOLT_EPON_ONU_10G_US_AUTO_ID_STAT_ALARM_RAISED,   /**< Stat Alarm Raised. */
+    BCMOLT_EPON_ONU_10G_US_AUTO_ID__NUM_OF              /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_onu_10g_us_auto_id;
+
+/** List of all epon_onu_1g_us groups of type auto. 
+ */
+typedef enum bcmolt_epon_onu_1g_us_auto_id
+{
+    BCMOLT_EPON_ONU_1G_US_AUTO_ID__BEGIN,
+    BCMOLT_EPON_ONU_1G_US_AUTO_ID_STAT_ALARM_CLEARED                                        = 0,    /**< Stat Alarm Cleared. */
+    BCMOLT_EPON_ONU_1G_US_AUTO_ID_STAT_ALARM_RAISED,    /**< Stat Alarm Raised. */
+    BCMOLT_EPON_ONU_1G_US_AUTO_ID__NUM_OF               /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_onu_1g_us_auto_id;
+
+/** List of all epon_path_10g_ds groups of type auto. 
+ */
+typedef enum bcmolt_epon_path_10g_ds_auto_id
+{
+    BCMOLT_EPON_PATH_10G_DS_AUTO_ID__BEGIN,
+    BCMOLT_EPON_PATH_10G_DS_AUTO_ID_STAT_ALARM_CLEARED                                      = 0,    /**< Stat Alarm Cleared. */
+    BCMOLT_EPON_PATH_10G_DS_AUTO_ID_STAT_ALARM_RAISED,  /**< Stat Alarm Raised. */
+    BCMOLT_EPON_PATH_10G_DS_AUTO_ID__NUM_OF             /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_path_10g_ds_auto_id;
+
+/** List of all epon_path_10g_us groups of type auto. 
+ */
+typedef enum bcmolt_epon_path_10g_us_auto_id
+{
+    BCMOLT_EPON_PATH_10G_US_AUTO_ID__BEGIN,
+    BCMOLT_EPON_PATH_10G_US_AUTO_ID_STAT_ALARM_CLEARED                                      = 0,    /**< Stat Alarm Cleared. */
+    BCMOLT_EPON_PATH_10G_US_AUTO_ID_STAT_ALARM_RAISED,  /**< Stat Alarm Raised. */
+    BCMOLT_EPON_PATH_10G_US_AUTO_ID__NUM_OF             /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_path_10g_us_auto_id;
+
+/** List of all epon_path_1g_ds groups of type auto. 
+ */
+typedef enum bcmolt_epon_path_1g_ds_auto_id
+{
+    BCMOLT_EPON_PATH_1G_DS_AUTO_ID__BEGIN,
+    BCMOLT_EPON_PATH_1G_DS_AUTO_ID_STAT_ALARM_CLEARED                                       = 0,    /**< Stat Alarm Cleared. */
+    BCMOLT_EPON_PATH_1G_DS_AUTO_ID_STAT_ALARM_RAISED,   /**< Stat Alarm Raised. */
+    BCMOLT_EPON_PATH_1G_DS_AUTO_ID__NUM_OF              /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_path_1g_ds_auto_id;
+
+/** List of all epon_path_1g_us groups of type auto. 
+ */
+typedef enum bcmolt_epon_path_1g_us_auto_id
+{
+    BCMOLT_EPON_PATH_1G_US_AUTO_ID__BEGIN,
+    BCMOLT_EPON_PATH_1G_US_AUTO_ID_STAT_ALARM_CLEARED                                       = 0,    /**< Stat Alarm Cleared. */
+    BCMOLT_EPON_PATH_1G_US_AUTO_ID_STAT_ALARM_RAISED,   /**< Stat Alarm Raised. */
+    BCMOLT_EPON_PATH_1G_US_AUTO_ID__NUM_OF              /**< Number of enum entries, not an entry itself. */
+} bcmolt_epon_path_1g_us_auto_id;
+
+/** List of all gpon_alloc groups of type auto. 
+ */
+typedef enum bcmolt_gpon_alloc_auto_id
+{
+    BCMOLT_GPON_ALLOC_AUTO_ID__BEGIN,
+    BCMOLT_GPON_ALLOC_AUTO_ID_CONFIGURATION_COMPLETED                                       = 0,    /**< Configuration Completed. */
+    BCMOLT_GPON_ALLOC_AUTO_ID_GET_ALLOC_STATS_COMPLETED,    /**< Get alloc ID statistics completed. */
+    BCMOLT_GPON_ALLOC_AUTO_ID_STAT_ALARM_CLEARED,           /**< Stat Alarm Cleared. */
+    BCMOLT_GPON_ALLOC_AUTO_ID_STAT_ALARM_RAISED,            /**< Stat Alarm Raised. */
+    BCMOLT_GPON_ALLOC_AUTO_ID__NUM_OF                       /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_alloc_auto_id;
+
+/** List of all gpon_alloc groups of type oper. 
+ */
+typedef enum bcmolt_gpon_alloc_oper_id
+{
+    BCMOLT_GPON_ALLOC_OPER_ID__BEGIN,
+    BCMOLT_GPON_ALLOC_OPER_ID_GET_STATS                                                     = 0,    /**< Get statistics. */
+    BCMOLT_GPON_ALLOC_OPER_ID_SET_STATE,    /**< Set state. */
+    BCMOLT_GPON_ALLOC_OPER_ID__NUM_OF       /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_alloc_oper_id;
+
+/** List of all gpon_gem_port groups of type auto. 
+ */
+typedef enum bcmolt_gpon_gem_port_auto_id
+{
+    BCMOLT_GPON_GEM_PORT_AUTO_ID__BEGIN,
+    BCMOLT_GPON_GEM_PORT_AUTO_ID_CONFIGURATION_COMPLETED                                    = 0,    /**< Configuration Completed. */
+    BCMOLT_GPON_GEM_PORT_AUTO_ID_STAT_ALARM_CLEARED,    /**< Stat Alarm Cleared. */
+    BCMOLT_GPON_GEM_PORT_AUTO_ID_STAT_ALARM_RAISED,     /**< Stat Alarm Raised. */
+    BCMOLT_GPON_GEM_PORT_AUTO_ID__NUM_OF                /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_gem_port_auto_id;
+
+/** List of all gpon_gem_port groups of type oper. 
+ */
+typedef enum bcmolt_gpon_gem_port_oper_id
+{
+    BCMOLT_GPON_GEM_PORT_OPER_ID__BEGIN,
+    BCMOLT_GPON_GEM_PORT_OPER_ID_SET_STATE                                                  = 0,    /**< Set state. */
+    BCMOLT_GPON_GEM_PORT_OPER_ID__NUM_OF    /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_gem_port_oper_id;
+
+/** List of all gpon_iwf groups of type auto. 
+ */
+typedef enum bcmolt_gpon_iwf_auto_id
+{
+    BCMOLT_GPON_IWF_AUTO_ID__BEGIN,
+    BCMOLT_GPON_IWF_AUTO_ID_FLUSH_MAC_TABLE_COMPLETED                                       = 0,    /**< Flush MAC Table Completed. */
+    BCMOLT_GPON_IWF_AUTO_ID_SCAN_MAC_TABLE_COMPLETED,   /**< Scan MAC Table Completed. */
+    BCMOLT_GPON_IWF_AUTO_ID_STAT_ALARM_CLEARED,         /**< Stat Alarm Cleared. */
+    BCMOLT_GPON_IWF_AUTO_ID_STAT_ALARM_RAISED,          /**< Stat Alarm Raised. */
+    BCMOLT_GPON_IWF_AUTO_ID__NUM_OF                     /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_iwf_auto_id;
+
+/** List of all gpon_iwf groups of type oper. 
+ */
+typedef enum bcmolt_gpon_iwf_oper_id
+{
+    BCMOLT_GPON_IWF_OPER_ID__BEGIN,
+    BCMOLT_GPON_IWF_OPER_ID_FLUSH_MAC_TABLE                                                 = 0,    /**< Flush MAC Table. */
+    BCMOLT_GPON_IWF_OPER_ID_SCAN_MAC_TABLE, /**< Scan MAC Table. */
+    BCMOLT_GPON_IWF_OPER_ID__NUM_OF         /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_iwf_oper_id;
+
+/** List of all gpon_iwf_mac_table groups of type auto. 
+ */
+typedef enum bcmolt_gpon_iwf_mac_table_auto_id
+{
+    BCMOLT_GPON_IWF_MAC_TABLE_AUTO_ID__BEGIN,
+    BCMOLT_GPON_IWF_MAC_TABLE_AUTO_ID_MAC_AGED                                              = 0,    /**< MAC Aged. */
+    BCMOLT_GPON_IWF_MAC_TABLE_AUTO_ID_MAC_DROPPED,  /**< MAC Dropped. */
+    BCMOLT_GPON_IWF_MAC_TABLE_AUTO_ID_MAC_MOVE,     /**< MAC Move. */
+    BCMOLT_GPON_IWF_MAC_TABLE_AUTO_ID_NEW_MAC,      /**< New MAC. */
+    BCMOLT_GPON_IWF_MAC_TABLE_AUTO_ID__NUM_OF       /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_iwf_mac_table_auto_id;
+
+/** List of all gpon_ni groups of type auto. 
+ */
+typedef enum bcmolt_gpon_ni_auto_id
+{
+    BCMOLT_GPON_NI_AUTO_ID__BEGIN,
+    BCMOLT_GPON_NI_AUTO_ID_ACTIVATE_ALL_ONUS_COMPLETED                                      = 0,    /**< activate all onus completed. */
+    BCMOLT_GPON_NI_AUTO_ID_CPU_PACKETS_FAILURE,             /**< CPU Packets Failure. */
+    BCMOLT_GPON_NI_AUTO_ID_DEACTIVATE_ALL_ONUS_COMPLETED,   /**< deactivate all onus completed. */
+    BCMOLT_GPON_NI_AUTO_ID_DISABLE_ALL_ONUS_COMPLETED,      /**< disable all onus completed. */
+    BCMOLT_GPON_NI_AUTO_ID_ENABLE_ALL_ONUS_COMPLETED,       /**< enable all onus completed. */
+    BCMOLT_GPON_NI_AUTO_ID_LOS,                     /**< LOS. */
+    BCMOLT_GPON_NI_AUTO_ID_ONU_DISCOVERED,          /**< ONU Discovered. */
+    BCMOLT_GPON_NI_AUTO_ID_ONU_UPGRADE_COMPLETE,    /**< ONU Upgrade Complete. */
+    BCMOLT_GPON_NI_AUTO_ID_PROTECTION_SWITCHING_ONUS_RANGED,            /**< Protection Switching ONUs Ranged. */
+    BCMOLT_GPON_NI_AUTO_ID_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED,   /**< Protection Switching Switchover Completed. */
+    BCMOLT_GPON_NI_AUTO_ID_PROTECTION_SWITCHING_TRAFFIC_RESUME,         /**< Protection Switching Traffic Resume. */
+    BCMOLT_GPON_NI_AUTO_ID_ROGUE_DETECTION_COMPLETED,                   /**< Rogue detection completed. */
+    BCMOLT_GPON_NI_AUTO_ID_ROGUE_ONU_SPECIAL_MAP_CYCLE_START,           /**< Rogue ONU special map cycle start. */
+    BCMOLT_GPON_NI_AUTO_ID_SERIAL_NUMBER_ACQUISITION_CYCLE_START,       /**< Serial Number Acquisition Cycle Start. */
+    BCMOLT_GPON_NI_AUTO_ID_STANDBY_PON_MONITORING_CYCLE_COMPLETED,      /**< Standby PON Monitoring Cycle Completed. */
+    BCMOLT_GPON_NI_AUTO_ID_STAT_ALARM_CLEARED,      /**< Stat Alarm Cleared. */
+    BCMOLT_GPON_NI_AUTO_ID_STAT_ALARM_RAISED,       /**< Stat Alarm Raised. */
+    BCMOLT_GPON_NI_AUTO_ID_STATE_CHANGE_COMPLETED,  /**< State Change Completed. */
+    BCMOLT_GPON_NI_AUTO_ID_TOD_REQUEST_COMPLETED,   /**< TOD request completed. */
+    BCMOLT_GPON_NI_AUTO_ID__NUM_OF                  /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_ni_auto_id;
+
+/** List of all gpon_ni groups of type oper. 
+ */
+typedef enum bcmolt_gpon_ni_oper_id
+{
+    BCMOLT_GPON_NI_OPER_ID__BEGIN,
+    BCMOLT_GPON_NI_OPER_ID_DISABLE_SERIAL_NUMBER                                            = 0,    /**< Disable Serial Number. */
+    BCMOLT_GPON_NI_OPER_ID_PROTECTION_SWITCHING_TYPE_C_SET_MULTIPLE_ONU_STATE,                      /**< protection switching type c set multiple onu state. */
+    BCMOLT_GPON_NI_OPER_ID_RESET,                   /**< Reset. */
+    BCMOLT_GPON_NI_OPER_ID_ROGUE_DETECTION_WINDOW,  /**< Rogue Detection Window. */
+    BCMOLT_GPON_NI_OPER_ID_SET_ONU_STATE,           /**< Set ONU State. */
+    BCMOLT_GPON_NI_OPER_ID_SET_PON_STATE,           /**< Set PON State. */
+    BCMOLT_GPON_NI_OPER_ID_SINGLE_REQUEST_STANDBY_PON_MONITORING,   /**< Single request for standby PON monitoring. */
+    BCMOLT_GPON_NI_OPER_ID_START_ONU_UPGRADE,                       /**< Start ONU Firmware Upgrade. */
+    BCMOLT_GPON_NI_OPER_ID_TOD_REQUEST, /**< TOD request. */
+    BCMOLT_GPON_NI_OPER_ID__NUM_OF      /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_ni_oper_id;
+
+/** List of all gpon_ni groups of type proxy. 
+ */
+typedef enum bcmolt_gpon_ni_proxy_id
+{
+    BCMOLT_GPON_NI_PROXY_ID__BEGIN,
+    BCMOLT_GPON_NI_PROXY_ID_BROADCAST_PLOAM_PACKET                                          = 0,    /**< Broadcast PLOAM Packet. */
+    BCMOLT_GPON_NI_PROXY_ID_CPU_PACKETS,    /**< GPON CPU Packets. */
+    BCMOLT_GPON_NI_PROXY_ID__NUM_OF         /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_ni_proxy_id;
+
+/** List of all gpon_onu groups of type auto. 
+ */
+typedef enum bcmolt_gpon_onu_auto_id
+{
+    BCMOLT_GPON_ONU_AUTO_ID__BEGIN,
+    BCMOLT_GPON_ONU_AUTO_ID_BER_INTERVAL_CONFIGURATION_COMPLETED                            = 0,    /**< BER Interval Configuration Completed. */
+    BCMOLT_GPON_ONU_AUTO_ID_DFI,                        /**< Receive Dying-Gasp of ONUi. */
+    BCMOLT_GPON_ONU_AUTO_ID_DGI,                        /**< Receive Dying-Gasp of ONUi. */
+    BCMOLT_GPON_ONU_AUTO_ID_DOWI,                       /**< Drift of Window of ONUi. */
+    BCMOLT_GPON_ONU_AUTO_ID_ERR,                        /**< ERR. */
+    BCMOLT_GPON_ONU_AUTO_ID_INVALID_DBRU_REPORT,        /**< Invalid DBRu Report. */
+    BCMOLT_GPON_ONU_AUTO_ID_KEY_EXCHANGE_COMPLETED,     /**< Key Exchange Completed. */
+    BCMOLT_GPON_ONU_AUTO_ID_KEY_EXCHANGE_CYCLE_SKIPPED, /**< Key Exchange Cycle Skipped. */
+    BCMOLT_GPON_ONU_AUTO_ID_KEY_EXCHANGE_DECRYPT_REQUIRED,      /**< Key Exchange Decrypt Required. */
+    BCMOLT_GPON_ONU_AUTO_ID_KEY_EXCHANGE_KEY_MISMATCH,          /**< Key Exchange Key Mismatch. */
+    BCMOLT_GPON_ONU_AUTO_ID_KEY_EXCHANGE_KEY_REQUEST_TIMEOUT,   /**< Key Exchange Key Request Timeout. */
+    BCMOLT_GPON_ONU_AUTO_ID_KEY_EXCHANGE_UNCONSECUTIVE_INDEX,   /**< Key Exchange Unconsecutive Index. */
+    BCMOLT_GPON_ONU_AUTO_ID_LOAI,   /**< LOAi. */
+    BCMOLT_GPON_ONU_AUTO_ID_LOKI,   /**< LOki. */
+    BCMOLT_GPON_ONU_AUTO_ID_MEMI,   /**< MEMi. */
+    BCMOLT_GPON_ONU_AUTO_ID_OMCI_PORT_ID_CONFIGURATION_COMPLETED,   /**< OMCI PORT ID Configuration Completed. */
+    BCMOLT_GPON_ONU_AUTO_ID_ONU_ACTIVATION_COMPLETED,               /**< ONU Activation Completed. */
+    BCMOLT_GPON_ONU_AUTO_ID_ONU_ACTIVATION_STANDBY_COMPLETED,       /**< onu activation standby completed. */
+    BCMOLT_GPON_ONU_AUTO_ID_ONU_ALARM,                  /**< ONU Alarm. */
+    BCMOLT_GPON_ONU_AUTO_ID_ONU_DEACTIVATION_COMPLETED, /**< ONU Deactivation Completed. */
+    BCMOLT_GPON_ONU_AUTO_ID_ONU_DISABLE_COMPLETED,      /**< ONU Disable Completed. */
+    BCMOLT_GPON_ONU_AUTO_ID_ONU_ENABLE_COMPLETED,       /**< ONU Enable Completed. */
+    BCMOLT_GPON_ONU_AUTO_ID_OPTICAL_REFLECTION,         /**< Optical Reflection. */
+    BCMOLT_GPON_ONU_AUTO_ID_PASSWORD_AUTHENTICATION_COMPLETED,  /**< Password Authentication Completed. */
+    BCMOLT_GPON_ONU_AUTO_ID_PEE,            /**< PEE. */
+    BCMOLT_GPON_ONU_AUTO_ID_POSSIBLE_DRIFT, /**< Possible Drift. */
+    BCMOLT_GPON_ONU_AUTO_ID_POWER_MANAGEMENT_STATE_CHANGE,  /**< Power Management State Change. */
+    BCMOLT_GPON_ONU_AUTO_ID_PST,                        /**< PST. */
+    BCMOLT_GPON_ONU_AUTO_ID_RANGING_COMPLETED,          /**< Ranging Completed. */
+    BCMOLT_GPON_ONU_AUTO_ID_REI,                        /**< REI. */
+    BCMOLT_GPON_ONU_AUTO_ID_RSSI_MEASUREMENT_COMPLETED, /**< RSSI Measurement Completed. */
+    BCMOLT_GPON_ONU_AUTO_ID_SDI,                        /**< Signal Degraded of ONUi. */
+    BCMOLT_GPON_ONU_AUTO_ID_SFI,                        /**< Signal Fail of ONUi. */
+    BCMOLT_GPON_ONU_AUTO_ID_STAT_ALARM_CLEARED,         /**< Stat Alarm Cleared. */
+    BCMOLT_GPON_ONU_AUTO_ID_STAT_ALARM_RAISED,          /**< Stat Alarm Raised. */
+    BCMOLT_GPON_ONU_AUTO_ID_SUFI,                       /**< SUFi. */
+    BCMOLT_GPON_ONU_AUTO_ID_TIWI,                       /**< Transmission Interference Warning. */
+    BCMOLT_GPON_ONU_AUTO_ID__NUM_OF                     /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_auto_id;
+
+/** List of all gpon_onu groups of type oper. 
+ */
+typedef enum bcmolt_gpon_onu_oper_id
+{
+    BCMOLT_GPON_ONU_OPER_ID__BEGIN,
+    BCMOLT_GPON_ONU_OPER_ID_CHANGE_POWER_LEVEL                                              = 0,    /**< Change Power Level. */
+    BCMOLT_GPON_ONU_OPER_ID_RSSI_MEASUREMENT,   /**< RSSI Measurement. */
+    BCMOLT_GPON_ONU_OPER_ID_SET_ONU_STATE,      /**< Set ONU State. */
+    BCMOLT_GPON_ONU_OPER_ID__NUM_OF             /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_oper_id;
+
+/** List of all gpon_onu groups of type proxy. 
+ */
+typedef enum bcmolt_gpon_onu_proxy_id
+{
+    BCMOLT_GPON_ONU_PROXY_ID__BEGIN,
+    BCMOLT_GPON_ONU_PROXY_ID_CPU_PACKETS                                                    = 0,    /**< GPON CPU Packets. */
+    BCMOLT_GPON_ONU_PROXY_ID_PLOAM_PACKET,  /**< PLOAM Packet. */
+    BCMOLT_GPON_ONU_PROXY_ID__NUM_OF        /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_proxy_id;
+
+/** List of all gpon_onu groups of type proxy_rx. 
+ */
+typedef enum bcmolt_gpon_onu_proxy_rx_id
+{
+    BCMOLT_GPON_ONU_PROXY_RX_ID__BEGIN,
+    BCMOLT_GPON_ONU_PROXY_RX_ID_CPU_PACKET                                                  = 0,    /**< GPON CPU packet. */
+    BCMOLT_GPON_ONU_PROXY_RX_ID_OMCI_PACKET,    /**< GPON OMCI packet. */
+    BCMOLT_GPON_ONU_PROXY_RX_ID__NUM_OF         /**< Number of enum entries, not an entry itself. */
+} bcmolt_gpon_onu_proxy_rx_id;
+
+/** List of all log_entry groups of type auto. 
+ */
+typedef enum bcmolt_log_entry_auto_id
+{
+    BCMOLT_LOG_ENTRY_AUTO_ID__BEGIN,
+    BCMOLT_LOG_ENTRY_AUTO_ID_STAT_ALARM_CLEARED                                             = 0,    /**< Stat Alarm Cleared. */
+    BCMOLT_LOG_ENTRY_AUTO_ID_STAT_ALARM_RAISED, /**< Stat Alarm Raised. */
+    BCMOLT_LOG_ENTRY_AUTO_ID__NUM_OF            /**< Number of enum entries, not an entry itself. */
+} bcmolt_log_entry_auto_id;
+
+/** List of all logger groups of type auto. 
+ */
+typedef enum bcmolt_logger_auto_id
+{
+    BCMOLT_LOGGER_AUTO_ID__BEGIN,
+    BCMOLT_LOGGER_AUTO_ID_STAT_ALARM_CLEARED                                                = 0,    /**< Stat Alarm Cleared. */
+    BCMOLT_LOGGER_AUTO_ID_STAT_ALARM_RAISED,    /**< Stat Alarm Raised. */
+    BCMOLT_LOGGER_AUTO_ID__NUM_OF               /**< Number of enum entries, not an entry itself. */
+} bcmolt_logger_auto_id;
+
+/** List of all logger groups of type oper. 
+ */
+typedef enum bcmolt_logger_oper_id
+{
+    BCMOLT_LOGGER_OPER_ID__BEGIN,
+    BCMOLT_LOGGER_OPER_ID_CLEAR_LOG                                                         = 0,    /**< clear log. */
+    BCMOLT_LOGGER_OPER_ID__NUM_OF   /**< Number of enum entries, not an entry itself. */
+} bcmolt_logger_oper_id;
+
+/** List of all nni groups of type auto. 
+ */
+typedef enum bcmolt_nni_auto_id
+{
+    BCMOLT_NNI_AUTO_ID__BEGIN,
+    BCMOLT_NNI_AUTO_ID_STAT_ALARM_CLEARED                                                   = 0,    /**< Stat Alarm Cleared. */
+    BCMOLT_NNI_AUTO_ID_STAT_ALARM_RAISED,   /**< Stat Alarm Raised. */
+    BCMOLT_NNI_AUTO_ID_STATUS_CHANGED,      /**< Status changed. */
+    BCMOLT_NNI_AUTO_ID__NUM_OF              /**< Number of enum entries, not an entry itself. */
+} bcmolt_nni_auto_id;
+
+/** List of all trx_calibration groups of type auto. 
+ */
+typedef enum bcmolt_trx_calibration_auto_id
+{
+    BCMOLT_TRX_CALIBRATION_AUTO_ID__BEGIN,
+    BCMOLT_TRX_CALIBRATION_AUTO_ID_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED                   = 0,    /**< Capture window and statistic completed. */
+    BCMOLT_TRX_CALIBRATION_AUTO_ID__NUM_OF  /**< Number of enum entries, not an entry itself. */
+} bcmolt_trx_calibration_auto_id;
+
+/** List of all trx_calibration groups of type oper. 
+ */
+typedef enum bcmolt_trx_calibration_oper_id
+{
+    BCMOLT_TRX_CALIBRATION_OPER_ID__BEGIN,
+    BCMOLT_TRX_CALIBRATION_OPER_ID_START_CAPTURE_WINDOW                                     = 0,    /**< start capture window. */
+    BCMOLT_TRX_CALIBRATION_OPER_ID_STOP_CAPTURE_WINDOW, /**< stop capture window. */
+    BCMOLT_TRX_CALIBRATION_OPER_ID__NUM_OF              /**< Number of enum entries, not an entry itself. */
+} bcmolt_trx_calibration_oper_id;
+
+/** List of all xgpon_alloc groups of type auto. 
+ */
+typedef enum bcmolt_xgpon_alloc_auto_id
+{
+    BCMOLT_XGPON_ALLOC_AUTO_ID__BEGIN,
+    BCMOLT_XGPON_ALLOC_AUTO_ID_CONFIGURATION_COMPLETED                                      = 0,    /**< Configuration Completed. */
+    BCMOLT_XGPON_ALLOC_AUTO_ID_GET_ALLOC_STATS_COMPLETED,   /**< Get alloc ID statistics completed. */
+    BCMOLT_XGPON_ALLOC_AUTO_ID_STAT_ALARM_CLEARED,          /**< Stat Alarm Cleared. */
+    BCMOLT_XGPON_ALLOC_AUTO_ID_STAT_ALARM_RAISED,           /**< Stat Alarm Raised. */
+    BCMOLT_XGPON_ALLOC_AUTO_ID__NUM_OF                      /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_alloc_auto_id;
+
+/** List of all xgpon_alloc groups of type oper. 
+ */
+typedef enum bcmolt_xgpon_alloc_oper_id
+{
+    BCMOLT_XGPON_ALLOC_OPER_ID__BEGIN,
+    BCMOLT_XGPON_ALLOC_OPER_ID_GET_STATS                                                    = 0,    /**< Get statistics. */
+    BCMOLT_XGPON_ALLOC_OPER_ID_SET_STATE,   /**< Set state. */
+    BCMOLT_XGPON_ALLOC_OPER_ID__NUM_OF      /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_alloc_oper_id;
+
+/** List of all xgpon_gem_port groups of type auto. 
+ */
+typedef enum bcmolt_xgpon_gem_port_auto_id
+{
+    BCMOLT_XGPON_GEM_PORT_AUTO_ID__BEGIN,
+    BCMOLT_XGPON_GEM_PORT_AUTO_ID_STAT_ALARM_CLEARED                                        = 0,    /**< Stat Alarm Cleared. */
+    BCMOLT_XGPON_GEM_PORT_AUTO_ID_STAT_ALARM_RAISED,    /**< Stat Alarm Raised. */
+    BCMOLT_XGPON_GEM_PORT_AUTO_ID__NUM_OF               /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_gem_port_auto_id;
+
+/** List of all xgpon_ni groups of type auto. 
+ */
+typedef enum bcmolt_xgpon_ni_auto_id
+{
+    BCMOLT_XGPON_NI_AUTO_ID__BEGIN,
+    BCMOLT_XGPON_NI_AUTO_ID_ACTIVATE_ALL_ONUS_COMPLETED                                     = 0,    /**< activate all onus completed. */
+    BCMOLT_XGPON_NI_AUTO_ID_CPU_PACKETS_FAILURE,            /**< CPU Packets Failure. */
+    BCMOLT_XGPON_NI_AUTO_ID_DEACTIVATE_ALL_ONUS_COMPLETED,  /**< deactivate all onus completed. */
+    BCMOLT_XGPON_NI_AUTO_ID_DISABLE_ALL_ONUS_COMPLETED,     /**< disable all onus completed. */
+    BCMOLT_XGPON_NI_AUTO_ID_ENABLE_ALL_ONUS_COMPLETED,      /**< enable all onus completed. */
+    BCMOLT_XGPON_NI_AUTO_ID_LOS,                    /**< LOS. */
+    BCMOLT_XGPON_NI_AUTO_ID_ONU_DISCOVERED,         /**< ONU Discovered. */
+    BCMOLT_XGPON_NI_AUTO_ID_ONU_UPGRADE_COMPLETE,   /**< ONU Upgrade Complete. */
+    BCMOLT_XGPON_NI_AUTO_ID_PROTECTION_SWITCHING_ONUS_RANGED,           /**< Protection Switching ONUs Ranged. */
+    BCMOLT_XGPON_NI_AUTO_ID_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED,  /**< Protection Switching Switchover Completed. */
+    BCMOLT_XGPON_NI_AUTO_ID_PROTECTION_SWITCHING_TRAFFIC_RESUME,        /**< Protection Switching Traffic Resume. */
+    BCMOLT_XGPON_NI_AUTO_ID_ROGUE_DETECTION_COMPLETED,                  /**< Rogue detection completed. */
+    BCMOLT_XGPON_NI_AUTO_ID_ROGUE_ONU_SPECIAL_MAP_CYCLE_START,          /**< Rogue ONU special map cycle start. */
+    BCMOLT_XGPON_NI_AUTO_ID_SERIAL_NUMBER_ACQUISITION_CYCLE_START,      /**< Serial Number Acquisition Cycle Start. */
+    BCMOLT_XGPON_NI_AUTO_ID_STANDBY_PON_MONITORING_CYCLE_COMPLETED,     /**< Standby PON Monitoring Cycle Completed. */
+    BCMOLT_XGPON_NI_AUTO_ID_STAT_ALARM_CLEARED,     /**< Stat Alarm Cleared. */
+    BCMOLT_XGPON_NI_AUTO_ID_STAT_ALARM_RAISED,      /**< Stat Alarm Raised. */
+    BCMOLT_XGPON_NI_AUTO_ID_STATE_CHANGE_COMPLETED, /**< State Change Completed. */
+    BCMOLT_XGPON_NI_AUTO_ID_TOD_REQUEST_COMPLETED,  /**< TOD request completed. */
+    BCMOLT_XGPON_NI_AUTO_ID__NUM_OF                 /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_ni_auto_id;
+
+/** List of all xgpon_ni groups of type oper. 
+ */
+typedef enum bcmolt_xgpon_ni_oper_id
+{
+    BCMOLT_XGPON_NI_OPER_ID__BEGIN,
+    BCMOLT_XGPON_NI_OPER_ID_ADJUST_TX_WAVELENGTH                                            = 0,    /**< Adjust Tx Wavelengh. */
+    BCMOLT_XGPON_NI_OPER_ID_DISABLE_SERIAL_NUMBER,                  /**< Disable Serial Number. */
+    BCMOLT_XGPON_NI_OPER_ID_RESET,                                  /**< Reset. */
+    BCMOLT_XGPON_NI_OPER_ID_ROGUE_DETECTION_WINDOW,                 /**< Rogue Detection Window. */
+    BCMOLT_XGPON_NI_OPER_ID_RUN_SPECIAL_BW_MAP,                     /**< Run Special BW Map. */
+    BCMOLT_XGPON_NI_OPER_ID_SET_ONU_STATE,                          /**< Set ONU State. */
+    BCMOLT_XGPON_NI_OPER_ID_SET_PON_STATE,                          /**< Set PON State. */
+    BCMOLT_XGPON_NI_OPER_ID_SINGLE_REQUEST_STANDBY_PON_MONITORING,  /**< Single request standby PON Monitoring. */
+    BCMOLT_XGPON_NI_OPER_ID_START_ONU_UPGRADE,                      /**< Start ONU Firmware Upgrade. */
+    BCMOLT_XGPON_NI_OPER_ID_TOD_REQUEST,    /**< TOD request. */
+    BCMOLT_XGPON_NI_OPER_ID__NUM_OF         /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_ni_oper_id;
+
+/** List of all xgpon_ni groups of type proxy. 
+ */
+typedef enum bcmolt_xgpon_ni_proxy_id
+{
+    BCMOLT_XGPON_NI_PROXY_ID__BEGIN,
+    BCMOLT_XGPON_NI_PROXY_ID_BROADCAST_PLOAM_PACKET                                         = 0,    /**< Broadcast PLOAM Packet. */
+    BCMOLT_XGPON_NI_PROXY_ID_CPU_PACKETS,   /**< XGPON CPU packets. */
+    BCMOLT_XGPON_NI_PROXY_ID__NUM_OF        /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_ni_proxy_id;
+
+/** List of all xgpon_onu groups of type auto. 
+ */
+typedef enum bcmolt_xgpon_onu_auto_id
+{
+    BCMOLT_XGPON_ONU_AUTO_ID__BEGIN,
+    BCMOLT_XGPON_ONU_AUTO_ID_DFI                                                            = 0,    /**< Receive Dying-Gasp of ONUi. */
+    BCMOLT_XGPON_ONU_AUTO_ID_DGI,                       /**< Receive Dying-Gasp of ONUi. */
+    BCMOLT_XGPON_ONU_AUTO_ID_DOWI,                      /**< Drift of Window of ONUi. */
+    BCMOLT_XGPON_ONU_AUTO_ID_INVALID_DBRU_REPORT,       /**< Invalid DBRu Report. */
+    BCMOLT_XGPON_ONU_AUTO_ID_KEY_EXCHANGE_COMPLETED,    /**< Key Exchange Completed. */
+    BCMOLT_XGPON_ONU_AUTO_ID_KEY_EXCHANGE_CYCLE_SKIPPED,        /**< Key Exchange Cycle Skipped. */
+    BCMOLT_XGPON_ONU_AUTO_ID_KEY_EXCHANGE_KEY_MISMATCH,         /**< Key Exchange Key Mismatch. */
+    BCMOLT_XGPON_ONU_AUTO_ID_KEY_EXCHANGE_KEY_REQUEST_TIMEOUT,  /**< Key Exchange Key Request Timeout. */
+    BCMOLT_XGPON_ONU_AUTO_ID_LOOCI,                     /**< LOOCi. */
+    BCMOLT_XGPON_ONU_AUTO_ID_ONU_ACTIVATION_COMPLETED,  /**< ONU Activation Completed. */
+    BCMOLT_XGPON_ONU_AUTO_ID_ONU_ALARM,                 /**< ONU Alarm. */
+    BCMOLT_XGPON_ONU_AUTO_ID_ONU_DEACTIVATION_COMPLETED,    /**< ONU Deactivation Completed. */
+    BCMOLT_XGPON_ONU_AUTO_ID_ONU_DISABLE_COMPLETED,         /**< ONU Disable Completed. */
+    BCMOLT_XGPON_ONU_AUTO_ID_ONU_ENABLE_COMPLETED,          /**< ONU Enable Completed. */
+    BCMOLT_XGPON_ONU_AUTO_ID_ONU_TUNING_IN_COMPLETED,       /**< ONU Tuning in completed. */
+    BCMOLT_XGPON_ONU_AUTO_ID_ONU_TUNING_OUT_COMPLETED,      /**< ONU Tuning out completed. */
+    BCMOLT_XGPON_ONU_AUTO_ID_OPTICAL_REFLECTION,            /**< Optical Reflection. */
+    BCMOLT_XGPON_ONU_AUTO_ID_POSSIBLE_DRIFT,                /**< Possible Drift. */
+    BCMOLT_XGPON_ONU_AUTO_ID_POWER_CONSUMPTION_REPORT,      /**< Power consumption report. */
+    BCMOLT_XGPON_ONU_AUTO_ID_POWER_LEVEL_REPORT,            /**< Power level report. */
+    BCMOLT_XGPON_ONU_AUTO_ID_POWER_MANAGEMENT_STATE_CHANGE, /**< Power Management State Change. */
+    BCMOLT_XGPON_ONU_AUTO_ID_PQSI,              /**< ploam queue status. */
+    BCMOLT_XGPON_ONU_AUTO_ID_RANGING_COMPLETED, /**< Ranging Completed. */
+    BCMOLT_XGPON_ONU_AUTO_ID_REGISTRATION_ID,   /**< Registration ID. */
+    BCMOLT_XGPON_ONU_AUTO_ID_RSSI_MEASUREMENT_COMPLETED,    /**< RSSI Measurement Completed. */
+    BCMOLT_XGPON_ONU_AUTO_ID_SDI,   /**< Signal Degraded of ONUi. */
+    BCMOLT_XGPON_ONU_AUTO_ID_SECURE_MUTUAL_AUTHENTICATION_FAILURE,  /**< secure mutual authentication failure. */
+    BCMOLT_XGPON_ONU_AUTO_ID_SFI,                   /**< Signal Fail of ONUi. */
+    BCMOLT_XGPON_ONU_AUTO_ID_STAT_ALARM_CLEARED,    /**< Stat Alarm Cleared. */
+    BCMOLT_XGPON_ONU_AUTO_ID_STAT_ALARM_RAISED,     /**< Stat Alarm Raised. */
+    BCMOLT_XGPON_ONU_AUTO_ID_SUFI,                  /**< SUFi. */
+    BCMOLT_XGPON_ONU_AUTO_ID_TIWI,                  /**< Transmission Interference Warning. */
+    BCMOLT_XGPON_ONU_AUTO_ID_TUNING_RESPONSE,       /**< Tuning response. */
+    BCMOLT_XGPON_ONU_AUTO_ID__NUM_OF                /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_auto_id;
+
+/** List of all xgpon_onu groups of type oper. 
+ */
+typedef enum bcmolt_xgpon_onu_oper_id
+{
+    BCMOLT_XGPON_ONU_OPER_ID__BEGIN,
+    BCMOLT_XGPON_ONU_OPER_ID_ADJUST_TX_WAVELENGTH                                           = 0,    /**< Adjust Tx wavelength. */
+    BCMOLT_XGPON_ONU_OPER_ID_CHANGE_POWER_LEVELLING,        /**< Change power levelling. */
+    BCMOLT_XGPON_ONU_OPER_ID_GET_POWER_CONSUMPTION,         /**< Get power consumption. */
+    BCMOLT_XGPON_ONU_OPER_ID_GET_POWER_LEVEL,               /**< Get power level. */
+    BCMOLT_XGPON_ONU_OPER_ID_ONU_TUNING_IN,                 /**< ONU Tuning in. */
+    BCMOLT_XGPON_ONU_OPER_ID_ONU_TUNING_OUT,                /**< ONU Tuning out. */
+    BCMOLT_XGPON_ONU_OPER_ID_REQUEST_REGISTRATION,          /**< Request registration. */
+    BCMOLT_XGPON_ONU_OPER_ID_RSSI_MEASUREMENT,              /**< RSSI Measurement. */
+    BCMOLT_XGPON_ONU_OPER_ID_SECURE_MUTUAL_AUTHENTICATION,  /**< Secure mutual authentication. */
+    BCMOLT_XGPON_ONU_OPER_ID_SET_ONU_STATE,                 /**< Set ONU State. */
+    BCMOLT_XGPON_ONU_OPER_ID__NUM_OF                        /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_oper_id;
+
+/** List of all xgpon_onu groups of type proxy. 
+ */
+typedef enum bcmolt_xgpon_onu_proxy_id
+{
+    BCMOLT_XGPON_ONU_PROXY_ID__BEGIN,
+    BCMOLT_XGPON_ONU_PROXY_ID_CPU_PACKETS                                                   = 0,    /**< XGPON CPU packets. */
+    BCMOLT_XGPON_ONU_PROXY_ID_PLOAM_PACKET, /**< PLOAM Packet. */
+    BCMOLT_XGPON_ONU_PROXY_ID__NUM_OF       /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_proxy_id;
+
+/** List of all xgpon_onu groups of type proxy_rx. 
+ */
+typedef enum bcmolt_xgpon_onu_proxy_rx_id
+{
+    BCMOLT_XGPON_ONU_PROXY_RX_ID__BEGIN,
+    BCMOLT_XGPON_ONU_PROXY_RX_ID_CPU_PACKET                                                 = 0,    /**< XGPON CPU packet. */
+    BCMOLT_XGPON_ONU_PROXY_RX_ID_OMCI_PACKET,   /**< XGPON OMCI packet. */
+    BCMOLT_XGPON_ONU_PROXY_RX_ID__NUM_OF        /**< Number of enum entries, not an entry itself. */
+} bcmolt_xgpon_onu_proxy_rx_id;
+
+#define bcmolt_ae_ni_key_id_all_properties                                                  BCMOLT_AE_NI_KEY_ID__NUM_OF
+#define bcmolt_ae_ni_cfg_id_all_properties                                                  BCMOLT_AE_NI_CFG_ID__NUM_OF
+#define bcmolt_ae_ni_set_ae_ni_en_state_id_all_properties                                   BCMOLT_AE_NI_SET_AE_NI_EN_STATE_ID__NUM_OF
+#define bcmolt_ae_path_ds_key_id_all_properties                                             BCMOLT_AE_PATH_DS_KEY_ID__NUM_OF
+#define bcmolt_ae_path_ds_stat_id_all_properties                                            BCMOLT_AE_PATH_DS_STAT_ID__NUM_OF
+#define bcmolt_ae_path_ds_stat_cfg_id_all_properties                                        BCMOLT_AE_PATH_DS_STAT_CFG_ID__NUM_OF
+#define bcmolt_ae_path_ds_stat_alarm_raised_id_all_properties                               BCMOLT_AE_PATH_DS_STAT_ALARM_RAISED_ID__NUM_OF
+#define bcmolt_ae_path_ds_stat_alarm_cleared_id_all_properties                              BCMOLT_AE_PATH_DS_STAT_ALARM_CLEARED_ID__NUM_OF
+#define bcmolt_ae_path_ds_auto_cfg_id_all_properties                                        BCMOLT_AE_PATH_DS_AUTO_CFG_ID__NUM_OF
+#define bcmolt_ae_path_us_key_id_all_properties                                             BCMOLT_AE_PATH_US_KEY_ID__NUM_OF
+#define bcmolt_ae_path_us_stat_id_all_properties                                            BCMOLT_AE_PATH_US_STAT_ID__NUM_OF
+#define bcmolt_ae_path_us_stat_cfg_id_all_properties                                        BCMOLT_AE_PATH_US_STAT_CFG_ID__NUM_OF
+#define bcmolt_ae_path_us_stat_alarm_raised_id_all_properties                               BCMOLT_AE_PATH_US_STAT_ALARM_RAISED_ID__NUM_OF
+#define bcmolt_ae_path_us_stat_alarm_cleared_id_all_properties                              BCMOLT_AE_PATH_US_STAT_ALARM_CLEARED_ID__NUM_OF
+#define bcmolt_ae_path_us_auto_cfg_id_all_properties                                        BCMOLT_AE_PATH_US_AUTO_CFG_ID__NUM_OF
+#define bcmolt_channel_key_id_all_properties                                                BCMOLT_CHANNEL_KEY_ID__NUM_OF
+#define bcmolt_channel_cfg_id_all_properties                                                BCMOLT_CHANNEL_CFG_ID__NUM_OF
+#define bcmolt_debug_key_id_all_properties                                                  BCMOLT_DEBUG_KEY_ID__NUM_OF
+#define bcmolt_debug_cli_input_id_all_properties                                            BCMOLT_DEBUG_CLI_INPUT_ID__NUM_OF
+#define bcmolt_debug_cli_output_id_all_properties                                           BCMOLT_DEBUG_CLI_OUTPUT_ID__NUM_OF
+#define bcmolt_debug_cfg_id_all_properties                                                  BCMOLT_DEBUG_CFG_ID__NUM_OF
+#define bcmolt_debug_file_almost_full_id_all_properties                                     BCMOLT_DEBUG_FILE_ALMOST_FULL_ID__NUM_OF
+#define bcmolt_debug_start_api_capture_id_all_properties                                    BCMOLT_DEBUG_START_API_CAPTURE_ID__NUM_OF
+#define bcmolt_debug_stop_api_capture_id_all_properties                                     BCMOLT_DEBUG_STOP_API_CAPTURE_ID__NUM_OF
+#define bcmolt_debug_reset_api_capture_id_all_properties                                    BCMOLT_DEBUG_RESET_API_CAPTURE_ID__NUM_OF
+#define bcmolt_debug_auto_cfg_id_all_properties                                             BCMOLT_DEBUG_AUTO_CFG_ID__NUM_OF
+#define bcmolt_device_cfg_id_all_properties                                                 BCMOLT_DEVICE_CFG_ID__NUM_OF
+#define bcmolt_device_key_id_all_properties                                                 BCMOLT_DEVICE_KEY_ID__NUM_OF
+#define bcmolt_device_connect_id_all_properties                                             BCMOLT_DEVICE_CONNECT_ID__NUM_OF
+#define bcmolt_device_disconnect_id_all_properties                                          BCMOLT_DEVICE_DISCONNECT_ID__NUM_OF
+#define bcmolt_device_reset_id_all_properties                                               BCMOLT_DEVICE_RESET_ID__NUM_OF
+#define bcmolt_device_host_keep_alive_id_all_properties                                     BCMOLT_DEVICE_HOST_KEEP_ALIVE_ID__NUM_OF
+#define bcmolt_device_sw_upgrade_activate_id_all_properties                                 BCMOLT_DEVICE_SW_UPGRADE_ACTIVATE_ID__NUM_OF
+#define bcmolt_device_device_ready_id_all_properties                                        BCMOLT_DEVICE_DEVICE_READY_ID__NUM_OF
+#define bcmolt_device_connection_established_id_all_properties                              BCMOLT_DEVICE_CONNECTION_ESTABLISHED_ID__NUM_OF
+#define bcmolt_device_device_keep_alive_id_all_properties                                   BCMOLT_DEVICE_DEVICE_KEEP_ALIVE_ID__NUM_OF
+#define bcmolt_device_connection_failure_id_all_properties                                  BCMOLT_DEVICE_CONNECTION_FAILURE_ID__NUM_OF
+#define bcmolt_device_connection_complete_id_all_properties                                 BCMOLT_DEVICE_CONNECTION_COMPLETE_ID__NUM_OF
+#define bcmolt_device_disconnection_complete_id_all_properties                              BCMOLT_DEVICE_DISCONNECTION_COMPLETE_ID__NUM_OF
+#define bcmolt_device_sw_error_id_all_properties                                            BCMOLT_DEVICE_SW_ERROR_ID__NUM_OF
+#define bcmolt_device_sw_exception_id_all_properties                                        BCMOLT_DEVICE_SW_EXCEPTION_ID__NUM_OF
+#define bcmolt_device_indications_dropped_id_all_properties                                 BCMOLT_DEVICE_INDICATIONS_DROPPED_ID__NUM_OF
+#define bcmolt_device_image_transfer_start_id_all_properties                                BCMOLT_DEVICE_IMAGE_TRANSFER_START_ID__NUM_OF
+#define bcmolt_device_image_transfer_data_id_all_properties                                 BCMOLT_DEVICE_IMAGE_TRANSFER_DATA_ID__NUM_OF
+#define bcmolt_device_image_transfer_complete_id_all_properties                             BCMOLT_DEVICE_IMAGE_TRANSFER_COMPLETE_ID__NUM_OF
+#define bcmolt_device_run_ddr_test_id_all_properties                                        BCMOLT_DEVICE_RUN_DDR_TEST_ID__NUM_OF
+#define bcmolt_device_ddr_test_complete_id_all_properties                                   BCMOLT_DEVICE_DDR_TEST_COMPLETE_ID__NUM_OF
+#define bcmolt_device_auto_cfg_id_all_properties                                            BCMOLT_DEVICE_AUTO_CFG_ID__NUM_OF
+#define bcmolt_epon_denied_link_key_id_all_properties                                       BCMOLT_EPON_DENIED_LINK_KEY_ID__NUM_OF
+#define bcmolt_epon_denied_link_cfg_id_all_properties                                       BCMOLT_EPON_DENIED_LINK_CFG_ID__NUM_OF
+#define bcmolt_epon_denied_link_unknown_link_violation_id_all_properties                    BCMOLT_EPON_DENIED_LINK_UNKNOWN_LINK_VIOLATION_ID__NUM_OF
+#define bcmolt_epon_denied_link_overhead_profile_violation_id_all_properties                BCMOLT_EPON_DENIED_LINK_OVERHEAD_PROFILE_VIOLATION_ID__NUM_OF
+#define bcmolt_epon_denied_link_laser_on_off_violation_id_all_properties                    BCMOLT_EPON_DENIED_LINK_LASER_ON_OFF_VIOLATION_ID__NUM_OF
+#define bcmolt_epon_denied_link_max_link_violation_id_all_properties                        BCMOLT_EPON_DENIED_LINK_MAX_LINK_VIOLATION_ID__NUM_OF
+#define bcmolt_epon_denied_link_llid_pool_empty_violation_id_all_properties                 BCMOLT_EPON_DENIED_LINK_LLID_POOL_EMPTY_VIOLATION_ID__NUM_OF
+#define bcmolt_epon_denied_link_system_resource_violation_id_all_properties                 BCMOLT_EPON_DENIED_LINK_SYSTEM_RESOURCE_VIOLATION_ID__NUM_OF
+#define bcmolt_epon_denied_link_range_violation_id_all_properties                           BCMOLT_EPON_DENIED_LINK_RANGE_VIOLATION_ID__NUM_OF
+#define bcmolt_epon_denied_link_tdm_channels_exhausted_id_all_properties                    BCMOLT_EPON_DENIED_LINK_TDM_CHANNELS_EXHAUSTED_ID__NUM_OF
+#define bcmolt_epon_denied_link_rogue_violation_id_all_properties                           BCMOLT_EPON_DENIED_LINK_ROGUE_VIOLATION_ID__NUM_OF
+#define bcmolt_epon_denied_link_upstream_bandwidth_violation_id_all_properties              BCMOLT_EPON_DENIED_LINK_UPSTREAM_BANDWIDTH_VIOLATION_ID__NUM_OF
+#define bcmolt_epon_denied_link_auto_cfg_id_all_properties                                  BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID__NUM_OF
+#define bcmolt_epon_link_key_id_all_properties                                              BCMOLT_EPON_LINK_KEY_ID__NUM_OF
+#define bcmolt_epon_link_cfg_id_all_properties                                              BCMOLT_EPON_LINK_CFG_ID__NUM_OF
+#define bcmolt_epon_link_stat_id_all_properties                                             BCMOLT_EPON_LINK_STAT_ID__NUM_OF
+#define bcmolt_epon_link_force_rediscovery_id_all_properties                                BCMOLT_EPON_LINK_FORCE_REDISCOVERY_ID__NUM_OF
+#define bcmolt_epon_link_delete_link_id_all_properties                                      BCMOLT_EPON_LINK_DELETE_LINK_ID__NUM_OF
+#define bcmolt_epon_link_key_exchange_failure_id_all_properties                             BCMOLT_EPON_LINK_KEY_EXCHANGE_FAILURE_ID__NUM_OF
+#define bcmolt_epon_link_encryption_enabled_id_all_properties                               BCMOLT_EPON_LINK_ENCRYPTION_ENABLED_ID__NUM_OF
+#define bcmolt_epon_link_mpcp_reg_ack_timeout_id_all_properties                             BCMOLT_EPON_LINK_MPCP_REG_ACK_TIMEOUT_ID__NUM_OF
+#define bcmolt_epon_link_range_value_changed_id_all_properties                              BCMOLT_EPON_LINK_RANGE_VALUE_CHANGED_ID__NUM_OF
+#define bcmolt_epon_link_protection_switch_occurred_id_all_properties                       BCMOLT_EPON_LINK_PROTECTION_SWITCH_OCCURRED_ID__NUM_OF
+#define bcmolt_epon_link_duplicate_mpcp_registration_request_id_all_properties              BCMOLT_EPON_LINK_DUPLICATE_MPCP_REGISTRATION_REQUEST_ID__NUM_OF
+#define bcmolt_epon_link_link_speed_mismatch_id_all_properties                              BCMOLT_EPON_LINK_LINK_SPEED_MISMATCH_ID__NUM_OF
+#define bcmolt_epon_link_mpcp_report_timeout_id_all_properties                              BCMOLT_EPON_LINK_MPCP_REPORT_TIMEOUT_ID__NUM_OF
+#define bcmolt_epon_link_oam_keepalive_timeout_id_all_properties                            BCMOLT_EPON_LINK_OAM_KEEPALIVE_TIMEOUT_ID__NUM_OF
+#define bcmolt_epon_link_mpcp_discovered_id_all_properties                                  BCMOLT_EPON_LINK_MPCP_DISCOVERED_ID__NUM_OF
+#define bcmolt_epon_link_mpcp_deregistered_id_all_properties                                BCMOLT_EPON_LINK_MPCP_DEREGISTERED_ID__NUM_OF
+#define bcmolt_epon_link_preprovisioned_link_created_id_all_properties                      BCMOLT_EPON_LINK_PREPROVISIONED_LINK_CREATED_ID__NUM_OF
+#define bcmolt_epon_link_oam_keepalive_timer_start_id_all_properties                        BCMOLT_EPON_LINK_OAM_KEEPALIVE_TIMER_START_ID__NUM_OF
+#define bcmolt_epon_link_oam_keepalive_timer_stop_id_all_properties                         BCMOLT_EPON_LINK_OAM_KEEPALIVE_TIMER_STOP_ID__NUM_OF
+#define bcmolt_epon_link_key_exchange_start_id_all_properties                               BCMOLT_EPON_LINK_KEY_EXCHANGE_START_ID__NUM_OF
+#define bcmolt_epon_link_key_exchange_stop_id_all_properties                                BCMOLT_EPON_LINK_KEY_EXCHANGE_STOP_ID__NUM_OF
+#define bcmolt_epon_link_oam_keepalive_timer_started_id_all_properties                      BCMOLT_EPON_LINK_OAM_KEEPALIVE_TIMER_STARTED_ID__NUM_OF
+#define bcmolt_epon_link_oam_keepalive_timer_stopped_id_all_properties                      BCMOLT_EPON_LINK_OAM_KEEPALIVE_TIMER_STOPPED_ID__NUM_OF
+#define bcmolt_epon_link_key_exchange_started_id_all_properties                             BCMOLT_EPON_LINK_KEY_EXCHANGE_STARTED_ID__NUM_OF
+#define bcmolt_epon_link_key_exchange_stopped_id_all_properties                             BCMOLT_EPON_LINK_KEY_EXCHANGE_STOPPED_ID__NUM_OF
+#define bcmolt_epon_link_static_registration_id_all_properties                              BCMOLT_EPON_LINK_STATIC_REGISTRATION_ID__NUM_OF
+#define bcmolt_epon_link_static_registration_done_id_all_properties                         BCMOLT_EPON_LINK_STATIC_REGISTRATION_DONE_ID__NUM_OF
+#define bcmolt_epon_link_rerange_failure_id_all_properties                                  BCMOLT_EPON_LINK_RERANGE_FAILURE_ID__NUM_OF
+#define bcmolt_epon_link_inject_frame_id_all_properties                                     BCMOLT_EPON_LINK_INJECT_FRAME_ID__NUM_OF
+#define bcmolt_epon_link_frame_captured_id_all_properties                                   BCMOLT_EPON_LINK_FRAME_CAPTURED_ID__NUM_OF
+#define bcmolt_epon_link_link_deleted_id_all_properties                                     BCMOLT_EPON_LINK_LINK_DELETED_ID__NUM_OF
+#define bcmolt_epon_link_stat_cfg_id_all_properties                                         BCMOLT_EPON_LINK_STAT_CFG_ID__NUM_OF
+#define bcmolt_epon_link_stat_alarm_raised_id_all_properties                                BCMOLT_EPON_LINK_STAT_ALARM_RAISED_ID__NUM_OF
+#define bcmolt_epon_link_stat_alarm_cleared_id_all_properties                               BCMOLT_EPON_LINK_STAT_ALARM_CLEARED_ID__NUM_OF
+#define bcmolt_epon_link_auto_cfg_id_all_properties                                         BCMOLT_EPON_LINK_AUTO_CFG_ID__NUM_OF
+#define bcmolt_epon_ni_key_id_all_properties                                                BCMOLT_EPON_NI_KEY_ID__NUM_OF
+#define bcmolt_epon_ni_cfg_id_all_properties                                                BCMOLT_EPON_NI_CFG_ID__NUM_OF
+#define bcmolt_epon_ni_set_epon_ni_en_state_id_all_properties                               BCMOLT_EPON_NI_SET_EPON_NI_EN_STATE_ID__NUM_OF
+#define bcmolt_epon_ni_issue_rssi_grant_id_all_properties                                   BCMOLT_EPON_NI_ISSUE_RSSI_GRANT_ID__NUM_OF
+#define bcmolt_epon_ni_add_link_id_all_properties                                           BCMOLT_EPON_NI_ADD_LINK_ID__NUM_OF
+#define bcmolt_epon_ni_add_multicast_link_id_all_properties                                 BCMOLT_EPON_NI_ADD_MULTICAST_LINK_ID__NUM_OF
+#define bcmolt_epon_ni_add_protected_standby_link_id_all_properties                         BCMOLT_EPON_NI_ADD_PROTECTED_STANDBY_LINK_ID__NUM_OF
+#define bcmolt_epon_ni_no_reports_id_all_properties                                         BCMOLT_EPON_NI_NO_REPORTS_ID__NUM_OF
+#define bcmolt_epon_ni_llid_quarantined_id_all_properties                                   BCMOLT_EPON_NI_LLID_QUARANTINED_ID__NUM_OF
+#define bcmolt_epon_ni_state_change_completed_id_all_properties                             BCMOLT_EPON_NI_STATE_CHANGE_COMPLETED_ID__NUM_OF
+#define bcmolt_epon_ni_protection_switching_apply_rerange_delta_id_all_properties           BCMOLT_EPON_NI_PROTECTION_SWITCHING_APPLY_RERANGE_DELTA_ID__NUM_OF
+#define bcmolt_epon_ni_rerange_failure_id_all_properties                                    BCMOLT_EPON_NI_RERANGE_FAILURE_ID__NUM_OF
+#define bcmolt_epon_ni_rssi_measurement_completed_id_all_properties                         BCMOLT_EPON_NI_RSSI_MEASUREMENT_COMPLETED_ID__NUM_OF
+#define bcmolt_epon_ni_rogue_llid_scan_id_all_properties                                    BCMOLT_EPON_NI_ROGUE_LLID_SCAN_ID__NUM_OF
+#define bcmolt_epon_ni_start_onu_upgrade_id_all_properties                                  BCMOLT_EPON_NI_START_ONU_UPGRADE_ID__NUM_OF
+#define bcmolt_epon_ni_onu_upgrade_complete_id_all_properties                               BCMOLT_EPON_NI_ONU_UPGRADE_COMPLETE_ID__NUM_OF
+#define bcmolt_epon_ni_rogue_scan_complete_id_all_properties                                BCMOLT_EPON_NI_ROGUE_SCAN_COMPLETE_ID__NUM_OF
+#define bcmolt_epon_ni_mpcp_timestamp_changed_id_all_properties                             BCMOLT_EPON_NI_MPCP_TIMESTAMP_CHANGED_ID__NUM_OF
+#define bcmolt_epon_ni_auto_rogue_scan_1g_failure_id_all_properties                         BCMOLT_EPON_NI_AUTO_ROGUE_SCAN_1G_FAILURE_ID__NUM_OF
+#define bcmolt_epon_ni_auto_rogue_scan_10g_failure_id_all_properties                        BCMOLT_EPON_NI_AUTO_ROGUE_SCAN_10G_FAILURE_ID__NUM_OF
+#define bcmolt_epon_ni_auto_cfg_id_all_properties                                           BCMOLT_EPON_NI_AUTO_CFG_ID__NUM_OF
+#define bcmolt_epon_onu_10g_us_key_id_all_properties                                        BCMOLT_EPON_ONU_10G_US_KEY_ID__NUM_OF
+#define bcmolt_epon_onu_10g_us_stat_id_all_properties                                       BCMOLT_EPON_ONU_10G_US_STAT_ID__NUM_OF
+#define bcmolt_epon_onu_10g_us_cfg_id_all_properties                                        BCMOLT_EPON_ONU_10G_US_CFG_ID__NUM_OF
+#define bcmolt_epon_onu_10g_us_stat_cfg_id_all_properties                                   BCMOLT_EPON_ONU_10G_US_STAT_CFG_ID__NUM_OF
+#define bcmolt_epon_onu_10g_us_stat_alarm_raised_id_all_properties                          BCMOLT_EPON_ONU_10G_US_STAT_ALARM_RAISED_ID__NUM_OF
+#define bcmolt_epon_onu_10g_us_stat_alarm_cleared_id_all_properties                         BCMOLT_EPON_ONU_10G_US_STAT_ALARM_CLEARED_ID__NUM_OF
+#define bcmolt_epon_onu_10g_us_auto_cfg_id_all_properties                                   BCMOLT_EPON_ONU_10G_US_AUTO_CFG_ID__NUM_OF
+#define bcmolt_epon_onu_1g_us_key_id_all_properties                                         BCMOLT_EPON_ONU_1G_US_KEY_ID__NUM_OF
+#define bcmolt_epon_onu_1g_us_stat_id_all_properties                                        BCMOLT_EPON_ONU_1G_US_STAT_ID__NUM_OF
+#define bcmolt_epon_onu_1g_us_cfg_id_all_properties                                         BCMOLT_EPON_ONU_1G_US_CFG_ID__NUM_OF
+#define bcmolt_epon_onu_1g_us_stat_cfg_id_all_properties                                    BCMOLT_EPON_ONU_1G_US_STAT_CFG_ID__NUM_OF
+#define bcmolt_epon_onu_1g_us_stat_alarm_raised_id_all_properties                           BCMOLT_EPON_ONU_1G_US_STAT_ALARM_RAISED_ID__NUM_OF
+#define bcmolt_epon_onu_1g_us_stat_alarm_cleared_id_all_properties                          BCMOLT_EPON_ONU_1G_US_STAT_ALARM_CLEARED_ID__NUM_OF
+#define bcmolt_epon_onu_1g_us_auto_cfg_id_all_properties                                    BCMOLT_EPON_ONU_1G_US_AUTO_CFG_ID__NUM_OF
+#define bcmolt_epon_path_10g_ds_key_id_all_properties                                       BCMOLT_EPON_PATH_10G_DS_KEY_ID__NUM_OF
+#define bcmolt_epon_path_10g_ds_cfg_id_all_properties                                       BCMOLT_EPON_PATH_10G_DS_CFG_ID__NUM_OF
+#define bcmolt_epon_path_10g_ds_stat_id_all_properties                                      BCMOLT_EPON_PATH_10G_DS_STAT_ID__NUM_OF
+#define bcmolt_epon_path_10g_ds_stat_cfg_id_all_properties                                  BCMOLT_EPON_PATH_10G_DS_STAT_CFG_ID__NUM_OF
+#define bcmolt_epon_path_10g_ds_stat_alarm_raised_id_all_properties                         BCMOLT_EPON_PATH_10G_DS_STAT_ALARM_RAISED_ID__NUM_OF
+#define bcmolt_epon_path_10g_ds_stat_alarm_cleared_id_all_properties                        BCMOLT_EPON_PATH_10G_DS_STAT_ALARM_CLEARED_ID__NUM_OF
+#define bcmolt_epon_path_10g_ds_auto_cfg_id_all_properties                                  BCMOLT_EPON_PATH_10G_DS_AUTO_CFG_ID__NUM_OF
+#define bcmolt_epon_path_10g_us_key_id_all_properties                                       BCMOLT_EPON_PATH_10G_US_KEY_ID__NUM_OF
+#define bcmolt_epon_path_10g_us_cfg_id_all_properties                                       BCMOLT_EPON_PATH_10G_US_CFG_ID__NUM_OF
+#define bcmolt_epon_path_10g_us_stat_id_all_properties                                      BCMOLT_EPON_PATH_10G_US_STAT_ID__NUM_OF
+#define bcmolt_epon_path_10g_us_stat_cfg_id_all_properties                                  BCMOLT_EPON_PATH_10G_US_STAT_CFG_ID__NUM_OF
+#define bcmolt_epon_path_10g_us_stat_alarm_raised_id_all_properties                         BCMOLT_EPON_PATH_10G_US_STAT_ALARM_RAISED_ID__NUM_OF
+#define bcmolt_epon_path_10g_us_stat_alarm_cleared_id_all_properties                        BCMOLT_EPON_PATH_10G_US_STAT_ALARM_CLEARED_ID__NUM_OF
+#define bcmolt_epon_path_10g_us_auto_cfg_id_all_properties                                  BCMOLT_EPON_PATH_10G_US_AUTO_CFG_ID__NUM_OF
+#define bcmolt_epon_path_1g_ds_key_id_all_properties                                        BCMOLT_EPON_PATH_1G_DS_KEY_ID__NUM_OF
+#define bcmolt_epon_path_1g_ds_cfg_id_all_properties                                        BCMOLT_EPON_PATH_1G_DS_CFG_ID__NUM_OF
+#define bcmolt_epon_path_1g_ds_stat_id_all_properties                                       BCMOLT_EPON_PATH_1G_DS_STAT_ID__NUM_OF
+#define bcmolt_epon_path_1g_ds_stat_cfg_id_all_properties                                   BCMOLT_EPON_PATH_1G_DS_STAT_CFG_ID__NUM_OF
+#define bcmolt_epon_path_1g_ds_stat_alarm_raised_id_all_properties                          BCMOLT_EPON_PATH_1G_DS_STAT_ALARM_RAISED_ID__NUM_OF
+#define bcmolt_epon_path_1g_ds_stat_alarm_cleared_id_all_properties                         BCMOLT_EPON_PATH_1G_DS_STAT_ALARM_CLEARED_ID__NUM_OF
+#define bcmolt_epon_path_1g_ds_auto_cfg_id_all_properties                                   BCMOLT_EPON_PATH_1G_DS_AUTO_CFG_ID__NUM_OF
+#define bcmolt_epon_path_1g_us_key_id_all_properties                                        BCMOLT_EPON_PATH_1G_US_KEY_ID__NUM_OF
+#define bcmolt_epon_path_1g_us_cfg_id_all_properties                                        BCMOLT_EPON_PATH_1G_US_CFG_ID__NUM_OF
+#define bcmolt_epon_path_1g_us_stat_id_all_properties                                       BCMOLT_EPON_PATH_1G_US_STAT_ID__NUM_OF
+#define bcmolt_epon_path_1g_us_stat_cfg_id_all_properties                                   BCMOLT_EPON_PATH_1G_US_STAT_CFG_ID__NUM_OF
+#define bcmolt_epon_path_1g_us_stat_alarm_raised_id_all_properties                          BCMOLT_EPON_PATH_1G_US_STAT_ALARM_RAISED_ID__NUM_OF
+#define bcmolt_epon_path_1g_us_stat_alarm_cleared_id_all_properties                         BCMOLT_EPON_PATH_1G_US_STAT_ALARM_CLEARED_ID__NUM_OF
+#define bcmolt_epon_path_1g_us_auto_cfg_id_all_properties                                   BCMOLT_EPON_PATH_1G_US_AUTO_CFG_ID__NUM_OF
+#define bcmolt_epon_rp_key_id_all_properties                                                BCMOLT_EPON_RP_KEY_ID__NUM_OF
+#define bcmolt_epon_rp_cfg_id_all_properties                                                BCMOLT_EPON_RP_CFG_ID__NUM_OF
+#define bcmolt_gpio_key_id_all_properties                                                   BCMOLT_GPIO_KEY_ID__NUM_OF
+#define bcmolt_gpio_cfg_id_all_properties                                                   BCMOLT_GPIO_CFG_ID__NUM_OF
+#define bcmolt_gpon_alloc_key_id_all_properties                                             BCMOLT_GPON_ALLOC_KEY_ID__NUM_OF
+#define bcmolt_gpon_alloc_cfg_id_all_properties                                             BCMOLT_GPON_ALLOC_CFG_ID__NUM_OF
+#define bcmolt_gpon_alloc_stat_id_all_properties                                            BCMOLT_GPON_ALLOC_STAT_ID__NUM_OF
+#define bcmolt_gpon_alloc_configuration_completed_id_all_properties                         BCMOLT_GPON_ALLOC_CONFIGURATION_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_alloc_set_state_id_all_properties                                       BCMOLT_GPON_ALLOC_SET_STATE_ID__NUM_OF
+#define bcmolt_gpon_alloc_get_stats_id_all_properties                                       BCMOLT_GPON_ALLOC_GET_STATS_ID__NUM_OF
+#define bcmolt_gpon_alloc_get_alloc_stats_completed_id_all_properties                       BCMOLT_GPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_alloc_stat_cfg_id_all_properties                                        BCMOLT_GPON_ALLOC_STAT_CFG_ID__NUM_OF
+#define bcmolt_gpon_alloc_stat_alarm_raised_id_all_properties                               BCMOLT_GPON_ALLOC_STAT_ALARM_RAISED_ID__NUM_OF
+#define bcmolt_gpon_alloc_stat_alarm_cleared_id_all_properties                              BCMOLT_GPON_ALLOC_STAT_ALARM_CLEARED_ID__NUM_OF
+#define bcmolt_gpon_alloc_auto_cfg_id_all_properties                                        BCMOLT_GPON_ALLOC_AUTO_CFG_ID__NUM_OF
+#define bcmolt_gpon_gem_port_key_id_all_properties                                          BCMOLT_GPON_GEM_PORT_KEY_ID__NUM_OF
+#define bcmolt_gpon_gem_port_cfg_id_all_properties                                          BCMOLT_GPON_GEM_PORT_CFG_ID__NUM_OF
+#define bcmolt_gpon_gem_port_stat_id_all_properties                                         BCMOLT_GPON_GEM_PORT_STAT_ID__NUM_OF
+#define bcmolt_gpon_gem_port_configuration_completed_id_all_properties                      BCMOLT_GPON_GEM_PORT_CONFIGURATION_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_gem_port_set_state_id_all_properties                                    BCMOLT_GPON_GEM_PORT_SET_STATE_ID__NUM_OF
+#define bcmolt_gpon_gem_port_stat_cfg_id_all_properties                                     BCMOLT_GPON_GEM_PORT_STAT_CFG_ID__NUM_OF
+#define bcmolt_gpon_gem_port_stat_alarm_raised_id_all_properties                            BCMOLT_GPON_GEM_PORT_STAT_ALARM_RAISED_ID__NUM_OF
+#define bcmolt_gpon_gem_port_stat_alarm_cleared_id_all_properties                           BCMOLT_GPON_GEM_PORT_STAT_ALARM_CLEARED_ID__NUM_OF
+#define bcmolt_gpon_gem_port_auto_cfg_id_all_properties                                     BCMOLT_GPON_GEM_PORT_AUTO_CFG_ID__NUM_OF
+#define bcmolt_gpon_iwf_key_id_all_properties                                               BCMOLT_GPON_IWF_KEY_ID__NUM_OF
+#define bcmolt_gpon_iwf_cfg_id_all_properties                                               BCMOLT_GPON_IWF_CFG_ID__NUM_OF
+#define bcmolt_gpon_iwf_stat_id_all_properties                                              BCMOLT_GPON_IWF_STAT_ID__NUM_OF
+#define bcmolt_gpon_iwf_flush_mac_table_id_all_properties                                   BCMOLT_GPON_IWF_FLUSH_MAC_TABLE_ID__NUM_OF
+#define bcmolt_gpon_iwf_scan_mac_table_id_all_properties                                    BCMOLT_GPON_IWF_SCAN_MAC_TABLE_ID__NUM_OF
+#define bcmolt_gpon_iwf_flush_mac_table_completed_id_all_properties                         BCMOLT_GPON_IWF_FLUSH_MAC_TABLE_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_iwf_scan_mac_table_completed_id_all_properties                          BCMOLT_GPON_IWF_SCAN_MAC_TABLE_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_iwf_stat_cfg_id_all_properties                                          BCMOLT_GPON_IWF_STAT_CFG_ID__NUM_OF
+#define bcmolt_gpon_iwf_stat_alarm_raised_id_all_properties                                 BCMOLT_GPON_IWF_STAT_ALARM_RAISED_ID__NUM_OF
+#define bcmolt_gpon_iwf_stat_alarm_cleared_id_all_properties                                BCMOLT_GPON_IWF_STAT_ALARM_CLEARED_ID__NUM_OF
+#define bcmolt_gpon_iwf_auto_cfg_id_all_properties                                          BCMOLT_GPON_IWF_AUTO_CFG_ID__NUM_OF
+#define bcmolt_gpon_iwf_ds_egress_flow_key_id_all_properties                                BCMOLT_GPON_IWF_DS_EGRESS_FLOW_KEY_ID__NUM_OF
+#define bcmolt_gpon_iwf_ds_egress_flow_cfg_id_all_properties                                BCMOLT_GPON_IWF_DS_EGRESS_FLOW_CFG_ID__NUM_OF
+#define bcmolt_gpon_iwf_ds_ingress_flow_key_id_all_properties                               BCMOLT_GPON_IWF_DS_INGRESS_FLOW_KEY_ID__NUM_OF
+#define bcmolt_gpon_iwf_ds_ingress_flow_cfg_id_all_properties                               BCMOLT_GPON_IWF_DS_INGRESS_FLOW_CFG_ID__NUM_OF
+#define bcmolt_gpon_iwf_mac_table_key_id_all_properties                                     BCMOLT_GPON_IWF_MAC_TABLE_KEY_ID__NUM_OF
+#define bcmolt_gpon_iwf_mac_table_cfg_id_all_properties                                     BCMOLT_GPON_IWF_MAC_TABLE_CFG_ID__NUM_OF
+#define bcmolt_gpon_iwf_mac_table_new_mac_id_all_properties                                 BCMOLT_GPON_IWF_MAC_TABLE_NEW_MAC_ID__NUM_OF
+#define bcmolt_gpon_iwf_mac_table_mac_aged_id_all_properties                                BCMOLT_GPON_IWF_MAC_TABLE_MAC_AGED_ID__NUM_OF
+#define bcmolt_gpon_iwf_mac_table_mac_move_id_all_properties                                BCMOLT_GPON_IWF_MAC_TABLE_MAC_MOVE_ID__NUM_OF
+#define bcmolt_gpon_iwf_mac_table_mac_dropped_id_all_properties                             BCMOLT_GPON_IWF_MAC_TABLE_MAC_DROPPED_ID__NUM_OF
+#define bcmolt_gpon_iwf_mac_table_auto_cfg_id_all_properties                                BCMOLT_GPON_IWF_MAC_TABLE_AUTO_CFG_ID__NUM_OF
+#define bcmolt_gpon_iwf_us_flow_key_id_all_properties                                       BCMOLT_GPON_IWF_US_FLOW_KEY_ID__NUM_OF
+#define bcmolt_gpon_iwf_us_flow_cfg_id_all_properties                                       BCMOLT_GPON_IWF_US_FLOW_CFG_ID__NUM_OF
+#define bcmolt_gpon_ni_key_id_all_properties                                                BCMOLT_GPON_NI_KEY_ID__NUM_OF
+#define bcmolt_gpon_ni_cfg_id_all_properties                                                BCMOLT_GPON_NI_CFG_ID__NUM_OF
+#define bcmolt_gpon_ni_stat_id_all_properties                                               BCMOLT_GPON_NI_STAT_ID__NUM_OF
+#define bcmolt_gpon_ni_set_pon_state_id_all_properties                                      BCMOLT_GPON_NI_SET_PON_STATE_ID__NUM_OF
+#define bcmolt_gpon_ni_reset_id_all_properties                                              BCMOLT_GPON_NI_RESET_ID__NUM_OF
+#define bcmolt_gpon_ni_disable_serial_number_id_all_properties                              BCMOLT_GPON_NI_DISABLE_SERIAL_NUMBER_ID__NUM_OF
+#define bcmolt_gpon_ni_single_request_standby_pon_monitoring_id_all_properties              BCMOLT_GPON_NI_SINGLE_REQUEST_STANDBY_PON_MONITORING_ID__NUM_OF
+#define bcmolt_gpon_ni_set_onu_state_id_all_properties                                      BCMOLT_GPON_NI_SET_ONU_STATE_ID__NUM_OF
+#define bcmolt_gpon_ni_state_change_completed_id_all_properties                             BCMOLT_GPON_NI_STATE_CHANGE_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_ni_los_id_all_properties                                                BCMOLT_GPON_NI_LOS_ID__NUM_OF
+#define bcmolt_gpon_ni_serial_number_acquisition_cycle_start_id_all_properties              BCMOLT_GPON_NI_SERIAL_NUMBER_ACQUISITION_CYCLE_START_ID__NUM_OF
+#define bcmolt_gpon_ni_protection_switching_traffic_resume_id_all_properties                BCMOLT_GPON_NI_PROTECTION_SWITCHING_TRAFFIC_RESUME_ID__NUM_OF
+#define bcmolt_gpon_ni_protection_switching_onus_ranged_id_all_properties                   BCMOLT_GPON_NI_PROTECTION_SWITCHING_ONUS_RANGED_ID__NUM_OF
+#define bcmolt_gpon_ni_protection_switching_switchover_completed_id_all_properties          BCMOLT_GPON_NI_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_id_all_properties             BCMOLT_GPON_NI_STANDBY_PON_MONITORING_CYCLE_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_ni_onu_discovered_id_all_properties                                     BCMOLT_GPON_NI_ONU_DISCOVERED_ID__NUM_OF
+#define bcmolt_gpon_ni_cpu_packets_failure_id_all_properties                                BCMOLT_GPON_NI_CPU_PACKETS_FAILURE_ID__NUM_OF
+#define bcmolt_gpon_ni_cpu_packets_id_all_properties                                        BCMOLT_GPON_NI_CPU_PACKETS_ID__NUM_OF
+#define bcmolt_gpon_ni_broadcast_ploam_packet_id_all_properties                             BCMOLT_GPON_NI_BROADCAST_PLOAM_PACKET_ID__NUM_OF
+#define bcmolt_gpon_ni_rogue_detection_window_id_all_properties                             BCMOLT_GPON_NI_ROGUE_DETECTION_WINDOW_ID__NUM_OF
+#define bcmolt_gpon_ni_rogue_detection_completed_id_all_properties                          BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_ni_deactivate_all_onus_completed_id_all_properties                      BCMOLT_GPON_NI_DEACTIVATE_ALL_ONUS_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_ni_disable_all_onus_completed_id_all_properties                         BCMOLT_GPON_NI_DISABLE_ALL_ONUS_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_ni_activate_all_onus_completed_id_all_properties                        BCMOLT_GPON_NI_ACTIVATE_ALL_ONUS_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_ni_enable_all_onus_completed_id_all_properties                          BCMOLT_GPON_NI_ENABLE_ALL_ONUS_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_ni_tod_request_id_all_properties                                        BCMOLT_GPON_NI_TOD_REQUEST_ID__NUM_OF
+#define bcmolt_gpon_ni_tod_request_completed_id_all_properties                              BCMOLT_GPON_NI_TOD_REQUEST_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_id_all_properties BCMOLT_GPON_NI_PROTECTION_SWITCHING_TYPE_C_SET_MULTIPLE_ONU_STATE_ID__NUM_OF
+#define bcmolt_gpon_ni_start_onu_upgrade_id_all_properties                                  BCMOLT_GPON_NI_START_ONU_UPGRADE_ID__NUM_OF
+#define bcmolt_gpon_ni_onu_upgrade_complete_id_all_properties                               BCMOLT_GPON_NI_ONU_UPGRADE_COMPLETE_ID__NUM_OF
+#define bcmolt_gpon_ni_rogue_onu_special_map_cycle_start_id_all_properties                  BCMOLT_GPON_NI_ROGUE_ONU_SPECIAL_MAP_CYCLE_START_ID__NUM_OF
+#define bcmolt_gpon_ni_stat_cfg_id_all_properties                                           BCMOLT_GPON_NI_STAT_CFG_ID__NUM_OF
+#define bcmolt_gpon_ni_stat_alarm_raised_id_all_properties                                  BCMOLT_GPON_NI_STAT_ALARM_RAISED_ID__NUM_OF
+#define bcmolt_gpon_ni_stat_alarm_cleared_id_all_properties                                 BCMOLT_GPON_NI_STAT_ALARM_CLEARED_ID__NUM_OF
+#define bcmolt_gpon_ni_auto_cfg_id_all_properties                                           BCMOLT_GPON_NI_AUTO_CFG_ID__NUM_OF
+#define bcmolt_gpon_onu_key_id_all_properties                                               BCMOLT_GPON_ONU_KEY_ID__NUM_OF
+#define bcmolt_gpon_onu_cfg_id_all_properties                                               BCMOLT_GPON_ONU_CFG_ID__NUM_OF
+#define bcmolt_gpon_onu_stat_id_all_properties                                              BCMOLT_GPON_ONU_STAT_ID__NUM_OF
+#define bcmolt_gpon_onu_set_onu_state_id_all_properties                                     BCMOLT_GPON_ONU_SET_ONU_STATE_ID__NUM_OF
+#define bcmolt_gpon_onu_rssi_measurement_id_all_properties                                  BCMOLT_GPON_ONU_RSSI_MEASUREMENT_ID__NUM_OF
+#define bcmolt_gpon_onu_change_power_level_id_all_properties                                BCMOLT_GPON_ONU_CHANGE_POWER_LEVEL_ID__NUM_OF
+#define bcmolt_gpon_onu_onu_alarm_id_all_properties                                         BCMOLT_GPON_ONU_ONU_ALARM_ID__NUM_OF
+#define bcmolt_gpon_onu_dowi_id_all_properties                                              BCMOLT_GPON_ONU_DOWI_ID__NUM_OF
+#define bcmolt_gpon_onu_sfi_id_all_properties                                               BCMOLT_GPON_ONU_SFI_ID__NUM_OF
+#define bcmolt_gpon_onu_sdi_id_all_properties                                               BCMOLT_GPON_ONU_SDI_ID__NUM_OF
+#define bcmolt_gpon_onu_dfi_id_all_properties                                               BCMOLT_GPON_ONU_DFI_ID__NUM_OF
+#define bcmolt_gpon_onu_sufi_id_all_properties                                              BCMOLT_GPON_ONU_SUFI_ID__NUM_OF
+#define bcmolt_gpon_onu_loai_id_all_properties                                              BCMOLT_GPON_ONU_LOAI_ID__NUM_OF
+#define bcmolt_gpon_onu_dgi_id_all_properties                                               BCMOLT_GPON_ONU_DGI_ID__NUM_OF
+#define bcmolt_gpon_onu_pee_id_all_properties                                               BCMOLT_GPON_ONU_PEE_ID__NUM_OF
+#define bcmolt_gpon_onu_pst_id_all_properties                                               BCMOLT_GPON_ONU_PST_ID__NUM_OF
+#define bcmolt_gpon_onu_tiwi_id_all_properties                                              BCMOLT_GPON_ONU_TIWI_ID__NUM_OF
+#define bcmolt_gpon_onu_loki_id_all_properties                                              BCMOLT_GPON_ONU_LOKI_ID__NUM_OF
+#define bcmolt_gpon_onu_memi_id_all_properties                                              BCMOLT_GPON_ONU_MEMI_ID__NUM_OF
+#define bcmolt_gpon_onu_omci_port_id_configuration_completed_id_all_properties              BCMOLT_GPON_ONU_OMCI_PORT_ID_CONFIGURATION_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_onu_ber_interval_configuration_completed_id_all_properties              BCMOLT_GPON_ONU_BER_INTERVAL_CONFIGURATION_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_onu_err_id_all_properties                                               BCMOLT_GPON_ONU_ERR_ID__NUM_OF
+#define bcmolt_gpon_onu_rei_id_all_properties                                               BCMOLT_GPON_ONU_REI_ID__NUM_OF
+#define bcmolt_gpon_onu_ranging_completed_id_all_properties                                 BCMOLT_GPON_ONU_RANGING_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_onu_password_authentication_completed_id_all_properties                 BCMOLT_GPON_ONU_PASSWORD_AUTHENTICATION_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_onu_onu_activation_completed_id_all_properties                          BCMOLT_GPON_ONU_ONU_ACTIVATION_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_onu_onu_deactivation_completed_id_all_properties                        BCMOLT_GPON_ONU_ONU_DEACTIVATION_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_onu_onu_enable_completed_id_all_properties                              BCMOLT_GPON_ONU_ONU_ENABLE_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_onu_onu_disable_completed_id_all_properties                             BCMOLT_GPON_ONU_ONU_DISABLE_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_onu_invalid_dbru_report_id_all_properties                               BCMOLT_GPON_ONU_INVALID_DBRU_REPORT_ID__NUM_OF
+#define bcmolt_gpon_onu_key_exchange_completed_id_all_properties                            BCMOLT_GPON_ONU_KEY_EXCHANGE_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_onu_key_exchange_key_request_timeout_id_all_properties                  BCMOLT_GPON_ONU_KEY_EXCHANGE_KEY_REQUEST_TIMEOUT_ID__NUM_OF
+#define bcmolt_gpon_onu_key_exchange_cycle_skipped_id_all_properties                        BCMOLT_GPON_ONU_KEY_EXCHANGE_CYCLE_SKIPPED_ID__NUM_OF
+#define bcmolt_gpon_onu_key_exchange_key_mismatch_id_all_properties                         BCMOLT_GPON_ONU_KEY_EXCHANGE_KEY_MISMATCH_ID__NUM_OF
+#define bcmolt_gpon_onu_key_exchange_unconsecutive_index_id_all_properties                  BCMOLT_GPON_ONU_KEY_EXCHANGE_UNCONSECUTIVE_INDEX_ID__NUM_OF
+#define bcmolt_gpon_onu_rssi_measurement_completed_id_all_properties                        BCMOLT_GPON_ONU_RSSI_MEASUREMENT_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_onu_key_exchange_decrypt_required_id_all_properties                     BCMOLT_GPON_ONU_KEY_EXCHANGE_DECRYPT_REQUIRED_ID__NUM_OF
+#define bcmolt_gpon_onu_optical_reflection_id_all_properties                                BCMOLT_GPON_ONU_OPTICAL_REFLECTION_ID__NUM_OF
+#define bcmolt_gpon_onu_cpu_packets_id_all_properties                                       BCMOLT_GPON_ONU_CPU_PACKETS_ID__NUM_OF
+#define bcmolt_gpon_onu_ploam_packet_id_all_properties                                      BCMOLT_GPON_ONU_PLOAM_PACKET_ID__NUM_OF
+#define bcmolt_gpon_onu_cpu_packet_id_all_properties                                        BCMOLT_GPON_ONU_CPU_PACKET_ID__NUM_OF
+#define bcmolt_gpon_onu_omci_packet_id_all_properties                                       BCMOLT_GPON_ONU_OMCI_PACKET_ID__NUM_OF
+#define bcmolt_gpon_onu_onu_activation_standby_completed_id_all_properties                  BCMOLT_GPON_ONU_ONU_ACTIVATION_STANDBY_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_onu_power_management_state_change_id_all_properties                     BCMOLT_GPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID__NUM_OF
+#define bcmolt_gpon_onu_possible_drift_id_all_properties                                    BCMOLT_GPON_ONU_POSSIBLE_DRIFT_ID__NUM_OF
+#define bcmolt_gpon_onu_stat_cfg_id_all_properties                                          BCMOLT_GPON_ONU_STAT_CFG_ID__NUM_OF
+#define bcmolt_gpon_onu_stat_alarm_raised_id_all_properties                                 BCMOLT_GPON_ONU_STAT_ALARM_RAISED_ID__NUM_OF
+#define bcmolt_gpon_onu_stat_alarm_cleared_id_all_properties                                BCMOLT_GPON_ONU_STAT_ALARM_CLEARED_ID__NUM_OF
+#define bcmolt_gpon_onu_auto_cfg_id_all_properties                                          BCMOLT_GPON_ONU_AUTO_CFG_ID__NUM_OF
+#define bcmolt_gpon_trx_key_id_all_properties                                               BCMOLT_GPON_TRX_KEY_ID__NUM_OF
+#define bcmolt_gpon_trx_cfg_id_all_properties                                               BCMOLT_GPON_TRX_CFG_ID__NUM_OF
+#define bcmolt_log_entry_key_id_all_properties                                              BCMOLT_LOG_ENTRY_KEY_ID__NUM_OF
+#define bcmolt_log_entry_cfg_id_all_properties                                              BCMOLT_LOG_ENTRY_CFG_ID__NUM_OF
+#define bcmolt_log_entry_stat_id_all_properties                                             BCMOLT_LOG_ENTRY_STAT_ID__NUM_OF
+#define bcmolt_log_entry_stat_cfg_id_all_properties                                         BCMOLT_LOG_ENTRY_STAT_CFG_ID__NUM_OF
+#define bcmolt_log_entry_stat_alarm_raised_id_all_properties                                BCMOLT_LOG_ENTRY_STAT_ALARM_RAISED_ID__NUM_OF
+#define bcmolt_log_entry_stat_alarm_cleared_id_all_properties                               BCMOLT_LOG_ENTRY_STAT_ALARM_CLEARED_ID__NUM_OF
+#define bcmolt_log_entry_auto_cfg_id_all_properties                                         BCMOLT_LOG_ENTRY_AUTO_CFG_ID__NUM_OF
+#define bcmolt_logger_key_id_all_properties                                                 BCMOLT_LOGGER_KEY_ID__NUM_OF
+#define bcmolt_logger_cfg_id_all_properties                                                 BCMOLT_LOGGER_CFG_ID__NUM_OF
+#define bcmolt_logger_stat_id_all_properties                                                BCMOLT_LOGGER_STAT_ID__NUM_OF
+#define bcmolt_logger_clear_log_id_all_properties                                           BCMOLT_LOGGER_CLEAR_LOG_ID__NUM_OF
+#define bcmolt_logger_stat_cfg_id_all_properties                                            BCMOLT_LOGGER_STAT_CFG_ID__NUM_OF
+#define bcmolt_logger_stat_alarm_raised_id_all_properties                                   BCMOLT_LOGGER_STAT_ALARM_RAISED_ID__NUM_OF
+#define bcmolt_logger_stat_alarm_cleared_id_all_properties                                  BCMOLT_LOGGER_STAT_ALARM_CLEARED_ID__NUM_OF
+#define bcmolt_logger_auto_cfg_id_all_properties                                            BCMOLT_LOGGER_AUTO_CFG_ID__NUM_OF
+#define bcmolt_nni_key_id_all_properties                                                    BCMOLT_NNI_KEY_ID__NUM_OF
+#define bcmolt_nni_cfg_id_all_properties                                                    BCMOLT_NNI_CFG_ID__NUM_OF
+#define bcmolt_nni_stat_id_all_properties                                                   BCMOLT_NNI_STAT_ID__NUM_OF
+#define bcmolt_nni_status_changed_id_all_properties                                         BCMOLT_NNI_STATUS_CHANGED_ID__NUM_OF
+#define bcmolt_nni_stat_cfg_id_all_properties                                               BCMOLT_NNI_STAT_CFG_ID__NUM_OF
+#define bcmolt_nni_stat_alarm_raised_id_all_properties                                      BCMOLT_NNI_STAT_ALARM_RAISED_ID__NUM_OF
+#define bcmolt_nni_stat_alarm_cleared_id_all_properties                                     BCMOLT_NNI_STAT_ALARM_CLEARED_ID__NUM_OF
+#define bcmolt_nni_auto_cfg_id_all_properties                                               BCMOLT_NNI_AUTO_CFG_ID__NUM_OF
+#define bcmolt_nni_serdes_key_id_all_properties                                             BCMOLT_NNI_SERDES_KEY_ID__NUM_OF
+#define bcmolt_nni_serdes_cfg_id_all_properties                                             BCMOLT_NNI_SERDES_CFG_ID__NUM_OF
+#define bcmolt_software_error_key_id_all_properties                                         BCMOLT_SOFTWARE_ERROR_KEY_ID__NUM_OF
+#define bcmolt_software_error_cfg_id_all_properties                                         BCMOLT_SOFTWARE_ERROR_CFG_ID__NUM_OF
+#define bcmolt_trx_calibration_key_id_all_properties                                        BCMOLT_TRX_CALIBRATION_KEY_ID__NUM_OF
+#define bcmolt_trx_calibration_start_capture_window_id_all_properties                       BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID__NUM_OF
+#define bcmolt_trx_calibration_capture_window_and_statistic_completed_id_all_properties     BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID__NUM_OF
+#define bcmolt_trx_calibration_stop_capture_window_id_all_properties                        BCMOLT_TRX_CALIBRATION_STOP_CAPTURE_WINDOW_ID__NUM_OF
+#define bcmolt_trx_calibration_auto_cfg_id_all_properties                                   BCMOLT_TRX_CALIBRATION_AUTO_CFG_ID__NUM_OF
+#define bcmolt_xgpon_alloc_key_id_all_properties                                            BCMOLT_XGPON_ALLOC_KEY_ID__NUM_OF
+#define bcmolt_xgpon_alloc_cfg_id_all_properties                                            BCMOLT_XGPON_ALLOC_CFG_ID__NUM_OF
+#define bcmolt_xgpon_alloc_configuration_completed_id_all_properties                        BCMOLT_XGPON_ALLOC_CONFIGURATION_COMPLETED_ID__NUM_OF
+#define bcmolt_xgpon_alloc_get_stats_id_all_properties                                      BCMOLT_XGPON_ALLOC_GET_STATS_ID__NUM_OF
+#define bcmolt_xgpon_alloc_get_alloc_stats_completed_id_all_properties                      BCMOLT_XGPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID__NUM_OF
+#define bcmolt_xgpon_alloc_set_state_id_all_properties                                      BCMOLT_XGPON_ALLOC_SET_STATE_ID__NUM_OF
+#define bcmolt_xgpon_alloc_stat_id_all_properties                                           BCMOLT_XGPON_ALLOC_STAT_ID__NUM_OF
+#define bcmolt_xgpon_alloc_stat_cfg_id_all_properties                                       BCMOLT_XGPON_ALLOC_STAT_CFG_ID__NUM_OF
+#define bcmolt_xgpon_alloc_stat_alarm_raised_id_all_properties                              BCMOLT_XGPON_ALLOC_STAT_ALARM_RAISED_ID__NUM_OF
+#define bcmolt_xgpon_alloc_stat_alarm_cleared_id_all_properties                             BCMOLT_XGPON_ALLOC_STAT_ALARM_CLEARED_ID__NUM_OF
+#define bcmolt_xgpon_alloc_auto_cfg_id_all_properties                                       BCMOLT_XGPON_ALLOC_AUTO_CFG_ID__NUM_OF
+#define bcmolt_xgpon_gem_port_key_id_all_properties                                         BCMOLT_XGPON_GEM_PORT_KEY_ID__NUM_OF
+#define bcmolt_xgpon_gem_port_cfg_id_all_properties                                         BCMOLT_XGPON_GEM_PORT_CFG_ID__NUM_OF
+#define bcmolt_xgpon_gem_port_stat_id_all_properties                                        BCMOLT_XGPON_GEM_PORT_STAT_ID__NUM_OF
+#define bcmolt_xgpon_gem_port_stat_cfg_id_all_properties                                    BCMOLT_XGPON_GEM_PORT_STAT_CFG_ID__NUM_OF
+#define bcmolt_xgpon_gem_port_stat_alarm_raised_id_all_properties                           BCMOLT_XGPON_GEM_PORT_STAT_ALARM_RAISED_ID__NUM_OF
+#define bcmolt_xgpon_gem_port_stat_alarm_cleared_id_all_properties                          BCMOLT_XGPON_GEM_PORT_STAT_ALARM_CLEARED_ID__NUM_OF
+#define bcmolt_xgpon_gem_port_auto_cfg_id_all_properties                                    BCMOLT_XGPON_GEM_PORT_AUTO_CFG_ID__NUM_OF
+#define bcmolt_xgpon_iwf_key_id_all_properties                                              BCMOLT_XGPON_IWF_KEY_ID__NUM_OF
+#define bcmolt_xgpon_iwf_cfg_id_all_properties                                              BCMOLT_XGPON_IWF_CFG_ID__NUM_OF
+#define bcmolt_xgpon_ni_key_id_all_properties                                               BCMOLT_XGPON_NI_KEY_ID__NUM_OF
+#define bcmolt_xgpon_ni_cfg_id_all_properties                                               BCMOLT_XGPON_NI_CFG_ID__NUM_OF
+#define bcmolt_xgpon_ni_stat_id_all_properties                                              BCMOLT_XGPON_NI_STAT_ID__NUM_OF
+#define bcmolt_xgpon_ni_set_pon_state_id_all_properties                                     BCMOLT_XGPON_NI_SET_PON_STATE_ID__NUM_OF
+#define bcmolt_xgpon_ni_reset_id_all_properties                                             BCMOLT_XGPON_NI_RESET_ID__NUM_OF
+#define bcmolt_xgpon_ni_disable_serial_number_id_all_properties                             BCMOLT_XGPON_NI_DISABLE_SERIAL_NUMBER_ID__NUM_OF
+#define bcmolt_xgpon_ni_single_request_standby_pon_monitoring_id_all_properties             BCMOLT_XGPON_NI_SINGLE_REQUEST_STANDBY_PON_MONITORING_ID__NUM_OF
+#define bcmolt_xgpon_ni_set_onu_state_id_all_properties                                     BCMOLT_XGPON_NI_SET_ONU_STATE_ID__NUM_OF
+#define bcmolt_xgpon_ni_run_special_bw_map_id_all_properties                                BCMOLT_XGPON_NI_RUN_SPECIAL_BW_MAP_ID__NUM_OF
+#define bcmolt_xgpon_ni_rogue_detection_window_id_all_properties                            BCMOLT_XGPON_NI_ROGUE_DETECTION_WINDOW_ID__NUM_OF
+#define bcmolt_xgpon_ni_state_change_completed_id_all_properties                            BCMOLT_XGPON_NI_STATE_CHANGE_COMPLETED_ID__NUM_OF
+#define bcmolt_xgpon_ni_los_id_all_properties                                               BCMOLT_XGPON_NI_LOS_ID__NUM_OF
+#define bcmolt_xgpon_ni_serial_number_acquisition_cycle_start_id_all_properties             BCMOLT_XGPON_NI_SERIAL_NUMBER_ACQUISITION_CYCLE_START_ID__NUM_OF
+#define bcmolt_xgpon_ni_protection_switching_traffic_resume_id_all_properties               BCMOLT_XGPON_NI_PROTECTION_SWITCHING_TRAFFIC_RESUME_ID__NUM_OF
+#define bcmolt_xgpon_ni_protection_switching_onus_ranged_id_all_properties                  BCMOLT_XGPON_NI_PROTECTION_SWITCHING_ONUS_RANGED_ID__NUM_OF
+#define bcmolt_xgpon_ni_protection_switching_switchover_completed_id_all_properties         BCMOLT_XGPON_NI_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED_ID__NUM_OF
+#define bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_id_all_properties            BCMOLT_XGPON_NI_STANDBY_PON_MONITORING_CYCLE_COMPLETED_ID__NUM_OF
+#define bcmolt_xgpon_ni_onu_discovered_id_all_properties                                    BCMOLT_XGPON_NI_ONU_DISCOVERED_ID__NUM_OF
+#define bcmolt_xgpon_ni_cpu_packets_failure_id_all_properties                               BCMOLT_XGPON_NI_CPU_PACKETS_FAILURE_ID__NUM_OF
+#define bcmolt_xgpon_ni_cpu_packets_id_all_properties                                       BCMOLT_XGPON_NI_CPU_PACKETS_ID__NUM_OF
+#define bcmolt_xgpon_ni_broadcast_ploam_packet_id_all_properties                            BCMOLT_XGPON_NI_BROADCAST_PLOAM_PACKET_ID__NUM_OF
+#define bcmolt_xgpon_ni_rogue_detection_completed_id_all_properties                         BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID__NUM_OF
+#define bcmolt_xgpon_ni_deactivate_all_onus_completed_id_all_properties                     BCMOLT_XGPON_NI_DEACTIVATE_ALL_ONUS_COMPLETED_ID__NUM_OF
+#define bcmolt_xgpon_ni_disable_all_onus_completed_id_all_properties                        BCMOLT_XGPON_NI_DISABLE_ALL_ONUS_COMPLETED_ID__NUM_OF
+#define bcmolt_xgpon_ni_activate_all_onus_completed_id_all_properties                       BCMOLT_XGPON_NI_ACTIVATE_ALL_ONUS_COMPLETED_ID__NUM_OF
+#define bcmolt_xgpon_ni_enable_all_onus_completed_id_all_properties                         BCMOLT_XGPON_NI_ENABLE_ALL_ONUS_COMPLETED_ID__NUM_OF
+#define bcmolt_xgpon_ni_tod_request_completed_id_all_properties                             BCMOLT_XGPON_NI_TOD_REQUEST_COMPLETED_ID__NUM_OF
+#define bcmolt_xgpon_ni_tod_request_id_all_properties                                       BCMOLT_XGPON_NI_TOD_REQUEST_ID__NUM_OF
+#define bcmolt_xgpon_ni_start_onu_upgrade_id_all_properties                                 BCMOLT_XGPON_NI_START_ONU_UPGRADE_ID__NUM_OF
+#define bcmolt_xgpon_ni_onu_upgrade_complete_id_all_properties                              BCMOLT_XGPON_NI_ONU_UPGRADE_COMPLETE_ID__NUM_OF
+#define bcmolt_xgpon_ni_rogue_onu_special_map_cycle_start_id_all_properties                 BCMOLT_XGPON_NI_ROGUE_ONU_SPECIAL_MAP_CYCLE_START_ID__NUM_OF
+#define bcmolt_xgpon_ni_adjust_tx_wavelength_id_all_properties                              BCMOLT_XGPON_NI_ADJUST_TX_WAVELENGTH_ID__NUM_OF
+#define bcmolt_xgpon_ni_stat_cfg_id_all_properties                                          BCMOLT_XGPON_NI_STAT_CFG_ID__NUM_OF
+#define bcmolt_xgpon_ni_stat_alarm_raised_id_all_properties                                 BCMOLT_XGPON_NI_STAT_ALARM_RAISED_ID__NUM_OF
+#define bcmolt_xgpon_ni_stat_alarm_cleared_id_all_properties                                BCMOLT_XGPON_NI_STAT_ALARM_CLEARED_ID__NUM_OF
+#define bcmolt_xgpon_ni_auto_cfg_id_all_properties                                          BCMOLT_XGPON_NI_AUTO_CFG_ID__NUM_OF
+#define bcmolt_xgpon_onu_key_id_all_properties                                              BCMOLT_XGPON_ONU_KEY_ID__NUM_OF
+#define bcmolt_xgpon_onu_cfg_id_all_properties                                              BCMOLT_XGPON_ONU_CFG_ID__NUM_OF
+#define bcmolt_xgpon_onu_stat_id_all_properties                                             BCMOLT_XGPON_ONU_STAT_ID__NUM_OF
+#define bcmolt_xgpon_onu_set_onu_state_id_all_properties                                    BCMOLT_XGPON_ONU_SET_ONU_STATE_ID__NUM_OF
+#define bcmolt_xgpon_onu_rssi_measurement_id_all_properties                                 BCMOLT_XGPON_ONU_RSSI_MEASUREMENT_ID__NUM_OF
+#define bcmolt_xgpon_onu_onu_alarm_id_all_properties                                        BCMOLT_XGPON_ONU_ONU_ALARM_ID__NUM_OF
+#define bcmolt_xgpon_onu_dowi_id_all_properties                                             BCMOLT_XGPON_ONU_DOWI_ID__NUM_OF
+#define bcmolt_xgpon_onu_sfi_id_all_properties                                              BCMOLT_XGPON_ONU_SFI_ID__NUM_OF
+#define bcmolt_xgpon_onu_sdi_id_all_properties                                              BCMOLT_XGPON_ONU_SDI_ID__NUM_OF
+#define bcmolt_xgpon_onu_dfi_id_all_properties                                              BCMOLT_XGPON_ONU_DFI_ID__NUM_OF
+#define bcmolt_xgpon_onu_pqsi_id_all_properties                                             BCMOLT_XGPON_ONU_PQSI_ID__NUM_OF
+#define bcmolt_xgpon_onu_sufi_id_all_properties                                             BCMOLT_XGPON_ONU_SUFI_ID__NUM_OF
+#define bcmolt_xgpon_onu_tiwi_id_all_properties                                             BCMOLT_XGPON_ONU_TIWI_ID__NUM_OF
+#define bcmolt_xgpon_onu_looci_id_all_properties                                            BCMOLT_XGPON_ONU_LOOCI_ID__NUM_OF
+#define bcmolt_xgpon_onu_ranging_completed_id_all_properties                                BCMOLT_XGPON_ONU_RANGING_COMPLETED_ID__NUM_OF
+#define bcmolt_xgpon_onu_onu_activation_completed_id_all_properties                         BCMOLT_XGPON_ONU_ONU_ACTIVATION_COMPLETED_ID__NUM_OF
+#define bcmolt_xgpon_onu_onu_deactivation_completed_id_all_properties                       BCMOLT_XGPON_ONU_ONU_DEACTIVATION_COMPLETED_ID__NUM_OF
+#define bcmolt_xgpon_onu_onu_enable_completed_id_all_properties                             BCMOLT_XGPON_ONU_ONU_ENABLE_COMPLETED_ID__NUM_OF
+#define bcmolt_xgpon_onu_onu_disable_completed_id_all_properties                            BCMOLT_XGPON_ONU_ONU_DISABLE_COMPLETED_ID__NUM_OF
+#define bcmolt_xgpon_onu_rssi_measurement_completed_id_all_properties                       BCMOLT_XGPON_ONU_RSSI_MEASUREMENT_COMPLETED_ID__NUM_OF
+#define bcmolt_xgpon_onu_invalid_dbru_report_id_all_properties                              BCMOLT_XGPON_ONU_INVALID_DBRU_REPORT_ID__NUM_OF
+#define bcmolt_xgpon_onu_key_exchange_completed_id_all_properties                           BCMOLT_XGPON_ONU_KEY_EXCHANGE_COMPLETED_ID__NUM_OF
+#define bcmolt_xgpon_onu_key_exchange_key_request_timeout_id_all_properties                 BCMOLT_XGPON_ONU_KEY_EXCHANGE_KEY_REQUEST_TIMEOUT_ID__NUM_OF
+#define bcmolt_xgpon_onu_key_exchange_cycle_skipped_id_all_properties                       BCMOLT_XGPON_ONU_KEY_EXCHANGE_CYCLE_SKIPPED_ID__NUM_OF
+#define bcmolt_xgpon_onu_key_exchange_key_mismatch_id_all_properties                        BCMOLT_XGPON_ONU_KEY_EXCHANGE_KEY_MISMATCH_ID__NUM_OF
+#define bcmolt_xgpon_onu_optical_reflection_id_all_properties                               BCMOLT_XGPON_ONU_OPTICAL_REFLECTION_ID__NUM_OF
+#define bcmolt_xgpon_onu_ploam_packet_id_all_properties                                     BCMOLT_XGPON_ONU_PLOAM_PACKET_ID__NUM_OF
+#define bcmolt_xgpon_onu_cpu_packets_id_all_properties                                      BCMOLT_XGPON_ONU_CPU_PACKETS_ID__NUM_OF
+#define bcmolt_xgpon_onu_cpu_packet_id_all_properties                                       BCMOLT_XGPON_ONU_CPU_PACKET_ID__NUM_OF
+#define bcmolt_xgpon_onu_omci_packet_id_all_properties                                      BCMOLT_XGPON_ONU_OMCI_PACKET_ID__NUM_OF
+#define bcmolt_xgpon_onu_dgi_id_all_properties                                              BCMOLT_XGPON_ONU_DGI_ID__NUM_OF
+#define bcmolt_xgpon_onu_power_management_state_change_id_all_properties                    BCMOLT_XGPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID__NUM_OF
+#define bcmolt_xgpon_onu_possible_drift_id_all_properties                                   BCMOLT_XGPON_ONU_POSSIBLE_DRIFT_ID__NUM_OF
+#define bcmolt_xgpon_onu_request_registration_id_all_properties                             BCMOLT_XGPON_ONU_REQUEST_REGISTRATION_ID__NUM_OF
+#define bcmolt_xgpon_onu_change_power_levelling_id_all_properties                           BCMOLT_XGPON_ONU_CHANGE_POWER_LEVELLING_ID__NUM_OF
+#define bcmolt_xgpon_onu_get_power_level_id_all_properties                                  BCMOLT_XGPON_ONU_GET_POWER_LEVEL_ID__NUM_OF
+#define bcmolt_xgpon_onu_get_power_consumption_id_all_properties                            BCMOLT_XGPON_ONU_GET_POWER_CONSUMPTION_ID__NUM_OF
+#define bcmolt_xgpon_onu_adjust_tx_wavelength_id_all_properties                             BCMOLT_XGPON_ONU_ADJUST_TX_WAVELENGTH_ID__NUM_OF
+#define bcmolt_xgpon_onu_registration_id_id_all_properties                                  BCMOLT_XGPON_ONU_REGISTRATION_ID_ID__NUM_OF
+#define bcmolt_xgpon_onu_power_level_report_id_all_properties                               BCMOLT_XGPON_ONU_POWER_LEVEL_REPORT_ID__NUM_OF
+#define bcmolt_xgpon_onu_power_consumption_report_id_all_properties                         BCMOLT_XGPON_ONU_POWER_CONSUMPTION_REPORT_ID__NUM_OF
+#define bcmolt_xgpon_onu_secure_mutual_authentication_id_all_properties                     BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_ID__NUM_OF
+#define bcmolt_xgpon_onu_secure_mutual_authentication_failure_id_all_properties             BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_FAILURE_ID__NUM_OF
+#define bcmolt_xgpon_onu_onu_tuning_in_id_all_properties                                    BCMOLT_XGPON_ONU_ONU_TUNING_IN_ID__NUM_OF
+#define bcmolt_xgpon_onu_onu_tuning_out_id_all_properties                                   BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID__NUM_OF
+#define bcmolt_xgpon_onu_onu_tuning_out_completed_id_all_properties                         BCMOLT_XGPON_ONU_ONU_TUNING_OUT_COMPLETED_ID__NUM_OF
+#define bcmolt_xgpon_onu_onu_tuning_in_completed_id_all_properties                          BCMOLT_XGPON_ONU_ONU_TUNING_IN_COMPLETED_ID__NUM_OF
+#define bcmolt_xgpon_onu_tuning_response_id_all_properties                                  BCMOLT_XGPON_ONU_TUNING_RESPONSE_ID__NUM_OF
+#define bcmolt_xgpon_onu_stat_cfg_id_all_properties                                         BCMOLT_XGPON_ONU_STAT_CFG_ID__NUM_OF
+#define bcmolt_xgpon_onu_stat_alarm_raised_id_all_properties                                BCMOLT_XGPON_ONU_STAT_ALARM_RAISED_ID__NUM_OF
+#define bcmolt_xgpon_onu_stat_alarm_cleared_id_all_properties                               BCMOLT_XGPON_ONU_STAT_ALARM_CLEARED_ID__NUM_OF
+#define bcmolt_xgpon_onu_auto_cfg_id_all_properties                                         BCMOLT_XGPON_ONU_AUTO_CFG_ID__NUM_OF
+#define bcmolt_xgpon_trx_key_id_all_properties                                              BCMOLT_XGPON_TRX_KEY_ID__NUM_OF
+#define bcmolt_xgpon_trx_cfg_id_all_properties                                              BCMOLT_XGPON_TRX_CFG_ID__NUM_OF
+#define bcmolt_xpon_serdes_key_id_all_properties                                            BCMOLT_XPON_SERDES_KEY_ID__NUM_OF
+#define bcmolt_xpon_serdes_cfg_id_all_properties                                            BCMOLT_XPON_SERDES_CFG_ID__NUM_OF
+
+/* The following are required for the API Init/Set/etc macros */
+#define bcmolt_obj_id__begin                                                                    BCMOLT_OBJ_ID__BEGIN
+#define bcmolt_obj_id_ae_ni                                                                     BCMOLT_OBJ_ID_AE_NI
+#define bcmolt_obj_id_ae_path_ds                                                                BCMOLT_OBJ_ID_AE_PATH_DS
+#define bcmolt_obj_id_ae_path_us                                                                BCMOLT_OBJ_ID_AE_PATH_US
+#define bcmolt_obj_id_channel                                                                   BCMOLT_OBJ_ID_CHANNEL
+#define bcmolt_obj_id_debug                                                                     BCMOLT_OBJ_ID_DEBUG
+#define bcmolt_obj_id_device                                                                    BCMOLT_OBJ_ID_DEVICE
+#define bcmolt_obj_id_epon_denied_link                                                          BCMOLT_OBJ_ID_EPON_DENIED_LINK
+#define bcmolt_obj_id_epon_link                                                                 BCMOLT_OBJ_ID_EPON_LINK
+#define bcmolt_obj_id_epon_ni                                                                   BCMOLT_OBJ_ID_EPON_NI
+#define bcmolt_obj_id_epon_onu_10g_us                                                           BCMOLT_OBJ_ID_EPON_ONU_10G_US
+#define bcmolt_obj_id_epon_onu_1g_us                                                            BCMOLT_OBJ_ID_EPON_ONU_1G_US
+#define bcmolt_obj_id_epon_path_10g_ds                                                          BCMOLT_OBJ_ID_EPON_PATH_10G_DS
+#define bcmolt_obj_id_epon_path_10g_us                                                          BCMOLT_OBJ_ID_EPON_PATH_10G_US
+#define bcmolt_obj_id_epon_path_1g_ds                                                           BCMOLT_OBJ_ID_EPON_PATH_1G_DS
+#define bcmolt_obj_id_epon_path_1g_us                                                           BCMOLT_OBJ_ID_EPON_PATH_1G_US
+#define bcmolt_obj_id_epon_rp                                                                   BCMOLT_OBJ_ID_EPON_RP
+#define bcmolt_obj_id_gpio                                                                      BCMOLT_OBJ_ID_GPIO
+#define bcmolt_obj_id_gpon_alloc                                                                BCMOLT_OBJ_ID_GPON_ALLOC
+#define bcmolt_obj_id_gpon_gem_port                                                             BCMOLT_OBJ_ID_GPON_GEM_PORT
+#define bcmolt_obj_id_gpon_iwf                                                                  BCMOLT_OBJ_ID_GPON_IWF
+#define bcmolt_obj_id_gpon_iwf_ds_egress_flow                                                   BCMOLT_OBJ_ID_GPON_IWF_DS_EGRESS_FLOW
+#define bcmolt_obj_id_gpon_iwf_ds_ingress_flow                                                  BCMOLT_OBJ_ID_GPON_IWF_DS_INGRESS_FLOW
+#define bcmolt_obj_id_gpon_iwf_mac_table                                                        BCMOLT_OBJ_ID_GPON_IWF_MAC_TABLE
+#define bcmolt_obj_id_gpon_iwf_us_flow                                                          BCMOLT_OBJ_ID_GPON_IWF_US_FLOW
+#define bcmolt_obj_id_gpon_ni                                                                   BCMOLT_OBJ_ID_GPON_NI
+#define bcmolt_obj_id_gpon_onu                                                                  BCMOLT_OBJ_ID_GPON_ONU
+#define bcmolt_obj_id_gpon_trx                                                                  BCMOLT_OBJ_ID_GPON_TRX
+#define bcmolt_obj_id_log_entry                                                                 BCMOLT_OBJ_ID_LOG_ENTRY
+#define bcmolt_obj_id_logger                                                                    BCMOLT_OBJ_ID_LOGGER
+#define bcmolt_obj_id_nni                                                                       BCMOLT_OBJ_ID_NNI
+#define bcmolt_obj_id_nni_serdes                                                                BCMOLT_OBJ_ID_NNI_SERDES
+#define bcmolt_obj_id_software_error                                                            BCMOLT_OBJ_ID_SOFTWARE_ERROR
+#define bcmolt_obj_id_trx_calibration                                                           BCMOLT_OBJ_ID_TRX_CALIBRATION
+#define bcmolt_obj_id_xgpon_alloc                                                               BCMOLT_OBJ_ID_XGPON_ALLOC
+#define bcmolt_obj_id_xgpon_gem_port                                                            BCMOLT_OBJ_ID_XGPON_GEM_PORT
+#define bcmolt_obj_id_xgpon_iwf                                                                 BCMOLT_OBJ_ID_XGPON_IWF
+#define bcmolt_obj_id_xgpon_ni                                                                  BCMOLT_OBJ_ID_XGPON_NI
+#define bcmolt_obj_id_xgpon_onu                                                                 BCMOLT_OBJ_ID_XGPON_ONU
+#define bcmolt_obj_id_xgpon_trx                                                                 BCMOLT_OBJ_ID_XGPON_TRX
+#define bcmolt_obj_id_xpon_serdes                                                               BCMOLT_OBJ_ID_XPON_SERDES
+#define bcmolt_obj_id__num_of                                                                   BCMOLT_OBJ_ID__NUM_OF
+#define bcmolt_ae_ni_oper_id__begin                                                             BCMOLT_AE_NI_OPER_ID__BEGIN
+#define bcmolt_ae_ni_oper_id_set_ae_ni_en_state                                                 BCMOLT_AE_NI_OPER_ID_SET_AE_NI_EN_STATE
+#define bcmolt_ae_ni_oper_id__num_of                                                            BCMOLT_AE_NI_OPER_ID__NUM_OF
+#define bcmolt_ae_path_ds_auto_id__begin                                                        BCMOLT_AE_PATH_DS_AUTO_ID__BEGIN
+#define bcmolt_ae_path_ds_auto_id_stat_alarm_cleared                                            BCMOLT_AE_PATH_DS_AUTO_ID_STAT_ALARM_CLEARED
+#define bcmolt_ae_path_ds_auto_id_stat_alarm_raised                                             BCMOLT_AE_PATH_DS_AUTO_ID_STAT_ALARM_RAISED
+#define bcmolt_ae_path_ds_auto_id__num_of                                                       BCMOLT_AE_PATH_DS_AUTO_ID__NUM_OF
+#define bcmolt_ae_path_us_auto_id__begin                                                        BCMOLT_AE_PATH_US_AUTO_ID__BEGIN
+#define bcmolt_ae_path_us_auto_id_stat_alarm_cleared                                            BCMOLT_AE_PATH_US_AUTO_ID_STAT_ALARM_CLEARED
+#define bcmolt_ae_path_us_auto_id_stat_alarm_raised                                             BCMOLT_AE_PATH_US_AUTO_ID_STAT_ALARM_RAISED
+#define bcmolt_ae_path_us_auto_id__num_of                                                       BCMOLT_AE_PATH_US_AUTO_ID__NUM_OF
+#define bcmolt_debug_auto_id__begin                                                             BCMOLT_DEBUG_AUTO_ID__BEGIN
+#define bcmolt_debug_auto_id_cli_output                                                         BCMOLT_DEBUG_AUTO_ID_CLI_OUTPUT
+#define bcmolt_debug_auto_id_file_almost_full                                                   BCMOLT_DEBUG_AUTO_ID_FILE_ALMOST_FULL
+#define bcmolt_debug_auto_id__num_of                                                            BCMOLT_DEBUG_AUTO_ID__NUM_OF
+#define bcmolt_debug_oper_id__begin                                                             BCMOLT_DEBUG_OPER_ID__BEGIN
+#define bcmolt_debug_oper_id_cli_input                                                          BCMOLT_DEBUG_OPER_ID_CLI_INPUT
+#define bcmolt_debug_oper_id_reset_api_capture                                                  BCMOLT_DEBUG_OPER_ID_RESET_API_CAPTURE
+#define bcmolt_debug_oper_id_start_api_capture                                                  BCMOLT_DEBUG_OPER_ID_START_API_CAPTURE
+#define bcmolt_debug_oper_id_stop_api_capture                                                   BCMOLT_DEBUG_OPER_ID_STOP_API_CAPTURE
+#define bcmolt_debug_oper_id__num_of                                                            BCMOLT_DEBUG_OPER_ID__NUM_OF
+#define bcmolt_device_auto_id__begin                                                            BCMOLT_DEVICE_AUTO_ID__BEGIN
+#define bcmolt_device_auto_id_connection_complete                                               BCMOLT_DEVICE_AUTO_ID_CONNECTION_COMPLETE
+#define bcmolt_device_auto_id_connection_established                                            BCMOLT_DEVICE_AUTO_ID_CONNECTION_ESTABLISHED
+#define bcmolt_device_auto_id_connection_failure                                                BCMOLT_DEVICE_AUTO_ID_CONNECTION_FAILURE
+#define bcmolt_device_auto_id_ddr_test_complete                                                 BCMOLT_DEVICE_AUTO_ID_DDR_TEST_COMPLETE
+#define bcmolt_device_auto_id_device_keep_alive                                                 BCMOLT_DEVICE_AUTO_ID_DEVICE_KEEP_ALIVE
+#define bcmolt_device_auto_id_device_ready                                                      BCMOLT_DEVICE_AUTO_ID_DEVICE_READY
+#define bcmolt_device_auto_id_disconnection_complete                                            BCMOLT_DEVICE_AUTO_ID_DISCONNECTION_COMPLETE
+#define bcmolt_device_auto_id_image_transfer_complete                                           BCMOLT_DEVICE_AUTO_ID_IMAGE_TRANSFER_COMPLETE
+#define bcmolt_device_auto_id_indications_dropped                                               BCMOLT_DEVICE_AUTO_ID_INDICATIONS_DROPPED
+#define bcmolt_device_auto_id_sw_error                                                          BCMOLT_DEVICE_AUTO_ID_SW_ERROR
+#define bcmolt_device_auto_id_sw_exception                                                      BCMOLT_DEVICE_AUTO_ID_SW_EXCEPTION
+#define bcmolt_device_auto_id__num_of                                                           BCMOLT_DEVICE_AUTO_ID__NUM_OF
+#define bcmolt_device_oper_id__begin                                                            BCMOLT_DEVICE_OPER_ID__BEGIN
+#define bcmolt_device_oper_id_connect                                                           BCMOLT_DEVICE_OPER_ID_CONNECT
+#define bcmolt_device_oper_id_disconnect                                                        BCMOLT_DEVICE_OPER_ID_DISCONNECT
+#define bcmolt_device_oper_id_host_keep_alive                                                   BCMOLT_DEVICE_OPER_ID_HOST_KEEP_ALIVE
+#define bcmolt_device_oper_id_image_transfer_data                                               BCMOLT_DEVICE_OPER_ID_IMAGE_TRANSFER_DATA
+#define bcmolt_device_oper_id_image_transfer_start                                              BCMOLT_DEVICE_OPER_ID_IMAGE_TRANSFER_START
+#define bcmolt_device_oper_id_reset                                                             BCMOLT_DEVICE_OPER_ID_RESET
+#define bcmolt_device_oper_id_run_ddr_test                                                      BCMOLT_DEVICE_OPER_ID_RUN_DDR_TEST
+#define bcmolt_device_oper_id_sw_upgrade_activate                                               BCMOLT_DEVICE_OPER_ID_SW_UPGRADE_ACTIVATE
+#define bcmolt_device_oper_id__num_of                                                           BCMOLT_DEVICE_OPER_ID__NUM_OF
+#define bcmolt_epon_denied_link_auto_id__begin                                                  BCMOLT_EPON_DENIED_LINK_AUTO_ID__BEGIN
+#define bcmolt_epon_denied_link_auto_id_laser_on_off_violation                                  BCMOLT_EPON_DENIED_LINK_AUTO_ID_LASER_ON_OFF_VIOLATION
+#define bcmolt_epon_denied_link_auto_id_llid_pool_empty_violation                               BCMOLT_EPON_DENIED_LINK_AUTO_ID_LLID_POOL_EMPTY_VIOLATION
+#define bcmolt_epon_denied_link_auto_id_max_link_violation                                      BCMOLT_EPON_DENIED_LINK_AUTO_ID_MAX_LINK_VIOLATION
+#define bcmolt_epon_denied_link_auto_id_overhead_profile_violation                              BCMOLT_EPON_DENIED_LINK_AUTO_ID_OVERHEAD_PROFILE_VIOLATION
+#define bcmolt_epon_denied_link_auto_id_range_violation                                         BCMOLT_EPON_DENIED_LINK_AUTO_ID_RANGE_VIOLATION
+#define bcmolt_epon_denied_link_auto_id_rogue_violation                                         BCMOLT_EPON_DENIED_LINK_AUTO_ID_ROGUE_VIOLATION
+#define bcmolt_epon_denied_link_auto_id_system_resource_violation                               BCMOLT_EPON_DENIED_LINK_AUTO_ID_SYSTEM_RESOURCE_VIOLATION
+#define bcmolt_epon_denied_link_auto_id_tdm_channels_exhausted                                  BCMOLT_EPON_DENIED_LINK_AUTO_ID_TDM_CHANNELS_EXHAUSTED
+#define bcmolt_epon_denied_link_auto_id_unknown_link_violation                                  BCMOLT_EPON_DENIED_LINK_AUTO_ID_UNKNOWN_LINK_VIOLATION
+#define bcmolt_epon_denied_link_auto_id_upstream_bandwidth_violation                            BCMOLT_EPON_DENIED_LINK_AUTO_ID_UPSTREAM_BANDWIDTH_VIOLATION
+#define bcmolt_epon_denied_link_auto_id__num_of                                                 BCMOLT_EPON_DENIED_LINK_AUTO_ID__NUM_OF
+#define bcmolt_epon_link_auto_id__begin                                                         BCMOLT_EPON_LINK_AUTO_ID__BEGIN
+#define bcmolt_epon_link_auto_id_duplicate_mpcp_registration_request                            BCMOLT_EPON_LINK_AUTO_ID_DUPLICATE_MPCP_REGISTRATION_REQUEST
+#define bcmolt_epon_link_auto_id_encryption_enabled                                             BCMOLT_EPON_LINK_AUTO_ID_ENCRYPTION_ENABLED
+#define bcmolt_epon_link_auto_id_key_exchange_failure                                           BCMOLT_EPON_LINK_AUTO_ID_KEY_EXCHANGE_FAILURE
+#define bcmolt_epon_link_auto_id_key_exchange_started                                           BCMOLT_EPON_LINK_AUTO_ID_KEY_EXCHANGE_STARTED
+#define bcmolt_epon_link_auto_id_key_exchange_stopped                                           BCMOLT_EPON_LINK_AUTO_ID_KEY_EXCHANGE_STOPPED
+#define bcmolt_epon_link_auto_id_link_deleted                                                   BCMOLT_EPON_LINK_AUTO_ID_LINK_DELETED
+#define bcmolt_epon_link_auto_id_link_speed_mismatch                                            BCMOLT_EPON_LINK_AUTO_ID_LINK_SPEED_MISMATCH
+#define bcmolt_epon_link_auto_id_mpcp_deregistered                                              BCMOLT_EPON_LINK_AUTO_ID_MPCP_DEREGISTERED
+#define bcmolt_epon_link_auto_id_mpcp_discovered                                                BCMOLT_EPON_LINK_AUTO_ID_MPCP_DISCOVERED
+#define bcmolt_epon_link_auto_id_mpcp_reg_ack_timeout                                           BCMOLT_EPON_LINK_AUTO_ID_MPCP_REG_ACK_TIMEOUT
+#define bcmolt_epon_link_auto_id_mpcp_report_timeout                                            BCMOLT_EPON_LINK_AUTO_ID_MPCP_REPORT_TIMEOUT
+#define bcmolt_epon_link_auto_id_oam_keepalive_timeout                                          BCMOLT_EPON_LINK_AUTO_ID_OAM_KEEPALIVE_TIMEOUT
+#define bcmolt_epon_link_auto_id_oam_keepalive_timer_started                                    BCMOLT_EPON_LINK_AUTO_ID_OAM_KEEPALIVE_TIMER_STARTED
+#define bcmolt_epon_link_auto_id_oam_keepalive_timer_stopped                                    BCMOLT_EPON_LINK_AUTO_ID_OAM_KEEPALIVE_TIMER_STOPPED
+#define bcmolt_epon_link_auto_id_preprovisioned_link_created                                    BCMOLT_EPON_LINK_AUTO_ID_PREPROVISIONED_LINK_CREATED
+#define bcmolt_epon_link_auto_id_protection_switch_occurred                                     BCMOLT_EPON_LINK_AUTO_ID_PROTECTION_SWITCH_OCCURRED
+#define bcmolt_epon_link_auto_id_range_value_changed                                            BCMOLT_EPON_LINK_AUTO_ID_RANGE_VALUE_CHANGED
+#define bcmolt_epon_link_auto_id_rerange_failure                                                BCMOLT_EPON_LINK_AUTO_ID_RERANGE_FAILURE
+#define bcmolt_epon_link_auto_id_stat_alarm_cleared                                             BCMOLT_EPON_LINK_AUTO_ID_STAT_ALARM_CLEARED
+#define bcmolt_epon_link_auto_id_stat_alarm_raised                                              BCMOLT_EPON_LINK_AUTO_ID_STAT_ALARM_RAISED
+#define bcmolt_epon_link_auto_id_static_registration_done                                       BCMOLT_EPON_LINK_AUTO_ID_STATIC_REGISTRATION_DONE
+#define bcmolt_epon_link_auto_id__num_of                                                        BCMOLT_EPON_LINK_AUTO_ID__NUM_OF
+#define bcmolt_epon_link_oper_id__begin                                                         BCMOLT_EPON_LINK_OPER_ID__BEGIN
+#define bcmolt_epon_link_oper_id_delete_link                                                    BCMOLT_EPON_LINK_OPER_ID_DELETE_LINK
+#define bcmolt_epon_link_oper_id_force_rediscovery                                              BCMOLT_EPON_LINK_OPER_ID_FORCE_REDISCOVERY
+#define bcmolt_epon_link_oper_id_key_exchange_start                                             BCMOLT_EPON_LINK_OPER_ID_KEY_EXCHANGE_START
+#define bcmolt_epon_link_oper_id_key_exchange_stop                                              BCMOLT_EPON_LINK_OPER_ID_KEY_EXCHANGE_STOP
+#define bcmolt_epon_link_oper_id_oam_keepalive_timer_start                                      BCMOLT_EPON_LINK_OPER_ID_OAM_KEEPALIVE_TIMER_START
+#define bcmolt_epon_link_oper_id_oam_keepalive_timer_stop                                       BCMOLT_EPON_LINK_OPER_ID_OAM_KEEPALIVE_TIMER_STOP
+#define bcmolt_epon_link_oper_id_static_registration                                            BCMOLT_EPON_LINK_OPER_ID_STATIC_REGISTRATION
+#define bcmolt_epon_link_oper_id__num_of                                                        BCMOLT_EPON_LINK_OPER_ID__NUM_OF
+#define bcmolt_epon_link_proxy_id__begin                                                        BCMOLT_EPON_LINK_PROXY_ID__BEGIN
+#define bcmolt_epon_link_proxy_id_inject_frame                                                  BCMOLT_EPON_LINK_PROXY_ID_INJECT_FRAME
+#define bcmolt_epon_link_proxy_id__num_of                                                       BCMOLT_EPON_LINK_PROXY_ID__NUM_OF
+#define bcmolt_epon_link_proxy_rx_id__begin                                                     BCMOLT_EPON_LINK_PROXY_RX_ID__BEGIN
+#define bcmolt_epon_link_proxy_rx_id_frame_captured                                             BCMOLT_EPON_LINK_PROXY_RX_ID_FRAME_CAPTURED
+#define bcmolt_epon_link_proxy_rx_id__num_of                                                    BCMOLT_EPON_LINK_PROXY_RX_ID__NUM_OF
+#define bcmolt_epon_ni_auto_id__begin                                                           BCMOLT_EPON_NI_AUTO_ID__BEGIN
+#define bcmolt_epon_ni_auto_id_auto_rogue_scan_10g_failure                                      BCMOLT_EPON_NI_AUTO_ID_AUTO_ROGUE_SCAN_10G_FAILURE
+#define bcmolt_epon_ni_auto_id_auto_rogue_scan_1g_failure                                       BCMOLT_EPON_NI_AUTO_ID_AUTO_ROGUE_SCAN_1G_FAILURE
+#define bcmolt_epon_ni_auto_id_llid_quarantined                                                 BCMOLT_EPON_NI_AUTO_ID_LLID_QUARANTINED
+#define bcmolt_epon_ni_auto_id_mpcp_timestamp_changed                                           BCMOLT_EPON_NI_AUTO_ID_MPCP_TIMESTAMP_CHANGED
+#define bcmolt_epon_ni_auto_id_no_reports                                                       BCMOLT_EPON_NI_AUTO_ID_NO_REPORTS
+#define bcmolt_epon_ni_auto_id_onu_upgrade_complete                                             BCMOLT_EPON_NI_AUTO_ID_ONU_UPGRADE_COMPLETE
+#define bcmolt_epon_ni_auto_id_rerange_failure                                                  BCMOLT_EPON_NI_AUTO_ID_RERANGE_FAILURE
+#define bcmolt_epon_ni_auto_id_rogue_scan_complete                                              BCMOLT_EPON_NI_AUTO_ID_ROGUE_SCAN_COMPLETE
+#define bcmolt_epon_ni_auto_id_rssi_measurement_completed                                       BCMOLT_EPON_NI_AUTO_ID_RSSI_MEASUREMENT_COMPLETED
+#define bcmolt_epon_ni_auto_id_state_change_completed                                           BCMOLT_EPON_NI_AUTO_ID_STATE_CHANGE_COMPLETED
+#define bcmolt_epon_ni_auto_id__num_of                                                          BCMOLT_EPON_NI_AUTO_ID__NUM_OF
+#define bcmolt_epon_ni_oper_id__begin                                                           BCMOLT_EPON_NI_OPER_ID__BEGIN
+#define bcmolt_epon_ni_oper_id_add_link                                                         BCMOLT_EPON_NI_OPER_ID_ADD_LINK
+#define bcmolt_epon_ni_oper_id_add_multicast_link                                               BCMOLT_EPON_NI_OPER_ID_ADD_MULTICAST_LINK
+#define bcmolt_epon_ni_oper_id_add_protected_standby_link                                       BCMOLT_EPON_NI_OPER_ID_ADD_PROTECTED_STANDBY_LINK
+#define bcmolt_epon_ni_oper_id_issue_rssi_grant                                                 BCMOLT_EPON_NI_OPER_ID_ISSUE_RSSI_GRANT
+#define bcmolt_epon_ni_oper_id_protection_switching_apply_rerange_delta                         BCMOLT_EPON_NI_OPER_ID_PROTECTION_SWITCHING_APPLY_RERANGE_DELTA
+#define bcmolt_epon_ni_oper_id_rogue_llid_scan                                                  BCMOLT_EPON_NI_OPER_ID_ROGUE_LLID_SCAN
+#define bcmolt_epon_ni_oper_id_set_epon_ni_en_state                                             BCMOLT_EPON_NI_OPER_ID_SET_EPON_NI_EN_STATE
+#define bcmolt_epon_ni_oper_id_start_onu_upgrade                                                BCMOLT_EPON_NI_OPER_ID_START_ONU_UPGRADE
+#define bcmolt_epon_ni_oper_id__num_of                                                          BCMOLT_EPON_NI_OPER_ID__NUM_OF
+#define bcmolt_epon_onu_10g_us_auto_id__begin                                                   BCMOLT_EPON_ONU_10G_US_AUTO_ID__BEGIN
+#define bcmolt_epon_onu_10g_us_auto_id_stat_alarm_cleared                                       BCMOLT_EPON_ONU_10G_US_AUTO_ID_STAT_ALARM_CLEARED
+#define bcmolt_epon_onu_10g_us_auto_id_stat_alarm_raised                                        BCMOLT_EPON_ONU_10G_US_AUTO_ID_STAT_ALARM_RAISED
+#define bcmolt_epon_onu_10g_us_auto_id__num_of                                                  BCMOLT_EPON_ONU_10G_US_AUTO_ID__NUM_OF
+#define bcmolt_epon_onu_1g_us_auto_id__begin                                                    BCMOLT_EPON_ONU_1G_US_AUTO_ID__BEGIN
+#define bcmolt_epon_onu_1g_us_auto_id_stat_alarm_cleared                                        BCMOLT_EPON_ONU_1G_US_AUTO_ID_STAT_ALARM_CLEARED
+#define bcmolt_epon_onu_1g_us_auto_id_stat_alarm_raised                                         BCMOLT_EPON_ONU_1G_US_AUTO_ID_STAT_ALARM_RAISED
+#define bcmolt_epon_onu_1g_us_auto_id__num_of                                                   BCMOLT_EPON_ONU_1G_US_AUTO_ID__NUM_OF
+#define bcmolt_epon_path_10g_ds_auto_id__begin                                                  BCMOLT_EPON_PATH_10G_DS_AUTO_ID__BEGIN
+#define bcmolt_epon_path_10g_ds_auto_id_stat_alarm_cleared                                      BCMOLT_EPON_PATH_10G_DS_AUTO_ID_STAT_ALARM_CLEARED
+#define bcmolt_epon_path_10g_ds_auto_id_stat_alarm_raised                                       BCMOLT_EPON_PATH_10G_DS_AUTO_ID_STAT_ALARM_RAISED
+#define bcmolt_epon_path_10g_ds_auto_id__num_of                                                 BCMOLT_EPON_PATH_10G_DS_AUTO_ID__NUM_OF
+#define bcmolt_epon_path_10g_us_auto_id__begin                                                  BCMOLT_EPON_PATH_10G_US_AUTO_ID__BEGIN
+#define bcmolt_epon_path_10g_us_auto_id_stat_alarm_cleared                                      BCMOLT_EPON_PATH_10G_US_AUTO_ID_STAT_ALARM_CLEARED
+#define bcmolt_epon_path_10g_us_auto_id_stat_alarm_raised                                       BCMOLT_EPON_PATH_10G_US_AUTO_ID_STAT_ALARM_RAISED
+#define bcmolt_epon_path_10g_us_auto_id__num_of                                                 BCMOLT_EPON_PATH_10G_US_AUTO_ID__NUM_OF
+#define bcmolt_epon_path_1g_ds_auto_id__begin                                                   BCMOLT_EPON_PATH_1G_DS_AUTO_ID__BEGIN
+#define bcmolt_epon_path_1g_ds_auto_id_stat_alarm_cleared                                       BCMOLT_EPON_PATH_1G_DS_AUTO_ID_STAT_ALARM_CLEARED
+#define bcmolt_epon_path_1g_ds_auto_id_stat_alarm_raised                                        BCMOLT_EPON_PATH_1G_DS_AUTO_ID_STAT_ALARM_RAISED
+#define bcmolt_epon_path_1g_ds_auto_id__num_of                                                  BCMOLT_EPON_PATH_1G_DS_AUTO_ID__NUM_OF
+#define bcmolt_epon_path_1g_us_auto_id__begin                                                   BCMOLT_EPON_PATH_1G_US_AUTO_ID__BEGIN
+#define bcmolt_epon_path_1g_us_auto_id_stat_alarm_cleared                                       BCMOLT_EPON_PATH_1G_US_AUTO_ID_STAT_ALARM_CLEARED
+#define bcmolt_epon_path_1g_us_auto_id_stat_alarm_raised                                        BCMOLT_EPON_PATH_1G_US_AUTO_ID_STAT_ALARM_RAISED
+#define bcmolt_epon_path_1g_us_auto_id__num_of                                                  BCMOLT_EPON_PATH_1G_US_AUTO_ID__NUM_OF
+#define bcmolt_gpon_alloc_auto_id__begin                                                        BCMOLT_GPON_ALLOC_AUTO_ID__BEGIN
+#define bcmolt_gpon_alloc_auto_id_configuration_completed                                       BCMOLT_GPON_ALLOC_AUTO_ID_CONFIGURATION_COMPLETED
+#define bcmolt_gpon_alloc_auto_id_get_alloc_stats_completed                                     BCMOLT_GPON_ALLOC_AUTO_ID_GET_ALLOC_STATS_COMPLETED
+#define bcmolt_gpon_alloc_auto_id_stat_alarm_cleared                                            BCMOLT_GPON_ALLOC_AUTO_ID_STAT_ALARM_CLEARED
+#define bcmolt_gpon_alloc_auto_id_stat_alarm_raised                                             BCMOLT_GPON_ALLOC_AUTO_ID_STAT_ALARM_RAISED
+#define bcmolt_gpon_alloc_auto_id__num_of                                                       BCMOLT_GPON_ALLOC_AUTO_ID__NUM_OF
+#define bcmolt_gpon_alloc_oper_id__begin                                                        BCMOLT_GPON_ALLOC_OPER_ID__BEGIN
+#define bcmolt_gpon_alloc_oper_id_get_stats                                                     BCMOLT_GPON_ALLOC_OPER_ID_GET_STATS
+#define bcmolt_gpon_alloc_oper_id_set_state                                                     BCMOLT_GPON_ALLOC_OPER_ID_SET_STATE
+#define bcmolt_gpon_alloc_oper_id__num_of                                                       BCMOLT_GPON_ALLOC_OPER_ID__NUM_OF
+#define bcmolt_gpon_gem_port_auto_id__begin                                                     BCMOLT_GPON_GEM_PORT_AUTO_ID__BEGIN
+#define bcmolt_gpon_gem_port_auto_id_configuration_completed                                    BCMOLT_GPON_GEM_PORT_AUTO_ID_CONFIGURATION_COMPLETED
+#define bcmolt_gpon_gem_port_auto_id_stat_alarm_cleared                                         BCMOLT_GPON_GEM_PORT_AUTO_ID_STAT_ALARM_CLEARED
+#define bcmolt_gpon_gem_port_auto_id_stat_alarm_raised                                          BCMOLT_GPON_GEM_PORT_AUTO_ID_STAT_ALARM_RAISED
+#define bcmolt_gpon_gem_port_auto_id__num_of                                                    BCMOLT_GPON_GEM_PORT_AUTO_ID__NUM_OF
+#define bcmolt_gpon_gem_port_oper_id__begin                                                     BCMOLT_GPON_GEM_PORT_OPER_ID__BEGIN
+#define bcmolt_gpon_gem_port_oper_id_set_state                                                  BCMOLT_GPON_GEM_PORT_OPER_ID_SET_STATE
+#define bcmolt_gpon_gem_port_oper_id__num_of                                                    BCMOLT_GPON_GEM_PORT_OPER_ID__NUM_OF
+#define bcmolt_gpon_iwf_auto_id__begin                                                          BCMOLT_GPON_IWF_AUTO_ID__BEGIN
+#define bcmolt_gpon_iwf_auto_id_flush_mac_table_completed                                       BCMOLT_GPON_IWF_AUTO_ID_FLUSH_MAC_TABLE_COMPLETED
+#define bcmolt_gpon_iwf_auto_id_scan_mac_table_completed                                        BCMOLT_GPON_IWF_AUTO_ID_SCAN_MAC_TABLE_COMPLETED
+#define bcmolt_gpon_iwf_auto_id_stat_alarm_cleared                                              BCMOLT_GPON_IWF_AUTO_ID_STAT_ALARM_CLEARED
+#define bcmolt_gpon_iwf_auto_id_stat_alarm_raised                                               BCMOLT_GPON_IWF_AUTO_ID_STAT_ALARM_RAISED
+#define bcmolt_gpon_iwf_auto_id__num_of                                                         BCMOLT_GPON_IWF_AUTO_ID__NUM_OF
+#define bcmolt_gpon_iwf_oper_id__begin                                                          BCMOLT_GPON_IWF_OPER_ID__BEGIN
+#define bcmolt_gpon_iwf_oper_id_flush_mac_table                                                 BCMOLT_GPON_IWF_OPER_ID_FLUSH_MAC_TABLE
+#define bcmolt_gpon_iwf_oper_id_scan_mac_table                                                  BCMOLT_GPON_IWF_OPER_ID_SCAN_MAC_TABLE
+#define bcmolt_gpon_iwf_oper_id__num_of                                                         BCMOLT_GPON_IWF_OPER_ID__NUM_OF
+#define bcmolt_gpon_iwf_mac_table_auto_id__begin                                                BCMOLT_GPON_IWF_MAC_TABLE_AUTO_ID__BEGIN
+#define bcmolt_gpon_iwf_mac_table_auto_id_mac_aged                                              BCMOLT_GPON_IWF_MAC_TABLE_AUTO_ID_MAC_AGED
+#define bcmolt_gpon_iwf_mac_table_auto_id_mac_dropped                                           BCMOLT_GPON_IWF_MAC_TABLE_AUTO_ID_MAC_DROPPED
+#define bcmolt_gpon_iwf_mac_table_auto_id_mac_move                                              BCMOLT_GPON_IWF_MAC_TABLE_AUTO_ID_MAC_MOVE
+#define bcmolt_gpon_iwf_mac_table_auto_id_new_mac                                               BCMOLT_GPON_IWF_MAC_TABLE_AUTO_ID_NEW_MAC
+#define bcmolt_gpon_iwf_mac_table_auto_id__num_of                                               BCMOLT_GPON_IWF_MAC_TABLE_AUTO_ID__NUM_OF
+#define bcmolt_gpon_ni_auto_id__begin                                                           BCMOLT_GPON_NI_AUTO_ID__BEGIN
+#define bcmolt_gpon_ni_auto_id_activate_all_onus_completed                                      BCMOLT_GPON_NI_AUTO_ID_ACTIVATE_ALL_ONUS_COMPLETED
+#define bcmolt_gpon_ni_auto_id_cpu_packets_failure                                              BCMOLT_GPON_NI_AUTO_ID_CPU_PACKETS_FAILURE
+#define bcmolt_gpon_ni_auto_id_deactivate_all_onus_completed                                    BCMOLT_GPON_NI_AUTO_ID_DEACTIVATE_ALL_ONUS_COMPLETED
+#define bcmolt_gpon_ni_auto_id_disable_all_onus_completed                                       BCMOLT_GPON_NI_AUTO_ID_DISABLE_ALL_ONUS_COMPLETED
+#define bcmolt_gpon_ni_auto_id_enable_all_onus_completed                                        BCMOLT_GPON_NI_AUTO_ID_ENABLE_ALL_ONUS_COMPLETED
+#define bcmolt_gpon_ni_auto_id_los                                                              BCMOLT_GPON_NI_AUTO_ID_LOS
+#define bcmolt_gpon_ni_auto_id_onu_discovered                                                   BCMOLT_GPON_NI_AUTO_ID_ONU_DISCOVERED
+#define bcmolt_gpon_ni_auto_id_onu_upgrade_complete                                             BCMOLT_GPON_NI_AUTO_ID_ONU_UPGRADE_COMPLETE
+#define bcmolt_gpon_ni_auto_id_protection_switching_onus_ranged                                 BCMOLT_GPON_NI_AUTO_ID_PROTECTION_SWITCHING_ONUS_RANGED
+#define bcmolt_gpon_ni_auto_id_protection_switching_switchover_completed                        BCMOLT_GPON_NI_AUTO_ID_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED
+#define bcmolt_gpon_ni_auto_id_protection_switching_traffic_resume                              BCMOLT_GPON_NI_AUTO_ID_PROTECTION_SWITCHING_TRAFFIC_RESUME
+#define bcmolt_gpon_ni_auto_id_rogue_detection_completed                                        BCMOLT_GPON_NI_AUTO_ID_ROGUE_DETECTION_COMPLETED
+#define bcmolt_gpon_ni_auto_id_rogue_onu_special_map_cycle_start                                BCMOLT_GPON_NI_AUTO_ID_ROGUE_ONU_SPECIAL_MAP_CYCLE_START
+#define bcmolt_gpon_ni_auto_id_serial_number_acquisition_cycle_start                            BCMOLT_GPON_NI_AUTO_ID_SERIAL_NUMBER_ACQUISITION_CYCLE_START
+#define bcmolt_gpon_ni_auto_id_standby_pon_monitoring_cycle_completed                           BCMOLT_GPON_NI_AUTO_ID_STANDBY_PON_MONITORING_CYCLE_COMPLETED
+#define bcmolt_gpon_ni_auto_id_stat_alarm_cleared                                               BCMOLT_GPON_NI_AUTO_ID_STAT_ALARM_CLEARED
+#define bcmolt_gpon_ni_auto_id_stat_alarm_raised                                                BCMOLT_GPON_NI_AUTO_ID_STAT_ALARM_RAISED
+#define bcmolt_gpon_ni_auto_id_state_change_completed                                           BCMOLT_GPON_NI_AUTO_ID_STATE_CHANGE_COMPLETED
+#define bcmolt_gpon_ni_auto_id_tod_request_completed                                            BCMOLT_GPON_NI_AUTO_ID_TOD_REQUEST_COMPLETED
+#define bcmolt_gpon_ni_auto_id__num_of                                                          BCMOLT_GPON_NI_AUTO_ID__NUM_OF
+#define bcmolt_gpon_ni_oper_id__begin                                                           BCMOLT_GPON_NI_OPER_ID__BEGIN
+#define bcmolt_gpon_ni_oper_id_disable_serial_number                                            BCMOLT_GPON_NI_OPER_ID_DISABLE_SERIAL_NUMBER
+#define bcmolt_gpon_ni_oper_id_protection_switching_type_c_set_multiple_onu_state               BCMOLT_GPON_NI_OPER_ID_PROTECTION_SWITCHING_TYPE_C_SET_MULTIPLE_ONU_STATE
+#define bcmolt_gpon_ni_oper_id_reset                                                            BCMOLT_GPON_NI_OPER_ID_RESET
+#define bcmolt_gpon_ni_oper_id_rogue_detection_window                                           BCMOLT_GPON_NI_OPER_ID_ROGUE_DETECTION_WINDOW
+#define bcmolt_gpon_ni_oper_id_set_onu_state                                                    BCMOLT_GPON_NI_OPER_ID_SET_ONU_STATE
+#define bcmolt_gpon_ni_oper_id_set_pon_state                                                    BCMOLT_GPON_NI_OPER_ID_SET_PON_STATE
+#define bcmolt_gpon_ni_oper_id_single_request_standby_pon_monitoring                            BCMOLT_GPON_NI_OPER_ID_SINGLE_REQUEST_STANDBY_PON_MONITORING
+#define bcmolt_gpon_ni_oper_id_start_onu_upgrade                                                BCMOLT_GPON_NI_OPER_ID_START_ONU_UPGRADE
+#define bcmolt_gpon_ni_oper_id_tod_request                                                      BCMOLT_GPON_NI_OPER_ID_TOD_REQUEST
+#define bcmolt_gpon_ni_oper_id__num_of                                                          BCMOLT_GPON_NI_OPER_ID__NUM_OF
+#define bcmolt_gpon_ni_proxy_id__begin                                                          BCMOLT_GPON_NI_PROXY_ID__BEGIN
+#define bcmolt_gpon_ni_proxy_id_broadcast_ploam_packet                                          BCMOLT_GPON_NI_PROXY_ID_BROADCAST_PLOAM_PACKET
+#define bcmolt_gpon_ni_proxy_id_cpu_packets                                                     BCMOLT_GPON_NI_PROXY_ID_CPU_PACKETS
+#define bcmolt_gpon_ni_proxy_id__num_of                                                         BCMOLT_GPON_NI_PROXY_ID__NUM_OF
+#define bcmolt_gpon_onu_auto_id__begin                                                          BCMOLT_GPON_ONU_AUTO_ID__BEGIN
+#define bcmolt_gpon_onu_auto_id_ber_interval_configuration_completed                            BCMOLT_GPON_ONU_AUTO_ID_BER_INTERVAL_CONFIGURATION_COMPLETED
+#define bcmolt_gpon_onu_auto_id_dfi                                                             BCMOLT_GPON_ONU_AUTO_ID_DFI
+#define bcmolt_gpon_onu_auto_id_dgi                                                             BCMOLT_GPON_ONU_AUTO_ID_DGI
+#define bcmolt_gpon_onu_auto_id_dowi                                                            BCMOLT_GPON_ONU_AUTO_ID_DOWI
+#define bcmolt_gpon_onu_auto_id_err                                                             BCMOLT_GPON_ONU_AUTO_ID_ERR
+#define bcmolt_gpon_onu_auto_id_invalid_dbru_report                                             BCMOLT_GPON_ONU_AUTO_ID_INVALID_DBRU_REPORT
+#define bcmolt_gpon_onu_auto_id_key_exchange_completed                                          BCMOLT_GPON_ONU_AUTO_ID_KEY_EXCHANGE_COMPLETED
+#define bcmolt_gpon_onu_auto_id_key_exchange_cycle_skipped                                      BCMOLT_GPON_ONU_AUTO_ID_KEY_EXCHANGE_CYCLE_SKIPPED
+#define bcmolt_gpon_onu_auto_id_key_exchange_decrypt_required                                   BCMOLT_GPON_ONU_AUTO_ID_KEY_EXCHANGE_DECRYPT_REQUIRED
+#define bcmolt_gpon_onu_auto_id_key_exchange_key_mismatch                                       BCMOLT_GPON_ONU_AUTO_ID_KEY_EXCHANGE_KEY_MISMATCH
+#define bcmolt_gpon_onu_auto_id_key_exchange_key_request_timeout                                BCMOLT_GPON_ONU_AUTO_ID_KEY_EXCHANGE_KEY_REQUEST_TIMEOUT
+#define bcmolt_gpon_onu_auto_id_key_exchange_unconsecutive_index                                BCMOLT_GPON_ONU_AUTO_ID_KEY_EXCHANGE_UNCONSECUTIVE_INDEX
+#define bcmolt_gpon_onu_auto_id_loai                                                            BCMOLT_GPON_ONU_AUTO_ID_LOAI
+#define bcmolt_gpon_onu_auto_id_loki                                                            BCMOLT_GPON_ONU_AUTO_ID_LOKI
+#define bcmolt_gpon_onu_auto_id_memi                                                            BCMOLT_GPON_ONU_AUTO_ID_MEMI
+#define bcmolt_gpon_onu_auto_id_omci_port_id_configuration_completed                            BCMOLT_GPON_ONU_AUTO_ID_OMCI_PORT_ID_CONFIGURATION_COMPLETED
+#define bcmolt_gpon_onu_auto_id_onu_activation_completed                                        BCMOLT_GPON_ONU_AUTO_ID_ONU_ACTIVATION_COMPLETED
+#define bcmolt_gpon_onu_auto_id_onu_activation_standby_completed                                BCMOLT_GPON_ONU_AUTO_ID_ONU_ACTIVATION_STANDBY_COMPLETED
+#define bcmolt_gpon_onu_auto_id_onu_alarm                                                       BCMOLT_GPON_ONU_AUTO_ID_ONU_ALARM
+#define bcmolt_gpon_onu_auto_id_onu_deactivation_completed                                      BCMOLT_GPON_ONU_AUTO_ID_ONU_DEACTIVATION_COMPLETED
+#define bcmolt_gpon_onu_auto_id_onu_disable_completed                                           BCMOLT_GPON_ONU_AUTO_ID_ONU_DISABLE_COMPLETED
+#define bcmolt_gpon_onu_auto_id_onu_enable_completed                                            BCMOLT_GPON_ONU_AUTO_ID_ONU_ENABLE_COMPLETED
+#define bcmolt_gpon_onu_auto_id_optical_reflection                                              BCMOLT_GPON_ONU_AUTO_ID_OPTICAL_REFLECTION
+#define bcmolt_gpon_onu_auto_id_password_authentication_completed                               BCMOLT_GPON_ONU_AUTO_ID_PASSWORD_AUTHENTICATION_COMPLETED
+#define bcmolt_gpon_onu_auto_id_pee                                                             BCMOLT_GPON_ONU_AUTO_ID_PEE
+#define bcmolt_gpon_onu_auto_id_possible_drift                                                  BCMOLT_GPON_ONU_AUTO_ID_POSSIBLE_DRIFT
+#define bcmolt_gpon_onu_auto_id_power_management_state_change                                   BCMOLT_GPON_ONU_AUTO_ID_POWER_MANAGEMENT_STATE_CHANGE
+#define bcmolt_gpon_onu_auto_id_pst                                                             BCMOLT_GPON_ONU_AUTO_ID_PST
+#define bcmolt_gpon_onu_auto_id_ranging_completed                                               BCMOLT_GPON_ONU_AUTO_ID_RANGING_COMPLETED
+#define bcmolt_gpon_onu_auto_id_rei                                                             BCMOLT_GPON_ONU_AUTO_ID_REI
+#define bcmolt_gpon_onu_auto_id_rssi_measurement_completed                                      BCMOLT_GPON_ONU_AUTO_ID_RSSI_MEASUREMENT_COMPLETED
+#define bcmolt_gpon_onu_auto_id_sdi                                                             BCMOLT_GPON_ONU_AUTO_ID_SDI
+#define bcmolt_gpon_onu_auto_id_sfi                                                             BCMOLT_GPON_ONU_AUTO_ID_SFI
+#define bcmolt_gpon_onu_auto_id_stat_alarm_cleared                                              BCMOLT_GPON_ONU_AUTO_ID_STAT_ALARM_CLEARED
+#define bcmolt_gpon_onu_auto_id_stat_alarm_raised                                               BCMOLT_GPON_ONU_AUTO_ID_STAT_ALARM_RAISED
+#define bcmolt_gpon_onu_auto_id_sufi                                                            BCMOLT_GPON_ONU_AUTO_ID_SUFI
+#define bcmolt_gpon_onu_auto_id_tiwi                                                            BCMOLT_GPON_ONU_AUTO_ID_TIWI
+#define bcmolt_gpon_onu_auto_id__num_of                                                         BCMOLT_GPON_ONU_AUTO_ID__NUM_OF
+#define bcmolt_gpon_onu_oper_id__begin                                                          BCMOLT_GPON_ONU_OPER_ID__BEGIN
+#define bcmolt_gpon_onu_oper_id_change_power_level                                              BCMOLT_GPON_ONU_OPER_ID_CHANGE_POWER_LEVEL
+#define bcmolt_gpon_onu_oper_id_rssi_measurement                                                BCMOLT_GPON_ONU_OPER_ID_RSSI_MEASUREMENT
+#define bcmolt_gpon_onu_oper_id_set_onu_state                                                   BCMOLT_GPON_ONU_OPER_ID_SET_ONU_STATE
+#define bcmolt_gpon_onu_oper_id__num_of                                                         BCMOLT_GPON_ONU_OPER_ID__NUM_OF
+#define bcmolt_gpon_onu_proxy_id__begin                                                         BCMOLT_GPON_ONU_PROXY_ID__BEGIN
+#define bcmolt_gpon_onu_proxy_id_cpu_packets                                                    BCMOLT_GPON_ONU_PROXY_ID_CPU_PACKETS
+#define bcmolt_gpon_onu_proxy_id_ploam_packet                                                   BCMOLT_GPON_ONU_PROXY_ID_PLOAM_PACKET
+#define bcmolt_gpon_onu_proxy_id__num_of                                                        BCMOLT_GPON_ONU_PROXY_ID__NUM_OF
+#define bcmolt_gpon_onu_proxy_rx_id__begin                                                      BCMOLT_GPON_ONU_PROXY_RX_ID__BEGIN
+#define bcmolt_gpon_onu_proxy_rx_id_cpu_packet                                                  BCMOLT_GPON_ONU_PROXY_RX_ID_CPU_PACKET
+#define bcmolt_gpon_onu_proxy_rx_id_omci_packet                                                 BCMOLT_GPON_ONU_PROXY_RX_ID_OMCI_PACKET
+#define bcmolt_gpon_onu_proxy_rx_id__num_of                                                     BCMOLT_GPON_ONU_PROXY_RX_ID__NUM_OF
+#define bcmolt_log_entry_auto_id__begin                                                         BCMOLT_LOG_ENTRY_AUTO_ID__BEGIN
+#define bcmolt_log_entry_auto_id_stat_alarm_cleared                                             BCMOLT_LOG_ENTRY_AUTO_ID_STAT_ALARM_CLEARED
+#define bcmolt_log_entry_auto_id_stat_alarm_raised                                              BCMOLT_LOG_ENTRY_AUTO_ID_STAT_ALARM_RAISED
+#define bcmolt_log_entry_auto_id__num_of                                                        BCMOLT_LOG_ENTRY_AUTO_ID__NUM_OF
+#define bcmolt_logger_auto_id__begin                                                            BCMOLT_LOGGER_AUTO_ID__BEGIN
+#define bcmolt_logger_auto_id_stat_alarm_cleared                                                BCMOLT_LOGGER_AUTO_ID_STAT_ALARM_CLEARED
+#define bcmolt_logger_auto_id_stat_alarm_raised                                                 BCMOLT_LOGGER_AUTO_ID_STAT_ALARM_RAISED
+#define bcmolt_logger_auto_id__num_of                                                           BCMOLT_LOGGER_AUTO_ID__NUM_OF
+#define bcmolt_logger_oper_id__begin                                                            BCMOLT_LOGGER_OPER_ID__BEGIN
+#define bcmolt_logger_oper_id_clear_log                                                         BCMOLT_LOGGER_OPER_ID_CLEAR_LOG
+#define bcmolt_logger_oper_id__num_of                                                           BCMOLT_LOGGER_OPER_ID__NUM_OF
+#define bcmolt_nni_auto_id__begin                                                               BCMOLT_NNI_AUTO_ID__BEGIN
+#define bcmolt_nni_auto_id_stat_alarm_cleared                                                   BCMOLT_NNI_AUTO_ID_STAT_ALARM_CLEARED
+#define bcmolt_nni_auto_id_stat_alarm_raised                                                    BCMOLT_NNI_AUTO_ID_STAT_ALARM_RAISED
+#define bcmolt_nni_auto_id_status_changed                                                       BCMOLT_NNI_AUTO_ID_STATUS_CHANGED
+#define bcmolt_nni_auto_id__num_of                                                              BCMOLT_NNI_AUTO_ID__NUM_OF
+#define bcmolt_trx_calibration_auto_id__begin                                                   BCMOLT_TRX_CALIBRATION_AUTO_ID__BEGIN
+#define bcmolt_trx_calibration_auto_id_capture_window_and_statistic_completed                   BCMOLT_TRX_CALIBRATION_AUTO_ID_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED
+#define bcmolt_trx_calibration_auto_id__num_of                                                  BCMOLT_TRX_CALIBRATION_AUTO_ID__NUM_OF
+#define bcmolt_trx_calibration_oper_id__begin                                                   BCMOLT_TRX_CALIBRATION_OPER_ID__BEGIN
+#define bcmolt_trx_calibration_oper_id_start_capture_window                                     BCMOLT_TRX_CALIBRATION_OPER_ID_START_CAPTURE_WINDOW
+#define bcmolt_trx_calibration_oper_id_stop_capture_window                                      BCMOLT_TRX_CALIBRATION_OPER_ID_STOP_CAPTURE_WINDOW
+#define bcmolt_trx_calibration_oper_id__num_of                                                  BCMOLT_TRX_CALIBRATION_OPER_ID__NUM_OF
+#define bcmolt_xgpon_alloc_auto_id__begin                                                       BCMOLT_XGPON_ALLOC_AUTO_ID__BEGIN
+#define bcmolt_xgpon_alloc_auto_id_configuration_completed                                      BCMOLT_XGPON_ALLOC_AUTO_ID_CONFIGURATION_COMPLETED
+#define bcmolt_xgpon_alloc_auto_id_get_alloc_stats_completed                                    BCMOLT_XGPON_ALLOC_AUTO_ID_GET_ALLOC_STATS_COMPLETED
+#define bcmolt_xgpon_alloc_auto_id_stat_alarm_cleared                                           BCMOLT_XGPON_ALLOC_AUTO_ID_STAT_ALARM_CLEARED
+#define bcmolt_xgpon_alloc_auto_id_stat_alarm_raised                                            BCMOLT_XGPON_ALLOC_AUTO_ID_STAT_ALARM_RAISED
+#define bcmolt_xgpon_alloc_auto_id__num_of                                                      BCMOLT_XGPON_ALLOC_AUTO_ID__NUM_OF
+#define bcmolt_xgpon_alloc_oper_id__begin                                                       BCMOLT_XGPON_ALLOC_OPER_ID__BEGIN
+#define bcmolt_xgpon_alloc_oper_id_get_stats                                                    BCMOLT_XGPON_ALLOC_OPER_ID_GET_STATS
+#define bcmolt_xgpon_alloc_oper_id_set_state                                                    BCMOLT_XGPON_ALLOC_OPER_ID_SET_STATE
+#define bcmolt_xgpon_alloc_oper_id__num_of                                                      BCMOLT_XGPON_ALLOC_OPER_ID__NUM_OF
+#define bcmolt_xgpon_gem_port_auto_id__begin                                                    BCMOLT_XGPON_GEM_PORT_AUTO_ID__BEGIN
+#define bcmolt_xgpon_gem_port_auto_id_stat_alarm_cleared                                        BCMOLT_XGPON_GEM_PORT_AUTO_ID_STAT_ALARM_CLEARED
+#define bcmolt_xgpon_gem_port_auto_id_stat_alarm_raised                                         BCMOLT_XGPON_GEM_PORT_AUTO_ID_STAT_ALARM_RAISED
+#define bcmolt_xgpon_gem_port_auto_id__num_of                                                   BCMOLT_XGPON_GEM_PORT_AUTO_ID__NUM_OF
+#define bcmolt_xgpon_ni_auto_id__begin                                                          BCMOLT_XGPON_NI_AUTO_ID__BEGIN
+#define bcmolt_xgpon_ni_auto_id_activate_all_onus_completed                                     BCMOLT_XGPON_NI_AUTO_ID_ACTIVATE_ALL_ONUS_COMPLETED
+#define bcmolt_xgpon_ni_auto_id_cpu_packets_failure                                             BCMOLT_XGPON_NI_AUTO_ID_CPU_PACKETS_FAILURE
+#define bcmolt_xgpon_ni_auto_id_deactivate_all_onus_completed                                   BCMOLT_XGPON_NI_AUTO_ID_DEACTIVATE_ALL_ONUS_COMPLETED
+#define bcmolt_xgpon_ni_auto_id_disable_all_onus_completed                                      BCMOLT_XGPON_NI_AUTO_ID_DISABLE_ALL_ONUS_COMPLETED
+#define bcmolt_xgpon_ni_auto_id_enable_all_onus_completed                                       BCMOLT_XGPON_NI_AUTO_ID_ENABLE_ALL_ONUS_COMPLETED
+#define bcmolt_xgpon_ni_auto_id_los                                                             BCMOLT_XGPON_NI_AUTO_ID_LOS
+#define bcmolt_xgpon_ni_auto_id_onu_discovered                                                  BCMOLT_XGPON_NI_AUTO_ID_ONU_DISCOVERED
+#define bcmolt_xgpon_ni_auto_id_onu_upgrade_complete                                            BCMOLT_XGPON_NI_AUTO_ID_ONU_UPGRADE_COMPLETE
+#define bcmolt_xgpon_ni_auto_id_protection_switching_onus_ranged                                BCMOLT_XGPON_NI_AUTO_ID_PROTECTION_SWITCHING_ONUS_RANGED
+#define bcmolt_xgpon_ni_auto_id_protection_switching_switchover_completed                       BCMOLT_XGPON_NI_AUTO_ID_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED
+#define bcmolt_xgpon_ni_auto_id_protection_switching_traffic_resume                             BCMOLT_XGPON_NI_AUTO_ID_PROTECTION_SWITCHING_TRAFFIC_RESUME
+#define bcmolt_xgpon_ni_auto_id_rogue_detection_completed                                       BCMOLT_XGPON_NI_AUTO_ID_ROGUE_DETECTION_COMPLETED
+#define bcmolt_xgpon_ni_auto_id_rogue_onu_special_map_cycle_start                               BCMOLT_XGPON_NI_AUTO_ID_ROGUE_ONU_SPECIAL_MAP_CYCLE_START
+#define bcmolt_xgpon_ni_auto_id_serial_number_acquisition_cycle_start                           BCMOLT_XGPON_NI_AUTO_ID_SERIAL_NUMBER_ACQUISITION_CYCLE_START
+#define bcmolt_xgpon_ni_auto_id_standby_pon_monitoring_cycle_completed                          BCMOLT_XGPON_NI_AUTO_ID_STANDBY_PON_MONITORING_CYCLE_COMPLETED
+#define bcmolt_xgpon_ni_auto_id_stat_alarm_cleared                                              BCMOLT_XGPON_NI_AUTO_ID_STAT_ALARM_CLEARED
+#define bcmolt_xgpon_ni_auto_id_stat_alarm_raised                                               BCMOLT_XGPON_NI_AUTO_ID_STAT_ALARM_RAISED
+#define bcmolt_xgpon_ni_auto_id_state_change_completed                                          BCMOLT_XGPON_NI_AUTO_ID_STATE_CHANGE_COMPLETED
+#define bcmolt_xgpon_ni_auto_id_tod_request_completed                                           BCMOLT_XGPON_NI_AUTO_ID_TOD_REQUEST_COMPLETED
+#define bcmolt_xgpon_ni_auto_id__num_of                                                         BCMOLT_XGPON_NI_AUTO_ID__NUM_OF
+#define bcmolt_xgpon_ni_oper_id__begin                                                          BCMOLT_XGPON_NI_OPER_ID__BEGIN
+#define bcmolt_xgpon_ni_oper_id_adjust_tx_wavelength                                            BCMOLT_XGPON_NI_OPER_ID_ADJUST_TX_WAVELENGTH
+#define bcmolt_xgpon_ni_oper_id_disable_serial_number                                           BCMOLT_XGPON_NI_OPER_ID_DISABLE_SERIAL_NUMBER
+#define bcmolt_xgpon_ni_oper_id_reset                                                           BCMOLT_XGPON_NI_OPER_ID_RESET
+#define bcmolt_xgpon_ni_oper_id_rogue_detection_window                                          BCMOLT_XGPON_NI_OPER_ID_ROGUE_DETECTION_WINDOW
+#define bcmolt_xgpon_ni_oper_id_run_special_bw_map                                              BCMOLT_XGPON_NI_OPER_ID_RUN_SPECIAL_BW_MAP
+#define bcmolt_xgpon_ni_oper_id_set_onu_state                                                   BCMOLT_XGPON_NI_OPER_ID_SET_ONU_STATE
+#define bcmolt_xgpon_ni_oper_id_set_pon_state                                                   BCMOLT_XGPON_NI_OPER_ID_SET_PON_STATE
+#define bcmolt_xgpon_ni_oper_id_single_request_standby_pon_monitoring                           BCMOLT_XGPON_NI_OPER_ID_SINGLE_REQUEST_STANDBY_PON_MONITORING
+#define bcmolt_xgpon_ni_oper_id_start_onu_upgrade                                               BCMOLT_XGPON_NI_OPER_ID_START_ONU_UPGRADE
+#define bcmolt_xgpon_ni_oper_id_tod_request                                                     BCMOLT_XGPON_NI_OPER_ID_TOD_REQUEST
+#define bcmolt_xgpon_ni_oper_id__num_of                                                         BCMOLT_XGPON_NI_OPER_ID__NUM_OF
+#define bcmolt_xgpon_ni_proxy_id__begin                                                         BCMOLT_XGPON_NI_PROXY_ID__BEGIN
+#define bcmolt_xgpon_ni_proxy_id_broadcast_ploam_packet                                         BCMOLT_XGPON_NI_PROXY_ID_BROADCAST_PLOAM_PACKET
+#define bcmolt_xgpon_ni_proxy_id_cpu_packets                                                    BCMOLT_XGPON_NI_PROXY_ID_CPU_PACKETS
+#define bcmolt_xgpon_ni_proxy_id__num_of                                                        BCMOLT_XGPON_NI_PROXY_ID__NUM_OF
+#define bcmolt_xgpon_onu_auto_id__begin                                                         BCMOLT_XGPON_ONU_AUTO_ID__BEGIN
+#define bcmolt_xgpon_onu_auto_id_dfi                                                            BCMOLT_XGPON_ONU_AUTO_ID_DFI
+#define bcmolt_xgpon_onu_auto_id_dgi                                                            BCMOLT_XGPON_ONU_AUTO_ID_DGI
+#define bcmolt_xgpon_onu_auto_id_dowi                                                           BCMOLT_XGPON_ONU_AUTO_ID_DOWI
+#define bcmolt_xgpon_onu_auto_id_invalid_dbru_report                                            BCMOLT_XGPON_ONU_AUTO_ID_INVALID_DBRU_REPORT
+#define bcmolt_xgpon_onu_auto_id_key_exchange_completed                                         BCMOLT_XGPON_ONU_AUTO_ID_KEY_EXCHANGE_COMPLETED
+#define bcmolt_xgpon_onu_auto_id_key_exchange_cycle_skipped                                     BCMOLT_XGPON_ONU_AUTO_ID_KEY_EXCHANGE_CYCLE_SKIPPED
+#define bcmolt_xgpon_onu_auto_id_key_exchange_key_mismatch                                      BCMOLT_XGPON_ONU_AUTO_ID_KEY_EXCHANGE_KEY_MISMATCH
+#define bcmolt_xgpon_onu_auto_id_key_exchange_key_request_timeout                               BCMOLT_XGPON_ONU_AUTO_ID_KEY_EXCHANGE_KEY_REQUEST_TIMEOUT
+#define bcmolt_xgpon_onu_auto_id_looci                                                          BCMOLT_XGPON_ONU_AUTO_ID_LOOCI
+#define bcmolt_xgpon_onu_auto_id_onu_activation_completed                                       BCMOLT_XGPON_ONU_AUTO_ID_ONU_ACTIVATION_COMPLETED
+#define bcmolt_xgpon_onu_auto_id_onu_alarm                                                      BCMOLT_XGPON_ONU_AUTO_ID_ONU_ALARM
+#define bcmolt_xgpon_onu_auto_id_onu_deactivation_completed                                     BCMOLT_XGPON_ONU_AUTO_ID_ONU_DEACTIVATION_COMPLETED
+#define bcmolt_xgpon_onu_auto_id_onu_disable_completed                                          BCMOLT_XGPON_ONU_AUTO_ID_ONU_DISABLE_COMPLETED
+#define bcmolt_xgpon_onu_auto_id_onu_enable_completed                                           BCMOLT_XGPON_ONU_AUTO_ID_ONU_ENABLE_COMPLETED
+#define bcmolt_xgpon_onu_auto_id_onu_tuning_in_completed                                        BCMOLT_XGPON_ONU_AUTO_ID_ONU_TUNING_IN_COMPLETED
+#define bcmolt_xgpon_onu_auto_id_onu_tuning_out_completed                                       BCMOLT_XGPON_ONU_AUTO_ID_ONU_TUNING_OUT_COMPLETED
+#define bcmolt_xgpon_onu_auto_id_optical_reflection                                             BCMOLT_XGPON_ONU_AUTO_ID_OPTICAL_REFLECTION
+#define bcmolt_xgpon_onu_auto_id_possible_drift                                                 BCMOLT_XGPON_ONU_AUTO_ID_POSSIBLE_DRIFT
+#define bcmolt_xgpon_onu_auto_id_power_consumption_report                                       BCMOLT_XGPON_ONU_AUTO_ID_POWER_CONSUMPTION_REPORT
+#define bcmolt_xgpon_onu_auto_id_power_level_report                                             BCMOLT_XGPON_ONU_AUTO_ID_POWER_LEVEL_REPORT
+#define bcmolt_xgpon_onu_auto_id_power_management_state_change                                  BCMOLT_XGPON_ONU_AUTO_ID_POWER_MANAGEMENT_STATE_CHANGE
+#define bcmolt_xgpon_onu_auto_id_pqsi                                                           BCMOLT_XGPON_ONU_AUTO_ID_PQSI
+#define bcmolt_xgpon_onu_auto_id_ranging_completed                                              BCMOLT_XGPON_ONU_AUTO_ID_RANGING_COMPLETED
+#define bcmolt_xgpon_onu_auto_id_registration_id                                                BCMOLT_XGPON_ONU_AUTO_ID_REGISTRATION_ID
+#define bcmolt_xgpon_onu_auto_id_rssi_measurement_completed                                     BCMOLT_XGPON_ONU_AUTO_ID_RSSI_MEASUREMENT_COMPLETED
+#define bcmolt_xgpon_onu_auto_id_sdi                                                            BCMOLT_XGPON_ONU_AUTO_ID_SDI
+#define bcmolt_xgpon_onu_auto_id_secure_mutual_authentication_failure                           BCMOLT_XGPON_ONU_AUTO_ID_SECURE_MUTUAL_AUTHENTICATION_FAILURE
+#define bcmolt_xgpon_onu_auto_id_sfi                                                            BCMOLT_XGPON_ONU_AUTO_ID_SFI
+#define bcmolt_xgpon_onu_auto_id_stat_alarm_cleared                                             BCMOLT_XGPON_ONU_AUTO_ID_STAT_ALARM_CLEARED
+#define bcmolt_xgpon_onu_auto_id_stat_alarm_raised                                              BCMOLT_XGPON_ONU_AUTO_ID_STAT_ALARM_RAISED
+#define bcmolt_xgpon_onu_auto_id_sufi                                                           BCMOLT_XGPON_ONU_AUTO_ID_SUFI
+#define bcmolt_xgpon_onu_auto_id_tiwi                                                           BCMOLT_XGPON_ONU_AUTO_ID_TIWI
+#define bcmolt_xgpon_onu_auto_id_tuning_response                                                BCMOLT_XGPON_ONU_AUTO_ID_TUNING_RESPONSE
+#define bcmolt_xgpon_onu_auto_id__num_of                                                        BCMOLT_XGPON_ONU_AUTO_ID__NUM_OF
+#define bcmolt_xgpon_onu_oper_id__begin                                                         BCMOLT_XGPON_ONU_OPER_ID__BEGIN
+#define bcmolt_xgpon_onu_oper_id_adjust_tx_wavelength                                           BCMOLT_XGPON_ONU_OPER_ID_ADJUST_TX_WAVELENGTH
+#define bcmolt_xgpon_onu_oper_id_change_power_levelling                                         BCMOLT_XGPON_ONU_OPER_ID_CHANGE_POWER_LEVELLING
+#define bcmolt_xgpon_onu_oper_id_get_power_consumption                                          BCMOLT_XGPON_ONU_OPER_ID_GET_POWER_CONSUMPTION
+#define bcmolt_xgpon_onu_oper_id_get_power_level                                                BCMOLT_XGPON_ONU_OPER_ID_GET_POWER_LEVEL
+#define bcmolt_xgpon_onu_oper_id_onu_tuning_in                                                  BCMOLT_XGPON_ONU_OPER_ID_ONU_TUNING_IN
+#define bcmolt_xgpon_onu_oper_id_onu_tuning_out                                                 BCMOLT_XGPON_ONU_OPER_ID_ONU_TUNING_OUT
+#define bcmolt_xgpon_onu_oper_id_request_registration                                           BCMOLT_XGPON_ONU_OPER_ID_REQUEST_REGISTRATION
+#define bcmolt_xgpon_onu_oper_id_rssi_measurement                                               BCMOLT_XGPON_ONU_OPER_ID_RSSI_MEASUREMENT
+#define bcmolt_xgpon_onu_oper_id_secure_mutual_authentication                                   BCMOLT_XGPON_ONU_OPER_ID_SECURE_MUTUAL_AUTHENTICATION
+#define bcmolt_xgpon_onu_oper_id_set_onu_state                                                  BCMOLT_XGPON_ONU_OPER_ID_SET_ONU_STATE
+#define bcmolt_xgpon_onu_oper_id__num_of                                                        BCMOLT_XGPON_ONU_OPER_ID__NUM_OF
+#define bcmolt_xgpon_onu_proxy_id__begin                                                        BCMOLT_XGPON_ONU_PROXY_ID__BEGIN
+#define bcmolt_xgpon_onu_proxy_id_cpu_packets                                                   BCMOLT_XGPON_ONU_PROXY_ID_CPU_PACKETS
+#define bcmolt_xgpon_onu_proxy_id_ploam_packet                                                  BCMOLT_XGPON_ONU_PROXY_ID_PLOAM_PACKET
+#define bcmolt_xgpon_onu_proxy_id__num_of                                                       BCMOLT_XGPON_ONU_PROXY_ID__NUM_OF
+#define bcmolt_xgpon_onu_proxy_rx_id__begin                                                     BCMOLT_XGPON_ONU_PROXY_RX_ID__BEGIN
+#define bcmolt_xgpon_onu_proxy_rx_id_cpu_packet                                                 BCMOLT_XGPON_ONU_PROXY_RX_ID_CPU_PACKET
+#define bcmolt_xgpon_onu_proxy_rx_id_omci_packet                                                BCMOLT_XGPON_ONU_PROXY_RX_ID_OMCI_PACKET
+#define bcmolt_xgpon_onu_proxy_rx_id__num_of                                                    BCMOLT_XGPON_ONU_PROXY_RX_ID__NUM_OF
+#define bcmolt_ae_ni_key_id_ae_ni                                                               BCMOLT_AE_NI_KEY_ID_AE_NI
+#define bcmolt_ae_ni_key_id__num_of                                                             BCMOLT_AE_NI_KEY_ID__NUM_OF
+#define bcmolt_ae_ni_cfg_id_mac_address                                                         BCMOLT_AE_NI_CFG_ID_MAC_ADDRESS
+#define bcmolt_ae_ni_cfg_id_ae_ni_en                                                            BCMOLT_AE_NI_CFG_ID_AE_NI_EN
+#define bcmolt_ae_ni_cfg_id_mtu_10g                                                             BCMOLT_AE_NI_CFG_ID_MTU_10G
+#define bcmolt_ae_ni_cfg_id_prbs_generator                                                      BCMOLT_AE_NI_CFG_ID_PRBS_GENERATOR
+#define bcmolt_ae_ni_cfg_id_prbs_checker                                                        BCMOLT_AE_NI_CFG_ID_PRBS_CHECKER
+#define bcmolt_ae_ni_cfg_id_prbs_status                                                         BCMOLT_AE_NI_CFG_ID_PRBS_STATUS
+#define bcmolt_ae_ni_cfg_id__num_of                                                             BCMOLT_AE_NI_CFG_ID__NUM_OF
+#define bcmolt_ae_ni_set_ae_ni_en_state_id_new_state                                            BCMOLT_AE_NI_SET_AE_NI_EN_STATE_ID_NEW_STATE
+#define bcmolt_ae_ni_set_ae_ni_en_state_id__num_of                                              BCMOLT_AE_NI_SET_AE_NI_EN_STATE_ID__NUM_OF
+#define bcmolt_ae_path_ds_key_id_ae_ni                                                          BCMOLT_AE_PATH_DS_KEY_ID_AE_NI
+#define bcmolt_ae_path_ds_key_id__num_of                                                        BCMOLT_AE_PATH_DS_KEY_ID__NUM_OF
+#define bcmolt_ae_path_ds_stat_id_bytes                                                         BCMOLT_AE_PATH_DS_STAT_ID_BYTES
+#define bcmolt_ae_path_ds_stat_id_frames                                                        BCMOLT_AE_PATH_DS_STAT_ID_FRAMES
+#define bcmolt_ae_path_ds_stat_id_frames_64                                                     BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_64
+#define bcmolt_ae_path_ds_stat_id_frames_65_127                                                 BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_65_127
+#define bcmolt_ae_path_ds_stat_id_frames_128_255                                                BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_128_255
+#define bcmolt_ae_path_ds_stat_id_frames_256_511                                                BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_256_511
+#define bcmolt_ae_path_ds_stat_id_frames_512_1023                                               BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_512_1023
+#define bcmolt_ae_path_ds_stat_id_frames_1024_1518                                              BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_1024_1518
+#define bcmolt_ae_path_ds_stat_id_frames_1519_2047                                              BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_1519_2047
+#define bcmolt_ae_path_ds_stat_id_frames_2048_4095                                              BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_2048_4095
+#define bcmolt_ae_path_ds_stat_id_frames_4096_9216                                              BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_4096_9216
+#define bcmolt_ae_path_ds_stat_id_frames_9217_16383                                             BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_9217_16383
+#define bcmolt_ae_path_ds_stat_id_broadcast_frames                                              BCMOLT_AE_PATH_DS_STAT_ID_BROADCAST_FRAMES
+#define bcmolt_ae_path_ds_stat_id_data_bytes                                                    BCMOLT_AE_PATH_DS_STAT_ID_DATA_BYTES
+#define bcmolt_ae_path_ds_stat_id_multicast_frames                                              BCMOLT_AE_PATH_DS_STAT_ID_MULTICAST_FRAMES
+#define bcmolt_ae_path_ds_stat_id_unicast_frames                                                BCMOLT_AE_PATH_DS_STAT_ID_UNICAST_FRAMES
+#define bcmolt_ae_path_ds_stat_id_abort_frames                                                  BCMOLT_AE_PATH_DS_STAT_ID_ABORT_FRAMES
+#define bcmolt_ae_path_ds_stat_id__num_of                                                       BCMOLT_AE_PATH_DS_STAT_ID__NUM_OF
+#define bcmolt_ae_path_ds_stat_cfg_id_cfg                                                       BCMOLT_AE_PATH_DS_STAT_CFG_ID_CFG
+#define bcmolt_ae_path_ds_stat_cfg_id__num_of                                                   BCMOLT_AE_PATH_DS_STAT_CFG_ID__NUM_OF
+#define bcmolt_ae_path_ds_stat_alarm_cleared_id_stat                                            BCMOLT_AE_PATH_DS_STAT_ALARM_CLEARED_ID_STAT
+#define bcmolt_ae_path_ds_stat_alarm_cleared_id__num_of                                         BCMOLT_AE_PATH_DS_STAT_ALARM_CLEARED_ID__NUM_OF
+#define bcmolt_ae_path_ds_stat_alarm_raised_id_stat                                             BCMOLT_AE_PATH_DS_STAT_ALARM_RAISED_ID_STAT
+#define bcmolt_ae_path_ds_stat_alarm_raised_id__num_of                                          BCMOLT_AE_PATH_DS_STAT_ALARM_RAISED_ID__NUM_OF
+#define bcmolt_ae_path_ds_auto_cfg_id_stat_alarm_cleared                                        BCMOLT_AE_PATH_DS_AUTO_CFG_ID_STAT_ALARM_CLEARED
+#define bcmolt_ae_path_ds_auto_cfg_id_stat_alarm_raised                                         BCMOLT_AE_PATH_DS_AUTO_CFG_ID_STAT_ALARM_RAISED
+#define bcmolt_ae_path_ds_auto_cfg_id__num_of                                                   BCMOLT_AE_PATH_DS_AUTO_CFG_ID__NUM_OF
+#define bcmolt_ae_path_us_key_id_ae_ni                                                          BCMOLT_AE_PATH_US_KEY_ID_AE_NI
+#define bcmolt_ae_path_us_key_id__num_of                                                        BCMOLT_AE_PATH_US_KEY_ID__NUM_OF
+#define bcmolt_ae_path_us_stat_id_bytes                                                         BCMOLT_AE_PATH_US_STAT_ID_BYTES
+#define bcmolt_ae_path_us_stat_id_frames                                                        BCMOLT_AE_PATH_US_STAT_ID_FRAMES
+#define bcmolt_ae_path_us_stat_id_frames_64                                                     BCMOLT_AE_PATH_US_STAT_ID_FRAMES_64
+#define bcmolt_ae_path_us_stat_id_frames_65_127                                                 BCMOLT_AE_PATH_US_STAT_ID_FRAMES_65_127
+#define bcmolt_ae_path_us_stat_id_frames_128_255                                                BCMOLT_AE_PATH_US_STAT_ID_FRAMES_128_255
+#define bcmolt_ae_path_us_stat_id_frames_256_511                                                BCMOLT_AE_PATH_US_STAT_ID_FRAMES_256_511
+#define bcmolt_ae_path_us_stat_id_frames_512_1023                                               BCMOLT_AE_PATH_US_STAT_ID_FRAMES_512_1023
+#define bcmolt_ae_path_us_stat_id_frames_1024_1518                                              BCMOLT_AE_PATH_US_STAT_ID_FRAMES_1024_1518
+#define bcmolt_ae_path_us_stat_id_frames_1519_2047                                              BCMOLT_AE_PATH_US_STAT_ID_FRAMES_1519_2047
+#define bcmolt_ae_path_us_stat_id_frames_2048_4095                                              BCMOLT_AE_PATH_US_STAT_ID_FRAMES_2048_4095
+#define bcmolt_ae_path_us_stat_id_frames_4096_9216                                              BCMOLT_AE_PATH_US_STAT_ID_FRAMES_4096_9216
+#define bcmolt_ae_path_us_stat_id_frames_9217_16383                                             BCMOLT_AE_PATH_US_STAT_ID_FRAMES_9217_16383
+#define bcmolt_ae_path_us_stat_id_broadcast_frames                                              BCMOLT_AE_PATH_US_STAT_ID_BROADCAST_FRAMES
+#define bcmolt_ae_path_us_stat_id_data_bytes                                                    BCMOLT_AE_PATH_US_STAT_ID_DATA_BYTES
+#define bcmolt_ae_path_us_stat_id_multicast_frames                                              BCMOLT_AE_PATH_US_STAT_ID_MULTICAST_FRAMES
+#define bcmolt_ae_path_us_stat_id_unicast_frames                                                BCMOLT_AE_PATH_US_STAT_ID_UNICAST_FRAMES
+#define bcmolt_ae_path_us_stat_id_abort_frames                                                  BCMOLT_AE_PATH_US_STAT_ID_ABORT_FRAMES
+#define bcmolt_ae_path_us_stat_id_fcs_error                                                     BCMOLT_AE_PATH_US_STAT_ID_FCS_ERROR
+#define bcmolt_ae_path_us_stat_id_oversize_error                                                BCMOLT_AE_PATH_US_STAT_ID_OVERSIZE_ERROR
+#define bcmolt_ae_path_us_stat_id_runt_error                                                    BCMOLT_AE_PATH_US_STAT_ID_RUNT_ERROR
+#define bcmolt_ae_path_us_stat_id__num_of                                                       BCMOLT_AE_PATH_US_STAT_ID__NUM_OF
+#define bcmolt_ae_path_us_stat_cfg_id_cfg                                                       BCMOLT_AE_PATH_US_STAT_CFG_ID_CFG
+#define bcmolt_ae_path_us_stat_cfg_id__num_of                                                   BCMOLT_AE_PATH_US_STAT_CFG_ID__NUM_OF
+#define bcmolt_ae_path_us_stat_alarm_cleared_id_stat                                            BCMOLT_AE_PATH_US_STAT_ALARM_CLEARED_ID_STAT
+#define bcmolt_ae_path_us_stat_alarm_cleared_id__num_of                                         BCMOLT_AE_PATH_US_STAT_ALARM_CLEARED_ID__NUM_OF
+#define bcmolt_ae_path_us_stat_alarm_raised_id_stat                                             BCMOLT_AE_PATH_US_STAT_ALARM_RAISED_ID_STAT
+#define bcmolt_ae_path_us_stat_alarm_raised_id__num_of                                          BCMOLT_AE_PATH_US_STAT_ALARM_RAISED_ID__NUM_OF
+#define bcmolt_ae_path_us_auto_cfg_id_stat_alarm_cleared                                        BCMOLT_AE_PATH_US_AUTO_CFG_ID_STAT_ALARM_CLEARED
+#define bcmolt_ae_path_us_auto_cfg_id_stat_alarm_raised                                         BCMOLT_AE_PATH_US_AUTO_CFG_ID_STAT_ALARM_RAISED
+#define bcmolt_ae_path_us_auto_cfg_id__num_of                                                   BCMOLT_AE_PATH_US_AUTO_CFG_ID__NUM_OF
+#define bcmolt_channel_key_id_pon_ni                                                            BCMOLT_CHANNEL_KEY_ID_PON_NI
+#define bcmolt_channel_key_id__num_of                                                           BCMOLT_CHANNEL_KEY_ID__NUM_OF
+#define bcmolt_channel_cfg_id_operation_control                                                 BCMOLT_CHANNEL_CFG_ID_OPERATION_CONTROL
+#define bcmolt_channel_cfg_id_tol                                                               BCMOLT_CHANNEL_CFG_ID_TOL
+#define bcmolt_channel_cfg_id_system_profile                                                    BCMOLT_CHANNEL_CFG_ID_SYSTEM_PROFILE
+#define bcmolt_channel_cfg_id_channel_profile                                                   BCMOLT_CHANNEL_CFG_ID_CHANNEL_PROFILE
+#define bcmolt_channel_cfg_id__num_of                                                           BCMOLT_CHANNEL_CFG_ID__NUM_OF
+#define bcmolt_debug_key_id_reserved                                                            BCMOLT_DEBUG_KEY_ID_RESERVED
+#define bcmolt_debug_key_id__num_of                                                             BCMOLT_DEBUG_KEY_ID__NUM_OF
+#define bcmolt_debug_cfg_id_console_redirection                                                 BCMOLT_DEBUG_CFG_ID_CONSOLE_REDIRECTION
+#define bcmolt_debug_cfg_id_indications_dropped                                                 BCMOLT_DEBUG_CFG_ID_INDICATIONS_DROPPED
+#define bcmolt_debug_cfg_id_file_used_percent                                                   BCMOLT_DEBUG_CFG_ID_FILE_USED_PERCENT
+#define bcmolt_debug_cfg_id_api_capture_cfg                                                     BCMOLT_DEBUG_CFG_ID_API_CAPTURE_CFG
+#define bcmolt_debug_cfg_id_api_capture_stats                                                   BCMOLT_DEBUG_CFG_ID_API_CAPTURE_STATS
+#define bcmolt_debug_cfg_id_api_capture_buffer_read                                             BCMOLT_DEBUG_CFG_ID_API_CAPTURE_BUFFER_READ
+#define bcmolt_debug_cfg_id_api_capture_buffer                                                  BCMOLT_DEBUG_CFG_ID_API_CAPTURE_BUFFER
+#define bcmolt_debug_cfg_id__num_of                                                             BCMOLT_DEBUG_CFG_ID__NUM_OF
+#define bcmolt_debug_cli_output_id_data                                                         BCMOLT_DEBUG_CLI_OUTPUT_ID_DATA
+#define bcmolt_debug_cli_output_id__num_of                                                      BCMOLT_DEBUG_CLI_OUTPUT_ID__NUM_OF
+#define bcmolt_debug_file_almost_full_id__num_of                                                BCMOLT_DEBUG_FILE_ALMOST_FULL_ID__NUM_OF
+#define bcmolt_debug_auto_cfg_id_cli_output                                                     BCMOLT_DEBUG_AUTO_CFG_ID_CLI_OUTPUT
+#define bcmolt_debug_auto_cfg_id_file_almost_full                                               BCMOLT_DEBUG_AUTO_CFG_ID_FILE_ALMOST_FULL
+#define bcmolt_debug_auto_cfg_id__num_of                                                        BCMOLT_DEBUG_AUTO_CFG_ID__NUM_OF
+#define bcmolt_debug_cli_input_id_data                                                          BCMOLT_DEBUG_CLI_INPUT_ID_DATA
+#define bcmolt_debug_cli_input_id__num_of                                                       BCMOLT_DEBUG_CLI_INPUT_ID__NUM_OF
+#define bcmolt_debug_reset_api_capture_id__num_of                                               BCMOLT_DEBUG_RESET_API_CAPTURE_ID__NUM_OF
+#define bcmolt_debug_start_api_capture_id__num_of                                               BCMOLT_DEBUG_START_API_CAPTURE_ID__NUM_OF
+#define bcmolt_debug_stop_api_capture_id__num_of                                                BCMOLT_DEBUG_STOP_API_CAPTURE_ID__NUM_OF
+#define bcmolt_device_key_id_reserved                                                           BCMOLT_DEVICE_KEY_ID_RESERVED
+#define bcmolt_device_key_id__num_of                                                            BCMOLT_DEVICE_KEY_ID__NUM_OF
+#define bcmolt_device_cfg_id_system_mode                                                        BCMOLT_DEVICE_CFG_ID_SYSTEM_MODE
+#define bcmolt_device_cfg_id_keepalive_interval                                                 BCMOLT_DEVICE_CFG_ID_KEEPALIVE_INTERVAL
+#define bcmolt_device_cfg_id_keepalive_tolerance                                                BCMOLT_DEVICE_CFG_ID_KEEPALIVE_TOLERANCE
+#define bcmolt_device_cfg_id_firmware_sw_version                                                BCMOLT_DEVICE_CFG_ID_FIRMWARE_SW_VERSION
+#define bcmolt_device_cfg_id_host_sw_version                                                    BCMOLT_DEVICE_CFG_ID_HOST_SW_VERSION
+#define bcmolt_device_cfg_id_chip_revision                                                      BCMOLT_DEVICE_CFG_ID_CHIP_REVISION
+#define bcmolt_device_cfg_id_state                                                              BCMOLT_DEVICE_CFG_ID_STATE
+#define bcmolt_device_cfg_id_debug                                                              BCMOLT_DEVICE_CFG_ID_DEBUG
+#define bcmolt_device_cfg_id_nni_speed                                                          BCMOLT_DEVICE_CFG_ID_NNI_SPEED
+#define bcmolt_device_cfg_id_protection_switching_ext_irq                                       BCMOLT_DEVICE_CFG_ID_PROTECTION_SWITCHING_EXT_IRQ
+#define bcmolt_device_cfg_id_epon_clock_transport_sample_delay                                  BCMOLT_DEVICE_CFG_ID_EPON_CLOCK_TRANSPORT_SAMPLE_DELAY
+#define bcmolt_device_cfg_id_indication_shaping                                                 BCMOLT_DEVICE_CFG_ID_INDICATION_SHAPING
+#define bcmolt_device_cfg_id_chip_temperature                                                   BCMOLT_DEVICE_CFG_ID_CHIP_TEMPERATURE
+#define bcmolt_device_cfg_id_gpon_xgpon_tod_enable                                              BCMOLT_DEVICE_CFG_ID_GPON_XGPON_TOD_ENABLE
+#define bcmolt_device_cfg_id_gpon_xgpon_tod_gpio_pin                                            BCMOLT_DEVICE_CFG_ID_GPON_XGPON_TOD_GPIO_PIN
+#define bcmolt_device_cfg_id_gpon_xgpon_tod_connected_internally                                BCMOLT_DEVICE_CFG_ID_GPON_XGPON_TOD_CONNECTED_INTERNALLY
+#define bcmolt_device_cfg_id_epon_8021_as_tod_format                                            BCMOLT_DEVICE_CFG_ID_EPON_8021_AS_TOD_FORMAT
+#define bcmolt_device_cfg_id_epon_shaper_mode                                                   BCMOLT_DEVICE_CFG_ID_EPON_SHAPER_MODE
+#define bcmolt_device_cfg_id_embedded_image_list                                                BCMOLT_DEVICE_CFG_ID_EMBEDDED_IMAGE_LIST
+#define bcmolt_device_cfg_id_chip_voltage                                                       BCMOLT_DEVICE_CFG_ID_CHIP_VOLTAGE
+#define bcmolt_device_cfg_id_epon_tod_string                                                    BCMOLT_DEVICE_CFG_ID_EPON_TOD_STRING
+#define bcmolt_device_cfg_id_xgpon_num_of_onus                                                  BCMOLT_DEVICE_CFG_ID_XGPON_NUM_OF_ONUS
+#define bcmolt_device_cfg_id_device_ip_address                                                  BCMOLT_DEVICE_CFG_ID_DEVICE_IP_ADDRESS
+#define bcmolt_device_cfg_id_device_udp_port                                                    BCMOLT_DEVICE_CFG_ID_DEVICE_UDP_PORT
+#define bcmolt_device_cfg_id_tod_uart_baudrate                                                  BCMOLT_DEVICE_CFG_ID_TOD_UART_BAUDRATE
+#define bcmolt_device_cfg_id_gpon_xgpon_tod_string_length                                       BCMOLT_DEVICE_CFG_ID_GPON_XGPON_TOD_STRING_LENGTH
+#define bcmolt_device_cfg_id__num_of                                                            BCMOLT_DEVICE_CFG_ID__NUM_OF
+#define bcmolt_device_connection_complete_id_standalone                                         BCMOLT_DEVICE_CONNECTION_COMPLETE_ID_STANDALONE
+#define bcmolt_device_connection_complete_id__num_of                                            BCMOLT_DEVICE_CONNECTION_COMPLETE_ID__NUM_OF
+#define bcmolt_device_connection_established_id__num_of                                         BCMOLT_DEVICE_CONNECTION_ESTABLISHED_ID__NUM_OF
+#define bcmolt_device_connection_failure_id_reason                                              BCMOLT_DEVICE_CONNECTION_FAILURE_ID_REASON
+#define bcmolt_device_connection_failure_id__num_of                                             BCMOLT_DEVICE_CONNECTION_FAILURE_ID__NUM_OF
+#define bcmolt_device_ddr_test_complete_id_ddr_test                                             BCMOLT_DEVICE_DDR_TEST_COMPLETE_ID_DDR_TEST
+#define bcmolt_device_ddr_test_complete_id__num_of                                              BCMOLT_DEVICE_DDR_TEST_COMPLETE_ID__NUM_OF
+#define bcmolt_device_device_keep_alive_id_sequence_number                                      BCMOLT_DEVICE_DEVICE_KEEP_ALIVE_ID_SEQUENCE_NUMBER
+#define bcmolt_device_device_keep_alive_id_time_stamp                                           BCMOLT_DEVICE_DEVICE_KEEP_ALIVE_ID_TIME_STAMP
+#define bcmolt_device_device_keep_alive_id__num_of                                              BCMOLT_DEVICE_DEVICE_KEEP_ALIVE_ID__NUM_OF
+#define bcmolt_device_device_ready_id_firmware_sw_version                                       BCMOLT_DEVICE_DEVICE_READY_ID_FIRMWARE_SW_VERSION
+#define bcmolt_device_device_ready_id_system_mode                                               BCMOLT_DEVICE_DEVICE_READY_ID_SYSTEM_MODE
+#define bcmolt_device_device_ready_id_nni_speed                                                 BCMOLT_DEVICE_DEVICE_READY_ID_NNI_SPEED
+#define bcmolt_device_device_ready_id_chip_revision                                             BCMOLT_DEVICE_DEVICE_READY_ID_CHIP_REVISION
+#define bcmolt_device_device_ready_id_tod_enable                                                BCMOLT_DEVICE_DEVICE_READY_ID_TOD_ENABLE
+#define bcmolt_device_device_ready_id_tod_gpio_pin                                              BCMOLT_DEVICE_DEVICE_READY_ID_TOD_GPIO_PIN
+#define bcmolt_device_device_ready_id__num_of                                                   BCMOLT_DEVICE_DEVICE_READY_ID__NUM_OF
+#define bcmolt_device_disconnection_complete_id__num_of                                         BCMOLT_DEVICE_DISCONNECTION_COMPLETE_ID__NUM_OF
+#define bcmolt_device_image_transfer_complete_id_image_type                                     BCMOLT_DEVICE_IMAGE_TRANSFER_COMPLETE_ID_IMAGE_TYPE
+#define bcmolt_device_image_transfer_complete_id_block_number                                   BCMOLT_DEVICE_IMAGE_TRANSFER_COMPLETE_ID_BLOCK_NUMBER
+#define bcmolt_device_image_transfer_complete_id_status                                         BCMOLT_DEVICE_IMAGE_TRANSFER_COMPLETE_ID_STATUS
+#define bcmolt_device_image_transfer_complete_id__num_of                                        BCMOLT_DEVICE_IMAGE_TRANSFER_COMPLETE_ID__NUM_OF
+#define bcmolt_device_indications_dropped_id_total_count                                        BCMOLT_DEVICE_INDICATIONS_DROPPED_ID_TOTAL_COUNT
+#define bcmolt_device_indications_dropped_id__num_of                                            BCMOLT_DEVICE_INDICATIONS_DROPPED_ID__NUM_OF
+#define bcmolt_device_sw_error_id_task_name                                                     BCMOLT_DEVICE_SW_ERROR_ID_TASK_NAME
+#define bcmolt_device_sw_error_id_file_name                                                     BCMOLT_DEVICE_SW_ERROR_ID_FILE_NAME
+#define bcmolt_device_sw_error_id_line_number                                                   BCMOLT_DEVICE_SW_ERROR_ID_LINE_NUMBER
+#define bcmolt_device_sw_error_id_pon_ni                                                        BCMOLT_DEVICE_SW_ERROR_ID_PON_NI
+#define bcmolt_device_sw_error_id__num_of                                                       BCMOLT_DEVICE_SW_ERROR_ID__NUM_OF
+#define bcmolt_device_sw_exception_id_cpu_id                                                    BCMOLT_DEVICE_SW_EXCEPTION_ID_CPU_ID
+#define bcmolt_device_sw_exception_id_text                                                      BCMOLT_DEVICE_SW_EXCEPTION_ID_TEXT
+#define bcmolt_device_sw_exception_id__num_of                                                   BCMOLT_DEVICE_SW_EXCEPTION_ID__NUM_OF
+#define bcmolt_device_auto_cfg_id_connection_complete                                           BCMOLT_DEVICE_AUTO_CFG_ID_CONNECTION_COMPLETE
+#define bcmolt_device_auto_cfg_id_connection_established                                        BCMOLT_DEVICE_AUTO_CFG_ID_CONNECTION_ESTABLISHED
+#define bcmolt_device_auto_cfg_id_connection_failure                                            BCMOLT_DEVICE_AUTO_CFG_ID_CONNECTION_FAILURE
+#define bcmolt_device_auto_cfg_id_ddr_test_complete                                             BCMOLT_DEVICE_AUTO_CFG_ID_DDR_TEST_COMPLETE
+#define bcmolt_device_auto_cfg_id_device_keep_alive                                             BCMOLT_DEVICE_AUTO_CFG_ID_DEVICE_KEEP_ALIVE
+#define bcmolt_device_auto_cfg_id_device_ready                                                  BCMOLT_DEVICE_AUTO_CFG_ID_DEVICE_READY
+#define bcmolt_device_auto_cfg_id_disconnection_complete                                        BCMOLT_DEVICE_AUTO_CFG_ID_DISCONNECTION_COMPLETE
+#define bcmolt_device_auto_cfg_id_image_transfer_complete                                       BCMOLT_DEVICE_AUTO_CFG_ID_IMAGE_TRANSFER_COMPLETE
+#define bcmolt_device_auto_cfg_id_indications_dropped                                           BCMOLT_DEVICE_AUTO_CFG_ID_INDICATIONS_DROPPED
+#define bcmolt_device_auto_cfg_id_sw_error                                                      BCMOLT_DEVICE_AUTO_CFG_ID_SW_ERROR
+#define bcmolt_device_auto_cfg_id_sw_exception                                                  BCMOLT_DEVICE_AUTO_CFG_ID_SW_EXCEPTION
+#define bcmolt_device_auto_cfg_id__num_of                                                       BCMOLT_DEVICE_AUTO_CFG_ID__NUM_OF
+#define bcmolt_device_connect_id__num_of                                                        BCMOLT_DEVICE_CONNECT_ID__NUM_OF
+#define bcmolt_device_disconnect_id__num_of                                                     BCMOLT_DEVICE_DISCONNECT_ID__NUM_OF
+#define bcmolt_device_host_keep_alive_id_sequence_number                                        BCMOLT_DEVICE_HOST_KEEP_ALIVE_ID_SEQUENCE_NUMBER
+#define bcmolt_device_host_keep_alive_id_time_stamp                                             BCMOLT_DEVICE_HOST_KEEP_ALIVE_ID_TIME_STAMP
+#define bcmolt_device_host_keep_alive_id__num_of                                                BCMOLT_DEVICE_HOST_KEEP_ALIVE_ID__NUM_OF
+#define bcmolt_device_image_transfer_data_id_block_number                                       BCMOLT_DEVICE_IMAGE_TRANSFER_DATA_ID_BLOCK_NUMBER
+#define bcmolt_device_image_transfer_data_id_more_data                                          BCMOLT_DEVICE_IMAGE_TRANSFER_DATA_ID_MORE_DATA
+#define bcmolt_device_image_transfer_data_id_data                                               BCMOLT_DEVICE_IMAGE_TRANSFER_DATA_ID_DATA
+#define bcmolt_device_image_transfer_data_id__num_of                                            BCMOLT_DEVICE_IMAGE_TRANSFER_DATA_ID__NUM_OF
+#define bcmolt_device_image_transfer_start_id_image_type                                        BCMOLT_DEVICE_IMAGE_TRANSFER_START_ID_IMAGE_TYPE
+#define bcmolt_device_image_transfer_start_id_image_size                                        BCMOLT_DEVICE_IMAGE_TRANSFER_START_ID_IMAGE_SIZE
+#define bcmolt_device_image_transfer_start_id_crc32                                             BCMOLT_DEVICE_IMAGE_TRANSFER_START_ID_CRC32
+#define bcmolt_device_image_transfer_start_id_image_name                                        BCMOLT_DEVICE_IMAGE_TRANSFER_START_ID_IMAGE_NAME
+#define bcmolt_device_image_transfer_start_id__num_of                                           BCMOLT_DEVICE_IMAGE_TRANSFER_START_ID__NUM_OF
+#define bcmolt_device_reset_id_mode                                                             BCMOLT_DEVICE_RESET_ID_MODE
+#define bcmolt_device_reset_id__num_of                                                          BCMOLT_DEVICE_RESET_ID__NUM_OF
+#define bcmolt_device_run_ddr_test_id_cpu                                                       BCMOLT_DEVICE_RUN_DDR_TEST_ID_CPU
+#define bcmolt_device_run_ddr_test_id_ras_0                                                     BCMOLT_DEVICE_RUN_DDR_TEST_ID_RAS_0
+#define bcmolt_device_run_ddr_test_id_ras_1                                                     BCMOLT_DEVICE_RUN_DDR_TEST_ID_RAS_1
+#define bcmolt_device_run_ddr_test_id__num_of                                                   BCMOLT_DEVICE_RUN_DDR_TEST_ID__NUM_OF
+#define bcmolt_device_sw_upgrade_activate_id__num_of                                            BCMOLT_DEVICE_SW_UPGRADE_ACTIVATE_ID__NUM_OF
+#define bcmolt_epon_denied_link_key_id_epon_ni                                                  BCMOLT_EPON_DENIED_LINK_KEY_ID_EPON_NI
+#define bcmolt_epon_denied_link_key_id_mac_address                                              BCMOLT_EPON_DENIED_LINK_KEY_ID_MAC_ADDRESS
+#define bcmolt_epon_denied_link_key_id__num_of                                                  BCMOLT_EPON_DENIED_LINK_KEY_ID__NUM_OF
+#define bcmolt_epon_denied_link_cfg_id_alarm_state                                              BCMOLT_EPON_DENIED_LINK_CFG_ID_ALARM_STATE
+#define bcmolt_epon_denied_link_cfg_id__num_of                                                  BCMOLT_EPON_DENIED_LINK_CFG_ID__NUM_OF
+#define bcmolt_epon_denied_link_laser_on_off_violation_id_alarm_status                          BCMOLT_EPON_DENIED_LINK_LASER_ON_OFF_VIOLATION_ID_ALARM_STATUS
+#define bcmolt_epon_denied_link_laser_on_off_violation_id__num_of                               BCMOLT_EPON_DENIED_LINK_LASER_ON_OFF_VIOLATION_ID__NUM_OF
+#define bcmolt_epon_denied_link_llid_pool_empty_violation_id_alarm_status                       BCMOLT_EPON_DENIED_LINK_LLID_POOL_EMPTY_VIOLATION_ID_ALARM_STATUS
+#define bcmolt_epon_denied_link_llid_pool_empty_violation_id__num_of                            BCMOLT_EPON_DENIED_LINK_LLID_POOL_EMPTY_VIOLATION_ID__NUM_OF
+#define bcmolt_epon_denied_link_max_link_violation_id_alarm_status                              BCMOLT_EPON_DENIED_LINK_MAX_LINK_VIOLATION_ID_ALARM_STATUS
+#define bcmolt_epon_denied_link_max_link_violation_id__num_of                                   BCMOLT_EPON_DENIED_LINK_MAX_LINK_VIOLATION_ID__NUM_OF
+#define bcmolt_epon_denied_link_overhead_profile_violation_id_alarm_status                      BCMOLT_EPON_DENIED_LINK_OVERHEAD_PROFILE_VIOLATION_ID_ALARM_STATUS
+#define bcmolt_epon_denied_link_overhead_profile_violation_id__num_of                           BCMOLT_EPON_DENIED_LINK_OVERHEAD_PROFILE_VIOLATION_ID__NUM_OF
+#define bcmolt_epon_denied_link_range_violation_id_alarm_status                                 BCMOLT_EPON_DENIED_LINK_RANGE_VIOLATION_ID_ALARM_STATUS
+#define bcmolt_epon_denied_link_range_violation_id__num_of                                      BCMOLT_EPON_DENIED_LINK_RANGE_VIOLATION_ID__NUM_OF
+#define bcmolt_epon_denied_link_rogue_violation_id_alarm_status                                 BCMOLT_EPON_DENIED_LINK_ROGUE_VIOLATION_ID_ALARM_STATUS
+#define bcmolt_epon_denied_link_rogue_violation_id__num_of                                      BCMOLT_EPON_DENIED_LINK_ROGUE_VIOLATION_ID__NUM_OF
+#define bcmolt_epon_denied_link_system_resource_violation_id_alarm_status                       BCMOLT_EPON_DENIED_LINK_SYSTEM_RESOURCE_VIOLATION_ID_ALARM_STATUS
+#define bcmolt_epon_denied_link_system_resource_violation_id__num_of                            BCMOLT_EPON_DENIED_LINK_SYSTEM_RESOURCE_VIOLATION_ID__NUM_OF
+#define bcmolt_epon_denied_link_tdm_channels_exhausted_id_alarm_status                          BCMOLT_EPON_DENIED_LINK_TDM_CHANNELS_EXHAUSTED_ID_ALARM_STATUS
+#define bcmolt_epon_denied_link_tdm_channels_exhausted_id__num_of                               BCMOLT_EPON_DENIED_LINK_TDM_CHANNELS_EXHAUSTED_ID__NUM_OF
+#define bcmolt_epon_denied_link_unknown_link_violation_id_alarm_status                          BCMOLT_EPON_DENIED_LINK_UNKNOWN_LINK_VIOLATION_ID_ALARM_STATUS
+#define bcmolt_epon_denied_link_unknown_link_violation_id__num_of                               BCMOLT_EPON_DENIED_LINK_UNKNOWN_LINK_VIOLATION_ID__NUM_OF
+#define bcmolt_epon_denied_link_upstream_bandwidth_violation_id_alarm_status                    BCMOLT_EPON_DENIED_LINK_UPSTREAM_BANDWIDTH_VIOLATION_ID_ALARM_STATUS
+#define bcmolt_epon_denied_link_upstream_bandwidth_violation_id__num_of                         BCMOLT_EPON_DENIED_LINK_UPSTREAM_BANDWIDTH_VIOLATION_ID__NUM_OF
+#define bcmolt_epon_denied_link_auto_cfg_id_laser_on_off_violation                              BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_LASER_ON_OFF_VIOLATION
+#define bcmolt_epon_denied_link_auto_cfg_id_llid_pool_empty_violation                           BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_LLID_POOL_EMPTY_VIOLATION
+#define bcmolt_epon_denied_link_auto_cfg_id_max_link_violation                                  BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_MAX_LINK_VIOLATION
+#define bcmolt_epon_denied_link_auto_cfg_id_overhead_profile_violation                          BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_OVERHEAD_PROFILE_VIOLATION
+#define bcmolt_epon_denied_link_auto_cfg_id_range_violation                                     BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_RANGE_VIOLATION
+#define bcmolt_epon_denied_link_auto_cfg_id_rogue_violation                                     BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_ROGUE_VIOLATION
+#define bcmolt_epon_denied_link_auto_cfg_id_system_resource_violation                           BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_SYSTEM_RESOURCE_VIOLATION
+#define bcmolt_epon_denied_link_auto_cfg_id_tdm_channels_exhausted                              BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_TDM_CHANNELS_EXHAUSTED
+#define bcmolt_epon_denied_link_auto_cfg_id_unknown_link_violation                              BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_UNKNOWN_LINK_VIOLATION
+#define bcmolt_epon_denied_link_auto_cfg_id_upstream_bandwidth_violation                        BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_UPSTREAM_BANDWIDTH_VIOLATION
+#define bcmolt_epon_denied_link_auto_cfg_id__num_of                                             BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID__NUM_OF
+#define bcmolt_epon_link_key_id_epon_ni                                                         BCMOLT_EPON_LINK_KEY_ID_EPON_NI
+#define bcmolt_epon_link_key_id_mac_address                                                     BCMOLT_EPON_LINK_KEY_ID_MAC_ADDRESS
+#define bcmolt_epon_link_key_id__num_of                                                         BCMOLT_EPON_LINK_KEY_ID__NUM_OF
+#define bcmolt_epon_link_cfg_id_link_rate                                                       BCMOLT_EPON_LINK_CFG_ID_LINK_RATE
+#define bcmolt_epon_link_cfg_id_state_flags                                                     BCMOLT_EPON_LINK_CFG_ID_STATE_FLAGS
+#define bcmolt_epon_link_cfg_id_llid                                                            BCMOLT_EPON_LINK_CFG_ID_LLID
+#define bcmolt_epon_link_cfg_id_laser_on_time_tq                                                BCMOLT_EPON_LINK_CFG_ID_LASER_ON_TIME_TQ
+#define bcmolt_epon_link_cfg_id_laser_off_time_tq                                               BCMOLT_EPON_LINK_CFG_ID_LASER_OFF_TIME_TQ
+#define bcmolt_epon_link_cfg_id_range_value_tq                                                  BCMOLT_EPON_LINK_CFG_ID_RANGE_VALUE_TQ
+#define bcmolt_epon_link_cfg_id_distance                                                        BCMOLT_EPON_LINK_CFG_ID_DISTANCE
+#define bcmolt_epon_link_cfg_id_alarm_state                                                     BCMOLT_EPON_LINK_CFG_ID_ALARM_STATE
+#define bcmolt_epon_link_cfg_id_tunnel_id                                                       BCMOLT_EPON_LINK_CFG_ID_TUNNEL_ID
+#define bcmolt_epon_link_cfg_id_onu_id                                                          BCMOLT_EPON_LINK_CFG_ID_ONU_ID
+#define bcmolt_epon_link_cfg_id_min_laser_overhead                                              BCMOLT_EPON_LINK_CFG_ID_MIN_LASER_OVERHEAD
+#define bcmolt_epon_link_cfg_id_key_exchange_config                                             BCMOLT_EPON_LINK_CFG_ID_KEY_EXCHANGE_CONFIG
+#define bcmolt_epon_link_cfg_id_epon_encryption                                                 BCMOLT_EPON_LINK_CFG_ID_EPON_ENCRYPTION
+#define bcmolt_epon_link_cfg_id_fec_enable                                                      BCMOLT_EPON_LINK_CFG_ID_FEC_ENABLE
+#define bcmolt_epon_link_cfg_id_oam_heartbeat_config                                            BCMOLT_EPON_LINK_CFG_ID_OAM_HEARTBEAT_CONFIG
+#define bcmolt_epon_link_cfg_id_upstream_bandwidth                                              BCMOLT_EPON_LINK_CFG_ID_UPSTREAM_BANDWIDTH
+#define bcmolt_epon_link_cfg_id_ubd_info                                                        BCMOLT_EPON_LINK_CFG_ID_UBD_INFO
+#define bcmolt_epon_link_cfg_id_clock_transport_enable                                          BCMOLT_EPON_LINK_CFG_ID_CLOCK_TRANSPORT_ENABLE
+#define bcmolt_epon_link_cfg_id_pending_grants                                                  BCMOLT_EPON_LINK_CFG_ID_PENDING_GRANTS
+#define bcmolt_epon_link_cfg_id_link_type                                                       BCMOLT_EPON_LINK_CFG_ID_LINK_TYPE
+#define bcmolt_epon_link_cfg_id__num_of                                                         BCMOLT_EPON_LINK_CFG_ID__NUM_OF
+#define bcmolt_epon_link_stat_id_rx_data_bytes                                                  BCMOLT_EPON_LINK_STAT_ID_RX_DATA_BYTES
+#define bcmolt_epon_link_stat_id_rx_data_frames                                                 BCMOLT_EPON_LINK_STAT_ID_RX_DATA_FRAMES
+#define bcmolt_epon_link_stat_id_rx_frames_64                                                   BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_64
+#define bcmolt_epon_link_stat_id_rx_frames_65_127                                               BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_65_127
+#define bcmolt_epon_link_stat_id_rx_frames_128_255                                              BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_128_255
+#define bcmolt_epon_link_stat_id_rx_frames_256_511                                              BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_256_511
+#define bcmolt_epon_link_stat_id_rx_frames_512_1023                                             BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_512_1023
+#define bcmolt_epon_link_stat_id_rx_frames_1024_1518                                            BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_1024_1518
+#define bcmolt_epon_link_stat_id_rx_frames_1519_2047                                            BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_1519_2047
+#define bcmolt_epon_link_stat_id_rx_frames_2048_4095                                            BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_2048_4095
+#define bcmolt_epon_link_stat_id_rx_frames_4096_9216                                            BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_4096_9216
+#define bcmolt_epon_link_stat_id_rx_frames_9217_16383                                           BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_9217_16383
+#define bcmolt_epon_link_stat_id_rx_oam_bytes                                                   BCMOLT_EPON_LINK_STAT_ID_RX_OAM_BYTES
+#define bcmolt_epon_link_stat_id_rx_oam_frames                                                  BCMOLT_EPON_LINK_STAT_ID_RX_OAM_FRAMES
+#define bcmolt_epon_link_stat_id_rx_mpcp_frames                                                 BCMOLT_EPON_LINK_STAT_ID_RX_MPCP_FRAMES
+#define bcmolt_epon_link_stat_id_rx_broadcast_frames                                            BCMOLT_EPON_LINK_STAT_ID_RX_BROADCAST_FRAMES
+#define bcmolt_epon_link_stat_id_rx_unicast_frames                                              BCMOLT_EPON_LINK_STAT_ID_RX_UNICAST_FRAMES
+#define bcmolt_epon_link_stat_id_rx_multicast_frames                                            BCMOLT_EPON_LINK_STAT_ID_RX_MULTICAST_FRAMES
+#define bcmolt_epon_link_stat_id_rx_report_frames                                               BCMOLT_EPON_LINK_STAT_ID_RX_REPORT_FRAMES
+#define bcmolt_epon_link_stat_id_rx_fcs_error                                                   BCMOLT_EPON_LINK_STAT_ID_RX_FCS_ERROR
+#define bcmolt_epon_link_stat_id_rx_oversize_error                                              BCMOLT_EPON_LINK_STAT_ID_RX_OVERSIZE_ERROR
+#define bcmolt_epon_link_stat_id_rx_runt_error                                                  BCMOLT_EPON_LINK_STAT_ID_RX_RUNT_ERROR
+#define bcmolt_epon_link_stat_id_rx_line_code_error                                             BCMOLT_EPON_LINK_STAT_ID_RX_LINE_CODE_ERROR
+#define bcmolt_epon_link_stat_id_rx_line_code_error_max                                         BCMOLT_EPON_LINK_STAT_ID_RX_LINE_CODE_ERROR_MAX
+#define bcmolt_epon_link_stat_id_tx_data_bytes                                                  BCMOLT_EPON_LINK_STAT_ID_TX_DATA_BYTES
+#define bcmolt_epon_link_stat_id_tx_data_frames                                                 BCMOLT_EPON_LINK_STAT_ID_TX_DATA_FRAMES
+#define bcmolt_epon_link_stat_id_tx_frames_64                                                   BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_64
+#define bcmolt_epon_link_stat_id_tx_frames_65_127                                               BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_65_127
+#define bcmolt_epon_link_stat_id_tx_frames_128_255                                              BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_128_255
+#define bcmolt_epon_link_stat_id_tx_frames_256_511                                              BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_256_511
+#define bcmolt_epon_link_stat_id_tx_frames_512_1023                                             BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_512_1023
+#define bcmolt_epon_link_stat_id_tx_frames_1024_1518                                            BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_1024_1518
+#define bcmolt_epon_link_stat_id_tx_frames_1519_2047                                            BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_1519_2047
+#define bcmolt_epon_link_stat_id_tx_frames_2048_4095                                            BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_2048_4095
+#define bcmolt_epon_link_stat_id_tx_frames_4096_9216                                            BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_4096_9216
+#define bcmolt_epon_link_stat_id_tx_frames_9217_16383                                           BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_9217_16383
+#define bcmolt_epon_link_stat_id_tx_oam_bytes                                                   BCMOLT_EPON_LINK_STAT_ID_TX_OAM_BYTES
+#define bcmolt_epon_link_stat_id_tx_oam_frames                                                  BCMOLT_EPON_LINK_STAT_ID_TX_OAM_FRAMES
+#define bcmolt_epon_link_stat_id_tx_mpcp_frames                                                 BCMOLT_EPON_LINK_STAT_ID_TX_MPCP_FRAMES
+#define bcmolt_epon_link_stat_id_tx_broadcast_frames                                            BCMOLT_EPON_LINK_STAT_ID_TX_BROADCAST_FRAMES
+#define bcmolt_epon_link_stat_id_tx_unicast_frames                                              BCMOLT_EPON_LINK_STAT_ID_TX_UNICAST_FRAMES
+#define bcmolt_epon_link_stat_id_tx_multicast_frames                                            BCMOLT_EPON_LINK_STAT_ID_TX_MULTICAST_FRAMES
+#define bcmolt_epon_link_stat_id_tx_gates                                                       BCMOLT_EPON_LINK_STAT_ID_TX_GATES
+#define bcmolt_epon_link_stat_id__num_of                                                        BCMOLT_EPON_LINK_STAT_ID__NUM_OF
+#define bcmolt_epon_link_stat_cfg_id_cfg                                                        BCMOLT_EPON_LINK_STAT_CFG_ID_CFG
+#define bcmolt_epon_link_stat_cfg_id__num_of                                                    BCMOLT_EPON_LINK_STAT_CFG_ID__NUM_OF
+#define bcmolt_epon_link_duplicate_mpcp_registration_request_id_initial_range_tq                BCMOLT_EPON_LINK_DUPLICATE_MPCP_REGISTRATION_REQUEST_ID_INITIAL_RANGE_TQ
+#define bcmolt_epon_link_duplicate_mpcp_registration_request_id_current_range_tq                BCMOLT_EPON_LINK_DUPLICATE_MPCP_REGISTRATION_REQUEST_ID_CURRENT_RANGE_TQ
+#define bcmolt_epon_link_duplicate_mpcp_registration_request_id__num_of                         BCMOLT_EPON_LINK_DUPLICATE_MPCP_REGISTRATION_REQUEST_ID__NUM_OF
+#define bcmolt_epon_link_encryption_enabled_id__num_of                                          BCMOLT_EPON_LINK_ENCRYPTION_ENABLED_ID__NUM_OF
+#define bcmolt_epon_link_key_exchange_failure_id_alarm_status                                   BCMOLT_EPON_LINK_KEY_EXCHANGE_FAILURE_ID_ALARM_STATUS
+#define bcmolt_epon_link_key_exchange_failure_id__num_of                                        BCMOLT_EPON_LINK_KEY_EXCHANGE_FAILURE_ID__NUM_OF
+#define bcmolt_epon_link_key_exchange_started_id__num_of                                        BCMOLT_EPON_LINK_KEY_EXCHANGE_STARTED_ID__NUM_OF
+#define bcmolt_epon_link_key_exchange_stopped_id__num_of                                        BCMOLT_EPON_LINK_KEY_EXCHANGE_STOPPED_ID__NUM_OF
+#define bcmolt_epon_link_link_deleted_id__num_of                                                BCMOLT_EPON_LINK_LINK_DELETED_ID__NUM_OF
+#define bcmolt_epon_link_link_speed_mismatch_id_previous_rate                                   BCMOLT_EPON_LINK_LINK_SPEED_MISMATCH_ID_PREVIOUS_RATE
+#define bcmolt_epon_link_link_speed_mismatch_id_current_rate                                    BCMOLT_EPON_LINK_LINK_SPEED_MISMATCH_ID_CURRENT_RATE
+#define bcmolt_epon_link_link_speed_mismatch_id__num_of                                         BCMOLT_EPON_LINK_LINK_SPEED_MISMATCH_ID__NUM_OF
+#define bcmolt_epon_link_mpcp_deregistered_id__num_of                                           BCMOLT_EPON_LINK_MPCP_DEREGISTERED_ID__NUM_OF
+#define bcmolt_epon_link_mpcp_discovered_id_link_info                                           BCMOLT_EPON_LINK_MPCP_DISCOVERED_ID_LINK_INFO
+#define bcmolt_epon_link_mpcp_discovered_id__num_of                                             BCMOLT_EPON_LINK_MPCP_DISCOVERED_ID__NUM_OF
+#define bcmolt_epon_link_mpcp_reg_ack_timeout_id__num_of                                        BCMOLT_EPON_LINK_MPCP_REG_ACK_TIMEOUT_ID__NUM_OF
+#define bcmolt_epon_link_mpcp_report_timeout_id_alarm_status                                    BCMOLT_EPON_LINK_MPCP_REPORT_TIMEOUT_ID_ALARM_STATUS
+#define bcmolt_epon_link_mpcp_report_timeout_id__num_of                                         BCMOLT_EPON_LINK_MPCP_REPORT_TIMEOUT_ID__NUM_OF
+#define bcmolt_epon_link_oam_keepalive_timeout_id_alarm_status                                  BCMOLT_EPON_LINK_OAM_KEEPALIVE_TIMEOUT_ID_ALARM_STATUS
+#define bcmolt_epon_link_oam_keepalive_timeout_id__num_of                                       BCMOLT_EPON_LINK_OAM_KEEPALIVE_TIMEOUT_ID__NUM_OF
+#define bcmolt_epon_link_oam_keepalive_timer_started_id__num_of                                 BCMOLT_EPON_LINK_OAM_KEEPALIVE_TIMER_STARTED_ID__NUM_OF
+#define bcmolt_epon_link_oam_keepalive_timer_stopped_id__num_of                                 BCMOLT_EPON_LINK_OAM_KEEPALIVE_TIMER_STOPPED_ID__NUM_OF
+#define bcmolt_epon_link_preprovisioned_link_created_id_link_info                               BCMOLT_EPON_LINK_PREPROVISIONED_LINK_CREATED_ID_LINK_INFO
+#define bcmolt_epon_link_preprovisioned_link_created_id__num_of                                 BCMOLT_EPON_LINK_PREPROVISIONED_LINK_CREATED_ID__NUM_OF
+#define bcmolt_epon_link_protection_switch_occurred_id_protection_status                        BCMOLT_EPON_LINK_PROTECTION_SWITCH_OCCURRED_ID_PROTECTION_STATUS
+#define bcmolt_epon_link_protection_switch_occurred_id_range_value_tq                           BCMOLT_EPON_LINK_PROTECTION_SWITCH_OCCURRED_ID_RANGE_VALUE_TQ
+#define bcmolt_epon_link_protection_switch_occurred_id__num_of                                  BCMOLT_EPON_LINK_PROTECTION_SWITCH_OCCURRED_ID__NUM_OF
+#define bcmolt_epon_link_range_value_changed_id_range_value_tq                                  BCMOLT_EPON_LINK_RANGE_VALUE_CHANGED_ID_RANGE_VALUE_TQ
+#define bcmolt_epon_link_range_value_changed_id__num_of                                         BCMOLT_EPON_LINK_RANGE_VALUE_CHANGED_ID__NUM_OF
+#define bcmolt_epon_link_rerange_failure_id__num_of                                             BCMOLT_EPON_LINK_RERANGE_FAILURE_ID__NUM_OF
+#define bcmolt_epon_link_stat_alarm_cleared_id_stat                                             BCMOLT_EPON_LINK_STAT_ALARM_CLEARED_ID_STAT
+#define bcmolt_epon_link_stat_alarm_cleared_id__num_of                                          BCMOLT_EPON_LINK_STAT_ALARM_CLEARED_ID__NUM_OF
+#define bcmolt_epon_link_stat_alarm_raised_id_stat                                              BCMOLT_EPON_LINK_STAT_ALARM_RAISED_ID_STAT
+#define bcmolt_epon_link_stat_alarm_raised_id__num_of                                           BCMOLT_EPON_LINK_STAT_ALARM_RAISED_ID__NUM_OF
+#define bcmolt_epon_link_static_registration_done_id__num_of                                    BCMOLT_EPON_LINK_STATIC_REGISTRATION_DONE_ID__NUM_OF
+#define bcmolt_epon_link_auto_cfg_id_duplicate_mpcp_registration_request                        BCMOLT_EPON_LINK_AUTO_CFG_ID_DUPLICATE_MPCP_REGISTRATION_REQUEST
+#define bcmolt_epon_link_auto_cfg_id_encryption_enabled                                         BCMOLT_EPON_LINK_AUTO_CFG_ID_ENCRYPTION_ENABLED
+#define bcmolt_epon_link_auto_cfg_id_key_exchange_failure                                       BCMOLT_EPON_LINK_AUTO_CFG_ID_KEY_EXCHANGE_FAILURE
+#define bcmolt_epon_link_auto_cfg_id_key_exchange_started                                       BCMOLT_EPON_LINK_AUTO_CFG_ID_KEY_EXCHANGE_STARTED
+#define bcmolt_epon_link_auto_cfg_id_key_exchange_stopped                                       BCMOLT_EPON_LINK_AUTO_CFG_ID_KEY_EXCHANGE_STOPPED
+#define bcmolt_epon_link_auto_cfg_id_link_deleted                                               BCMOLT_EPON_LINK_AUTO_CFG_ID_LINK_DELETED
+#define bcmolt_epon_link_auto_cfg_id_link_speed_mismatch                                        BCMOLT_EPON_LINK_AUTO_CFG_ID_LINK_SPEED_MISMATCH
+#define bcmolt_epon_link_auto_cfg_id_mpcp_deregistered                                          BCMOLT_EPON_LINK_AUTO_CFG_ID_MPCP_DEREGISTERED
+#define bcmolt_epon_link_auto_cfg_id_mpcp_discovered                                            BCMOLT_EPON_LINK_AUTO_CFG_ID_MPCP_DISCOVERED
+#define bcmolt_epon_link_auto_cfg_id_mpcp_reg_ack_timeout                                       BCMOLT_EPON_LINK_AUTO_CFG_ID_MPCP_REG_ACK_TIMEOUT
+#define bcmolt_epon_link_auto_cfg_id_mpcp_report_timeout                                        BCMOLT_EPON_LINK_AUTO_CFG_ID_MPCP_REPORT_TIMEOUT
+#define bcmolt_epon_link_auto_cfg_id_oam_keepalive_timeout                                      BCMOLT_EPON_LINK_AUTO_CFG_ID_OAM_KEEPALIVE_TIMEOUT
+#define bcmolt_epon_link_auto_cfg_id_oam_keepalive_timer_started                                BCMOLT_EPON_LINK_AUTO_CFG_ID_OAM_KEEPALIVE_TIMER_STARTED
+#define bcmolt_epon_link_auto_cfg_id_oam_keepalive_timer_stopped                                BCMOLT_EPON_LINK_AUTO_CFG_ID_OAM_KEEPALIVE_TIMER_STOPPED
+#define bcmolt_epon_link_auto_cfg_id_preprovisioned_link_created                                BCMOLT_EPON_LINK_AUTO_CFG_ID_PREPROVISIONED_LINK_CREATED
+#define bcmolt_epon_link_auto_cfg_id_protection_switch_occurred                                 BCMOLT_EPON_LINK_AUTO_CFG_ID_PROTECTION_SWITCH_OCCURRED
+#define bcmolt_epon_link_auto_cfg_id_range_value_changed                                        BCMOLT_EPON_LINK_AUTO_CFG_ID_RANGE_VALUE_CHANGED
+#define bcmolt_epon_link_auto_cfg_id_rerange_failure                                            BCMOLT_EPON_LINK_AUTO_CFG_ID_RERANGE_FAILURE
+#define bcmolt_epon_link_auto_cfg_id_stat_alarm_cleared                                         BCMOLT_EPON_LINK_AUTO_CFG_ID_STAT_ALARM_CLEARED
+#define bcmolt_epon_link_auto_cfg_id_stat_alarm_raised                                          BCMOLT_EPON_LINK_AUTO_CFG_ID_STAT_ALARM_RAISED
+#define bcmolt_epon_link_auto_cfg_id_static_registration_done                                   BCMOLT_EPON_LINK_AUTO_CFG_ID_STATIC_REGISTRATION_DONE
+#define bcmolt_epon_link_auto_cfg_id__num_of                                                    BCMOLT_EPON_LINK_AUTO_CFG_ID__NUM_OF
+#define bcmolt_epon_link_delete_link_id__num_of                                                 BCMOLT_EPON_LINK_DELETE_LINK_ID__NUM_OF
+#define bcmolt_epon_link_force_rediscovery_id__num_of                                           BCMOLT_EPON_LINK_FORCE_REDISCOVERY_ID__NUM_OF
+#define bcmolt_epon_link_key_exchange_start_id_period                                           BCMOLT_EPON_LINK_KEY_EXCHANGE_START_ID_PERIOD
+#define bcmolt_epon_link_key_exchange_start_id__num_of                                          BCMOLT_EPON_LINK_KEY_EXCHANGE_START_ID__NUM_OF
+#define bcmolt_epon_link_key_exchange_stop_id__num_of                                           BCMOLT_EPON_LINK_KEY_EXCHANGE_STOP_ID__NUM_OF
+#define bcmolt_epon_link_oam_keepalive_timer_start_id_send_period                               BCMOLT_EPON_LINK_OAM_KEEPALIVE_TIMER_START_ID_SEND_PERIOD
+#define bcmolt_epon_link_oam_keepalive_timer_start_id__num_of                                   BCMOLT_EPON_LINK_OAM_KEEPALIVE_TIMER_START_ID__NUM_OF
+#define bcmolt_epon_link_oam_keepalive_timer_stop_id__num_of                                    BCMOLT_EPON_LINK_OAM_KEEPALIVE_TIMER_STOP_ID__NUM_OF
+#define bcmolt_epon_link_static_registration_id_laseron_time_tq                                 BCMOLT_EPON_LINK_STATIC_REGISTRATION_ID_LASERON_TIME_TQ
+#define bcmolt_epon_link_static_registration_id_laseroff_time_tq                                BCMOLT_EPON_LINK_STATIC_REGISTRATION_ID_LASEROFF_TIME_TQ
+#define bcmolt_epon_link_static_registration_id_range_value_tq                                  BCMOLT_EPON_LINK_STATIC_REGISTRATION_ID_RANGE_VALUE_TQ
+#define bcmolt_epon_link_static_registration_id_pending_grants                                  BCMOLT_EPON_LINK_STATIC_REGISTRATION_ID_PENDING_GRANTS
+#define bcmolt_epon_link_static_registration_id__num_of                                         BCMOLT_EPON_LINK_STATIC_REGISTRATION_ID__NUM_OF
+#define bcmolt_epon_link_inject_frame_id_frame                                                  BCMOLT_EPON_LINK_INJECT_FRAME_ID_FRAME
+#define bcmolt_epon_link_inject_frame_id__num_of                                                BCMOLT_EPON_LINK_INJECT_FRAME_ID__NUM_OF
+#define bcmolt_epon_link_frame_captured_id_frame                                                BCMOLT_EPON_LINK_FRAME_CAPTURED_ID_FRAME
+#define bcmolt_epon_link_frame_captured_id__num_of                                              BCMOLT_EPON_LINK_FRAME_CAPTURED_ID__NUM_OF
+#define bcmolt_epon_ni_key_id_epon_ni                                                           BCMOLT_EPON_NI_KEY_ID_EPON_NI
+#define bcmolt_epon_ni_key_id__num_of                                                           BCMOLT_EPON_NI_KEY_ID__NUM_OF
+#define bcmolt_epon_ni_cfg_id_mac_address                                                       BCMOLT_EPON_NI_CFG_ID_MAC_ADDRESS
+#define bcmolt_epon_ni_cfg_id_epon_ni_en                                                        BCMOLT_EPON_NI_CFG_ID_EPON_NI_EN
+#define bcmolt_epon_ni_cfg_id_registration_behavior                                             BCMOLT_EPON_NI_CFG_ID_REGISTRATION_BEHAVIOR
+#define bcmolt_epon_ni_cfg_id_mtu_1g                                                            BCMOLT_EPON_NI_CFG_ID_MTU_1G
+#define bcmolt_epon_ni_cfg_id_mtu_10g                                                           BCMOLT_EPON_NI_CFG_ID_MTU_10G
+#define bcmolt_epon_ni_cfg_id_minimum_fiber_length                                              BCMOLT_EPON_NI_CFG_ID_MINIMUM_FIBER_LENGTH
+#define bcmolt_epon_ni_cfg_id_maximum_fiber_length                                              BCMOLT_EPON_NI_CFG_ID_MAXIMUM_FIBER_LENGTH
+#define bcmolt_epon_ni_cfg_id_grant_spacing_tq                                                  BCMOLT_EPON_NI_CFG_ID_GRANT_SPACING_TQ
+#define bcmolt_epon_ni_cfg_id_epon_logical_link_options                                         BCMOLT_EPON_NI_CFG_ID_EPON_LOGICAL_LINK_OPTIONS
+#define bcmolt_epon_ni_cfg_id_mpcp_discovery_period_ms                                          BCMOLT_EPON_NI_CFG_ID_MPCP_DISCOVERY_PERIOD_MS
+#define bcmolt_epon_ni_cfg_id_alarm_state                                                       BCMOLT_EPON_NI_CFG_ID_ALARM_STATE
+#define bcmolt_epon_ni_cfg_id_all_links                                                         BCMOLT_EPON_NI_CFG_ID_ALL_LINKS
+#define bcmolt_epon_ni_cfg_id_encryption_cfg                                                    BCMOLT_EPON_NI_CFG_ID_ENCRYPTION_CFG
+#define bcmolt_epon_ni_cfg_id_protection_switching_cfg                                          BCMOLT_EPON_NI_CFG_ID_PROTECTION_SWITCHING_CFG
+#define bcmolt_epon_ni_cfg_id_clock_transport_cfg                                               BCMOLT_EPON_NI_CFG_ID_CLOCK_TRANSPORT_CFG
+#define bcmolt_epon_ni_cfg_id_dropdown_weights                                                  BCMOLT_EPON_NI_CFG_ID_DROPDOWN_WEIGHTS
+#define bcmolt_epon_ni_cfg_id_approximate_solicited_usage                                       BCMOLT_EPON_NI_CFG_ID_APPROXIMATE_SOLICITED_USAGE
+#define bcmolt_epon_ni_cfg_id_approximate_tdm_usage                                             BCMOLT_EPON_NI_CFG_ID_APPROXIMATE_TDM_USAGE
+#define bcmolt_epon_ni_cfg_id_no_reports_soak_time                                              BCMOLT_EPON_NI_CFG_ID_NO_REPORTS_SOAK_TIME
+#define bcmolt_epon_ni_cfg_id_pon_aggregate_shaper                                              BCMOLT_EPON_NI_CFG_ID_PON_AGGREGATE_SHAPER
+#define bcmolt_epon_ni_cfg_id_estimated_pon_latency_tq                                          BCMOLT_EPON_NI_CFG_ID_ESTIMATED_PON_LATENCY_TQ
+#define bcmolt_epon_ni_cfg_id_onu_upgrade_params                                                BCMOLT_EPON_NI_CFG_ID_ONU_UPGRADE_PARAMS
+#define bcmolt_epon_ni_cfg_id_auto_rogue_detect_10g_en                                          BCMOLT_EPON_NI_CFG_ID_AUTO_ROGUE_DETECT_10G_EN
+#define bcmolt_epon_ni_cfg_id_auto_rogue_detect_1g_en                                           BCMOLT_EPON_NI_CFG_ID_AUTO_ROGUE_DETECT_1G_EN
+#define bcmolt_epon_ni_cfg_id_auto_rogue_detect_10g_threshold                                   BCMOLT_EPON_NI_CFG_ID_AUTO_ROGUE_DETECT_10G_THRESHOLD
+#define bcmolt_epon_ni_cfg_id__num_of                                                           BCMOLT_EPON_NI_CFG_ID__NUM_OF
+#define bcmolt_epon_ni_auto_rogue_scan_10g_failure_id__num_of                                   BCMOLT_EPON_NI_AUTO_ROGUE_SCAN_10G_FAILURE_ID__NUM_OF
+#define bcmolt_epon_ni_auto_rogue_scan_1g_failure_id__num_of                                    BCMOLT_EPON_NI_AUTO_ROGUE_SCAN_1G_FAILURE_ID__NUM_OF
+#define bcmolt_epon_ni_llid_quarantined_id_llid                                                 BCMOLT_EPON_NI_LLID_QUARANTINED_ID_LLID
+#define bcmolt_epon_ni_llid_quarantined_id_link_rate                                            BCMOLT_EPON_NI_LLID_QUARANTINED_ID_LINK_RATE
+#define bcmolt_epon_ni_llid_quarantined_id_link_mac                                             BCMOLT_EPON_NI_LLID_QUARANTINED_ID_LINK_MAC
+#define bcmolt_epon_ni_llid_quarantined_id_range_value_tq                                       BCMOLT_EPON_NI_LLID_QUARANTINED_ID_RANGE_VALUE_TQ
+#define bcmolt_epon_ni_llid_quarantined_id__num_of                                              BCMOLT_EPON_NI_LLID_QUARANTINED_ID__NUM_OF
+#define bcmolt_epon_ni_mpcp_timestamp_changed_id_mpcp_timestamp                                 BCMOLT_EPON_NI_MPCP_TIMESTAMP_CHANGED_ID_MPCP_TIMESTAMP
+#define bcmolt_epon_ni_mpcp_timestamp_changed_id__num_of                                        BCMOLT_EPON_NI_MPCP_TIMESTAMP_CHANGED_ID__NUM_OF
+#define bcmolt_epon_ni_no_reports_id_alarm_status                                               BCMOLT_EPON_NI_NO_REPORTS_ID_ALARM_STATUS
+#define bcmolt_epon_ni_no_reports_id__num_of                                                    BCMOLT_EPON_NI_NO_REPORTS_ID__NUM_OF
+#define bcmolt_epon_ni_onu_upgrade_complete_id_status                                           BCMOLT_EPON_NI_ONU_UPGRADE_COMPLETE_ID_STATUS
+#define bcmolt_epon_ni_onu_upgrade_complete_id_list_of_failed_entities                          BCMOLT_EPON_NI_ONU_UPGRADE_COMPLETE_ID_LIST_OF_FAILED_ENTITIES
+#define bcmolt_epon_ni_onu_upgrade_complete_id__num_of                                          BCMOLT_EPON_NI_ONU_UPGRADE_COMPLETE_ID__NUM_OF
+#define bcmolt_epon_ni_rerange_failure_id__num_of                                               BCMOLT_EPON_NI_RERANGE_FAILURE_ID__NUM_OF
+#define bcmolt_epon_ni_rogue_scan_complete_id_return_ind_status                                 BCMOLT_EPON_NI_ROGUE_SCAN_COMPLETE_ID_RETURN_IND_STATUS
+#define bcmolt_epon_ni_rogue_scan_complete_id__num_of                                           BCMOLT_EPON_NI_ROGUE_SCAN_COMPLETE_ID__NUM_OF
+#define bcmolt_epon_ni_rssi_measurement_completed_id_status                                     BCMOLT_EPON_NI_RSSI_MEASUREMENT_COMPLETED_ID_STATUS
+#define bcmolt_epon_ni_rssi_measurement_completed_id_llid                                       BCMOLT_EPON_NI_RSSI_MEASUREMENT_COMPLETED_ID_LLID
+#define bcmolt_epon_ni_rssi_measurement_completed_id_link_mac                                   BCMOLT_EPON_NI_RSSI_MEASUREMENT_COMPLETED_ID_LINK_MAC
+#define bcmolt_epon_ni_rssi_measurement_completed_id__num_of                                    BCMOLT_EPON_NI_RSSI_MEASUREMENT_COMPLETED_ID__NUM_OF
+#define bcmolt_epon_ni_state_change_completed_id_new_state                                      BCMOLT_EPON_NI_STATE_CHANGE_COMPLETED_ID_NEW_STATE
+#define bcmolt_epon_ni_state_change_completed_id__num_of                                        BCMOLT_EPON_NI_STATE_CHANGE_COMPLETED_ID__NUM_OF
+#define bcmolt_epon_ni_auto_cfg_id_auto_rogue_scan_10g_failure                                  BCMOLT_EPON_NI_AUTO_CFG_ID_AUTO_ROGUE_SCAN_10G_FAILURE
+#define bcmolt_epon_ni_auto_cfg_id_auto_rogue_scan_1g_failure                                   BCMOLT_EPON_NI_AUTO_CFG_ID_AUTO_ROGUE_SCAN_1G_FAILURE
+#define bcmolt_epon_ni_auto_cfg_id_llid_quarantined                                             BCMOLT_EPON_NI_AUTO_CFG_ID_LLID_QUARANTINED
+#define bcmolt_epon_ni_auto_cfg_id_mpcp_timestamp_changed                                       BCMOLT_EPON_NI_AUTO_CFG_ID_MPCP_TIMESTAMP_CHANGED
+#define bcmolt_epon_ni_auto_cfg_id_no_reports                                                   BCMOLT_EPON_NI_AUTO_CFG_ID_NO_REPORTS
+#define bcmolt_epon_ni_auto_cfg_id_onu_upgrade_complete                                         BCMOLT_EPON_NI_AUTO_CFG_ID_ONU_UPGRADE_COMPLETE
+#define bcmolt_epon_ni_auto_cfg_id_rerange_failure                                              BCMOLT_EPON_NI_AUTO_CFG_ID_RERANGE_FAILURE
+#define bcmolt_epon_ni_auto_cfg_id_rogue_scan_complete                                          BCMOLT_EPON_NI_AUTO_CFG_ID_ROGUE_SCAN_COMPLETE
+#define bcmolt_epon_ni_auto_cfg_id_rssi_measurement_completed                                   BCMOLT_EPON_NI_AUTO_CFG_ID_RSSI_MEASUREMENT_COMPLETED
+#define bcmolt_epon_ni_auto_cfg_id_state_change_completed                                       BCMOLT_EPON_NI_AUTO_CFG_ID_STATE_CHANGE_COMPLETED
+#define bcmolt_epon_ni_auto_cfg_id__num_of                                                      BCMOLT_EPON_NI_AUTO_CFG_ID__NUM_OF
+#define bcmolt_epon_ni_add_link_id_mac_address                                                  BCMOLT_EPON_NI_ADD_LINK_ID_MAC_ADDRESS
+#define bcmolt_epon_ni_add_link_id_rate                                                         BCMOLT_EPON_NI_ADD_LINK_ID_RATE
+#define bcmolt_epon_ni_add_link_id__num_of                                                      BCMOLT_EPON_NI_ADD_LINK_ID__NUM_OF
+#define bcmolt_epon_ni_add_multicast_link_id_mac_address                                        BCMOLT_EPON_NI_ADD_MULTICAST_LINK_ID_MAC_ADDRESS
+#define bcmolt_epon_ni_add_multicast_link_id_rate                                               BCMOLT_EPON_NI_ADD_MULTICAST_LINK_ID_RATE
+#define bcmolt_epon_ni_add_multicast_link_id__num_of                                            BCMOLT_EPON_NI_ADD_MULTICAST_LINK_ID__NUM_OF
+#define bcmolt_epon_ni_add_protected_standby_link_id_mac_address                                BCMOLT_EPON_NI_ADD_PROTECTED_STANDBY_LINK_ID_MAC_ADDRESS
+#define bcmolt_epon_ni_add_protected_standby_link_id_working_link_info                          BCMOLT_EPON_NI_ADD_PROTECTED_STANDBY_LINK_ID_WORKING_LINK_INFO
+#define bcmolt_epon_ni_add_protected_standby_link_id__num_of                                    BCMOLT_EPON_NI_ADD_PROTECTED_STANDBY_LINK_ID__NUM_OF
+#define bcmolt_epon_ni_issue_rssi_grant_id_granted_link                                         BCMOLT_EPON_NI_ISSUE_RSSI_GRANT_ID_GRANTED_LINK
+#define bcmolt_epon_ni_issue_rssi_grant_id_trigger_width                                        BCMOLT_EPON_NI_ISSUE_RSSI_GRANT_ID_TRIGGER_WIDTH
+#define bcmolt_epon_ni_issue_rssi_grant_id_trigger_delay                                        BCMOLT_EPON_NI_ISSUE_RSSI_GRANT_ID_TRIGGER_DELAY
+#define bcmolt_epon_ni_issue_rssi_grant_id_sample_period                                        BCMOLT_EPON_NI_ISSUE_RSSI_GRANT_ID_SAMPLE_PERIOD
+#define bcmolt_epon_ni_issue_rssi_grant_id__num_of                                              BCMOLT_EPON_NI_ISSUE_RSSI_GRANT_ID__NUM_OF
+#define bcmolt_epon_ni_protection_switching_apply_rerange_delta_id_rerange_delta                BCMOLT_EPON_NI_PROTECTION_SWITCHING_APPLY_RERANGE_DELTA_ID_RERANGE_DELTA
+#define bcmolt_epon_ni_protection_switching_apply_rerange_delta_id__num_of                      BCMOLT_EPON_NI_PROTECTION_SWITCHING_APPLY_RERANGE_DELTA_ID__NUM_OF
+#define bcmolt_epon_ni_rogue_llid_scan_id_mode                                                  BCMOLT_EPON_NI_ROGUE_LLID_SCAN_ID_MODE
+#define bcmolt_epon_ni_rogue_llid_scan_id_llid                                                  BCMOLT_EPON_NI_ROGUE_LLID_SCAN_ID_LLID
+#define bcmolt_epon_ni_rogue_llid_scan_id__num_of                                               BCMOLT_EPON_NI_ROGUE_LLID_SCAN_ID__NUM_OF
+#define bcmolt_epon_ni_set_epon_ni_en_state_id_new_state                                        BCMOLT_EPON_NI_SET_EPON_NI_EN_STATE_ID_NEW_STATE
+#define bcmolt_epon_ni_set_epon_ni_en_state_id__num_of                                          BCMOLT_EPON_NI_SET_EPON_NI_EN_STATE_ID__NUM_OF
+#define bcmolt_epon_ni_start_onu_upgrade_id_list_of_onu_ids                                     BCMOLT_EPON_NI_START_ONU_UPGRADE_ID_LIST_OF_ONU_IDS
+#define bcmolt_epon_ni_start_onu_upgrade_id__num_of                                             BCMOLT_EPON_NI_START_ONU_UPGRADE_ID__NUM_OF
+#define bcmolt_epon_onu_10g_us_key_id_epon_ni                                                   BCMOLT_EPON_ONU_10G_US_KEY_ID_EPON_NI
+#define bcmolt_epon_onu_10g_us_key_id_onu_id                                                    BCMOLT_EPON_ONU_10G_US_KEY_ID_ONU_ID
+#define bcmolt_epon_onu_10g_us_key_id__num_of                                                   BCMOLT_EPON_ONU_10G_US_KEY_ID__NUM_OF
+#define bcmolt_epon_onu_10g_us_cfg_id_all_links                                                 BCMOLT_EPON_ONU_10G_US_CFG_ID_ALL_LINKS
+#define bcmolt_epon_onu_10g_us_cfg_id__num_of                                                   BCMOLT_EPON_ONU_10G_US_CFG_ID__NUM_OF
+#define bcmolt_epon_onu_10g_us_stat_id_fec_code_words_total                                     BCMOLT_EPON_ONU_10G_US_STAT_ID_FEC_CODE_WORDS_TOTAL
+#define bcmolt_epon_onu_10g_us_stat_id_fec_code_words_decode_fails                              BCMOLT_EPON_ONU_10G_US_STAT_ID_FEC_CODE_WORDS_DECODE_FAILS
+#define bcmolt_epon_onu_10g_us_stat_id_fec_zeroes_corrected                                     BCMOLT_EPON_ONU_10G_US_STAT_ID_FEC_ZEROES_CORRECTED
+#define bcmolt_epon_onu_10g_us_stat_id_fec_ones_corrected                                       BCMOLT_EPON_ONU_10G_US_STAT_ID_FEC_ONES_CORRECTED
+#define bcmolt_epon_onu_10g_us_stat_id__num_of                                                  BCMOLT_EPON_ONU_10G_US_STAT_ID__NUM_OF
+#define bcmolt_epon_onu_10g_us_stat_cfg_id_cfg                                                  BCMOLT_EPON_ONU_10G_US_STAT_CFG_ID_CFG
+#define bcmolt_epon_onu_10g_us_stat_cfg_id__num_of                                              BCMOLT_EPON_ONU_10G_US_STAT_CFG_ID__NUM_OF
+#define bcmolt_epon_onu_10g_us_stat_alarm_cleared_id_stat                                       BCMOLT_EPON_ONU_10G_US_STAT_ALARM_CLEARED_ID_STAT
+#define bcmolt_epon_onu_10g_us_stat_alarm_cleared_id__num_of                                    BCMOLT_EPON_ONU_10G_US_STAT_ALARM_CLEARED_ID__NUM_OF
+#define bcmolt_epon_onu_10g_us_stat_alarm_raised_id_stat                                        BCMOLT_EPON_ONU_10G_US_STAT_ALARM_RAISED_ID_STAT
+#define bcmolt_epon_onu_10g_us_stat_alarm_raised_id__num_of                                     BCMOLT_EPON_ONU_10G_US_STAT_ALARM_RAISED_ID__NUM_OF
+#define bcmolt_epon_onu_10g_us_auto_cfg_id_stat_alarm_cleared                                   BCMOLT_EPON_ONU_10G_US_AUTO_CFG_ID_STAT_ALARM_CLEARED
+#define bcmolt_epon_onu_10g_us_auto_cfg_id_stat_alarm_raised                                    BCMOLT_EPON_ONU_10G_US_AUTO_CFG_ID_STAT_ALARM_RAISED
+#define bcmolt_epon_onu_10g_us_auto_cfg_id__num_of                                              BCMOLT_EPON_ONU_10G_US_AUTO_CFG_ID__NUM_OF
+#define bcmolt_epon_onu_1g_us_key_id_epon_ni                                                    BCMOLT_EPON_ONU_1G_US_KEY_ID_EPON_NI
+#define bcmolt_epon_onu_1g_us_key_id_onu_id                                                     BCMOLT_EPON_ONU_1G_US_KEY_ID_ONU_ID
+#define bcmolt_epon_onu_1g_us_key_id__num_of                                                    BCMOLT_EPON_ONU_1G_US_KEY_ID__NUM_OF
+#define bcmolt_epon_onu_1g_us_cfg_id_all_links                                                  BCMOLT_EPON_ONU_1G_US_CFG_ID_ALL_LINKS
+#define bcmolt_epon_onu_1g_us_cfg_id__num_of                                                    BCMOLT_EPON_ONU_1G_US_CFG_ID__NUM_OF
+#define bcmolt_epon_onu_1g_us_stat_id_good_frames                                               BCMOLT_EPON_ONU_1G_US_STAT_ID_GOOD_FRAMES
+#define bcmolt_epon_onu_1g_us_stat_id_good_bytes                                                BCMOLT_EPON_ONU_1G_US_STAT_ID_GOOD_BYTES
+#define bcmolt_epon_onu_1g_us_stat_id_oversz_frames                                             BCMOLT_EPON_ONU_1G_US_STAT_ID_OVERSZ_FRAMES
+#define bcmolt_epon_onu_1g_us_stat_id_non_fec_good_frames                                       BCMOLT_EPON_ONU_1G_US_STAT_ID_NON_FEC_GOOD_FRAMES
+#define bcmolt_epon_onu_1g_us_stat_id_non_fec_good_bytes                                        BCMOLT_EPON_ONU_1G_US_STAT_ID_NON_FEC_GOOD_BYTES
+#define bcmolt_epon_onu_1g_us_stat_id_fec_good_frames                                           BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_GOOD_FRAMES
+#define bcmolt_epon_onu_1g_us_stat_id_fec_good_bytes                                            BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_GOOD_BYTES
+#define bcmolt_epon_onu_1g_us_stat_id_fec_frames_exc_errs                                       BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_FRAMES_EXC_ERRS
+#define bcmolt_epon_onu_1g_us_stat_id_fec_blks_no_errs                                          BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_BLKS_NO_ERRS
+#define bcmolt_epon_onu_1g_us_stat_id_fec_blks_corr_errs                                        BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_BLKS_CORR_ERRS
+#define bcmolt_epon_onu_1g_us_stat_id_fec_blks_uncorr_errs                                      BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_BLKS_UNCORR_ERRS
+#define bcmolt_epon_onu_1g_us_stat_id_fec_corr_bytes                                            BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_CORR_BYTES
+#define bcmolt_epon_onu_1g_us_stat_id_fec_corr_zeroes                                           BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_CORR_ZEROES
+#define bcmolt_epon_onu_1g_us_stat_id_fec_corr_ones                                             BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_CORR_ONES
+#define bcmolt_epon_onu_1g_us_stat_id_undersz_frames                                            BCMOLT_EPON_ONU_1G_US_STAT_ID_UNDERSZ_FRAMES
+#define bcmolt_epon_onu_1g_us_stat_id_errorsz_frames                                            BCMOLT_EPON_ONU_1G_US_STAT_ID_ERRORSZ_FRAMES
+#define bcmolt_epon_onu_1g_us_stat_id__num_of                                                   BCMOLT_EPON_ONU_1G_US_STAT_ID__NUM_OF
+#define bcmolt_epon_onu_1g_us_stat_cfg_id_cfg                                                   BCMOLT_EPON_ONU_1G_US_STAT_CFG_ID_CFG
+#define bcmolt_epon_onu_1g_us_stat_cfg_id__num_of                                               BCMOLT_EPON_ONU_1G_US_STAT_CFG_ID__NUM_OF
+#define bcmolt_epon_onu_1g_us_stat_alarm_cleared_id_stat                                        BCMOLT_EPON_ONU_1G_US_STAT_ALARM_CLEARED_ID_STAT
+#define bcmolt_epon_onu_1g_us_stat_alarm_cleared_id__num_of                                     BCMOLT_EPON_ONU_1G_US_STAT_ALARM_CLEARED_ID__NUM_OF
+#define bcmolt_epon_onu_1g_us_stat_alarm_raised_id_stat                                         BCMOLT_EPON_ONU_1G_US_STAT_ALARM_RAISED_ID_STAT
+#define bcmolt_epon_onu_1g_us_stat_alarm_raised_id__num_of                                      BCMOLT_EPON_ONU_1G_US_STAT_ALARM_RAISED_ID__NUM_OF
+#define bcmolt_epon_onu_1g_us_auto_cfg_id_stat_alarm_cleared                                    BCMOLT_EPON_ONU_1G_US_AUTO_CFG_ID_STAT_ALARM_CLEARED
+#define bcmolt_epon_onu_1g_us_auto_cfg_id_stat_alarm_raised                                     BCMOLT_EPON_ONU_1G_US_AUTO_CFG_ID_STAT_ALARM_RAISED
+#define bcmolt_epon_onu_1g_us_auto_cfg_id__num_of                                               BCMOLT_EPON_ONU_1G_US_AUTO_CFG_ID__NUM_OF
+#define bcmolt_epon_path_10g_ds_key_id_epon_ni                                                  BCMOLT_EPON_PATH_10G_DS_KEY_ID_EPON_NI
+#define bcmolt_epon_path_10g_ds_key_id__num_of                                                  BCMOLT_EPON_PATH_10G_DS_KEY_ID__NUM_OF
+#define bcmolt_epon_path_10g_ds_cfg_id_fec_state                                                BCMOLT_EPON_PATH_10G_DS_CFG_ID_FEC_STATE
+#define bcmolt_epon_path_10g_ds_cfg_id_prbs_generator                                           BCMOLT_EPON_PATH_10G_DS_CFG_ID_PRBS_GENERATOR
+#define bcmolt_epon_path_10g_ds_cfg_id__num_of                                                  BCMOLT_EPON_PATH_10G_DS_CFG_ID__NUM_OF
+#define bcmolt_epon_path_10g_ds_stat_id_bytes                                                   BCMOLT_EPON_PATH_10G_DS_STAT_ID_BYTES
+#define bcmolt_epon_path_10g_ds_stat_id_frames                                                  BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES
+#define bcmolt_epon_path_10g_ds_stat_id_frames_64                                               BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_64
+#define bcmolt_epon_path_10g_ds_stat_id_frames_65_127                                           BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_65_127
+#define bcmolt_epon_path_10g_ds_stat_id_frames_128_255                                          BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_128_255
+#define bcmolt_epon_path_10g_ds_stat_id_frames_256_511                                          BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_256_511
+#define bcmolt_epon_path_10g_ds_stat_id_frames_512_1023                                         BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_512_1023
+#define bcmolt_epon_path_10g_ds_stat_id_frames_1024_1518                                        BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_1024_1518
+#define bcmolt_epon_path_10g_ds_stat_id_frames_1519_2047                                        BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_1519_2047
+#define bcmolt_epon_path_10g_ds_stat_id_frames_2048_4095                                        BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_2048_4095
+#define bcmolt_epon_path_10g_ds_stat_id_frames_4096_9216                                        BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_4096_9216
+#define bcmolt_epon_path_10g_ds_stat_id_frames_9217_16383                                       BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_9217_16383
+#define bcmolt_epon_path_10g_ds_stat_id_broadcast_frames                                        BCMOLT_EPON_PATH_10G_DS_STAT_ID_BROADCAST_FRAMES
+#define bcmolt_epon_path_10g_ds_stat_id_data_bytes                                              BCMOLT_EPON_PATH_10G_DS_STAT_ID_DATA_BYTES
+#define bcmolt_epon_path_10g_ds_stat_id_multicast_frames                                        BCMOLT_EPON_PATH_10G_DS_STAT_ID_MULTICAST_FRAMES
+#define bcmolt_epon_path_10g_ds_stat_id_unicast_frames                                          BCMOLT_EPON_PATH_10G_DS_STAT_ID_UNICAST_FRAMES
+#define bcmolt_epon_path_10g_ds_stat_id_oam_bytes                                               BCMOLT_EPON_PATH_10G_DS_STAT_ID_OAM_BYTES
+#define bcmolt_epon_path_10g_ds_stat_id_oam_frames                                              BCMOLT_EPON_PATH_10G_DS_STAT_ID_OAM_FRAMES
+#define bcmolt_epon_path_10g_ds_stat_id_gate_frames                                             BCMOLT_EPON_PATH_10G_DS_STAT_ID_GATE_FRAMES
+#define bcmolt_epon_path_10g_ds_stat_id_mpcp_frames                                             BCMOLT_EPON_PATH_10G_DS_STAT_ID_MPCP_FRAMES
+#define bcmolt_epon_path_10g_ds_stat_id_abort_frames                                            BCMOLT_EPON_PATH_10G_DS_STAT_ID_ABORT_FRAMES
+#define bcmolt_epon_path_10g_ds_stat_id__num_of                                                 BCMOLT_EPON_PATH_10G_DS_STAT_ID__NUM_OF
+#define bcmolt_epon_path_10g_ds_stat_cfg_id_cfg                                                 BCMOLT_EPON_PATH_10G_DS_STAT_CFG_ID_CFG
+#define bcmolt_epon_path_10g_ds_stat_cfg_id__num_of                                             BCMOLT_EPON_PATH_10G_DS_STAT_CFG_ID__NUM_OF
+#define bcmolt_epon_path_10g_ds_stat_alarm_cleared_id_stat                                      BCMOLT_EPON_PATH_10G_DS_STAT_ALARM_CLEARED_ID_STAT
+#define bcmolt_epon_path_10g_ds_stat_alarm_cleared_id__num_of                                   BCMOLT_EPON_PATH_10G_DS_STAT_ALARM_CLEARED_ID__NUM_OF
+#define bcmolt_epon_path_10g_ds_stat_alarm_raised_id_stat                                       BCMOLT_EPON_PATH_10G_DS_STAT_ALARM_RAISED_ID_STAT
+#define bcmolt_epon_path_10g_ds_stat_alarm_raised_id__num_of                                    BCMOLT_EPON_PATH_10G_DS_STAT_ALARM_RAISED_ID__NUM_OF
+#define bcmolt_epon_path_10g_ds_auto_cfg_id_stat_alarm_cleared                                  BCMOLT_EPON_PATH_10G_DS_AUTO_CFG_ID_STAT_ALARM_CLEARED
+#define bcmolt_epon_path_10g_ds_auto_cfg_id_stat_alarm_raised                                   BCMOLT_EPON_PATH_10G_DS_AUTO_CFG_ID_STAT_ALARM_RAISED
+#define bcmolt_epon_path_10g_ds_auto_cfg_id__num_of                                             BCMOLT_EPON_PATH_10G_DS_AUTO_CFG_ID__NUM_OF
+#define bcmolt_epon_path_10g_us_key_id_epon_ni                                                  BCMOLT_EPON_PATH_10G_US_KEY_ID_EPON_NI
+#define bcmolt_epon_path_10g_us_key_id__num_of                                                  BCMOLT_EPON_PATH_10G_US_KEY_ID__NUM_OF
+#define bcmolt_epon_path_10g_us_cfg_id_fec_state                                                BCMOLT_EPON_PATH_10G_US_CFG_ID_FEC_STATE
+#define bcmolt_epon_path_10g_us_cfg_id_sync_time_tq                                             BCMOLT_EPON_PATH_10G_US_CFG_ID_SYNC_TIME_TQ
+#define bcmolt_epon_path_10g_us_cfg_id_prbs_checker                                             BCMOLT_EPON_PATH_10G_US_CFG_ID_PRBS_CHECKER
+#define bcmolt_epon_path_10g_us_cfg_id_prbs_status                                              BCMOLT_EPON_PATH_10G_US_CFG_ID_PRBS_STATUS
+#define bcmolt_epon_path_10g_us_cfg_id__num_of                                                  BCMOLT_EPON_PATH_10G_US_CFG_ID__NUM_OF
+#define bcmolt_epon_path_10g_us_stat_id_bytes                                                   BCMOLT_EPON_PATH_10G_US_STAT_ID_BYTES
+#define bcmolt_epon_path_10g_us_stat_id_frames                                                  BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES
+#define bcmolt_epon_path_10g_us_stat_id_frames_64                                               BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_64
+#define bcmolt_epon_path_10g_us_stat_id_frames_65_127                                           BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_65_127
+#define bcmolt_epon_path_10g_us_stat_id_frames_128_255                                          BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_128_255
+#define bcmolt_epon_path_10g_us_stat_id_frames_256_511                                          BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_256_511
+#define bcmolt_epon_path_10g_us_stat_id_frames_512_1023                                         BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_512_1023
+#define bcmolt_epon_path_10g_us_stat_id_frames_1024_1518                                        BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_1024_1518
+#define bcmolt_epon_path_10g_us_stat_id_frames_1519_2047                                        BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_1519_2047
+#define bcmolt_epon_path_10g_us_stat_id_frames_2048_4095                                        BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_2048_4095
+#define bcmolt_epon_path_10g_us_stat_id_frames_4096_9216                                        BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_4096_9216
+#define bcmolt_epon_path_10g_us_stat_id_frames_9217_16383                                       BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_9217_16383
+#define bcmolt_epon_path_10g_us_stat_id_broadcast_frames                                        BCMOLT_EPON_PATH_10G_US_STAT_ID_BROADCAST_FRAMES
+#define bcmolt_epon_path_10g_us_stat_id_data_bytes                                              BCMOLT_EPON_PATH_10G_US_STAT_ID_DATA_BYTES
+#define bcmolt_epon_path_10g_us_stat_id_multicast_frames                                        BCMOLT_EPON_PATH_10G_US_STAT_ID_MULTICAST_FRAMES
+#define bcmolt_epon_path_10g_us_stat_id_unicast_frames                                          BCMOLT_EPON_PATH_10G_US_STAT_ID_UNICAST_FRAMES
+#define bcmolt_epon_path_10g_us_stat_id_mpcp_frames                                             BCMOLT_EPON_PATH_10G_US_STAT_ID_MPCP_FRAMES
+#define bcmolt_epon_path_10g_us_stat_id_oam_bytes                                               BCMOLT_EPON_PATH_10G_US_STAT_ID_OAM_BYTES
+#define bcmolt_epon_path_10g_us_stat_id_oam_frames                                              BCMOLT_EPON_PATH_10G_US_STAT_ID_OAM_FRAMES
+#define bcmolt_epon_path_10g_us_stat_id_report_frames                                           BCMOLT_EPON_PATH_10G_US_STAT_ID_REPORT_FRAMES
+#define bcmolt_epon_path_10g_us_stat_id_abort_frames                                            BCMOLT_EPON_PATH_10G_US_STAT_ID_ABORT_FRAMES
+#define bcmolt_epon_path_10g_us_stat_id_fcs_error                                               BCMOLT_EPON_PATH_10G_US_STAT_ID_FCS_ERROR
+#define bcmolt_epon_path_10g_us_stat_id_crc_8_error                                             BCMOLT_EPON_PATH_10G_US_STAT_ID_CRC_8_ERROR
+#define bcmolt_epon_path_10g_us_stat_id_out_of_slot                                             BCMOLT_EPON_PATH_10G_US_STAT_ID_OUT_OF_SLOT
+#define bcmolt_epon_path_10g_us_stat_id_oversize_error                                          BCMOLT_EPON_PATH_10G_US_STAT_ID_OVERSIZE_ERROR
+#define bcmolt_epon_path_10g_us_stat_id_runt_error                                              BCMOLT_EPON_PATH_10G_US_STAT_ID_RUNT_ERROR
+#define bcmolt_epon_path_10g_us_stat_id__num_of                                                 BCMOLT_EPON_PATH_10G_US_STAT_ID__NUM_OF
+#define bcmolt_epon_path_10g_us_stat_cfg_id_cfg                                                 BCMOLT_EPON_PATH_10G_US_STAT_CFG_ID_CFG
+#define bcmolt_epon_path_10g_us_stat_cfg_id__num_of                                             BCMOLT_EPON_PATH_10G_US_STAT_CFG_ID__NUM_OF
+#define bcmolt_epon_path_10g_us_stat_alarm_cleared_id_stat                                      BCMOLT_EPON_PATH_10G_US_STAT_ALARM_CLEARED_ID_STAT
+#define bcmolt_epon_path_10g_us_stat_alarm_cleared_id__num_of                                   BCMOLT_EPON_PATH_10G_US_STAT_ALARM_CLEARED_ID__NUM_OF
+#define bcmolt_epon_path_10g_us_stat_alarm_raised_id_stat                                       BCMOLT_EPON_PATH_10G_US_STAT_ALARM_RAISED_ID_STAT
+#define bcmolt_epon_path_10g_us_stat_alarm_raised_id__num_of                                    BCMOLT_EPON_PATH_10G_US_STAT_ALARM_RAISED_ID__NUM_OF
+#define bcmolt_epon_path_10g_us_auto_cfg_id_stat_alarm_cleared                                  BCMOLT_EPON_PATH_10G_US_AUTO_CFG_ID_STAT_ALARM_CLEARED
+#define bcmolt_epon_path_10g_us_auto_cfg_id_stat_alarm_raised                                   BCMOLT_EPON_PATH_10G_US_AUTO_CFG_ID_STAT_ALARM_RAISED
+#define bcmolt_epon_path_10g_us_auto_cfg_id__num_of                                             BCMOLT_EPON_PATH_10G_US_AUTO_CFG_ID__NUM_OF
+#define bcmolt_epon_path_1g_ds_key_id_epon_ni                                                   BCMOLT_EPON_PATH_1G_DS_KEY_ID_EPON_NI
+#define bcmolt_epon_path_1g_ds_key_id__num_of                                                   BCMOLT_EPON_PATH_1G_DS_KEY_ID__NUM_OF
+#define bcmolt_epon_path_1g_ds_cfg_id_default_fec_state                                         BCMOLT_EPON_PATH_1G_DS_CFG_ID_DEFAULT_FEC_STATE
+#define bcmolt_epon_path_1g_ds_cfg_id_raman_mode                                                BCMOLT_EPON_PATH_1G_DS_CFG_ID_RAMAN_MODE
+#define bcmolt_epon_path_1g_ds_cfg_id_turbo_2g_mode                                             BCMOLT_EPON_PATH_1G_DS_CFG_ID_TURBO_2G_MODE
+#define bcmolt_epon_path_1g_ds_cfg_id_prbs_generator                                            BCMOLT_EPON_PATH_1G_DS_CFG_ID_PRBS_GENERATOR
+#define bcmolt_epon_path_1g_ds_cfg_id__num_of                                                   BCMOLT_EPON_PATH_1G_DS_CFG_ID__NUM_OF
+#define bcmolt_epon_path_1g_ds_stat_id_bytes                                                    BCMOLT_EPON_PATH_1G_DS_STAT_ID_BYTES
+#define bcmolt_epon_path_1g_ds_stat_id_frames                                                   BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES
+#define bcmolt_epon_path_1g_ds_stat_id_frames_64                                                BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_64
+#define bcmolt_epon_path_1g_ds_stat_id_frames_65_127                                            BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_65_127
+#define bcmolt_epon_path_1g_ds_stat_id_frames_128_255                                           BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_128_255
+#define bcmolt_epon_path_1g_ds_stat_id_frames_256_511                                           BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_256_511
+#define bcmolt_epon_path_1g_ds_stat_id_frames_512_1023                                          BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_512_1023
+#define bcmolt_epon_path_1g_ds_stat_id_frames_1024_1518                                         BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_1024_1518
+#define bcmolt_epon_path_1g_ds_stat_id_frames_1519_2047                                         BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_1519_2047
+#define bcmolt_epon_path_1g_ds_stat_id_frames_2048_4095                                         BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_2048_4095
+#define bcmolt_epon_path_1g_ds_stat_id_frames_4096_9216                                         BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_4096_9216
+#define bcmolt_epon_path_1g_ds_stat_id_frames_9217_16383                                        BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_9217_16383
+#define bcmolt_epon_path_1g_ds_stat_id_broadcast_frames                                         BCMOLT_EPON_PATH_1G_DS_STAT_ID_BROADCAST_FRAMES
+#define bcmolt_epon_path_1g_ds_stat_id_data_bytes                                               BCMOLT_EPON_PATH_1G_DS_STAT_ID_DATA_BYTES
+#define bcmolt_epon_path_1g_ds_stat_id_multicast_frames                                         BCMOLT_EPON_PATH_1G_DS_STAT_ID_MULTICAST_FRAMES
+#define bcmolt_epon_path_1g_ds_stat_id_unicast_frames                                           BCMOLT_EPON_PATH_1G_DS_STAT_ID_UNICAST_FRAMES
+#define bcmolt_epon_path_1g_ds_stat_id_oam_bytes                                                BCMOLT_EPON_PATH_1G_DS_STAT_ID_OAM_BYTES
+#define bcmolt_epon_path_1g_ds_stat_id_oam_frames                                               BCMOLT_EPON_PATH_1G_DS_STAT_ID_OAM_FRAMES
+#define bcmolt_epon_path_1g_ds_stat_id_gate_frames                                              BCMOLT_EPON_PATH_1G_DS_STAT_ID_GATE_FRAMES
+#define bcmolt_epon_path_1g_ds_stat_id_mpcp_frames                                              BCMOLT_EPON_PATH_1G_DS_STAT_ID_MPCP_FRAMES
+#define bcmolt_epon_path_1g_ds_stat_id_abort_frames                                             BCMOLT_EPON_PATH_1G_DS_STAT_ID_ABORT_FRAMES
+#define bcmolt_epon_path_1g_ds_stat_id__num_of                                                  BCMOLT_EPON_PATH_1G_DS_STAT_ID__NUM_OF
+#define bcmolt_epon_path_1g_ds_stat_cfg_id_cfg                                                  BCMOLT_EPON_PATH_1G_DS_STAT_CFG_ID_CFG
+#define bcmolt_epon_path_1g_ds_stat_cfg_id__num_of                                              BCMOLT_EPON_PATH_1G_DS_STAT_CFG_ID__NUM_OF
+#define bcmolt_epon_path_1g_ds_stat_alarm_cleared_id_stat                                       BCMOLT_EPON_PATH_1G_DS_STAT_ALARM_CLEARED_ID_STAT
+#define bcmolt_epon_path_1g_ds_stat_alarm_cleared_id__num_of                                    BCMOLT_EPON_PATH_1G_DS_STAT_ALARM_CLEARED_ID__NUM_OF
+#define bcmolt_epon_path_1g_ds_stat_alarm_raised_id_stat                                        BCMOLT_EPON_PATH_1G_DS_STAT_ALARM_RAISED_ID_STAT
+#define bcmolt_epon_path_1g_ds_stat_alarm_raised_id__num_of                                     BCMOLT_EPON_PATH_1G_DS_STAT_ALARM_RAISED_ID__NUM_OF
+#define bcmolt_epon_path_1g_ds_auto_cfg_id_stat_alarm_cleared                                   BCMOLT_EPON_PATH_1G_DS_AUTO_CFG_ID_STAT_ALARM_CLEARED
+#define bcmolt_epon_path_1g_ds_auto_cfg_id_stat_alarm_raised                                    BCMOLT_EPON_PATH_1G_DS_AUTO_CFG_ID_STAT_ALARM_RAISED
+#define bcmolt_epon_path_1g_ds_auto_cfg_id__num_of                                              BCMOLT_EPON_PATH_1G_DS_AUTO_CFG_ID__NUM_OF
+#define bcmolt_epon_path_1g_us_key_id_epon_ni                                                   BCMOLT_EPON_PATH_1G_US_KEY_ID_EPON_NI
+#define bcmolt_epon_path_1g_us_key_id__num_of                                                   BCMOLT_EPON_PATH_1G_US_KEY_ID__NUM_OF
+#define bcmolt_epon_path_1g_us_cfg_id_default_fec_state                                         BCMOLT_EPON_PATH_1G_US_CFG_ID_DEFAULT_FEC_STATE
+#define bcmolt_epon_path_1g_us_cfg_id_sync_time_tq                                              BCMOLT_EPON_PATH_1G_US_CFG_ID_SYNC_TIME_TQ
+#define bcmolt_epon_path_1g_us_cfg_id_prbs_checker                                              BCMOLT_EPON_PATH_1G_US_CFG_ID_PRBS_CHECKER
+#define bcmolt_epon_path_1g_us_cfg_id_prbs_status                                               BCMOLT_EPON_PATH_1G_US_CFG_ID_PRBS_STATUS
+#define bcmolt_epon_path_1g_us_cfg_id__num_of                                                   BCMOLT_EPON_PATH_1G_US_CFG_ID__NUM_OF
+#define bcmolt_epon_path_1g_us_stat_id_bytes                                                    BCMOLT_EPON_PATH_1G_US_STAT_ID_BYTES
+#define bcmolt_epon_path_1g_us_stat_id_frames                                                   BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES
+#define bcmolt_epon_path_1g_us_stat_id_frames_64                                                BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_64
+#define bcmolt_epon_path_1g_us_stat_id_frames_65_127                                            BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_65_127
+#define bcmolt_epon_path_1g_us_stat_id_frames_128_255                                           BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_128_255
+#define bcmolt_epon_path_1g_us_stat_id_frames_256_511                                           BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_256_511
+#define bcmolt_epon_path_1g_us_stat_id_frames_512_1023                                          BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_512_1023
+#define bcmolt_epon_path_1g_us_stat_id_frames_1024_1518                                         BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_1024_1518
+#define bcmolt_epon_path_1g_us_stat_id_frames_1519_2047                                         BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_1519_2047
+#define bcmolt_epon_path_1g_us_stat_id_frames_2048_4095                                         BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_2048_4095
+#define bcmolt_epon_path_1g_us_stat_id_frames_4096_9216                                         BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_4096_9216
+#define bcmolt_epon_path_1g_us_stat_id_frames_9217_16383                                        BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_9217_16383
+#define bcmolt_epon_path_1g_us_stat_id_broadcast_frames                                         BCMOLT_EPON_PATH_1G_US_STAT_ID_BROADCAST_FRAMES
+#define bcmolt_epon_path_1g_us_stat_id_data_bytes                                               BCMOLT_EPON_PATH_1G_US_STAT_ID_DATA_BYTES
+#define bcmolt_epon_path_1g_us_stat_id_multicast_frames                                         BCMOLT_EPON_PATH_1G_US_STAT_ID_MULTICAST_FRAMES
+#define bcmolt_epon_path_1g_us_stat_id_unicast_frames                                           BCMOLT_EPON_PATH_1G_US_STAT_ID_UNICAST_FRAMES
+#define bcmolt_epon_path_1g_us_stat_id_mpcp_frames                                              BCMOLT_EPON_PATH_1G_US_STAT_ID_MPCP_FRAMES
+#define bcmolt_epon_path_1g_us_stat_id_oam_bytes                                                BCMOLT_EPON_PATH_1G_US_STAT_ID_OAM_BYTES
+#define bcmolt_epon_path_1g_us_stat_id_oam_frames                                               BCMOLT_EPON_PATH_1G_US_STAT_ID_OAM_FRAMES
+#define bcmolt_epon_path_1g_us_stat_id_report_frames                                            BCMOLT_EPON_PATH_1G_US_STAT_ID_REPORT_FRAMES
+#define bcmolt_epon_path_1g_us_stat_id_abort_frames                                             BCMOLT_EPON_PATH_1G_US_STAT_ID_ABORT_FRAMES
+#define bcmolt_epon_path_1g_us_stat_id_fcs_error                                                BCMOLT_EPON_PATH_1G_US_STAT_ID_FCS_ERROR
+#define bcmolt_epon_path_1g_us_stat_id_crc_8_error                                              BCMOLT_EPON_PATH_1G_US_STAT_ID_CRC_8_ERROR
+#define bcmolt_epon_path_1g_us_stat_id_out_of_slot                                              BCMOLT_EPON_PATH_1G_US_STAT_ID_OUT_OF_SLOT
+#define bcmolt_epon_path_1g_us_stat_id_oversize_error                                           BCMOLT_EPON_PATH_1G_US_STAT_ID_OVERSIZE_ERROR
+#define bcmolt_epon_path_1g_us_stat_id_runt_error                                               BCMOLT_EPON_PATH_1G_US_STAT_ID_RUNT_ERROR
+#define bcmolt_epon_path_1g_us_stat_id__num_of                                                  BCMOLT_EPON_PATH_1G_US_STAT_ID__NUM_OF
+#define bcmolt_epon_path_1g_us_stat_cfg_id_cfg                                                  BCMOLT_EPON_PATH_1G_US_STAT_CFG_ID_CFG
+#define bcmolt_epon_path_1g_us_stat_cfg_id__num_of                                              BCMOLT_EPON_PATH_1G_US_STAT_CFG_ID__NUM_OF
+#define bcmolt_epon_path_1g_us_stat_alarm_cleared_id_stat                                       BCMOLT_EPON_PATH_1G_US_STAT_ALARM_CLEARED_ID_STAT
+#define bcmolt_epon_path_1g_us_stat_alarm_cleared_id__num_of                                    BCMOLT_EPON_PATH_1G_US_STAT_ALARM_CLEARED_ID__NUM_OF
+#define bcmolt_epon_path_1g_us_stat_alarm_raised_id_stat                                        BCMOLT_EPON_PATH_1G_US_STAT_ALARM_RAISED_ID_STAT
+#define bcmolt_epon_path_1g_us_stat_alarm_raised_id__num_of                                     BCMOLT_EPON_PATH_1G_US_STAT_ALARM_RAISED_ID__NUM_OF
+#define bcmolt_epon_path_1g_us_auto_cfg_id_stat_alarm_cleared                                   BCMOLT_EPON_PATH_1G_US_AUTO_CFG_ID_STAT_ALARM_CLEARED
+#define bcmolt_epon_path_1g_us_auto_cfg_id_stat_alarm_raised                                    BCMOLT_EPON_PATH_1G_US_AUTO_CFG_ID_STAT_ALARM_RAISED
+#define bcmolt_epon_path_1g_us_auto_cfg_id__num_of                                              BCMOLT_EPON_PATH_1G_US_AUTO_CFG_ID__NUM_OF
+#define bcmolt_epon_rp_key_id_epon_ni                                                           BCMOLT_EPON_RP_KEY_ID_EPON_NI
+#define bcmolt_epon_rp_key_id_link_rate                                                         BCMOLT_EPON_RP_KEY_ID_LINK_RATE
+#define bcmolt_epon_rp_key_id__num_of                                                           BCMOLT_EPON_RP_KEY_ID__NUM_OF
+#define bcmolt_epon_rp_cfg_id_base_llid                                                         BCMOLT_EPON_RP_CFG_ID_BASE_LLID
+#define bcmolt_epon_rp_cfg_id_mpcp_disc_en                                                      BCMOLT_EPON_RP_CFG_ID_MPCP_DISC_EN
+#define bcmolt_epon_rp_cfg_id_mpcp_disc_gnt_len_tq                                              BCMOLT_EPON_RP_CFG_ID_MPCP_DISC_GNT_LEN_TQ
+#define bcmolt_epon_rp_cfg_id_mpcp_report_timeout                                               BCMOLT_EPON_RP_CFG_ID_MPCP_REPORT_TIMEOUT
+#define bcmolt_epon_rp_cfg_id_max_mpcp_reg_per_disc_window                                      BCMOLT_EPON_RP_CFG_ID_MAX_MPCP_REG_PER_DISC_WINDOW
+#define bcmolt_epon_rp_cfg_id_max_links                                                         BCMOLT_EPON_RP_CFG_ID_MAX_LINKS
+#define bcmolt_epon_rp_cfg_id_default_upstream_bandwidth                                        BCMOLT_EPON_RP_CFG_ID_DEFAULT_UPSTREAM_BANDWIDTH
+#define bcmolt_epon_rp_cfg_id_rate_of_refraction                                                BCMOLT_EPON_RP_CFG_ID_RATE_OF_REFRACTION
+#define bcmolt_epon_rp_cfg_id__num_of                                                           BCMOLT_EPON_RP_CFG_ID__NUM_OF
+#define bcmolt_gpio_key_id_reserved                                                             BCMOLT_GPIO_KEY_ID_RESERVED
+#define bcmolt_gpio_key_id_gpio_id                                                              BCMOLT_GPIO_KEY_ID_GPIO_ID
+#define bcmolt_gpio_key_id__num_of                                                              BCMOLT_GPIO_KEY_ID__NUM_OF
+#define bcmolt_gpio_cfg_id_direction                                                            BCMOLT_GPIO_CFG_ID_DIRECTION
+#define bcmolt_gpio_cfg_id_value                                                                BCMOLT_GPIO_CFG_ID_VALUE
+#define bcmolt_gpio_cfg_id__num_of                                                              BCMOLT_GPIO_CFG_ID__NUM_OF
+#define bcmolt_gpon_alloc_key_id_pon_ni                                                         BCMOLT_GPON_ALLOC_KEY_ID_PON_NI
+#define bcmolt_gpon_alloc_key_id_alloc_id                                                       BCMOLT_GPON_ALLOC_KEY_ID_ALLOC_ID
+#define bcmolt_gpon_alloc_key_id__num_of                                                        BCMOLT_GPON_ALLOC_KEY_ID__NUM_OF
+#define bcmolt_gpon_alloc_cfg_id_state                                                          BCMOLT_GPON_ALLOC_CFG_ID_STATE
+#define bcmolt_gpon_alloc_cfg_id_sla                                                            BCMOLT_GPON_ALLOC_CFG_ID_SLA
+#define bcmolt_gpon_alloc_cfg_id_onu_id                                                         BCMOLT_GPON_ALLOC_CFG_ID_ONU_ID
+#define bcmolt_gpon_alloc_cfg_id_collect_stats                                                  BCMOLT_GPON_ALLOC_CFG_ID_COLLECT_STATS
+#define bcmolt_gpon_alloc_cfg_id__num_of                                                        BCMOLT_GPON_ALLOC_CFG_ID__NUM_OF
+#define bcmolt_gpon_alloc_stat_id_rx_bytes                                                      BCMOLT_GPON_ALLOC_STAT_ID_RX_BYTES
+#define bcmolt_gpon_alloc_stat_id__num_of                                                       BCMOLT_GPON_ALLOC_STAT_ID__NUM_OF
+#define bcmolt_gpon_alloc_stat_cfg_id_cfg                                                       BCMOLT_GPON_ALLOC_STAT_CFG_ID_CFG
+#define bcmolt_gpon_alloc_stat_cfg_id__num_of                                                   BCMOLT_GPON_ALLOC_STAT_CFG_ID__NUM_OF
+#define bcmolt_gpon_alloc_configuration_completed_id_status                                     BCMOLT_GPON_ALLOC_CONFIGURATION_COMPLETED_ID_STATUS
+#define bcmolt_gpon_alloc_configuration_completed_id_new_state                                  BCMOLT_GPON_ALLOC_CONFIGURATION_COMPLETED_ID_NEW_STATE
+#define bcmolt_gpon_alloc_configuration_completed_id__num_of                                    BCMOLT_GPON_ALLOC_CONFIGURATION_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_alloc_get_alloc_stats_completed_id_status                                   BCMOLT_GPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_STATUS
+#define bcmolt_gpon_alloc_get_alloc_stats_completed_id_average_nsr_used                         BCMOLT_GPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_AVERAGE_NSR_USED
+#define bcmolt_gpon_alloc_get_alloc_stats_completed_id_average_nsr_allocated                    BCMOLT_GPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_AVERAGE_NSR_ALLOCATED
+#define bcmolt_gpon_alloc_get_alloc_stats_completed_id_average_sr_report                        BCMOLT_GPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_AVERAGE_SR_REPORT
+#define bcmolt_gpon_alloc_get_alloc_stats_completed_id__num_of                                  BCMOLT_GPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_alloc_stat_alarm_cleared_id_stat                                            BCMOLT_GPON_ALLOC_STAT_ALARM_CLEARED_ID_STAT
+#define bcmolt_gpon_alloc_stat_alarm_cleared_id__num_of                                         BCMOLT_GPON_ALLOC_STAT_ALARM_CLEARED_ID__NUM_OF
+#define bcmolt_gpon_alloc_stat_alarm_raised_id_stat                                             BCMOLT_GPON_ALLOC_STAT_ALARM_RAISED_ID_STAT
+#define bcmolt_gpon_alloc_stat_alarm_raised_id__num_of                                          BCMOLT_GPON_ALLOC_STAT_ALARM_RAISED_ID__NUM_OF
+#define bcmolt_gpon_alloc_auto_cfg_id_configuration_completed                                   BCMOLT_GPON_ALLOC_AUTO_CFG_ID_CONFIGURATION_COMPLETED
+#define bcmolt_gpon_alloc_auto_cfg_id_get_alloc_stats_completed                                 BCMOLT_GPON_ALLOC_AUTO_CFG_ID_GET_ALLOC_STATS_COMPLETED
+#define bcmolt_gpon_alloc_auto_cfg_id_stat_alarm_cleared                                        BCMOLT_GPON_ALLOC_AUTO_CFG_ID_STAT_ALARM_CLEARED
+#define bcmolt_gpon_alloc_auto_cfg_id_stat_alarm_raised                                         BCMOLT_GPON_ALLOC_AUTO_CFG_ID_STAT_ALARM_RAISED
+#define bcmolt_gpon_alloc_auto_cfg_id__num_of                                                   BCMOLT_GPON_ALLOC_AUTO_CFG_ID__NUM_OF
+#define bcmolt_gpon_alloc_get_stats_id_num_of_cycles                                            BCMOLT_GPON_ALLOC_GET_STATS_ID_NUM_OF_CYCLES
+#define bcmolt_gpon_alloc_get_stats_id__num_of                                                  BCMOLT_GPON_ALLOC_GET_STATS_ID__NUM_OF
+#define bcmolt_gpon_alloc_set_state_id_state                                                    BCMOLT_GPON_ALLOC_SET_STATE_ID_STATE
+#define bcmolt_gpon_alloc_set_state_id__num_of                                                  BCMOLT_GPON_ALLOC_SET_STATE_ID__NUM_OF
+#define bcmolt_gpon_gem_port_key_id_pon_ni                                                      BCMOLT_GPON_GEM_PORT_KEY_ID_PON_NI
+#define bcmolt_gpon_gem_port_key_id_gem_port_id                                                 BCMOLT_GPON_GEM_PORT_KEY_ID_GEM_PORT_ID
+#define bcmolt_gpon_gem_port_key_id__num_of                                                     BCMOLT_GPON_GEM_PORT_KEY_ID__NUM_OF
+#define bcmolt_gpon_gem_port_cfg_id_configuration                                               BCMOLT_GPON_GEM_PORT_CFG_ID_CONFIGURATION
+#define bcmolt_gpon_gem_port_cfg_id_onu_id                                                      BCMOLT_GPON_GEM_PORT_CFG_ID_ONU_ID
+#define bcmolt_gpon_gem_port_cfg_id_gem_port_state                                              BCMOLT_GPON_GEM_PORT_CFG_ID_GEM_PORT_STATE
+#define bcmolt_gpon_gem_port_cfg_id_downstream_encryption_mode                                  BCMOLT_GPON_GEM_PORT_CFG_ID_DOWNSTREAM_ENCRYPTION_MODE
+#define bcmolt_gpon_gem_port_cfg_id_upstream_destination_queue                                  BCMOLT_GPON_GEM_PORT_CFG_ID_UPSTREAM_DESTINATION_QUEUE
+#define bcmolt_gpon_gem_port_cfg_id_control                                                     BCMOLT_GPON_GEM_PORT_CFG_ID_CONTROL
+#define bcmolt_gpon_gem_port_cfg_id_debug_flow_config                                           BCMOLT_GPON_GEM_PORT_CFG_ID_DEBUG_FLOW_CONFIG
+#define bcmolt_gpon_gem_port_cfg_id_mac_table_entry_limit                                       BCMOLT_GPON_GEM_PORT_CFG_ID_MAC_TABLE_ENTRY_LIMIT
+#define bcmolt_gpon_gem_port_cfg_id__num_of                                                     BCMOLT_GPON_GEM_PORT_CFG_ID__NUM_OF
+#define bcmolt_gpon_gem_port_stat_id_rx_packets                                                 BCMOLT_GPON_GEM_PORT_STAT_ID_RX_PACKETS
+#define bcmolt_gpon_gem_port_stat_id_rx_bytes                                                   BCMOLT_GPON_GEM_PORT_STAT_ID_RX_BYTES
+#define bcmolt_gpon_gem_port_stat_id_tx_packets                                                 BCMOLT_GPON_GEM_PORT_STAT_ID_TX_PACKETS
+#define bcmolt_gpon_gem_port_stat_id_tx_bytes                                                   BCMOLT_GPON_GEM_PORT_STAT_ID_TX_BYTES
+#define bcmolt_gpon_gem_port_stat_id__num_of                                                    BCMOLT_GPON_GEM_PORT_STAT_ID__NUM_OF
+#define bcmolt_gpon_gem_port_stat_cfg_id_cfg                                                    BCMOLT_GPON_GEM_PORT_STAT_CFG_ID_CFG
+#define bcmolt_gpon_gem_port_stat_cfg_id__num_of                                                BCMOLT_GPON_GEM_PORT_STAT_CFG_ID__NUM_OF
+#define bcmolt_gpon_gem_port_configuration_completed_id_status                                  BCMOLT_GPON_GEM_PORT_CONFIGURATION_COMPLETED_ID_STATUS
+#define bcmolt_gpon_gem_port_configuration_completed_id_new_state                               BCMOLT_GPON_GEM_PORT_CONFIGURATION_COMPLETED_ID_NEW_STATE
+#define bcmolt_gpon_gem_port_configuration_completed_id__num_of                                 BCMOLT_GPON_GEM_PORT_CONFIGURATION_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_gem_port_stat_alarm_cleared_id_stat                                         BCMOLT_GPON_GEM_PORT_STAT_ALARM_CLEARED_ID_STAT
+#define bcmolt_gpon_gem_port_stat_alarm_cleared_id__num_of                                      BCMOLT_GPON_GEM_PORT_STAT_ALARM_CLEARED_ID__NUM_OF
+#define bcmolt_gpon_gem_port_stat_alarm_raised_id_stat                                          BCMOLT_GPON_GEM_PORT_STAT_ALARM_RAISED_ID_STAT
+#define bcmolt_gpon_gem_port_stat_alarm_raised_id__num_of                                       BCMOLT_GPON_GEM_PORT_STAT_ALARM_RAISED_ID__NUM_OF
+#define bcmolt_gpon_gem_port_auto_cfg_id_configuration_completed                                BCMOLT_GPON_GEM_PORT_AUTO_CFG_ID_CONFIGURATION_COMPLETED
+#define bcmolt_gpon_gem_port_auto_cfg_id_stat_alarm_cleared                                     BCMOLT_GPON_GEM_PORT_AUTO_CFG_ID_STAT_ALARM_CLEARED
+#define bcmolt_gpon_gem_port_auto_cfg_id_stat_alarm_raised                                      BCMOLT_GPON_GEM_PORT_AUTO_CFG_ID_STAT_ALARM_RAISED
+#define bcmolt_gpon_gem_port_auto_cfg_id__num_of                                                BCMOLT_GPON_GEM_PORT_AUTO_CFG_ID__NUM_OF
+#define bcmolt_gpon_gem_port_set_state_id_state                                                 BCMOLT_GPON_GEM_PORT_SET_STATE_ID_STATE
+#define bcmolt_gpon_gem_port_set_state_id__num_of                                               BCMOLT_GPON_GEM_PORT_SET_STATE_ID__NUM_OF
+#define bcmolt_gpon_iwf_key_id_pon_ni                                                           BCMOLT_GPON_IWF_KEY_ID_PON_NI
+#define bcmolt_gpon_iwf_key_id__num_of                                                          BCMOLT_GPON_IWF_KEY_ID__NUM_OF
+#define bcmolt_gpon_iwf_cfg_id_iwf_mode                                                         BCMOLT_GPON_IWF_CFG_ID_IWF_MODE
+#define bcmolt_gpon_iwf_cfg_id_us_tpid_per_flow                                                 BCMOLT_GPON_IWF_CFG_ID_US_TPID_PER_FLOW
+#define bcmolt_gpon_iwf_cfg_id_us_otag_direct_tpid                                              BCMOLT_GPON_IWF_CFG_ID_US_OTAG_DIRECT_TPID
+#define bcmolt_gpon_iwf_cfg_id_us_otag_direct_pbit                                              BCMOLT_GPON_IWF_CFG_ID_US_OTAG_DIRECT_PBIT
+#define bcmolt_gpon_iwf_cfg_id_ds_tpid                                                          BCMOLT_GPON_IWF_CFG_ID_DS_TPID
+#define bcmolt_gpon_iwf_cfg_id_mac_table_configuration                                          BCMOLT_GPON_IWF_CFG_ID_MAC_TABLE_CONFIGURATION
+#define bcmolt_gpon_iwf_cfg_id_debug_flow_configuration                                         BCMOLT_GPON_IWF_CFG_ID_DEBUG_FLOW_CONFIGURATION
+#define bcmolt_gpon_iwf_cfg_id_mac_table_count                                                  BCMOLT_GPON_IWF_CFG_ID_MAC_TABLE_COUNT
+#define bcmolt_gpon_iwf_cfg_id_forbidden_vlan_flow_gem_range_start                              BCMOLT_GPON_IWF_CFG_ID_FORBIDDEN_VLAN_FLOW_GEM_RANGE_START
+#define bcmolt_gpon_iwf_cfg_id__num_of                                                          BCMOLT_GPON_IWF_CFG_ID__NUM_OF
+#define bcmolt_gpon_iwf_stat_id_ds_hit_event                                                    BCMOLT_GPON_IWF_STAT_ID_DS_HIT_EVENT
+#define bcmolt_gpon_iwf_stat_id_ds_miss_event                                                   BCMOLT_GPON_IWF_STAT_ID_DS_MISS_EVENT
+#define bcmolt_gpon_iwf_stat_id_ds_drop_due_to_miss_event                                       BCMOLT_GPON_IWF_STAT_ID_DS_DROP_DUE_TO_MISS_EVENT
+#define bcmolt_gpon_iwf_stat_id_ds_drop_due_to_hit_event                                        BCMOLT_GPON_IWF_STAT_ID_DS_DROP_DUE_TO_HIT_EVENT
+#define bcmolt_gpon_iwf_stat_id_ds_drop_to_disabled_gem                                         BCMOLT_GPON_IWF_STAT_ID_DS_DROP_TO_DISABLED_GEM
+#define bcmolt_gpon_iwf_stat_id_new_mac_discovered                                              BCMOLT_GPON_IWF_STAT_ID_NEW_MAC_DISCOVERED
+#define bcmolt_gpon_iwf_stat_id_move_event                                                      BCMOLT_GPON_IWF_STAT_ID_MOVE_EVENT
+#define bcmolt_gpon_iwf_stat_id_new_mac_drop_due_to_fifo_full                                   BCMOLT_GPON_IWF_STAT_ID_NEW_MAC_DROP_DUE_TO_FIFO_FULL
+#define bcmolt_gpon_iwf_stat_id__num_of                                                         BCMOLT_GPON_IWF_STAT_ID__NUM_OF
+#define bcmolt_gpon_iwf_stat_cfg_id_cfg                                                         BCMOLT_GPON_IWF_STAT_CFG_ID_CFG
+#define bcmolt_gpon_iwf_stat_cfg_id__num_of                                                     BCMOLT_GPON_IWF_STAT_CFG_ID__NUM_OF
+#define bcmolt_gpon_iwf_flush_mac_table_completed_id__num_of                                    BCMOLT_GPON_IWF_FLUSH_MAC_TABLE_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_iwf_scan_mac_table_completed_id_mac_address                                 BCMOLT_GPON_IWF_SCAN_MAC_TABLE_COMPLETED_ID_MAC_ADDRESS
+#define bcmolt_gpon_iwf_scan_mac_table_completed_id_entries                                     BCMOLT_GPON_IWF_SCAN_MAC_TABLE_COMPLETED_ID_ENTRIES
+#define bcmolt_gpon_iwf_scan_mac_table_completed_id__num_of                                     BCMOLT_GPON_IWF_SCAN_MAC_TABLE_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_iwf_stat_alarm_cleared_id_stat                                              BCMOLT_GPON_IWF_STAT_ALARM_CLEARED_ID_STAT
+#define bcmolt_gpon_iwf_stat_alarm_cleared_id__num_of                                           BCMOLT_GPON_IWF_STAT_ALARM_CLEARED_ID__NUM_OF
+#define bcmolt_gpon_iwf_stat_alarm_raised_id_stat                                               BCMOLT_GPON_IWF_STAT_ALARM_RAISED_ID_STAT
+#define bcmolt_gpon_iwf_stat_alarm_raised_id__num_of                                            BCMOLT_GPON_IWF_STAT_ALARM_RAISED_ID__NUM_OF
+#define bcmolt_gpon_iwf_auto_cfg_id_flush_mac_table_completed                                   BCMOLT_GPON_IWF_AUTO_CFG_ID_FLUSH_MAC_TABLE_COMPLETED
+#define bcmolt_gpon_iwf_auto_cfg_id_scan_mac_table_completed                                    BCMOLT_GPON_IWF_AUTO_CFG_ID_SCAN_MAC_TABLE_COMPLETED
+#define bcmolt_gpon_iwf_auto_cfg_id_stat_alarm_cleared                                          BCMOLT_GPON_IWF_AUTO_CFG_ID_STAT_ALARM_CLEARED
+#define bcmolt_gpon_iwf_auto_cfg_id_stat_alarm_raised                                           BCMOLT_GPON_IWF_AUTO_CFG_ID_STAT_ALARM_RAISED
+#define bcmolt_gpon_iwf_auto_cfg_id__num_of                                                     BCMOLT_GPON_IWF_AUTO_CFG_ID__NUM_OF
+#define bcmolt_gpon_iwf_flush_mac_table_id_control                                              BCMOLT_GPON_IWF_FLUSH_MAC_TABLE_ID_CONTROL
+#define bcmolt_gpon_iwf_flush_mac_table_id_vid                                                  BCMOLT_GPON_IWF_FLUSH_MAC_TABLE_ID_VID
+#define bcmolt_gpon_iwf_flush_mac_table_id_flow_id                                              BCMOLT_GPON_IWF_FLUSH_MAC_TABLE_ID_FLOW_ID
+#define bcmolt_gpon_iwf_flush_mac_table_id__num_of                                              BCMOLT_GPON_IWF_FLUSH_MAC_TABLE_ID__NUM_OF
+#define bcmolt_gpon_iwf_scan_mac_table_id_mac_address                                           BCMOLT_GPON_IWF_SCAN_MAC_TABLE_ID_MAC_ADDRESS
+#define bcmolt_gpon_iwf_scan_mac_table_id__num_of                                               BCMOLT_GPON_IWF_SCAN_MAC_TABLE_ID__NUM_OF
+#define bcmolt_gpon_iwf_ds_egress_flow_key_id_pon_ni                                            BCMOLT_GPON_IWF_DS_EGRESS_FLOW_KEY_ID_PON_NI
+#define bcmolt_gpon_iwf_ds_egress_flow_key_id_flow_id                                           BCMOLT_GPON_IWF_DS_EGRESS_FLOW_KEY_ID_FLOW_ID
+#define bcmolt_gpon_iwf_ds_egress_flow_key_id__num_of                                           BCMOLT_GPON_IWF_DS_EGRESS_FLOW_KEY_ID__NUM_OF
+#define bcmolt_gpon_iwf_ds_egress_flow_cfg_id_gem_port                                          BCMOLT_GPON_IWF_DS_EGRESS_FLOW_CFG_ID_GEM_PORT
+#define bcmolt_gpon_iwf_ds_egress_flow_cfg_id_pbit_control                                      BCMOLT_GPON_IWF_DS_EGRESS_FLOW_CFG_ID_PBIT_CONTROL
+#define bcmolt_gpon_iwf_ds_egress_flow_cfg_id__num_of                                           BCMOLT_GPON_IWF_DS_EGRESS_FLOW_CFG_ID__NUM_OF
+#define bcmolt_gpon_iwf_ds_ingress_flow_key_id_pon_ni                                           BCMOLT_GPON_IWF_DS_INGRESS_FLOW_KEY_ID_PON_NI
+#define bcmolt_gpon_iwf_ds_ingress_flow_key_id_vlan_id                                          BCMOLT_GPON_IWF_DS_INGRESS_FLOW_KEY_ID_VLAN_ID
+#define bcmolt_gpon_iwf_ds_ingress_flow_key_id__num_of                                          BCMOLT_GPON_IWF_DS_INGRESS_FLOW_KEY_ID__NUM_OF
+#define bcmolt_gpon_iwf_ds_ingress_flow_cfg_id_mapping_method                                   BCMOLT_GPON_IWF_DS_INGRESS_FLOW_CFG_ID_MAPPING_METHOD
+#define bcmolt_gpon_iwf_ds_ingress_flow_cfg_id_mapping_tag                                      BCMOLT_GPON_IWF_DS_INGRESS_FLOW_CFG_ID_MAPPING_TAG
+#define bcmolt_gpon_iwf_ds_ingress_flow_cfg_id_vlan_action                                      BCMOLT_GPON_IWF_DS_INGRESS_FLOW_CFG_ID_VLAN_ACTION
+#define bcmolt_gpon_iwf_ds_ingress_flow_cfg_id__num_of                                          BCMOLT_GPON_IWF_DS_INGRESS_FLOW_CFG_ID__NUM_OF
+#define bcmolt_gpon_iwf_mac_table_key_id_pon_ni                                                 BCMOLT_GPON_IWF_MAC_TABLE_KEY_ID_PON_NI
+#define bcmolt_gpon_iwf_mac_table_key_id_mac_address                                            BCMOLT_GPON_IWF_MAC_TABLE_KEY_ID_MAC_ADDRESS
+#define bcmolt_gpon_iwf_mac_table_key_id_vlan                                                   BCMOLT_GPON_IWF_MAC_TABLE_KEY_ID_VLAN
+#define bcmolt_gpon_iwf_mac_table_key_id__num_of                                                BCMOLT_GPON_IWF_MAC_TABLE_KEY_ID__NUM_OF
+#define bcmolt_gpon_iwf_mac_table_cfg_id_flow_id                                                BCMOLT_GPON_IWF_MAC_TABLE_CFG_ID_FLOW_ID
+#define bcmolt_gpon_iwf_mac_table_cfg_id_stat                                                   BCMOLT_GPON_IWF_MAC_TABLE_CFG_ID_STAT
+#define bcmolt_gpon_iwf_mac_table_cfg_id_gem_port_id                                            BCMOLT_GPON_IWF_MAC_TABLE_CFG_ID_GEM_PORT_ID
+#define bcmolt_gpon_iwf_mac_table_cfg_id_onu_id                                                 BCMOLT_GPON_IWF_MAC_TABLE_CFG_ID_ONU_ID
+#define bcmolt_gpon_iwf_mac_table_cfg_id__num_of                                                BCMOLT_GPON_IWF_MAC_TABLE_CFG_ID__NUM_OF
+#define bcmolt_gpon_iwf_mac_table_mac_aged_id__num_of                                           BCMOLT_GPON_IWF_MAC_TABLE_MAC_AGED_ID__NUM_OF
+#define bcmolt_gpon_iwf_mac_table_mac_dropped_id_flow_id                                        BCMOLT_GPON_IWF_MAC_TABLE_MAC_DROPPED_ID_FLOW_ID
+#define bcmolt_gpon_iwf_mac_table_mac_dropped_id__num_of                                        BCMOLT_GPON_IWF_MAC_TABLE_MAC_DROPPED_ID__NUM_OF
+#define bcmolt_gpon_iwf_mac_table_mac_move_id_old_flow_id                                       BCMOLT_GPON_IWF_MAC_TABLE_MAC_MOVE_ID_OLD_FLOW_ID
+#define bcmolt_gpon_iwf_mac_table_mac_move_id_new_flow_id                                       BCMOLT_GPON_IWF_MAC_TABLE_MAC_MOVE_ID_NEW_FLOW_ID
+#define bcmolt_gpon_iwf_mac_table_mac_move_id__num_of                                           BCMOLT_GPON_IWF_MAC_TABLE_MAC_MOVE_ID__NUM_OF
+#define bcmolt_gpon_iwf_mac_table_new_mac_id_flow_id                                            BCMOLT_GPON_IWF_MAC_TABLE_NEW_MAC_ID_FLOW_ID
+#define bcmolt_gpon_iwf_mac_table_new_mac_id__num_of                                            BCMOLT_GPON_IWF_MAC_TABLE_NEW_MAC_ID__NUM_OF
+#define bcmolt_gpon_iwf_mac_table_auto_cfg_id_mac_aged                                          BCMOLT_GPON_IWF_MAC_TABLE_AUTO_CFG_ID_MAC_AGED
+#define bcmolt_gpon_iwf_mac_table_auto_cfg_id_mac_dropped                                       BCMOLT_GPON_IWF_MAC_TABLE_AUTO_CFG_ID_MAC_DROPPED
+#define bcmolt_gpon_iwf_mac_table_auto_cfg_id_mac_move                                          BCMOLT_GPON_IWF_MAC_TABLE_AUTO_CFG_ID_MAC_MOVE
+#define bcmolt_gpon_iwf_mac_table_auto_cfg_id_new_mac                                           BCMOLT_GPON_IWF_MAC_TABLE_AUTO_CFG_ID_NEW_MAC
+#define bcmolt_gpon_iwf_mac_table_auto_cfg_id__num_of                                           BCMOLT_GPON_IWF_MAC_TABLE_AUTO_CFG_ID__NUM_OF
+#define bcmolt_gpon_iwf_us_flow_key_id_pon_ni                                                   BCMOLT_GPON_IWF_US_FLOW_KEY_ID_PON_NI
+#define bcmolt_gpon_iwf_us_flow_key_id_gem_port_id                                              BCMOLT_GPON_IWF_US_FLOW_KEY_ID_GEM_PORT_ID
+#define bcmolt_gpon_iwf_us_flow_key_id__num_of                                                  BCMOLT_GPON_IWF_US_FLOW_KEY_ID__NUM_OF
+#define bcmolt_gpon_iwf_us_flow_cfg_id_flow_id                                                  BCMOLT_GPON_IWF_US_FLOW_CFG_ID_FLOW_ID
+#define bcmolt_gpon_iwf_us_flow_cfg_id_mac_learning                                             BCMOLT_GPON_IWF_US_FLOW_CFG_ID_MAC_LEARNING
+#define bcmolt_gpon_iwf_us_flow_cfg_id_vlan_action                                              BCMOLT_GPON_IWF_US_FLOW_CFG_ID_VLAN_ACTION
+#define bcmolt_gpon_iwf_us_flow_cfg_id_vlan_tag                                                 BCMOLT_GPON_IWF_US_FLOW_CFG_ID_VLAN_TAG
+#define bcmolt_gpon_iwf_us_flow_cfg_id_tpid_index                                               BCMOLT_GPON_IWF_US_FLOW_CFG_ID_TPID_INDEX
+#define bcmolt_gpon_iwf_us_flow_cfg_id__num_of                                                  BCMOLT_GPON_IWF_US_FLOW_CFG_ID__NUM_OF
+#define bcmolt_gpon_ni_key_id_pon_ni                                                            BCMOLT_GPON_NI_KEY_ID_PON_NI
+#define bcmolt_gpon_ni_key_id__num_of                                                           BCMOLT_GPON_NI_KEY_ID__NUM_OF
+#define bcmolt_gpon_ni_cfg_id_pon_status                                                        BCMOLT_GPON_NI_CFG_ID_PON_STATUS
+#define bcmolt_gpon_ni_cfg_id_available_bandwidth                                               BCMOLT_GPON_NI_CFG_ID_AVAILABLE_BANDWIDTH
+#define bcmolt_gpon_ni_cfg_id_number_of_active_onus                                             BCMOLT_GPON_NI_CFG_ID_NUMBER_OF_ACTIVE_ONUS
+#define bcmolt_gpon_ni_cfg_id_number_of_active_standby_onus                                     BCMOLT_GPON_NI_CFG_ID_NUMBER_OF_ACTIVE_STANDBY_ONUS
+#define bcmolt_gpon_ni_cfg_id_prbs_status                                                       BCMOLT_GPON_NI_CFG_ID_PRBS_STATUS
+#define bcmolt_gpon_ni_cfg_id_pon_distance                                                      BCMOLT_GPON_NI_CFG_ID_PON_DISTANCE
+#define bcmolt_gpon_ni_cfg_id_ranging_window_size                                               BCMOLT_GPON_NI_CFG_ID_RANGING_WINDOW_SIZE
+#define bcmolt_gpon_ni_cfg_id_preassigned_equalization_delay                                    BCMOLT_GPON_NI_CFG_ID_PREASSIGNED_EQUALIZATION_DELAY
+#define bcmolt_gpon_ni_cfg_id_eqd_cycles_number                                                 BCMOLT_GPON_NI_CFG_ID_EQD_CYCLES_NUMBER
+#define bcmolt_gpon_ni_cfg_id_power_level                                                       BCMOLT_GPON_NI_CFG_ID_POWER_LEVEL
+#define bcmolt_gpon_ni_cfg_id_ds_fec_mode                                                       BCMOLT_GPON_NI_CFG_ID_DS_FEC_MODE
+#define bcmolt_gpon_ni_cfg_id_drift_control                                                     BCMOLT_GPON_NI_CFG_ID_DRIFT_CONTROL
+#define bcmolt_gpon_ni_cfg_id_ds_ber_reporting_interval                                         BCMOLT_GPON_NI_CFG_ID_DS_BER_REPORTING_INTERVAL
+#define bcmolt_gpon_ni_cfg_id_los_alarm_threshold                                               BCMOLT_GPON_NI_CFG_ID_LOS_ALARM_THRESHOLD
+#define bcmolt_gpon_ni_cfg_id_los_initial_value                                                 BCMOLT_GPON_NI_CFG_ID_LOS_INITIAL_VALUE
+#define bcmolt_gpon_ni_cfg_id_onu_alarms_thresholds                                             BCMOLT_GPON_NI_CFG_ID_ONU_ALARMS_THRESHOLDS
+#define bcmolt_gpon_ni_cfg_id_ber_monitor                                                       BCMOLT_GPON_NI_CFG_ID_BER_MONITOR
+#define bcmolt_gpon_ni_cfg_id_ploam_ack_timeout                                                 BCMOLT_GPON_NI_CFG_ID_PLOAM_ACK_TIMEOUT
+#define bcmolt_gpon_ni_cfg_id_onu_activation                                                    BCMOLT_GPON_NI_CFG_ID_ONU_ACTIVATION
+#define bcmolt_gpon_ni_cfg_id_sn_acquisition                                                    BCMOLT_GPON_NI_CFG_ID_SN_ACQUISITION
+#define bcmolt_gpon_ni_cfg_id_key_exchange                                                      BCMOLT_GPON_NI_CFG_ID_KEY_EXCHANGE
+#define bcmolt_gpon_ni_cfg_id_protection_switching                                              BCMOLT_GPON_NI_CFG_ID_PROTECTION_SWITCHING
+#define bcmolt_gpon_ni_cfg_id_cbr_rt_allocation_profile                                         BCMOLT_GPON_NI_CFG_ID_CBR_RT_ALLOCATION_PROFILE
+#define bcmolt_gpon_ni_cfg_id_cbr_nrt_allocation_profile                                        BCMOLT_GPON_NI_CFG_ID_CBR_NRT_ALLOCATION_PROFILE
+#define bcmolt_gpon_ni_cfg_id_dba                                                               BCMOLT_GPON_NI_CFG_ID_DBA
+#define bcmolt_gpon_ni_cfg_id_power_management                                                  BCMOLT_GPON_NI_CFG_ID_POWER_MANAGEMENT
+#define bcmolt_gpon_ni_cfg_id_rogue_onu_detection_process                                       BCMOLT_GPON_NI_CFG_ID_ROGUE_ONU_DETECTION_PROCESS
+#define bcmolt_gpon_ni_cfg_id_periodic_standby_pon_monitoring                                   BCMOLT_GPON_NI_CFG_ID_PERIODIC_STANDBY_PON_MONITORING
+#define bcmolt_gpon_ni_cfg_id_prbs_checker                                                      BCMOLT_GPON_NI_CFG_ID_PRBS_CHECKER
+#define bcmolt_gpon_ni_cfg_id_prbs_generator                                                    BCMOLT_GPON_NI_CFG_ID_PRBS_GENERATOR
+#define bcmolt_gpon_ni_cfg_id_min_data_alloc_id                                                 BCMOLT_GPON_NI_CFG_ID_MIN_DATA_ALLOC_ID
+#define bcmolt_gpon_ni_cfg_id_automatic_onu_deactivation                                        BCMOLT_GPON_NI_CFG_ID_AUTOMATIC_ONU_DEACTIVATION
+#define bcmolt_gpon_ni_cfg_id_us_bandwidth_limit                                                BCMOLT_GPON_NI_CFG_ID_US_BANDWIDTH_LIMIT
+#define bcmolt_gpon_ni_cfg_id_all_onus                                                          BCMOLT_GPON_NI_CFG_ID_ALL_ONUS
+#define bcmolt_gpon_ni_cfg_id_all_mcast_gem_ports                                               BCMOLT_GPON_NI_CFG_ID_ALL_MCAST_GEM_PORTS
+#define bcmolt_gpon_ni_cfg_id_debug                                                             BCMOLT_GPON_NI_CFG_ID_DEBUG
+#define bcmolt_gpon_ni_cfg_id_onu_upgrade_params                                                BCMOLT_GPON_NI_CFG_ID_ONU_UPGRADE_PARAMS
+#define bcmolt_gpon_ni_cfg_id_ps_c_wait_before_deactivation_timeout                             BCMOLT_GPON_NI_CFG_ID_PS_C_WAIT_BEFORE_DEACTIVATION_TIMEOUT
+#define bcmolt_gpon_ni_cfg_id_bip32_indication_control                                          BCMOLT_GPON_NI_CFG_ID_BIP32_INDICATION_CONTROL
+#define bcmolt_gpon_ni_cfg_id__num_of                                                           BCMOLT_GPON_NI_CFG_ID__NUM_OF
+#define bcmolt_gpon_ni_stat_id_fec_codewords                                                    BCMOLT_GPON_NI_STAT_ID_FEC_CODEWORDS
+#define bcmolt_gpon_ni_stat_id_fec_codewords_uncorrected                                        BCMOLT_GPON_NI_STAT_ID_FEC_CODEWORDS_UNCORRECTED
+#define bcmolt_gpon_ni_stat_id_bip8_bytes                                                       BCMOLT_GPON_NI_STAT_ID_BIP8_BYTES
+#define bcmolt_gpon_ni_stat_id_bip8_errors                                                      BCMOLT_GPON_NI_STAT_ID_BIP8_ERRORS
+#define bcmolt_gpon_ni_stat_id_rx_gem_packets                                                   BCMOLT_GPON_NI_STAT_ID_RX_GEM_PACKETS
+#define bcmolt_gpon_ni_stat_id_rx_gem_dropped                                                   BCMOLT_GPON_NI_STAT_ID_RX_GEM_DROPPED
+#define bcmolt_gpon_ni_stat_id_rx_gem_idle                                                      BCMOLT_GPON_NI_STAT_ID_RX_GEM_IDLE
+#define bcmolt_gpon_ni_stat_id_rx_gem_corrected                                                 BCMOLT_GPON_NI_STAT_ID_RX_GEM_CORRECTED
+#define bcmolt_gpon_ni_stat_id_rx_gem_illegal                                                   BCMOLT_GPON_NI_STAT_ID_RX_GEM_ILLEGAL
+#define bcmolt_gpon_ni_stat_id_rx_allocations_valid                                             BCMOLT_GPON_NI_STAT_ID_RX_ALLOCATIONS_VALID
+#define bcmolt_gpon_ni_stat_id_rx_allocations_invalid                                           BCMOLT_GPON_NI_STAT_ID_RX_ALLOCATIONS_INVALID
+#define bcmolt_gpon_ni_stat_id_rx_allocations_disabled                                          BCMOLT_GPON_NI_STAT_ID_RX_ALLOCATIONS_DISABLED
+#define bcmolt_gpon_ni_stat_id_rx_ploams                                                        BCMOLT_GPON_NI_STAT_ID_RX_PLOAMS
+#define bcmolt_gpon_ni_stat_id_rx_ploams_non_idle                                               BCMOLT_GPON_NI_STAT_ID_RX_PLOAMS_NON_IDLE
+#define bcmolt_gpon_ni_stat_id_rx_ploams_error                                                  BCMOLT_GPON_NI_STAT_ID_RX_PLOAMS_ERROR
+#define bcmolt_gpon_ni_stat_id_rx_ploams_dropped                                                BCMOLT_GPON_NI_STAT_ID_RX_PLOAMS_DROPPED
+#define bcmolt_gpon_ni_stat_id_rx_cpu                                                           BCMOLT_GPON_NI_STAT_ID_RX_CPU
+#define bcmolt_gpon_ni_stat_id_rx_omci                                                          BCMOLT_GPON_NI_STAT_ID_RX_OMCI
+#define bcmolt_gpon_ni_stat_id_rx_omci_packets_crc_error                                        BCMOLT_GPON_NI_STAT_ID_RX_OMCI_PACKETS_CRC_ERROR
+#define bcmolt_gpon_ni_stat_id_rx_dropped_too_short                                             BCMOLT_GPON_NI_STAT_ID_RX_DROPPED_TOO_SHORT
+#define bcmolt_gpon_ni_stat_id_rx_dropped_too_long                                              BCMOLT_GPON_NI_STAT_ID_RX_DROPPED_TOO_LONG
+#define bcmolt_gpon_ni_stat_id_rx_crc_errors                                                    BCMOLT_GPON_NI_STAT_ID_RX_CRC_ERRORS
+#define bcmolt_gpon_ni_stat_id_rx_key_errors                                                    BCMOLT_GPON_NI_STAT_ID_RX_KEY_ERRORS
+#define bcmolt_gpon_ni_stat_id_rx_fragments_errors                                              BCMOLT_GPON_NI_STAT_ID_RX_FRAGMENTS_ERRORS
+#define bcmolt_gpon_ni_stat_id_rx_packets_dropped                                               BCMOLT_GPON_NI_STAT_ID_RX_PACKETS_DROPPED
+#define bcmolt_gpon_ni_stat_id_tx_gem                                                           BCMOLT_GPON_NI_STAT_ID_TX_GEM
+#define bcmolt_gpon_ni_stat_id_tx_ploams                                                        BCMOLT_GPON_NI_STAT_ID_TX_PLOAMS
+#define bcmolt_gpon_ni_stat_id_tx_gem_fragments                                                 BCMOLT_GPON_NI_STAT_ID_TX_GEM_FRAGMENTS
+#define bcmolt_gpon_ni_stat_id_tx_cpu                                                           BCMOLT_GPON_NI_STAT_ID_TX_CPU
+#define bcmolt_gpon_ni_stat_id_tx_omci                                                          BCMOLT_GPON_NI_STAT_ID_TX_OMCI
+#define bcmolt_gpon_ni_stat_id_tx_cpu_omci_packets_dropped                                      BCMOLT_GPON_NI_STAT_ID_TX_CPU_OMCI_PACKETS_DROPPED
+#define bcmolt_gpon_ni_stat_id_tx_dropped_illegal_length                                        BCMOLT_GPON_NI_STAT_ID_TX_DROPPED_ILLEGAL_LENGTH
+#define bcmolt_gpon_ni_stat_id_tx_dropped_tpid_miss                                             BCMOLT_GPON_NI_STAT_ID_TX_DROPPED_TPID_MISS
+#define bcmolt_gpon_ni_stat_id_tx_dropped_vid_miss                                              BCMOLT_GPON_NI_STAT_ID_TX_DROPPED_VID_MISS
+#define bcmolt_gpon_ni_stat_id__num_of                                                          BCMOLT_GPON_NI_STAT_ID__NUM_OF
+#define bcmolt_gpon_ni_stat_cfg_id_cfg                                                          BCMOLT_GPON_NI_STAT_CFG_ID_CFG
+#define bcmolt_gpon_ni_stat_cfg_id__num_of                                                      BCMOLT_GPON_NI_STAT_CFG_ID__NUM_OF
+#define bcmolt_gpon_ni_activate_all_onus_completed_id__num_of                                   BCMOLT_GPON_NI_ACTIVATE_ALL_ONUS_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_ni_cpu_packets_failure_id_error                                             BCMOLT_GPON_NI_CPU_PACKETS_FAILURE_ID_ERROR
+#define bcmolt_gpon_ni_cpu_packets_failure_id_gem_port_id                                       BCMOLT_GPON_NI_CPU_PACKETS_FAILURE_ID_GEM_PORT_ID
+#define bcmolt_gpon_ni_cpu_packets_failure_id__num_of                                           BCMOLT_GPON_NI_CPU_PACKETS_FAILURE_ID__NUM_OF
+#define bcmolt_gpon_ni_deactivate_all_onus_completed_id__num_of                                 BCMOLT_GPON_NI_DEACTIVATE_ALL_ONUS_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_ni_disable_all_onus_completed_id__num_of                                    BCMOLT_GPON_NI_DISABLE_ALL_ONUS_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_ni_enable_all_onus_completed_id__num_of                                     BCMOLT_GPON_NI_ENABLE_ALL_ONUS_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_ni_los_id_status                                                            BCMOLT_GPON_NI_LOS_ID_STATUS
+#define bcmolt_gpon_ni_los_id__num_of                                                           BCMOLT_GPON_NI_LOS_ID__NUM_OF
+#define bcmolt_gpon_ni_onu_discovered_id_serial_number                                          BCMOLT_GPON_NI_ONU_DISCOVERED_ID_SERIAL_NUMBER
+#define bcmolt_gpon_ni_onu_discovered_id_ranging_time                                           BCMOLT_GPON_NI_ONU_DISCOVERED_ID_RANGING_TIME
+#define bcmolt_gpon_ni_onu_discovered_id_onu_id                                                 BCMOLT_GPON_NI_ONU_DISCOVERED_ID_ONU_ID
+#define bcmolt_gpon_ni_onu_discovered_id__num_of                                                BCMOLT_GPON_NI_ONU_DISCOVERED_ID__NUM_OF
+#define bcmolt_gpon_ni_onu_upgrade_complete_id_status                                           BCMOLT_GPON_NI_ONU_UPGRADE_COMPLETE_ID_STATUS
+#define bcmolt_gpon_ni_onu_upgrade_complete_id_list_of_failed_entities                          BCMOLT_GPON_NI_ONU_UPGRADE_COMPLETE_ID_LIST_OF_FAILED_ENTITIES
+#define bcmolt_gpon_ni_onu_upgrade_complete_id__num_of                                          BCMOLT_GPON_NI_ONU_UPGRADE_COMPLETE_ID__NUM_OF
+#define bcmolt_gpon_ni_protection_switching_onus_ranged_id_onus                                 BCMOLT_GPON_NI_PROTECTION_SWITCHING_ONUS_RANGED_ID_ONUS
+#define bcmolt_gpon_ni_protection_switching_onus_ranged_id__num_of                              BCMOLT_GPON_NI_PROTECTION_SWITCHING_ONUS_RANGED_ID__NUM_OF
+#define bcmolt_gpon_ni_protection_switching_switchover_completed_id_result                      BCMOLT_GPON_NI_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED_ID_RESULT
+#define bcmolt_gpon_ni_protection_switching_switchover_completed_id__num_of                     BCMOLT_GPON_NI_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_ni_protection_switching_traffic_resume_id_result                            BCMOLT_GPON_NI_PROTECTION_SWITCHING_TRAFFIC_RESUME_ID_RESULT
+#define bcmolt_gpon_ni_protection_switching_traffic_resume_id__num_of                           BCMOLT_GPON_NI_PROTECTION_SWITCHING_TRAFFIC_RESUME_ID__NUM_OF
+#define bcmolt_gpon_ni_rogue_detection_completed_id_window_type                                 BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_WINDOW_TYPE
+#define bcmolt_gpon_ni_rogue_detection_completed_id_measurement_status                          BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_MEASUREMENT_STATUS
+#define bcmolt_gpon_ni_rogue_detection_completed_id_alloc_id                                    BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_ALLOC_ID
+#define bcmolt_gpon_ni_rogue_detection_completed_id_onu_id                                      BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_ONU_ID
+#define bcmolt_gpon_ni_rogue_detection_completed_id_is_delineation                              BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_IS_DELINEATION
+#define bcmolt_gpon_ni_rogue_detection_completed_id_is_ed                                       BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_IS_ED
+#define bcmolt_gpon_ni_rogue_detection_completed_id_rx_data                                     BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_RX_DATA
+#define bcmolt_gpon_ni_rogue_detection_completed_id_ploam_received_onu_id                       BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_PLOAM_RECEIVED_ONU_ID
+#define bcmolt_gpon_ni_rogue_detection_completed_id_ploam_received_crc_error                    BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_PLOAM_RECEIVED_CRC_ERROR
+#define bcmolt_gpon_ni_rogue_detection_completed_id__num_of                                     BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_ni_rogue_onu_special_map_cycle_start_id__num_of                             BCMOLT_GPON_NI_ROGUE_ONU_SPECIAL_MAP_CYCLE_START_ID__NUM_OF
+#define bcmolt_gpon_ni_serial_number_acquisition_cycle_start_id__num_of                         BCMOLT_GPON_NI_SERIAL_NUMBER_ACQUISITION_CYCLE_START_ID__NUM_OF
+#define bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_id_number_of_detected_delimiter   BCMOLT_GPON_NI_STANDBY_PON_MONITORING_CYCLE_COMPLETED_ID_NUMBER_OF_DETECTED_DELIMITER
+#define bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_id_energy_detect_signal           BCMOLT_GPON_NI_STANDBY_PON_MONITORING_CYCLE_COMPLETED_ID_ENERGY_DETECT_SIGNAL
+#define bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_id__num_of                        BCMOLT_GPON_NI_STANDBY_PON_MONITORING_CYCLE_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_ni_stat_alarm_cleared_id_stat                                               BCMOLT_GPON_NI_STAT_ALARM_CLEARED_ID_STAT
+#define bcmolt_gpon_ni_stat_alarm_cleared_id__num_of                                            BCMOLT_GPON_NI_STAT_ALARM_CLEARED_ID__NUM_OF
+#define bcmolt_gpon_ni_stat_alarm_raised_id_stat                                                BCMOLT_GPON_NI_STAT_ALARM_RAISED_ID_STAT
+#define bcmolt_gpon_ni_stat_alarm_raised_id__num_of                                             BCMOLT_GPON_NI_STAT_ALARM_RAISED_ID__NUM_OF
+#define bcmolt_gpon_ni_state_change_completed_id_result                                         BCMOLT_GPON_NI_STATE_CHANGE_COMPLETED_ID_RESULT
+#define bcmolt_gpon_ni_state_change_completed_id_previous_state                                 BCMOLT_GPON_NI_STATE_CHANGE_COMPLETED_ID_PREVIOUS_STATE
+#define bcmolt_gpon_ni_state_change_completed_id_new_state                                      BCMOLT_GPON_NI_STATE_CHANGE_COMPLETED_ID_NEW_STATE
+#define bcmolt_gpon_ni_state_change_completed_id__num_of                                        BCMOLT_GPON_NI_STATE_CHANGE_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_ni_tod_request_completed_id_tod_string                                      BCMOLT_GPON_NI_TOD_REQUEST_COMPLETED_ID_TOD_STRING
+#define bcmolt_gpon_ni_tod_request_completed_id_sfc                                             BCMOLT_GPON_NI_TOD_REQUEST_COMPLETED_ID_SFC
+#define bcmolt_gpon_ni_tod_request_completed_id_rtc_offset_sec                                  BCMOLT_GPON_NI_TOD_REQUEST_COMPLETED_ID_RTC_OFFSET_SEC
+#define bcmolt_gpon_ni_tod_request_completed_id_rtc_offset_nsec                                 BCMOLT_GPON_NI_TOD_REQUEST_COMPLETED_ID_RTC_OFFSET_NSEC
+#define bcmolt_gpon_ni_tod_request_completed_id_status                                          BCMOLT_GPON_NI_TOD_REQUEST_COMPLETED_ID_STATUS
+#define bcmolt_gpon_ni_tod_request_completed_id__num_of                                         BCMOLT_GPON_NI_TOD_REQUEST_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_ni_auto_cfg_id_activate_all_onus_completed                                  BCMOLT_GPON_NI_AUTO_CFG_ID_ACTIVATE_ALL_ONUS_COMPLETED
+#define bcmolt_gpon_ni_auto_cfg_id_cpu_packets_failure                                          BCMOLT_GPON_NI_AUTO_CFG_ID_CPU_PACKETS_FAILURE
+#define bcmolt_gpon_ni_auto_cfg_id_deactivate_all_onus_completed                                BCMOLT_GPON_NI_AUTO_CFG_ID_DEACTIVATE_ALL_ONUS_COMPLETED
+#define bcmolt_gpon_ni_auto_cfg_id_disable_all_onus_completed                                   BCMOLT_GPON_NI_AUTO_CFG_ID_DISABLE_ALL_ONUS_COMPLETED
+#define bcmolt_gpon_ni_auto_cfg_id_enable_all_onus_completed                                    BCMOLT_GPON_NI_AUTO_CFG_ID_ENABLE_ALL_ONUS_COMPLETED
+#define bcmolt_gpon_ni_auto_cfg_id_los                                                          BCMOLT_GPON_NI_AUTO_CFG_ID_LOS
+#define bcmolt_gpon_ni_auto_cfg_id_onu_discovered                                               BCMOLT_GPON_NI_AUTO_CFG_ID_ONU_DISCOVERED
+#define bcmolt_gpon_ni_auto_cfg_id_onu_upgrade_complete                                         BCMOLT_GPON_NI_AUTO_CFG_ID_ONU_UPGRADE_COMPLETE
+#define bcmolt_gpon_ni_auto_cfg_id_protection_switching_onus_ranged                             BCMOLT_GPON_NI_AUTO_CFG_ID_PROTECTION_SWITCHING_ONUS_RANGED
+#define bcmolt_gpon_ni_auto_cfg_id_protection_switching_switchover_completed                    BCMOLT_GPON_NI_AUTO_CFG_ID_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED
+#define bcmolt_gpon_ni_auto_cfg_id_protection_switching_traffic_resume                          BCMOLT_GPON_NI_AUTO_CFG_ID_PROTECTION_SWITCHING_TRAFFIC_RESUME
+#define bcmolt_gpon_ni_auto_cfg_id_rogue_detection_completed                                    BCMOLT_GPON_NI_AUTO_CFG_ID_ROGUE_DETECTION_COMPLETED
+#define bcmolt_gpon_ni_auto_cfg_id_rogue_onu_special_map_cycle_start                            BCMOLT_GPON_NI_AUTO_CFG_ID_ROGUE_ONU_SPECIAL_MAP_CYCLE_START
+#define bcmolt_gpon_ni_auto_cfg_id_serial_number_acquisition_cycle_start                        BCMOLT_GPON_NI_AUTO_CFG_ID_SERIAL_NUMBER_ACQUISITION_CYCLE_START
+#define bcmolt_gpon_ni_auto_cfg_id_standby_pon_monitoring_cycle_completed                       BCMOLT_GPON_NI_AUTO_CFG_ID_STANDBY_PON_MONITORING_CYCLE_COMPLETED
+#define bcmolt_gpon_ni_auto_cfg_id_stat_alarm_cleared                                           BCMOLT_GPON_NI_AUTO_CFG_ID_STAT_ALARM_CLEARED
+#define bcmolt_gpon_ni_auto_cfg_id_stat_alarm_raised                                            BCMOLT_GPON_NI_AUTO_CFG_ID_STAT_ALARM_RAISED
+#define bcmolt_gpon_ni_auto_cfg_id_state_change_completed                                       BCMOLT_GPON_NI_AUTO_CFG_ID_STATE_CHANGE_COMPLETED
+#define bcmolt_gpon_ni_auto_cfg_id_tod_request_completed                                        BCMOLT_GPON_NI_AUTO_CFG_ID_TOD_REQUEST_COMPLETED
+#define bcmolt_gpon_ni_auto_cfg_id__num_of                                                      BCMOLT_GPON_NI_AUTO_CFG_ID__NUM_OF
+#define bcmolt_gpon_ni_disable_serial_number_id_control                                         BCMOLT_GPON_NI_DISABLE_SERIAL_NUMBER_ID_CONTROL
+#define bcmolt_gpon_ni_disable_serial_number_id_serial_number                                   BCMOLT_GPON_NI_DISABLE_SERIAL_NUMBER_ID_SERIAL_NUMBER
+#define bcmolt_gpon_ni_disable_serial_number_id__num_of                                         BCMOLT_GPON_NI_DISABLE_SERIAL_NUMBER_ID__NUM_OF
+#define bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_id_onu_state          BCMOLT_GPON_NI_PROTECTION_SWITCHING_TYPE_C_SET_MULTIPLE_ONU_STATE_ID_ONU_STATE
+#define bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_id_onu_list           BCMOLT_GPON_NI_PROTECTION_SWITCHING_TYPE_C_SET_MULTIPLE_ONU_STATE_ID_ONU_LIST
+#define bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_id__num_of            BCMOLT_GPON_NI_PROTECTION_SWITCHING_TYPE_C_SET_MULTIPLE_ONU_STATE_ID__NUM_OF
+#define bcmolt_gpon_ni_reset_id__num_of                                                         BCMOLT_GPON_NI_RESET_ID__NUM_OF
+#define bcmolt_gpon_ni_rogue_detection_window_id_window_type                                    BCMOLT_GPON_NI_ROGUE_DETECTION_WINDOW_ID_WINDOW_TYPE
+#define bcmolt_gpon_ni_rogue_detection_window_id_alloc_id                                       BCMOLT_GPON_NI_ROGUE_DETECTION_WINDOW_ID_ALLOC_ID
+#define bcmolt_gpon_ni_rogue_detection_window_id_onu_id                                         BCMOLT_GPON_NI_ROGUE_DETECTION_WINDOW_ID_ONU_ID
+#define bcmolt_gpon_ni_rogue_detection_window_id_second_ranging_window                          BCMOLT_GPON_NI_ROGUE_DETECTION_WINDOW_ID_SECOND_RANGING_WINDOW
+#define bcmolt_gpon_ni_rogue_detection_window_id__num_of                                        BCMOLT_GPON_NI_ROGUE_DETECTION_WINDOW_ID__NUM_OF
+#define bcmolt_gpon_ni_set_onu_state_id_onu_state                                               BCMOLT_GPON_NI_SET_ONU_STATE_ID_ONU_STATE
+#define bcmolt_gpon_ni_set_onu_state_id__num_of                                                 BCMOLT_GPON_NI_SET_ONU_STATE_ID__NUM_OF
+#define bcmolt_gpon_ni_set_pon_state_id_pon_state                                               BCMOLT_GPON_NI_SET_PON_STATE_ID_PON_STATE
+#define bcmolt_gpon_ni_set_pon_state_id__num_of                                                 BCMOLT_GPON_NI_SET_PON_STATE_ID__NUM_OF
+#define bcmolt_gpon_ni_single_request_standby_pon_monitoring_id__num_of                         BCMOLT_GPON_NI_SINGLE_REQUEST_STANDBY_PON_MONITORING_ID__NUM_OF
+#define bcmolt_gpon_ni_start_onu_upgrade_id_list_of_onu_ids                                     BCMOLT_GPON_NI_START_ONU_UPGRADE_ID_LIST_OF_ONU_IDS
+#define bcmolt_gpon_ni_start_onu_upgrade_id__num_of                                             BCMOLT_GPON_NI_START_ONU_UPGRADE_ID__NUM_OF
+#define bcmolt_gpon_ni_tod_request_id__num_of                                                   BCMOLT_GPON_NI_TOD_REQUEST_ID__NUM_OF
+#define bcmolt_gpon_ni_broadcast_ploam_packet_id_ploam                                          BCMOLT_GPON_NI_BROADCAST_PLOAM_PACKET_ID_PLOAM
+#define bcmolt_gpon_ni_broadcast_ploam_packet_id__num_of                                        BCMOLT_GPON_NI_BROADCAST_PLOAM_PACKET_ID__NUM_OF
+#define bcmolt_gpon_ni_cpu_packets_id_packet_type                                               BCMOLT_GPON_NI_CPU_PACKETS_ID_PACKET_TYPE
+#define bcmolt_gpon_ni_cpu_packets_id_calc_crc                                                  BCMOLT_GPON_NI_CPU_PACKETS_ID_CALC_CRC
+#define bcmolt_gpon_ni_cpu_packets_id_gem_port_list                                             BCMOLT_GPON_NI_CPU_PACKETS_ID_GEM_PORT_LIST
+#define bcmolt_gpon_ni_cpu_packets_id_buffer                                                    BCMOLT_GPON_NI_CPU_PACKETS_ID_BUFFER
+#define bcmolt_gpon_ni_cpu_packets_id__num_of                                                   BCMOLT_GPON_NI_CPU_PACKETS_ID__NUM_OF
+#define bcmolt_gpon_onu_key_id_pon_ni                                                           BCMOLT_GPON_ONU_KEY_ID_PON_NI
+#define bcmolt_gpon_onu_key_id_onu_id                                                           BCMOLT_GPON_ONU_KEY_ID_ONU_ID
+#define bcmolt_gpon_onu_key_id__num_of                                                          BCMOLT_GPON_ONU_KEY_ID__NUM_OF
+#define bcmolt_gpon_onu_cfg_id_onu_state                                                        BCMOLT_GPON_ONU_CFG_ID_ONU_STATE
+#define bcmolt_gpon_onu_cfg_id_serial_number                                                    BCMOLT_GPON_ONU_CFG_ID_SERIAL_NUMBER
+#define bcmolt_gpon_onu_cfg_id_password                                                         BCMOLT_GPON_ONU_CFG_ID_PASSWORD
+#define bcmolt_gpon_onu_cfg_id_auto_password_learning                                           BCMOLT_GPON_ONU_CFG_ID_AUTO_PASSWORD_LEARNING
+#define bcmolt_gpon_onu_cfg_id_us_fec                                                           BCMOLT_GPON_ONU_CFG_ID_US_FEC
+#define bcmolt_gpon_onu_cfg_id_omci_port_id                                                     BCMOLT_GPON_ONU_CFG_ID_OMCI_PORT_ID
+#define bcmolt_gpon_onu_cfg_id_ds_ber_reporting_interval                                        BCMOLT_GPON_ONU_CFG_ID_DS_BER_REPORTING_INTERVAL
+#define bcmolt_gpon_onu_cfg_id_aes_encryption_key                                               BCMOLT_GPON_ONU_CFG_ID_AES_ENCRYPTION_KEY
+#define bcmolt_gpon_onu_cfg_id_alarm_state                                                      BCMOLT_GPON_ONU_CFG_ID_ALARM_STATE
+#define bcmolt_gpon_onu_cfg_id_ranging_time                                                     BCMOLT_GPON_ONU_CFG_ID_RANGING_TIME
+#define bcmolt_gpon_onu_cfg_id_disabled_after_discovery                                         BCMOLT_GPON_ONU_CFG_ID_DISABLED_AFTER_DISCOVERY
+#define bcmolt_gpon_onu_cfg_id_deactivation_reason                                              BCMOLT_GPON_ONU_CFG_ID_DEACTIVATION_REASON
+#define bcmolt_gpon_onu_cfg_id_all_gem_ports                                                    BCMOLT_GPON_ONU_CFG_ID_ALL_GEM_PORTS
+#define bcmolt_gpon_onu_cfg_id_all_allocs                                                       BCMOLT_GPON_ONU_CFG_ID_ALL_ALLOCS
+#define bcmolt_gpon_onu_cfg_id_onu_ps_type_c                                                    BCMOLT_GPON_ONU_CFG_ID_ONU_PS_TYPE_C
+#define bcmolt_gpon_onu_cfg_id_extended_guard_time                                              BCMOLT_GPON_ONU_CFG_ID_EXTENDED_GUARD_TIME
+#define bcmolt_gpon_onu_cfg_id__num_of                                                          BCMOLT_GPON_ONU_CFG_ID__NUM_OF
+#define bcmolt_gpon_onu_stat_id_fec_codewords                                                   BCMOLT_GPON_ONU_STAT_ID_FEC_CODEWORDS
+#define bcmolt_gpon_onu_stat_id_fec_bytes_corrected                                             BCMOLT_GPON_ONU_STAT_ID_FEC_BYTES_CORRECTED
+#define bcmolt_gpon_onu_stat_id_fec_codewords_corrected                                         BCMOLT_GPON_ONU_STAT_ID_FEC_CODEWORDS_CORRECTED
+#define bcmolt_gpon_onu_stat_id_fec_codewords_uncorrected                                       BCMOLT_GPON_ONU_STAT_ID_FEC_CODEWORDS_UNCORRECTED
+#define bcmolt_gpon_onu_stat_id_bip8_bytes                                                      BCMOLT_GPON_ONU_STAT_ID_BIP8_BYTES
+#define bcmolt_gpon_onu_stat_id_bip8_errors                                                     BCMOLT_GPON_ONU_STAT_ID_BIP8_ERRORS
+#define bcmolt_gpon_onu_stat_id_rx_ploams_crc_error                                             BCMOLT_GPON_ONU_STAT_ID_RX_PLOAMS_CRC_ERROR
+#define bcmolt_gpon_onu_stat_id_rx_ploams_non_idle                                              BCMOLT_GPON_ONU_STAT_ID_RX_PLOAMS_NON_IDLE
+#define bcmolt_gpon_onu_stat_id_positive_drift                                                  BCMOLT_GPON_ONU_STAT_ID_POSITIVE_DRIFT
+#define bcmolt_gpon_onu_stat_id_negative_drift                                                  BCMOLT_GPON_ONU_STAT_ID_NEGATIVE_DRIFT
+#define bcmolt_gpon_onu_stat_id_rx_omci                                                         BCMOLT_GPON_ONU_STAT_ID_RX_OMCI
+#define bcmolt_gpon_onu_stat_id_rx_omci_packets_crc_error                                       BCMOLT_GPON_ONU_STAT_ID_RX_OMCI_PACKETS_CRC_ERROR
+#define bcmolt_gpon_onu_stat_id_ber_reported                                                    BCMOLT_GPON_ONU_STAT_ID_BER_REPORTED
+#define bcmolt_gpon_onu_stat_id_unreceived_burst                                                BCMOLT_GPON_ONU_STAT_ID_UNRECEIVED_BURST
+#define bcmolt_gpon_onu_stat_id_lcdg_errors                                                     BCMOLT_GPON_ONU_STAT_ID_LCDG_ERRORS
+#define bcmolt_gpon_onu_stat_id_rdi_errors                                                      BCMOLT_GPON_ONU_STAT_ID_RDI_ERRORS
+#define bcmolt_gpon_onu_stat_id_rx_bytes                                                        BCMOLT_GPON_ONU_STAT_ID_RX_BYTES
+#define bcmolt_gpon_onu_stat_id_rx_packets                                                      BCMOLT_GPON_ONU_STAT_ID_RX_PACKETS
+#define bcmolt_gpon_onu_stat_id_tx_bytes                                                        BCMOLT_GPON_ONU_STAT_ID_TX_BYTES
+#define bcmolt_gpon_onu_stat_id_tx_packets                                                      BCMOLT_GPON_ONU_STAT_ID_TX_PACKETS
+#define bcmolt_gpon_onu_stat_id__num_of                                                         BCMOLT_GPON_ONU_STAT_ID__NUM_OF
+#define bcmolt_gpon_onu_stat_cfg_id_cfg                                                         BCMOLT_GPON_ONU_STAT_CFG_ID_CFG
+#define bcmolt_gpon_onu_stat_cfg_id__num_of                                                     BCMOLT_GPON_ONU_STAT_CFG_ID__NUM_OF
+#define bcmolt_gpon_onu_ber_interval_configuration_completed_id_ber_interval                    BCMOLT_GPON_ONU_BER_INTERVAL_CONFIGURATION_COMPLETED_ID_BER_INTERVAL
+#define bcmolt_gpon_onu_ber_interval_configuration_completed_id_result                          BCMOLT_GPON_ONU_BER_INTERVAL_CONFIGURATION_COMPLETED_ID_RESULT
+#define bcmolt_gpon_onu_ber_interval_configuration_completed_id__num_of                         BCMOLT_GPON_ONU_BER_INTERVAL_CONFIGURATION_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_onu_dfi_id_alarm_status                                                     BCMOLT_GPON_ONU_DFI_ID_ALARM_STATUS
+#define bcmolt_gpon_onu_dfi_id__num_of                                                          BCMOLT_GPON_ONU_DFI_ID__NUM_OF
+#define bcmolt_gpon_onu_dgi_id_alarm_status                                                     BCMOLT_GPON_ONU_DGI_ID_ALARM_STATUS
+#define bcmolt_gpon_onu_dgi_id__num_of                                                          BCMOLT_GPON_ONU_DGI_ID__NUM_OF
+#define bcmolt_gpon_onu_dowi_id_alarm_status                                                    BCMOLT_GPON_ONU_DOWI_ID_ALARM_STATUS
+#define bcmolt_gpon_onu_dowi_id_drift_value                                                     BCMOLT_GPON_ONU_DOWI_ID_DRIFT_VALUE
+#define bcmolt_gpon_onu_dowi_id_new_eqd                                                         BCMOLT_GPON_ONU_DOWI_ID_NEW_EQD
+#define bcmolt_gpon_onu_dowi_id__num_of                                                         BCMOLT_GPON_ONU_DOWI_ID__NUM_OF
+#define bcmolt_gpon_onu_err_id_bip8_errors                                                      BCMOLT_GPON_ONU_ERR_ID_BIP8_ERRORS
+#define bcmolt_gpon_onu_err_id__num_of                                                          BCMOLT_GPON_ONU_ERR_ID__NUM_OF
+#define bcmolt_gpon_onu_invalid_dbru_report_id_alloc_id                                         BCMOLT_GPON_ONU_INVALID_DBRU_REPORT_ID_ALLOC_ID
+#define bcmolt_gpon_onu_invalid_dbru_report_id__num_of                                          BCMOLT_GPON_ONU_INVALID_DBRU_REPORT_ID__NUM_OF
+#define bcmolt_gpon_onu_key_exchange_completed_id_new_key                                       BCMOLT_GPON_ONU_KEY_EXCHANGE_COMPLETED_ID_NEW_KEY
+#define bcmolt_gpon_onu_key_exchange_completed_id__num_of                                       BCMOLT_GPON_ONU_KEY_EXCHANGE_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_onu_key_exchange_cycle_skipped_id__num_of                                   BCMOLT_GPON_ONU_KEY_EXCHANGE_CYCLE_SKIPPED_ID__NUM_OF
+#define bcmolt_gpon_onu_key_exchange_decrypt_required_id_new_key                                BCMOLT_GPON_ONU_KEY_EXCHANGE_DECRYPT_REQUIRED_ID_NEW_KEY
+#define bcmolt_gpon_onu_key_exchange_decrypt_required_id__num_of                                BCMOLT_GPON_ONU_KEY_EXCHANGE_DECRYPT_REQUIRED_ID__NUM_OF
+#define bcmolt_gpon_onu_key_exchange_key_mismatch_id_expected_key                               BCMOLT_GPON_ONU_KEY_EXCHANGE_KEY_MISMATCH_ID_EXPECTED_KEY
+#define bcmolt_gpon_onu_key_exchange_key_mismatch_id_received_key                               BCMOLT_GPON_ONU_KEY_EXCHANGE_KEY_MISMATCH_ID_RECEIVED_KEY
+#define bcmolt_gpon_onu_key_exchange_key_mismatch_id__num_of                                    BCMOLT_GPON_ONU_KEY_EXCHANGE_KEY_MISMATCH_ID__NUM_OF
+#define bcmolt_gpon_onu_key_exchange_key_request_timeout_id__num_of                             BCMOLT_GPON_ONU_KEY_EXCHANGE_KEY_REQUEST_TIMEOUT_ID__NUM_OF
+#define bcmolt_gpon_onu_key_exchange_unconsecutive_index_id_expected_index                      BCMOLT_GPON_ONU_KEY_EXCHANGE_UNCONSECUTIVE_INDEX_ID_EXPECTED_INDEX
+#define bcmolt_gpon_onu_key_exchange_unconsecutive_index_id_actual_index                        BCMOLT_GPON_ONU_KEY_EXCHANGE_UNCONSECUTIVE_INDEX_ID_ACTUAL_INDEX
+#define bcmolt_gpon_onu_key_exchange_unconsecutive_index_id__num_of                             BCMOLT_GPON_ONU_KEY_EXCHANGE_UNCONSECUTIVE_INDEX_ID__NUM_OF
+#define bcmolt_gpon_onu_loai_id_alarm_status                                                    BCMOLT_GPON_ONU_LOAI_ID_ALARM_STATUS
+#define bcmolt_gpon_onu_loai_id__num_of                                                         BCMOLT_GPON_ONU_LOAI_ID__NUM_OF
+#define bcmolt_gpon_onu_loki_id_alarm_status                                                    BCMOLT_GPON_ONU_LOKI_ID_ALARM_STATUS
+#define bcmolt_gpon_onu_loki_id__num_of                                                         BCMOLT_GPON_ONU_LOKI_ID__NUM_OF
+#define bcmolt_gpon_onu_memi_id_ploam_buffer                                                    BCMOLT_GPON_ONU_MEMI_ID_PLOAM_BUFFER
+#define bcmolt_gpon_onu_memi_id__num_of                                                         BCMOLT_GPON_ONU_MEMI_ID__NUM_OF
+#define bcmolt_gpon_onu_omci_port_id_configuration_completed_id_gem_port                        BCMOLT_GPON_ONU_OMCI_PORT_ID_CONFIGURATION_COMPLETED_ID_GEM_PORT
+#define bcmolt_gpon_onu_omci_port_id_configuration_completed_id_status                          BCMOLT_GPON_ONU_OMCI_PORT_ID_CONFIGURATION_COMPLETED_ID_STATUS
+#define bcmolt_gpon_onu_omci_port_id_configuration_completed_id_operation                       BCMOLT_GPON_ONU_OMCI_PORT_ID_CONFIGURATION_COMPLETED_ID_OPERATION
+#define bcmolt_gpon_onu_omci_port_id_configuration_completed_id__num_of                         BCMOLT_GPON_ONU_OMCI_PORT_ID_CONFIGURATION_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_onu_onu_activation_completed_id_status                                      BCMOLT_GPON_ONU_ONU_ACTIVATION_COMPLETED_ID_STATUS
+#define bcmolt_gpon_onu_onu_activation_completed_id_fail_reason                                 BCMOLT_GPON_ONU_ONU_ACTIVATION_COMPLETED_ID_FAIL_REASON
+#define bcmolt_gpon_onu_onu_activation_completed_id__num_of                                     BCMOLT_GPON_ONU_ONU_ACTIVATION_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_onu_onu_activation_standby_completed_id_result                              BCMOLT_GPON_ONU_ONU_ACTIVATION_STANDBY_COMPLETED_ID_RESULT
+#define bcmolt_gpon_onu_onu_activation_standby_completed_id__num_of                             BCMOLT_GPON_ONU_ONU_ACTIVATION_STANDBY_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_onu_onu_alarm_id_onu_alarm                                                  BCMOLT_GPON_ONU_ONU_ALARM_ID_ONU_ALARM
+#define bcmolt_gpon_onu_onu_alarm_id__num_of                                                    BCMOLT_GPON_ONU_ONU_ALARM_ID__NUM_OF
+#define bcmolt_gpon_onu_onu_deactivation_completed_id_status                                    BCMOLT_GPON_ONU_ONU_DEACTIVATION_COMPLETED_ID_STATUS
+#define bcmolt_gpon_onu_onu_deactivation_completed_id__num_of                                   BCMOLT_GPON_ONU_ONU_DEACTIVATION_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_onu_onu_disable_completed_id_serial_number                                  BCMOLT_GPON_ONU_ONU_DISABLE_COMPLETED_ID_SERIAL_NUMBER
+#define bcmolt_gpon_onu_onu_disable_completed_id__num_of                                        BCMOLT_GPON_ONU_ONU_DISABLE_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_onu_onu_enable_completed_id_serial_number                                   BCMOLT_GPON_ONU_ONU_ENABLE_COMPLETED_ID_SERIAL_NUMBER
+#define bcmolt_gpon_onu_onu_enable_completed_id__num_of                                         BCMOLT_GPON_ONU_ONU_ENABLE_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_onu_optical_reflection_id__num_of                                           BCMOLT_GPON_ONU_OPTICAL_REFLECTION_ID__NUM_OF
+#define bcmolt_gpon_onu_password_authentication_completed_id_status                             BCMOLT_GPON_ONU_PASSWORD_AUTHENTICATION_COMPLETED_ID_STATUS
+#define bcmolt_gpon_onu_password_authentication_completed_id_fail_reason                        BCMOLT_GPON_ONU_PASSWORD_AUTHENTICATION_COMPLETED_ID_FAIL_REASON
+#define bcmolt_gpon_onu_password_authentication_completed_id_password                           BCMOLT_GPON_ONU_PASSWORD_AUTHENTICATION_COMPLETED_ID_PASSWORD
+#define bcmolt_gpon_onu_password_authentication_completed_id__num_of                            BCMOLT_GPON_ONU_PASSWORD_AUTHENTICATION_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_onu_pee_id_alarm_status                                                     BCMOLT_GPON_ONU_PEE_ID_ALARM_STATUS
+#define bcmolt_gpon_onu_pee_id__num_of                                                          BCMOLT_GPON_ONU_PEE_ID__NUM_OF
+#define bcmolt_gpon_onu_possible_drift_id_alarm_status                                          BCMOLT_GPON_ONU_POSSIBLE_DRIFT_ID_ALARM_STATUS
+#define bcmolt_gpon_onu_possible_drift_id_estimated_drift                                       BCMOLT_GPON_ONU_POSSIBLE_DRIFT_ID_ESTIMATED_DRIFT
+#define bcmolt_gpon_onu_possible_drift_id__num_of                                               BCMOLT_GPON_ONU_POSSIBLE_DRIFT_ID__NUM_OF
+#define bcmolt_gpon_onu_power_management_state_change_id_old_state                              BCMOLT_GPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_OLD_STATE
+#define bcmolt_gpon_onu_power_management_state_change_id_new_state                              BCMOLT_GPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_NEW_STATE
+#define bcmolt_gpon_onu_power_management_state_change_id_reason                                 BCMOLT_GPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_REASON
+#define bcmolt_gpon_onu_power_management_state_change_id__num_of                                BCMOLT_GPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID__NUM_OF
+#define bcmolt_gpon_onu_pst_id_link_number                                                      BCMOLT_GPON_ONU_PST_ID_LINK_NUMBER
+#define bcmolt_gpon_onu_pst_id_k1                                                               BCMOLT_GPON_ONU_PST_ID_K1
+#define bcmolt_gpon_onu_pst_id_k2                                                               BCMOLT_GPON_ONU_PST_ID_K2
+#define bcmolt_gpon_onu_pst_id__num_of                                                          BCMOLT_GPON_ONU_PST_ID__NUM_OF
+#define bcmolt_gpon_onu_ranging_completed_id_status                                             BCMOLT_GPON_ONU_RANGING_COMPLETED_ID_STATUS
+#define bcmolt_gpon_onu_ranging_completed_id_fail_reason                                        BCMOLT_GPON_ONU_RANGING_COMPLETED_ID_FAIL_REASON
+#define bcmolt_gpon_onu_ranging_completed_id_number_of_ploams                                   BCMOLT_GPON_ONU_RANGING_COMPLETED_ID_NUMBER_OF_PLOAMS
+#define bcmolt_gpon_onu_ranging_completed_id_eqd                                                BCMOLT_GPON_ONU_RANGING_COMPLETED_ID_EQD
+#define bcmolt_gpon_onu_ranging_completed_id_power_level                                        BCMOLT_GPON_ONU_RANGING_COMPLETED_ID_POWER_LEVEL
+#define bcmolt_gpon_onu_ranging_completed_id__num_of                                            BCMOLT_GPON_ONU_RANGING_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_onu_rei_id_bip8_errors                                                      BCMOLT_GPON_ONU_REI_ID_BIP8_ERRORS
+#define bcmolt_gpon_onu_rei_id__num_of                                                          BCMOLT_GPON_ONU_REI_ID__NUM_OF
+#define bcmolt_gpon_onu_rssi_measurement_completed_id_status                                    BCMOLT_GPON_ONU_RSSI_MEASUREMENT_COMPLETED_ID_STATUS
+#define bcmolt_gpon_onu_rssi_measurement_completed_id_fail_reason                               BCMOLT_GPON_ONU_RSSI_MEASUREMENT_COMPLETED_ID_FAIL_REASON
+#define bcmolt_gpon_onu_rssi_measurement_completed_id__num_of                                   BCMOLT_GPON_ONU_RSSI_MEASUREMENT_COMPLETED_ID__NUM_OF
+#define bcmolt_gpon_onu_sdi_id_alarm_status                                                     BCMOLT_GPON_ONU_SDI_ID_ALARM_STATUS
+#define bcmolt_gpon_onu_sdi_id_ber                                                              BCMOLT_GPON_ONU_SDI_ID_BER
+#define bcmolt_gpon_onu_sdi_id__num_of                                                          BCMOLT_GPON_ONU_SDI_ID__NUM_OF
+#define bcmolt_gpon_onu_sfi_id_alarm_status                                                     BCMOLT_GPON_ONU_SFI_ID_ALARM_STATUS
+#define bcmolt_gpon_onu_sfi_id_ber                                                              BCMOLT_GPON_ONU_SFI_ID_BER
+#define bcmolt_gpon_onu_sfi_id__num_of                                                          BCMOLT_GPON_ONU_SFI_ID__NUM_OF
+#define bcmolt_gpon_onu_stat_alarm_cleared_id_stat                                              BCMOLT_GPON_ONU_STAT_ALARM_CLEARED_ID_STAT
+#define bcmolt_gpon_onu_stat_alarm_cleared_id__num_of                                           BCMOLT_GPON_ONU_STAT_ALARM_CLEARED_ID__NUM_OF
+#define bcmolt_gpon_onu_stat_alarm_raised_id_stat                                               BCMOLT_GPON_ONU_STAT_ALARM_RAISED_ID_STAT
+#define bcmolt_gpon_onu_stat_alarm_raised_id__num_of                                            BCMOLT_GPON_ONU_STAT_ALARM_RAISED_ID__NUM_OF
+#define bcmolt_gpon_onu_sufi_id_alarm_status                                                    BCMOLT_GPON_ONU_SUFI_ID_ALARM_STATUS
+#define bcmolt_gpon_onu_sufi_id__num_of                                                         BCMOLT_GPON_ONU_SUFI_ID__NUM_OF
+#define bcmolt_gpon_onu_tiwi_id_alarm_status                                                    BCMOLT_GPON_ONU_TIWI_ID_ALARM_STATUS
+#define bcmolt_gpon_onu_tiwi_id_drift_value                                                     BCMOLT_GPON_ONU_TIWI_ID_DRIFT_VALUE
+#define bcmolt_gpon_onu_tiwi_id__num_of                                                         BCMOLT_GPON_ONU_TIWI_ID__NUM_OF
+#define bcmolt_gpon_onu_auto_cfg_id_ber_interval_configuration_completed                        BCMOLT_GPON_ONU_AUTO_CFG_ID_BER_INTERVAL_CONFIGURATION_COMPLETED
+#define bcmolt_gpon_onu_auto_cfg_id_dfi                                                         BCMOLT_GPON_ONU_AUTO_CFG_ID_DFI
+#define bcmolt_gpon_onu_auto_cfg_id_dgi                                                         BCMOLT_GPON_ONU_AUTO_CFG_ID_DGI
+#define bcmolt_gpon_onu_auto_cfg_id_dowi                                                        BCMOLT_GPON_ONU_AUTO_CFG_ID_DOWI
+#define bcmolt_gpon_onu_auto_cfg_id_err                                                         BCMOLT_GPON_ONU_AUTO_CFG_ID_ERR
+#define bcmolt_gpon_onu_auto_cfg_id_invalid_dbru_report                                         BCMOLT_GPON_ONU_AUTO_CFG_ID_INVALID_DBRU_REPORT
+#define bcmolt_gpon_onu_auto_cfg_id_key_exchange_completed                                      BCMOLT_GPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_COMPLETED
+#define bcmolt_gpon_onu_auto_cfg_id_key_exchange_cycle_skipped                                  BCMOLT_GPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_CYCLE_SKIPPED
+#define bcmolt_gpon_onu_auto_cfg_id_key_exchange_decrypt_required                               BCMOLT_GPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_DECRYPT_REQUIRED
+#define bcmolt_gpon_onu_auto_cfg_id_key_exchange_key_mismatch                                   BCMOLT_GPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_KEY_MISMATCH
+#define bcmolt_gpon_onu_auto_cfg_id_key_exchange_key_request_timeout                            BCMOLT_GPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_KEY_REQUEST_TIMEOUT
+#define bcmolt_gpon_onu_auto_cfg_id_key_exchange_unconsecutive_index                            BCMOLT_GPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_UNCONSECUTIVE_INDEX
+#define bcmolt_gpon_onu_auto_cfg_id_loai                                                        BCMOLT_GPON_ONU_AUTO_CFG_ID_LOAI
+#define bcmolt_gpon_onu_auto_cfg_id_loki                                                        BCMOLT_GPON_ONU_AUTO_CFG_ID_LOKI
+#define bcmolt_gpon_onu_auto_cfg_id_memi                                                        BCMOLT_GPON_ONU_AUTO_CFG_ID_MEMI
+#define bcmolt_gpon_onu_auto_cfg_id_omci_port_id_configuration_completed                        BCMOLT_GPON_ONU_AUTO_CFG_ID_OMCI_PORT_ID_CONFIGURATION_COMPLETED
+#define bcmolt_gpon_onu_auto_cfg_id_onu_activation_completed                                    BCMOLT_GPON_ONU_AUTO_CFG_ID_ONU_ACTIVATION_COMPLETED
+#define bcmolt_gpon_onu_auto_cfg_id_onu_activation_standby_completed                            BCMOLT_GPON_ONU_AUTO_CFG_ID_ONU_ACTIVATION_STANDBY_COMPLETED
+#define bcmolt_gpon_onu_auto_cfg_id_onu_alarm                                                   BCMOLT_GPON_ONU_AUTO_CFG_ID_ONU_ALARM
+#define bcmolt_gpon_onu_auto_cfg_id_onu_deactivation_completed                                  BCMOLT_GPON_ONU_AUTO_CFG_ID_ONU_DEACTIVATION_COMPLETED
+#define bcmolt_gpon_onu_auto_cfg_id_onu_disable_completed                                       BCMOLT_GPON_ONU_AUTO_CFG_ID_ONU_DISABLE_COMPLETED
+#define bcmolt_gpon_onu_auto_cfg_id_onu_enable_completed                                        BCMOLT_GPON_ONU_AUTO_CFG_ID_ONU_ENABLE_COMPLETED
+#define bcmolt_gpon_onu_auto_cfg_id_optical_reflection                                          BCMOLT_GPON_ONU_AUTO_CFG_ID_OPTICAL_REFLECTION
+#define bcmolt_gpon_onu_auto_cfg_id_password_authentication_completed                           BCMOLT_GPON_ONU_AUTO_CFG_ID_PASSWORD_AUTHENTICATION_COMPLETED
+#define bcmolt_gpon_onu_auto_cfg_id_pee                                                         BCMOLT_GPON_ONU_AUTO_CFG_ID_PEE
+#define bcmolt_gpon_onu_auto_cfg_id_possible_drift                                              BCMOLT_GPON_ONU_AUTO_CFG_ID_POSSIBLE_DRIFT
+#define bcmolt_gpon_onu_auto_cfg_id_power_management_state_change                               BCMOLT_GPON_ONU_AUTO_CFG_ID_POWER_MANAGEMENT_STATE_CHANGE
+#define bcmolt_gpon_onu_auto_cfg_id_pst                                                         BCMOLT_GPON_ONU_AUTO_CFG_ID_PST
+#define bcmolt_gpon_onu_auto_cfg_id_ranging_completed                                           BCMOLT_GPON_ONU_AUTO_CFG_ID_RANGING_COMPLETED
+#define bcmolt_gpon_onu_auto_cfg_id_rei                                                         BCMOLT_GPON_ONU_AUTO_CFG_ID_REI
+#define bcmolt_gpon_onu_auto_cfg_id_rssi_measurement_completed                                  BCMOLT_GPON_ONU_AUTO_CFG_ID_RSSI_MEASUREMENT_COMPLETED
+#define bcmolt_gpon_onu_auto_cfg_id_sdi                                                         BCMOLT_GPON_ONU_AUTO_CFG_ID_SDI
+#define bcmolt_gpon_onu_auto_cfg_id_sfi                                                         BCMOLT_GPON_ONU_AUTO_CFG_ID_SFI
+#define bcmolt_gpon_onu_auto_cfg_id_stat_alarm_cleared                                          BCMOLT_GPON_ONU_AUTO_CFG_ID_STAT_ALARM_CLEARED
+#define bcmolt_gpon_onu_auto_cfg_id_stat_alarm_raised                                           BCMOLT_GPON_ONU_AUTO_CFG_ID_STAT_ALARM_RAISED
+#define bcmolt_gpon_onu_auto_cfg_id_sufi                                                        BCMOLT_GPON_ONU_AUTO_CFG_ID_SUFI
+#define bcmolt_gpon_onu_auto_cfg_id_tiwi                                                        BCMOLT_GPON_ONU_AUTO_CFG_ID_TIWI
+#define bcmolt_gpon_onu_auto_cfg_id__num_of                                                     BCMOLT_GPON_ONU_AUTO_CFG_ID__NUM_OF
+#define bcmolt_gpon_onu_change_power_level_id_power_level_action                                BCMOLT_GPON_ONU_CHANGE_POWER_LEVEL_ID_POWER_LEVEL_ACTION
+#define bcmolt_gpon_onu_change_power_level_id__num_of                                           BCMOLT_GPON_ONU_CHANGE_POWER_LEVEL_ID__NUM_OF
+#define bcmolt_gpon_onu_rssi_measurement_id__num_of                                             BCMOLT_GPON_ONU_RSSI_MEASUREMENT_ID__NUM_OF
+#define bcmolt_gpon_onu_set_onu_state_id_onu_state                                              BCMOLT_GPON_ONU_SET_ONU_STATE_ID_ONU_STATE
+#define bcmolt_gpon_onu_set_onu_state_id__num_of                                                BCMOLT_GPON_ONU_SET_ONU_STATE_ID__NUM_OF
+#define bcmolt_gpon_onu_cpu_packets_id_packet_type                                              BCMOLT_GPON_ONU_CPU_PACKETS_ID_PACKET_TYPE
+#define bcmolt_gpon_onu_cpu_packets_id_calc_crc                                                 BCMOLT_GPON_ONU_CPU_PACKETS_ID_CALC_CRC
+#define bcmolt_gpon_onu_cpu_packets_id_number_of_packets                                        BCMOLT_GPON_ONU_CPU_PACKETS_ID_NUMBER_OF_PACKETS
+#define bcmolt_gpon_onu_cpu_packets_id_packet_size                                              BCMOLT_GPON_ONU_CPU_PACKETS_ID_PACKET_SIZE
+#define bcmolt_gpon_onu_cpu_packets_id_buffer                                                   BCMOLT_GPON_ONU_CPU_PACKETS_ID_BUFFER
+#define bcmolt_gpon_onu_cpu_packets_id__num_of                                                  BCMOLT_GPON_ONU_CPU_PACKETS_ID__NUM_OF
+#define bcmolt_gpon_onu_ploam_packet_id_ploam                                                   BCMOLT_GPON_ONU_PLOAM_PACKET_ID_PLOAM
+#define bcmolt_gpon_onu_ploam_packet_id__num_of                                                 BCMOLT_GPON_ONU_PLOAM_PACKET_ID__NUM_OF
+#define bcmolt_gpon_onu_cpu_packet_id_port_id                                                   BCMOLT_GPON_ONU_CPU_PACKET_ID_PORT_ID
+#define bcmolt_gpon_onu_cpu_packet_id_crc_ok                                                    BCMOLT_GPON_ONU_CPU_PACKET_ID_CRC_OK
+#define bcmolt_gpon_onu_cpu_packet_id_packet_size                                               BCMOLT_GPON_ONU_CPU_PACKET_ID_PACKET_SIZE
+#define bcmolt_gpon_onu_cpu_packet_id_buffer                                                    BCMOLT_GPON_ONU_CPU_PACKET_ID_BUFFER
+#define bcmolt_gpon_onu_cpu_packet_id__num_of                                                   BCMOLT_GPON_ONU_CPU_PACKET_ID__NUM_OF
+#define bcmolt_gpon_onu_omci_packet_id_port_id                                                  BCMOLT_GPON_ONU_OMCI_PACKET_ID_PORT_ID
+#define bcmolt_gpon_onu_omci_packet_id_crc_ok                                                   BCMOLT_GPON_ONU_OMCI_PACKET_ID_CRC_OK
+#define bcmolt_gpon_onu_omci_packet_id_packet_size                                              BCMOLT_GPON_ONU_OMCI_PACKET_ID_PACKET_SIZE
+#define bcmolt_gpon_onu_omci_packet_id_buffer                                                   BCMOLT_GPON_ONU_OMCI_PACKET_ID_BUFFER
+#define bcmolt_gpon_onu_omci_packet_id__num_of                                                  BCMOLT_GPON_ONU_OMCI_PACKET_ID__NUM_OF
+#define bcmolt_gpon_trx_key_id_pon_ni                                                           BCMOLT_GPON_TRX_KEY_ID_PON_NI
+#define bcmolt_gpon_trx_key_id__num_of                                                          BCMOLT_GPON_TRX_KEY_ID__NUM_OF
+#define bcmolt_gpon_trx_cfg_id_transceiver_type                                                 BCMOLT_GPON_TRX_CFG_ID_TRANSCEIVER_TYPE
+#define bcmolt_gpon_trx_cfg_id_la_configuration                                                 BCMOLT_GPON_TRX_CFG_ID_LA_CONFIGURATION
+#define bcmolt_gpon_trx_cfg_id_bcdr                                                             BCMOLT_GPON_TRX_CFG_ID_BCDR
+#define bcmolt_gpon_trx_cfg_id_la_ranging_after_no_ed_resync                                    BCMOLT_GPON_TRX_CFG_ID_LA_RANGING_AFTER_NO_ED_RESYNC
+#define bcmolt_gpon_trx_cfg_id_bcdr_ranging_after_no_ed_resync                                  BCMOLT_GPON_TRX_CFG_ID_BCDR_RANGING_AFTER_NO_ED_RESYNC
+#define bcmolt_gpon_trx_cfg_id_la_ranging_after_ed_resync                                       BCMOLT_GPON_TRX_CFG_ID_LA_RANGING_AFTER_ED_RESYNC
+#define bcmolt_gpon_trx_cfg_id_bcdr_ranging_after_ed_resync                                     BCMOLT_GPON_TRX_CFG_ID_BCDR_RANGING_AFTER_ED_RESYNC
+#define bcmolt_gpon_trx_cfg_id_la_resync_polarity                                               BCMOLT_GPON_TRX_CFG_ID_LA_RESYNC_POLARITY
+#define bcmolt_gpon_trx_cfg_id_bcdr_resync_polarity                                             BCMOLT_GPON_TRX_CFG_ID_BCDR_RESYNC_POLARITY
+#define bcmolt_gpon_trx_cfg_id_bcdr_ranging_resync_conditions                                   BCMOLT_GPON_TRX_CFG_ID_BCDR_RANGING_RESYNC_CONDITIONS
+#define bcmolt_gpon_trx_cfg_id_la_ranging_resync_conditions                                     BCMOLT_GPON_TRX_CFG_ID_LA_RANGING_RESYNC_CONDITIONS
+#define bcmolt_gpon_trx_cfg_id_rx_configuration                                                 BCMOLT_GPON_TRX_CFG_ID_RX_CONFIGURATION
+#define bcmolt_gpon_trx_cfg_id_ranging_control_stages_configuration                             BCMOLT_GPON_TRX_CFG_ID_RANGING_CONTROL_STAGES_CONFIGURATION
+#define bcmolt_gpon_trx_cfg_id_energy_detect                                                    BCMOLT_GPON_TRX_CFG_ID_ENERGY_DETECT
+#define bcmolt_gpon_trx_cfg_id_end_of_burst_data_pattern                                        BCMOLT_GPON_TRX_CFG_ID_END_OF_BURST_DATA_PATTERN
+#define bcmolt_gpon_trx_cfg_id_end_of_burst_ranging_pattern                                     BCMOLT_GPON_TRX_CFG_ID_END_OF_BURST_RANGING_PATTERN
+#define bcmolt_gpon_trx_cfg_id_preamble                                                         BCMOLT_GPON_TRX_CFG_ID_PREAMBLE
+#define bcmolt_gpon_trx_cfg_id_delimiter                                                        BCMOLT_GPON_TRX_CFG_ID_DELIMITER
+#define bcmolt_gpon_trx_cfg_id_guard_bits                                                       BCMOLT_GPON_TRX_CFG_ID_GUARD_BITS
+#define bcmolt_gpon_trx_cfg_id_serdes_configuration                                             BCMOLT_GPON_TRX_CFG_ID_SERDES_CONFIGURATION
+#define bcmolt_gpon_trx_cfg_id_plo_ranging                                                      BCMOLT_GPON_TRX_CFG_ID_PLO_RANGING
+#define bcmolt_gpon_trx_cfg_id_plo_data                                                         BCMOLT_GPON_TRX_CFG_ID_PLO_DATA
+#define bcmolt_gpon_trx_cfg_id_rssi_normal_config                                               BCMOLT_GPON_TRX_CFG_ID_RSSI_NORMAL_CONFIG
+#define bcmolt_gpon_trx_cfg_id_ranging_rssi_resync_control                                      BCMOLT_GPON_TRX_CFG_ID_RANGING_RSSI_RESYNC_CONTROL
+#define bcmolt_gpon_trx_cfg_id__num_of                                                          BCMOLT_GPON_TRX_CFG_ID__NUM_OF
+#define bcmolt_log_entry_key_id_log_id                                                          BCMOLT_LOG_ENTRY_KEY_ID_LOG_ID
+#define bcmolt_log_entry_key_id_reserved                                                        BCMOLT_LOG_ENTRY_KEY_ID_RESERVED
+#define bcmolt_log_entry_key_id_name                                                            BCMOLT_LOG_ENTRY_KEY_ID_NAME
+#define bcmolt_log_entry_key_id__num_of                                                         BCMOLT_LOG_ENTRY_KEY_ID__NUM_OF
+#define bcmolt_log_entry_cfg_id_default_log_level                                               BCMOLT_LOG_ENTRY_CFG_ID_DEFAULT_LOG_LEVEL
+#define bcmolt_log_entry_cfg_id_default_log_type                                                BCMOLT_LOG_ENTRY_CFG_ID_DEFAULT_LOG_TYPE
+#define bcmolt_log_entry_cfg_id_log_level_print                                                 BCMOLT_LOG_ENTRY_CFG_ID_LOG_LEVEL_PRINT
+#define bcmolt_log_entry_cfg_id_log_level_save                                                  BCMOLT_LOG_ENTRY_CFG_ID_LOG_LEVEL_SAVE
+#define bcmolt_log_entry_cfg_id_log_type                                                        BCMOLT_LOG_ENTRY_CFG_ID_LOG_TYPE
+#define bcmolt_log_entry_cfg_id_log_style                                                       BCMOLT_LOG_ENTRY_CFG_ID_LOG_STYLE
+#define bcmolt_log_entry_cfg_id_log_name                                                        BCMOLT_LOG_ENTRY_CFG_ID_LOG_NAME
+#define bcmolt_log_entry_cfg_id__num_of                                                         BCMOLT_LOG_ENTRY_CFG_ID__NUM_OF
+#define bcmolt_log_entry_stat_id_msg_count                                                      BCMOLT_LOG_ENTRY_STAT_ID_MSG_COUNT
+#define bcmolt_log_entry_stat_id_lost_msg_count                                                 BCMOLT_LOG_ENTRY_STAT_ID_LOST_MSG_COUNT
+#define bcmolt_log_entry_stat_id__num_of                                                        BCMOLT_LOG_ENTRY_STAT_ID__NUM_OF
+#define bcmolt_log_entry_stat_cfg_id_cfg                                                        BCMOLT_LOG_ENTRY_STAT_CFG_ID_CFG
+#define bcmolt_log_entry_stat_cfg_id__num_of                                                    BCMOLT_LOG_ENTRY_STAT_CFG_ID__NUM_OF
+#define bcmolt_log_entry_stat_alarm_cleared_id_stat                                             BCMOLT_LOG_ENTRY_STAT_ALARM_CLEARED_ID_STAT
+#define bcmolt_log_entry_stat_alarm_cleared_id__num_of                                          BCMOLT_LOG_ENTRY_STAT_ALARM_CLEARED_ID__NUM_OF
+#define bcmolt_log_entry_stat_alarm_raised_id_stat                                              BCMOLT_LOG_ENTRY_STAT_ALARM_RAISED_ID_STAT
+#define bcmolt_log_entry_stat_alarm_raised_id__num_of                                           BCMOLT_LOG_ENTRY_STAT_ALARM_RAISED_ID__NUM_OF
+#define bcmolt_log_entry_auto_cfg_id_stat_alarm_cleared                                         BCMOLT_LOG_ENTRY_AUTO_CFG_ID_STAT_ALARM_CLEARED
+#define bcmolt_log_entry_auto_cfg_id_stat_alarm_raised                                          BCMOLT_LOG_ENTRY_AUTO_CFG_ID_STAT_ALARM_RAISED
+#define bcmolt_log_entry_auto_cfg_id__num_of                                                    BCMOLT_LOG_ENTRY_AUTO_CFG_ID__NUM_OF
+#define bcmolt_logger_key_id_reserved                                                           BCMOLT_LOGGER_KEY_ID_RESERVED
+#define bcmolt_logger_key_id_file_id                                                            BCMOLT_LOGGER_KEY_ID_FILE_ID
+#define bcmolt_logger_key_id__num_of                                                            BCMOLT_LOGGER_KEY_ID__NUM_OF
+#define bcmolt_logger_cfg_id_buffer                                                             BCMOLT_LOGGER_CFG_ID_BUFFER
+#define bcmolt_logger_cfg_id_wrap_around                                                        BCMOLT_LOGGER_CFG_ID_WRAP_AROUND
+#define bcmolt_logger_cfg_id_clear_after_read                                                   BCMOLT_LOGGER_CFG_ID_CLEAR_AFTER_READ
+#define bcmolt_logger_cfg_id_enable_log                                                         BCMOLT_LOGGER_CFG_ID_ENABLE_LOG
+#define bcmolt_logger_cfg_id_log_names                                                          BCMOLT_LOGGER_CFG_ID_LOG_NAMES
+#define bcmolt_logger_cfg_id__num_of                                                            BCMOLT_LOGGER_CFG_ID__NUM_OF
+#define bcmolt_logger_stat_id_lines_in_log                                                      BCMOLT_LOGGER_STAT_ID_LINES_IN_LOG
+#define bcmolt_logger_stat_id__num_of                                                           BCMOLT_LOGGER_STAT_ID__NUM_OF
+#define bcmolt_logger_stat_cfg_id_cfg                                                           BCMOLT_LOGGER_STAT_CFG_ID_CFG
+#define bcmolt_logger_stat_cfg_id__num_of                                                       BCMOLT_LOGGER_STAT_CFG_ID__NUM_OF
+#define bcmolt_logger_stat_alarm_cleared_id_stat                                                BCMOLT_LOGGER_STAT_ALARM_CLEARED_ID_STAT
+#define bcmolt_logger_stat_alarm_cleared_id__num_of                                             BCMOLT_LOGGER_STAT_ALARM_CLEARED_ID__NUM_OF
+#define bcmolt_logger_stat_alarm_raised_id_stat                                                 BCMOLT_LOGGER_STAT_ALARM_RAISED_ID_STAT
+#define bcmolt_logger_stat_alarm_raised_id__num_of                                              BCMOLT_LOGGER_STAT_ALARM_RAISED_ID__NUM_OF
+#define bcmolt_logger_auto_cfg_id_stat_alarm_cleared                                            BCMOLT_LOGGER_AUTO_CFG_ID_STAT_ALARM_CLEARED
+#define bcmolt_logger_auto_cfg_id_stat_alarm_raised                                             BCMOLT_LOGGER_AUTO_CFG_ID_STAT_ALARM_RAISED
+#define bcmolt_logger_auto_cfg_id__num_of                                                       BCMOLT_LOGGER_AUTO_CFG_ID__NUM_OF
+#define bcmolt_logger_clear_log_id__num_of                                                      BCMOLT_LOGGER_CLEAR_LOG_ID__NUM_OF
+#define bcmolt_nni_key_id_pon_ni                                                                BCMOLT_NNI_KEY_ID_PON_NI
+#define bcmolt_nni_key_id__num_of                                                               BCMOLT_NNI_KEY_ID__NUM_OF
+#define bcmolt_nni_cfg_id_remote_loopback                                                       BCMOLT_NNI_CFG_ID_REMOTE_LOOPBACK
+#define bcmolt_nni_cfg_id_line_loopback                                                         BCMOLT_NNI_CFG_ID_LINE_LOOPBACK
+#define bcmolt_nni_cfg_id_mac_address                                                           BCMOLT_NNI_CFG_ID_MAC_ADDRESS
+#define bcmolt_nni_cfg_id_nni_status                                                            BCMOLT_NNI_CFG_ID_NNI_STATUS
+#define bcmolt_nni_cfg_id_nni_backup_status                                                     BCMOLT_NNI_CFG_ID_NNI_BACKUP_STATUS
+#define bcmolt_nni_cfg_id_active_nni                                                            BCMOLT_NNI_CFG_ID_ACTIVE_NNI
+#define bcmolt_nni_cfg_id_nni_status_polling_interval_ms                                        BCMOLT_NNI_CFG_ID_NNI_STATUS_POLLING_INTERVAL_MS
+#define bcmolt_nni_cfg_id_autoswitch                                                            BCMOLT_NNI_CFG_ID_AUTOSWITCH
+#define bcmolt_nni_cfg_id_flow_control                                                          BCMOLT_NNI_CFG_ID_FLOW_CONTROL
+#define bcmolt_nni_cfg_id__num_of                                                               BCMOLT_NNI_CFG_ID__NUM_OF
+#define bcmolt_nni_stat_id_rx_frames_64                                                         BCMOLT_NNI_STAT_ID_RX_FRAMES_64
+#define bcmolt_nni_stat_id_rx_frames_65_127                                                     BCMOLT_NNI_STAT_ID_RX_FRAMES_65_127
+#define bcmolt_nni_stat_id_rx_frames_128_255                                                    BCMOLT_NNI_STAT_ID_RX_FRAMES_128_255
+#define bcmolt_nni_stat_id_rx_frames_256_511                                                    BCMOLT_NNI_STAT_ID_RX_FRAMES_256_511
+#define bcmolt_nni_stat_id_rx_frames_512_1023                                                   BCMOLT_NNI_STAT_ID_RX_FRAMES_512_1023
+#define bcmolt_nni_stat_id_rx_frames_1024_1518                                                  BCMOLT_NNI_STAT_ID_RX_FRAMES_1024_1518
+#define bcmolt_nni_stat_id_rx_frames_1519_2047                                                  BCMOLT_NNI_STAT_ID_RX_FRAMES_1519_2047
+#define bcmolt_nni_stat_id_rx_frames_2048_4095                                                  BCMOLT_NNI_STAT_ID_RX_FRAMES_2048_4095
+#define bcmolt_nni_stat_id_rx_frames_4096_9216                                                  BCMOLT_NNI_STAT_ID_RX_FRAMES_4096_9216
+#define bcmolt_nni_stat_id_rx_frames_9217_16383                                                 BCMOLT_NNI_STAT_ID_RX_FRAMES_9217_16383
+#define bcmolt_nni_stat_id_rx_frames                                                            BCMOLT_NNI_STAT_ID_RX_FRAMES
+#define bcmolt_nni_stat_id_rx_bytes                                                             BCMOLT_NNI_STAT_ID_RX_BYTES
+#define bcmolt_nni_stat_id_rx_good_frames                                                       BCMOLT_NNI_STAT_ID_RX_GOOD_FRAMES
+#define bcmolt_nni_stat_id_rx_unicast_frames                                                    BCMOLT_NNI_STAT_ID_RX_UNICAST_FRAMES
+#define bcmolt_nni_stat_id_rx_multicast_frames                                                  BCMOLT_NNI_STAT_ID_RX_MULTICAST_FRAMES
+#define bcmolt_nni_stat_id_rx_broadcast_frames                                                  BCMOLT_NNI_STAT_ID_RX_BROADCAST_FRAMES
+#define bcmolt_nni_stat_id_rx_fcs_errors                                                        BCMOLT_NNI_STAT_ID_RX_FCS_ERRORS
+#define bcmolt_nni_stat_id_rx_control_frames                                                    BCMOLT_NNI_STAT_ID_RX_CONTROL_FRAMES
+#define bcmolt_nni_stat_id_rx_pause_frames                                                      BCMOLT_NNI_STAT_ID_RX_PAUSE_FRAMES
+#define bcmolt_nni_stat_id_rx_pfc_frames                                                        BCMOLT_NNI_STAT_ID_RX_PFC_FRAMES
+#define bcmolt_nni_stat_id_rx_unsupported_opcode                                                BCMOLT_NNI_STAT_ID_RX_UNSUPPORTED_OPCODE
+#define bcmolt_nni_stat_id_rx_unsupported_da                                                    BCMOLT_NNI_STAT_ID_RX_UNSUPPORTED_DA
+#define bcmolt_nni_stat_id_rx_alignment_errors                                                  BCMOLT_NNI_STAT_ID_RX_ALIGNMENT_ERRORS
+#define bcmolt_nni_stat_id_rx_length_out_of_range                                               BCMOLT_NNI_STAT_ID_RX_LENGTH_OUT_OF_RANGE
+#define bcmolt_nni_stat_id_rx_code_errors                                                       BCMOLT_NNI_STAT_ID_RX_CODE_ERRORS
+#define bcmolt_nni_stat_id_rx_oversized_frames                                                  BCMOLT_NNI_STAT_ID_RX_OVERSIZED_FRAMES
+#define bcmolt_nni_stat_id_rx_jabber_frames                                                     BCMOLT_NNI_STAT_ID_RX_JABBER_FRAMES
+#define bcmolt_nni_stat_id_rx_mtu_check_errors                                                  BCMOLT_NNI_STAT_ID_RX_MTU_CHECK_ERRORS
+#define bcmolt_nni_stat_id_rx_promiscuous_frames                                                BCMOLT_NNI_STAT_ID_RX_PROMISCUOUS_FRAMES
+#define bcmolt_nni_stat_id_rx_vlan_frames                                                       BCMOLT_NNI_STAT_ID_RX_VLAN_FRAMES
+#define bcmolt_nni_stat_id_rx_double_vlan_frames                                                BCMOLT_NNI_STAT_ID_RX_DOUBLE_VLAN_FRAMES
+#define bcmolt_nni_stat_id_rx_truncated_frames                                                  BCMOLT_NNI_STAT_ID_RX_TRUNCATED_FRAMES
+#define bcmolt_nni_stat_id_rx_undersize_frames                                                  BCMOLT_NNI_STAT_ID_RX_UNDERSIZE_FRAMES
+#define bcmolt_nni_stat_id_rx_fragmented_frames                                                 BCMOLT_NNI_STAT_ID_RX_FRAGMENTED_FRAMES
+#define bcmolt_nni_stat_id_rx_runt_frames                                                       BCMOLT_NNI_STAT_ID_RX_RUNT_FRAMES
+#define bcmolt_nni_stat_id_tx_frames_64                                                         BCMOLT_NNI_STAT_ID_TX_FRAMES_64
+#define bcmolt_nni_stat_id_tx_frames_65_127                                                     BCMOLT_NNI_STAT_ID_TX_FRAMES_65_127
+#define bcmolt_nni_stat_id_tx_frames_128_255                                                    BCMOLT_NNI_STAT_ID_TX_FRAMES_128_255
+#define bcmolt_nni_stat_id_tx_frames_256_511                                                    BCMOLT_NNI_STAT_ID_TX_FRAMES_256_511
+#define bcmolt_nni_stat_id_tx_frames_512_1023                                                   BCMOLT_NNI_STAT_ID_TX_FRAMES_512_1023
+#define bcmolt_nni_stat_id_tx_frames_1024_1518                                                  BCMOLT_NNI_STAT_ID_TX_FRAMES_1024_1518
+#define bcmolt_nni_stat_id_tx_frames_1519_2047                                                  BCMOLT_NNI_STAT_ID_TX_FRAMES_1519_2047
+#define bcmolt_nni_stat_id_tx_frames_2048_4095                                                  BCMOLT_NNI_STAT_ID_TX_FRAMES_2048_4095
+#define bcmolt_nni_stat_id_tx_frames_4096_9216                                                  BCMOLT_NNI_STAT_ID_TX_FRAMES_4096_9216
+#define bcmolt_nni_stat_id_tx_frames_9217_16383                                                 BCMOLT_NNI_STAT_ID_TX_FRAMES_9217_16383
+#define bcmolt_nni_stat_id_tx_frames                                                            BCMOLT_NNI_STAT_ID_TX_FRAMES
+#define bcmolt_nni_stat_id_tx_bytes                                                             BCMOLT_NNI_STAT_ID_TX_BYTES
+#define bcmolt_nni_stat_id_tx_good_frames                                                       BCMOLT_NNI_STAT_ID_TX_GOOD_FRAMES
+#define bcmolt_nni_stat_id_tx_unicast_frames                                                    BCMOLT_NNI_STAT_ID_TX_UNICAST_FRAMES
+#define bcmolt_nni_stat_id_tx_multicast_frames                                                  BCMOLT_NNI_STAT_ID_TX_MULTICAST_FRAMES
+#define bcmolt_nni_stat_id_tx_broadcast_frames                                                  BCMOLT_NNI_STAT_ID_TX_BROADCAST_FRAMES
+#define bcmolt_nni_stat_id_tx_pause_frames                                                      BCMOLT_NNI_STAT_ID_TX_PAUSE_FRAMES
+#define bcmolt_nni_stat_id_tx_pfc_frames                                                        BCMOLT_NNI_STAT_ID_TX_PFC_FRAMES
+#define bcmolt_nni_stat_id_tx_jabber_frames                                                     BCMOLT_NNI_STAT_ID_TX_JABBER_FRAMES
+#define bcmolt_nni_stat_id_tx_fcs_errors                                                        BCMOLT_NNI_STAT_ID_TX_FCS_ERRORS
+#define bcmolt_nni_stat_id_tx_control_frames                                                    BCMOLT_NNI_STAT_ID_TX_CONTROL_FRAMES
+#define bcmolt_nni_stat_id_tx_oversize_frames                                                   BCMOLT_NNI_STAT_ID_TX_OVERSIZE_FRAMES
+#define bcmolt_nni_stat_id_tx_fragmented_frames                                                 BCMOLT_NNI_STAT_ID_TX_FRAGMENTED_FRAMES
+#define bcmolt_nni_stat_id_tx_error_frames                                                      BCMOLT_NNI_STAT_ID_TX_ERROR_FRAMES
+#define bcmolt_nni_stat_id_tx_vlan_frames                                                       BCMOLT_NNI_STAT_ID_TX_VLAN_FRAMES
+#define bcmolt_nni_stat_id_tx_double_vlan_frames                                                BCMOLT_NNI_STAT_ID_TX_DOUBLE_VLAN_FRAMES
+#define bcmolt_nni_stat_id_tx_runt_frames                                                       BCMOLT_NNI_STAT_ID_TX_RUNT_FRAMES
+#define bcmolt_nni_stat_id_tx_underrun_frames                                                   BCMOLT_NNI_STAT_ID_TX_UNDERRUN_FRAMES
+#define bcmolt_nni_stat_id__num_of                                                              BCMOLT_NNI_STAT_ID__NUM_OF
+#define bcmolt_nni_stat_cfg_id_cfg                                                              BCMOLT_NNI_STAT_CFG_ID_CFG
+#define bcmolt_nni_stat_cfg_id__num_of                                                          BCMOLT_NNI_STAT_CFG_ID__NUM_OF
+#define bcmolt_nni_stat_alarm_cleared_id_stat                                                   BCMOLT_NNI_STAT_ALARM_CLEARED_ID_STAT
+#define bcmolt_nni_stat_alarm_cleared_id__num_of                                                BCMOLT_NNI_STAT_ALARM_CLEARED_ID__NUM_OF
+#define bcmolt_nni_stat_alarm_raised_id_stat                                                    BCMOLT_NNI_STAT_ALARM_RAISED_ID_STAT
+#define bcmolt_nni_stat_alarm_raised_id__num_of                                                 BCMOLT_NNI_STAT_ALARM_RAISED_ID__NUM_OF
+#define bcmolt_nni_status_changed_id_new_status                                                 BCMOLT_NNI_STATUS_CHANGED_ID_NEW_STATUS
+#define bcmolt_nni_status_changed_id_link                                                       BCMOLT_NNI_STATUS_CHANGED_ID_LINK
+#define bcmolt_nni_status_changed_id_previous_active                                            BCMOLT_NNI_STATUS_CHANGED_ID_PREVIOUS_ACTIVE
+#define bcmolt_nni_status_changed_id_new_active                                                 BCMOLT_NNI_STATUS_CHANGED_ID_NEW_ACTIVE
+#define bcmolt_nni_status_changed_id__num_of                                                    BCMOLT_NNI_STATUS_CHANGED_ID__NUM_OF
+#define bcmolt_nni_auto_cfg_id_stat_alarm_cleared                                               BCMOLT_NNI_AUTO_CFG_ID_STAT_ALARM_CLEARED
+#define bcmolt_nni_auto_cfg_id_stat_alarm_raised                                                BCMOLT_NNI_AUTO_CFG_ID_STAT_ALARM_RAISED
+#define bcmolt_nni_auto_cfg_id_status_changed                                                   BCMOLT_NNI_AUTO_CFG_ID_STATUS_CHANGED
+#define bcmolt_nni_auto_cfg_id__num_of                                                          BCMOLT_NNI_AUTO_CFG_ID__NUM_OF
+#define bcmolt_nni_serdes_key_id_pon_ni                                                         BCMOLT_NNI_SERDES_KEY_ID_PON_NI
+#define bcmolt_nni_serdes_key_id_instance                                                       BCMOLT_NNI_SERDES_KEY_ID_INSTANCE
+#define bcmolt_nni_serdes_key_id__num_of                                                        BCMOLT_NNI_SERDES_KEY_ID__NUM_OF
+#define bcmolt_nni_serdes_cfg_id_rx_vga                                                         BCMOLT_NNI_SERDES_CFG_ID_RX_VGA
+#define bcmolt_nni_serdes_cfg_id_rx_pf                                                          BCMOLT_NNI_SERDES_CFG_ID_RX_PF
+#define bcmolt_nni_serdes_cfg_id_rx_lfpf                                                        BCMOLT_NNI_SERDES_CFG_ID_RX_LFPF
+#define bcmolt_nni_serdes_cfg_id_rx_dfe1                                                        BCMOLT_NNI_SERDES_CFG_ID_RX_DFE1
+#define bcmolt_nni_serdes_cfg_id_rx_dfe2                                                        BCMOLT_NNI_SERDES_CFG_ID_RX_DFE2
+#define bcmolt_nni_serdes_cfg_id_rx_dfe3                                                        BCMOLT_NNI_SERDES_CFG_ID_RX_DFE3
+#define bcmolt_nni_serdes_cfg_id_rx_dfe4                                                        BCMOLT_NNI_SERDES_CFG_ID_RX_DFE4
+#define bcmolt_nni_serdes_cfg_id_rx_dfe5                                                        BCMOLT_NNI_SERDES_CFG_ID_RX_DFE5
+#define bcmolt_nni_serdes_cfg_id_tx_pre                                                         BCMOLT_NNI_SERDES_CFG_ID_TX_PRE
+#define bcmolt_nni_serdes_cfg_id_tx_main                                                        BCMOLT_NNI_SERDES_CFG_ID_TX_MAIN
+#define bcmolt_nni_serdes_cfg_id_tx_post1                                                       BCMOLT_NNI_SERDES_CFG_ID_TX_POST1
+#define bcmolt_nni_serdes_cfg_id_tx_post2                                                       BCMOLT_NNI_SERDES_CFG_ID_TX_POST2
+#define bcmolt_nni_serdes_cfg_id_tx_post3                                                       BCMOLT_NNI_SERDES_CFG_ID_TX_POST3
+#define bcmolt_nni_serdes_cfg_id_tx_amp                                                         BCMOLT_NNI_SERDES_CFG_ID_TX_AMP
+#define bcmolt_nni_serdes_cfg_id__num_of                                                        BCMOLT_NNI_SERDES_CFG_ID__NUM_OF
+#define bcmolt_software_error_key_id_reserved                                                   BCMOLT_SOFTWARE_ERROR_KEY_ID_RESERVED
+#define bcmolt_software_error_key_id_idx                                                        BCMOLT_SOFTWARE_ERROR_KEY_ID_IDX
+#define bcmolt_software_error_key_id__num_of                                                    BCMOLT_SOFTWARE_ERROR_KEY_ID__NUM_OF
+#define bcmolt_software_error_cfg_id_entry                                                      BCMOLT_SOFTWARE_ERROR_CFG_ID_ENTRY
+#define bcmolt_software_error_cfg_id__num_of                                                    BCMOLT_SOFTWARE_ERROR_CFG_ID__NUM_OF
+#define bcmolt_trx_calibration_key_id_reserved                                                  BCMOLT_TRX_CALIBRATION_KEY_ID_RESERVED
+#define bcmolt_trx_calibration_key_id__num_of                                                   BCMOLT_TRX_CALIBRATION_KEY_ID__NUM_OF
+#define bcmolt_trx_calibration_capture_window_and_statistic_completed_id_data_window            BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_DATA_WINDOW
+#define bcmolt_trx_calibration_capture_window_and_statistic_completed_id_strobe_window          BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_STROBE_WINDOW
+#define bcmolt_trx_calibration_capture_window_and_statistic_completed_id_edge_rise_min_min      BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_RISE_MIN_MIN
+#define bcmolt_trx_calibration_capture_window_and_statistic_completed_id_edge_rise_min_max      BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_RISE_MIN_MAX
+#define bcmolt_trx_calibration_capture_window_and_statistic_completed_id_edge_rise_max_min      BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_RISE_MAX_MIN
+#define bcmolt_trx_calibration_capture_window_and_statistic_completed_id_edge_rise_max_max      BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_RISE_MAX_MAX
+#define bcmolt_trx_calibration_capture_window_and_statistic_completed_id_edge_fall_min_min      BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_FALL_MIN_MIN
+#define bcmolt_trx_calibration_capture_window_and_statistic_completed_id_edge_fall_min_max      BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_FALL_MIN_MAX
+#define bcmolt_trx_calibration_capture_window_and_statistic_completed_id_edge_fall_max_min      BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_FALL_MAX_MIN
+#define bcmolt_trx_calibration_capture_window_and_statistic_completed_id_edge_fall_max_max      BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_FALL_MAX_MAX
+#define bcmolt_trx_calibration_capture_window_and_statistic_completed_id_result                 BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_RESULT
+#define bcmolt_trx_calibration_capture_window_and_statistic_completed_id__num_of                BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID__NUM_OF
+#define bcmolt_trx_calibration_auto_cfg_id_capture_window_and_statistic_completed               BCMOLT_TRX_CALIBRATION_AUTO_CFG_ID_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED
+#define bcmolt_trx_calibration_auto_cfg_id__num_of                                              BCMOLT_TRX_CALIBRATION_AUTO_CFG_ID__NUM_OF
+#define bcmolt_trx_calibration_start_capture_window_id_pon_ni                                   BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_PON_NI
+#define bcmolt_trx_calibration_start_capture_window_id_trigger                                  BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_TRIGGER
+#define bcmolt_trx_calibration_start_capture_window_id_strobe                                   BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_STROBE
+#define bcmolt_trx_calibration_start_capture_window_id_window_mode                              BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_WINDOW_MODE
+#define bcmolt_trx_calibration_start_capture_window_id_onu_id                                   BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_ONU_ID
+#define bcmolt_trx_calibration_start_capture_window_id_trigger_position                         BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_TRIGGER_POSITION
+#define bcmolt_trx_calibration_start_capture_window_id_stop_due_to_corrupt_strobe               BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_STOP_DUE_TO_CORRUPT_STROBE
+#define bcmolt_trx_calibration_start_capture_window_id_start_offset                             BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_START_OFFSET
+#define bcmolt_trx_calibration_start_capture_window_id_end_offset                               BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_END_OFFSET
+#define bcmolt_trx_calibration_start_capture_window_id_number_of_cycles                         BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_NUMBER_OF_CYCLES
+#define bcmolt_trx_calibration_start_capture_window_id__num_of                                  BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID__NUM_OF
+#define bcmolt_trx_calibration_stop_capture_window_id_pon_ni                                    BCMOLT_TRX_CALIBRATION_STOP_CAPTURE_WINDOW_ID_PON_NI
+#define bcmolt_trx_calibration_stop_capture_window_id__num_of                                   BCMOLT_TRX_CALIBRATION_STOP_CAPTURE_WINDOW_ID__NUM_OF
+#define bcmolt_xgpon_alloc_key_id_pon_ni                                                        BCMOLT_XGPON_ALLOC_KEY_ID_PON_NI
+#define bcmolt_xgpon_alloc_key_id_alloc_id                                                      BCMOLT_XGPON_ALLOC_KEY_ID_ALLOC_ID
+#define bcmolt_xgpon_alloc_key_id__num_of                                                       BCMOLT_XGPON_ALLOC_KEY_ID__NUM_OF
+#define bcmolt_xgpon_alloc_cfg_id_state                                                         BCMOLT_XGPON_ALLOC_CFG_ID_STATE
+#define bcmolt_xgpon_alloc_cfg_id_sla                                                           BCMOLT_XGPON_ALLOC_CFG_ID_SLA
+#define bcmolt_xgpon_alloc_cfg_id_onu_id                                                        BCMOLT_XGPON_ALLOC_CFG_ID_ONU_ID
+#define bcmolt_xgpon_alloc_cfg_id_collect_stats                                                 BCMOLT_XGPON_ALLOC_CFG_ID_COLLECT_STATS
+#define bcmolt_xgpon_alloc_cfg_id__num_of                                                       BCMOLT_XGPON_ALLOC_CFG_ID__NUM_OF
+#define bcmolt_xgpon_alloc_stat_id_rx_bytes                                                     BCMOLT_XGPON_ALLOC_STAT_ID_RX_BYTES
+#define bcmolt_xgpon_alloc_stat_id__num_of                                                      BCMOLT_XGPON_ALLOC_STAT_ID__NUM_OF
+#define bcmolt_xgpon_alloc_stat_cfg_id_cfg                                                      BCMOLT_XGPON_ALLOC_STAT_CFG_ID_CFG
+#define bcmolt_xgpon_alloc_stat_cfg_id__num_of                                                  BCMOLT_XGPON_ALLOC_STAT_CFG_ID__NUM_OF
+#define bcmolt_xgpon_alloc_configuration_completed_id_status                                    BCMOLT_XGPON_ALLOC_CONFIGURATION_COMPLETED_ID_STATUS
+#define bcmolt_xgpon_alloc_configuration_completed_id_new_state                                 BCMOLT_XGPON_ALLOC_CONFIGURATION_COMPLETED_ID_NEW_STATE
+#define bcmolt_xgpon_alloc_configuration_completed_id__num_of                                   BCMOLT_XGPON_ALLOC_CONFIGURATION_COMPLETED_ID__NUM_OF
+#define bcmolt_xgpon_alloc_get_alloc_stats_completed_id_status                                  BCMOLT_XGPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_STATUS
+#define bcmolt_xgpon_alloc_get_alloc_stats_completed_id_average_nsr_used                        BCMOLT_XGPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_AVERAGE_NSR_USED
+#define bcmolt_xgpon_alloc_get_alloc_stats_completed_id_average_nsr_allocated                   BCMOLT_XGPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_AVERAGE_NSR_ALLOCATED
+#define bcmolt_xgpon_alloc_get_alloc_stats_completed_id_average_sr_report                       BCMOLT_XGPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_AVERAGE_SR_REPORT
+#define bcmolt_xgpon_alloc_get_alloc_stats_completed_id__num_of                                 BCMOLT_XGPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID__NUM_OF
+#define bcmolt_xgpon_alloc_stat_alarm_cleared_id_stat                                           BCMOLT_XGPON_ALLOC_STAT_ALARM_CLEARED_ID_STAT
+#define bcmolt_xgpon_alloc_stat_alarm_cleared_id__num_of                                        BCMOLT_XGPON_ALLOC_STAT_ALARM_CLEARED_ID__NUM_OF
+#define bcmolt_xgpon_alloc_stat_alarm_raised_id_stat                                            BCMOLT_XGPON_ALLOC_STAT_ALARM_RAISED_ID_STAT
+#define bcmolt_xgpon_alloc_stat_alarm_raised_id__num_of                                         BCMOLT_XGPON_ALLOC_STAT_ALARM_RAISED_ID__NUM_OF
+#define bcmolt_xgpon_alloc_auto_cfg_id_configuration_completed                                  BCMOLT_XGPON_ALLOC_AUTO_CFG_ID_CONFIGURATION_COMPLETED
+#define bcmolt_xgpon_alloc_auto_cfg_id_get_alloc_stats_completed                                BCMOLT_XGPON_ALLOC_AUTO_CFG_ID_GET_ALLOC_STATS_COMPLETED
+#define bcmolt_xgpon_alloc_auto_cfg_id_stat_alarm_cleared                                       BCMOLT_XGPON_ALLOC_AUTO_CFG_ID_STAT_ALARM_CLEARED
+#define bcmolt_xgpon_alloc_auto_cfg_id_stat_alarm_raised                                        BCMOLT_XGPON_ALLOC_AUTO_CFG_ID_STAT_ALARM_RAISED
+#define bcmolt_xgpon_alloc_auto_cfg_id__num_of                                                  BCMOLT_XGPON_ALLOC_AUTO_CFG_ID__NUM_OF
+#define bcmolt_xgpon_alloc_get_stats_id_num_of_cycles                                           BCMOLT_XGPON_ALLOC_GET_STATS_ID_NUM_OF_CYCLES
+#define bcmolt_xgpon_alloc_get_stats_id__num_of                                                 BCMOLT_XGPON_ALLOC_GET_STATS_ID__NUM_OF
+#define bcmolt_xgpon_alloc_set_state_id_state                                                   BCMOLT_XGPON_ALLOC_SET_STATE_ID_STATE
+#define bcmolt_xgpon_alloc_set_state_id__num_of                                                 BCMOLT_XGPON_ALLOC_SET_STATE_ID__NUM_OF
+#define bcmolt_xgpon_gem_port_key_id_pon_ni                                                     BCMOLT_XGPON_GEM_PORT_KEY_ID_PON_NI
+#define bcmolt_xgpon_gem_port_key_id_gem_port_id                                                BCMOLT_XGPON_GEM_PORT_KEY_ID_GEM_PORT_ID
+#define bcmolt_xgpon_gem_port_key_id__num_of                                                    BCMOLT_XGPON_GEM_PORT_KEY_ID__NUM_OF
+#define bcmolt_xgpon_gem_port_cfg_id_configuration                                              BCMOLT_XGPON_GEM_PORT_CFG_ID_CONFIGURATION
+#define bcmolt_xgpon_gem_port_cfg_id_onu_id                                                     BCMOLT_XGPON_GEM_PORT_CFG_ID_ONU_ID
+#define bcmolt_xgpon_gem_port_cfg_id_gem_port_state                                             BCMOLT_XGPON_GEM_PORT_CFG_ID_GEM_PORT_STATE
+#define bcmolt_xgpon_gem_port_cfg_id_encryption_mode                                            BCMOLT_XGPON_GEM_PORT_CFG_ID_ENCRYPTION_MODE
+#define bcmolt_xgpon_gem_port_cfg_id_upstream_destination_queue                                 BCMOLT_XGPON_GEM_PORT_CFG_ID_UPSTREAM_DESTINATION_QUEUE
+#define bcmolt_xgpon_gem_port_cfg_id_control                                                    BCMOLT_XGPON_GEM_PORT_CFG_ID_CONTROL
+#define bcmolt_xgpon_gem_port_cfg_id__num_of                                                    BCMOLT_XGPON_GEM_PORT_CFG_ID__NUM_OF
+#define bcmolt_xgpon_gem_port_stat_id_tx_bytes                                                  BCMOLT_XGPON_GEM_PORT_STAT_ID_TX_BYTES
+#define bcmolt_xgpon_gem_port_stat_id_tx_packets                                                BCMOLT_XGPON_GEM_PORT_STAT_ID_TX_PACKETS
+#define bcmolt_xgpon_gem_port_stat_id_rx_packets                                                BCMOLT_XGPON_GEM_PORT_STAT_ID_RX_PACKETS
+#define bcmolt_xgpon_gem_port_stat_id_rx_bytes                                                  BCMOLT_XGPON_GEM_PORT_STAT_ID_RX_BYTES
+#define bcmolt_xgpon_gem_port_stat_id__num_of                                                   BCMOLT_XGPON_GEM_PORT_STAT_ID__NUM_OF
+#define bcmolt_xgpon_gem_port_stat_cfg_id_cfg                                                   BCMOLT_XGPON_GEM_PORT_STAT_CFG_ID_CFG
+#define bcmolt_xgpon_gem_port_stat_cfg_id__num_of                                               BCMOLT_XGPON_GEM_PORT_STAT_CFG_ID__NUM_OF
+#define bcmolt_xgpon_gem_port_stat_alarm_cleared_id_stat                                        BCMOLT_XGPON_GEM_PORT_STAT_ALARM_CLEARED_ID_STAT
+#define bcmolt_xgpon_gem_port_stat_alarm_cleared_id__num_of                                     BCMOLT_XGPON_GEM_PORT_STAT_ALARM_CLEARED_ID__NUM_OF
+#define bcmolt_xgpon_gem_port_stat_alarm_raised_id_stat                                         BCMOLT_XGPON_GEM_PORT_STAT_ALARM_RAISED_ID_STAT
+#define bcmolt_xgpon_gem_port_stat_alarm_raised_id__num_of                                      BCMOLT_XGPON_GEM_PORT_STAT_ALARM_RAISED_ID__NUM_OF
+#define bcmolt_xgpon_gem_port_auto_cfg_id_stat_alarm_cleared                                    BCMOLT_XGPON_GEM_PORT_AUTO_CFG_ID_STAT_ALARM_CLEARED
+#define bcmolt_xgpon_gem_port_auto_cfg_id_stat_alarm_raised                                     BCMOLT_XGPON_GEM_PORT_AUTO_CFG_ID_STAT_ALARM_RAISED
+#define bcmolt_xgpon_gem_port_auto_cfg_id__num_of                                               BCMOLT_XGPON_GEM_PORT_AUTO_CFG_ID__NUM_OF
+#define bcmolt_xgpon_iwf_key_id_pon_ni                                                          BCMOLT_XGPON_IWF_KEY_ID_PON_NI
+#define bcmolt_xgpon_iwf_key_id__num_of                                                         BCMOLT_XGPON_IWF_KEY_ID__NUM_OF
+#define bcmolt_xgpon_iwf_cfg_id_us_otag_direct_tpid                                             BCMOLT_XGPON_IWF_CFG_ID_US_OTAG_DIRECT_TPID
+#define bcmolt_xgpon_iwf_cfg_id_ds_tpid                                                         BCMOLT_XGPON_IWF_CFG_ID_DS_TPID
+#define bcmolt_xgpon_iwf_cfg_id__num_of                                                         BCMOLT_XGPON_IWF_CFG_ID__NUM_OF
+#define bcmolt_xgpon_ni_key_id_pon_ni                                                           BCMOLT_XGPON_NI_KEY_ID_PON_NI
+#define bcmolt_xgpon_ni_key_id__num_of                                                          BCMOLT_XGPON_NI_KEY_ID__NUM_OF
+#define bcmolt_xgpon_ni_cfg_id_hw_pon_id                                                        BCMOLT_XGPON_NI_CFG_ID_HW_PON_ID
+#define bcmolt_xgpon_ni_cfg_id_available_bandwidth                                              BCMOLT_XGPON_NI_CFG_ID_AVAILABLE_BANDWIDTH
+#define bcmolt_xgpon_ni_cfg_id_number_of_active_onus                                            BCMOLT_XGPON_NI_CFG_ID_NUMBER_OF_ACTIVE_ONUS
+#define bcmolt_xgpon_ni_cfg_id_pon_status                                                       BCMOLT_XGPON_NI_CFG_ID_PON_STATUS
+#define bcmolt_xgpon_ni_cfg_id_pon_distance                                                     BCMOLT_XGPON_NI_CFG_ID_PON_DISTANCE
+#define bcmolt_xgpon_ni_cfg_id_ranging_window_size                                              BCMOLT_XGPON_NI_CFG_ID_RANGING_WINDOW_SIZE
+#define bcmolt_xgpon_ni_cfg_id_eqd_cycles_number                                                BCMOLT_XGPON_NI_CFG_ID_EQD_CYCLES_NUMBER
+#define bcmolt_xgpon_ni_cfg_id_drift_control                                                    BCMOLT_XGPON_NI_CFG_ID_DRIFT_CONTROL
+#define bcmolt_xgpon_ni_cfg_id_los_alarm_threshold                                              BCMOLT_XGPON_NI_CFG_ID_LOS_ALARM_THRESHOLD
+#define bcmolt_xgpon_ni_cfg_id_los_initial_value                                                BCMOLT_XGPON_NI_CFG_ID_LOS_INITIAL_VALUE
+#define bcmolt_xgpon_ni_cfg_id_onu_alarms_thresholds                                            BCMOLT_XGPON_NI_CFG_ID_ONU_ALARMS_THRESHOLDS
+#define bcmolt_xgpon_ni_cfg_id_ber_monitor                                                      BCMOLT_XGPON_NI_CFG_ID_BER_MONITOR
+#define bcmolt_xgpon_ni_cfg_id_onu_activation                                                   BCMOLT_XGPON_NI_CFG_ID_ONU_ACTIVATION
+#define bcmolt_xgpon_ni_cfg_id_sn_acquisition                                                   BCMOLT_XGPON_NI_CFG_ID_SN_ACQUISITION
+#define bcmolt_xgpon_ni_cfg_id_key_exchange                                                     BCMOLT_XGPON_NI_CFG_ID_KEY_EXCHANGE
+#define bcmolt_xgpon_ni_cfg_id_protection_switching                                             BCMOLT_XGPON_NI_CFG_ID_PROTECTION_SWITCHING
+#define bcmolt_xgpon_ni_cfg_id_protection_switching_debug                                       BCMOLT_XGPON_NI_CFG_ID_PROTECTION_SWITCHING_DEBUG
+#define bcmolt_xgpon_ni_cfg_id_cbr_rt_allocation_profile                                        BCMOLT_XGPON_NI_CFG_ID_CBR_RT_ALLOCATION_PROFILE
+#define bcmolt_xgpon_ni_cfg_id_cbr_nrt_allocation_profile                                       BCMOLT_XGPON_NI_CFG_ID_CBR_NRT_ALLOCATION_PROFILE
+#define bcmolt_xgpon_ni_cfg_id_power_management                                                 BCMOLT_XGPON_NI_CFG_ID_POWER_MANAGEMENT
+#define bcmolt_xgpon_ni_cfg_id_rogue_onu_detection_process                                      BCMOLT_XGPON_NI_CFG_ID_ROGUE_ONU_DETECTION_PROCESS
+#define bcmolt_xgpon_ni_cfg_id_periodic_standby_pon_monitoring                                  BCMOLT_XGPON_NI_CFG_ID_PERIODIC_STANDBY_PON_MONITORING
+#define bcmolt_xgpon_ni_cfg_id_dba_mode                                                         BCMOLT_XGPON_NI_CFG_ID_DBA_MODE
+#define bcmolt_xgpon_ni_cfg_id_ploam_handling                                                   BCMOLT_XGPON_NI_CFG_ID_PLOAM_HANDLING
+#define bcmolt_xgpon_ni_cfg_id_min_data_alloc_id                                                BCMOLT_XGPON_NI_CFG_ID_MIN_DATA_ALLOC_ID
+#define bcmolt_xgpon_ni_cfg_id_min_data_gem_port_id                                             BCMOLT_XGPON_NI_CFG_ID_MIN_DATA_GEM_PORT_ID
+#define bcmolt_xgpon_ni_cfg_id_multicast_key                                                    BCMOLT_XGPON_NI_CFG_ID_MULTICAST_KEY
+#define bcmolt_xgpon_ni_cfg_id_prbs_checker                                                     BCMOLT_XGPON_NI_CFG_ID_PRBS_CHECKER
+#define bcmolt_xgpon_ni_cfg_id_prbs_generator                                                   BCMOLT_XGPON_NI_CFG_ID_PRBS_GENERATOR
+#define bcmolt_xgpon_ni_cfg_id_prbs_status                                                      BCMOLT_XGPON_NI_CFG_ID_PRBS_STATUS
+#define bcmolt_xgpon_ni_cfg_id_automatic_onu_deactivation                                       BCMOLT_XGPON_NI_CFG_ID_AUTOMATIC_ONU_DEACTIVATION
+#define bcmolt_xgpon_ni_cfg_id_us_bandwidth_limit                                               BCMOLT_XGPON_NI_CFG_ID_US_BANDWIDTH_LIMIT
+#define bcmolt_xgpon_ni_cfg_id_all_onus                                                         BCMOLT_XGPON_NI_CFG_ID_ALL_ONUS
+#define bcmolt_xgpon_ni_cfg_id_all_mcast_gem_ports                                              BCMOLT_XGPON_NI_CFG_ID_ALL_MCAST_GEM_PORTS
+#define bcmolt_xgpon_ni_cfg_id_debug                                                            BCMOLT_XGPON_NI_CFG_ID_DEBUG
+#define bcmolt_xgpon_ni_cfg_id_onu_upgrade_params                                               BCMOLT_XGPON_NI_CFG_ID_ONU_UPGRADE_PARAMS
+#define bcmolt_xgpon_ni_cfg_id_ds_fec_mode                                                      BCMOLT_XGPON_NI_CFG_ID_DS_FEC_MODE
+#define bcmolt_xgpon_ni_cfg_id_dba_type                                                         BCMOLT_XGPON_NI_CFG_ID_DBA_TYPE
+#define bcmolt_xgpon_ni_cfg_id_onu_tuning                                                       BCMOLT_XGPON_NI_CFG_ID_ONU_TUNING
+#define bcmolt_xgpon_ni_cfg_id__num_of                                                          BCMOLT_XGPON_NI_CFG_ID__NUM_OF
+#define bcmolt_xgpon_ni_stat_id_fec_codewords                                                   BCMOLT_XGPON_NI_STAT_ID_FEC_CODEWORDS
+#define bcmolt_xgpon_ni_stat_id_bip32_bytes                                                     BCMOLT_XGPON_NI_STAT_ID_BIP32_BYTES
+#define bcmolt_xgpon_ni_stat_id_bip32_errors                                                    BCMOLT_XGPON_NI_STAT_ID_BIP32_ERRORS
+#define bcmolt_xgpon_ni_stat_id_rx_xgtc_headers                                                 BCMOLT_XGPON_NI_STAT_ID_RX_XGTC_HEADERS
+#define bcmolt_xgpon_ni_stat_id_rx_xgtc_corrected                                               BCMOLT_XGPON_NI_STAT_ID_RX_XGTC_CORRECTED
+#define bcmolt_xgpon_ni_stat_id_rx_xgtc_uncorrected                                             BCMOLT_XGPON_NI_STAT_ID_RX_XGTC_UNCORRECTED
+#define bcmolt_xgpon_ni_stat_id_rx_xgem                                                         BCMOLT_XGPON_NI_STAT_ID_RX_XGEM
+#define bcmolt_xgpon_ni_stat_id_rx_xgem_dropped                                                 BCMOLT_XGPON_NI_STAT_ID_RX_XGEM_DROPPED
+#define bcmolt_xgpon_ni_stat_id_rx_xgem_idle                                                    BCMOLT_XGPON_NI_STAT_ID_RX_XGEM_IDLE
+#define bcmolt_xgpon_ni_stat_id_rx_xgem_corrected                                               BCMOLT_XGPON_NI_STAT_ID_RX_XGEM_CORRECTED
+#define bcmolt_xgpon_ni_stat_id_rx_crc_error                                                    BCMOLT_XGPON_NI_STAT_ID_RX_CRC_ERROR
+#define bcmolt_xgpon_ni_stat_id_rx_fragment_error                                               BCMOLT_XGPON_NI_STAT_ID_RX_FRAGMENT_ERROR
+#define bcmolt_xgpon_ni_stat_id_rx_packets_dropped                                              BCMOLT_XGPON_NI_STAT_ID_RX_PACKETS_DROPPED
+#define bcmolt_xgpon_ni_stat_id_rx_dropped_too_short                                            BCMOLT_XGPON_NI_STAT_ID_RX_DROPPED_TOO_SHORT
+#define bcmolt_xgpon_ni_stat_id_rx_dropped_too_long                                             BCMOLT_XGPON_NI_STAT_ID_RX_DROPPED_TOO_LONG
+#define bcmolt_xgpon_ni_stat_id_rx_key_error                                                    BCMOLT_XGPON_NI_STAT_ID_RX_KEY_ERROR
+#define bcmolt_xgpon_ni_stat_id_tx_ploams                                                       BCMOLT_XGPON_NI_STAT_ID_TX_PLOAMS
+#define bcmolt_xgpon_ni_stat_id_rx_ploams_dropped                                               BCMOLT_XGPON_NI_STAT_ID_RX_PLOAMS_DROPPED
+#define bcmolt_xgpon_ni_stat_id_rx_allocations_valid                                            BCMOLT_XGPON_NI_STAT_ID_RX_ALLOCATIONS_VALID
+#define bcmolt_xgpon_ni_stat_id_rx_allocations_invalid                                          BCMOLT_XGPON_NI_STAT_ID_RX_ALLOCATIONS_INVALID
+#define bcmolt_xgpon_ni_stat_id_rx_allocations_disabled                                         BCMOLT_XGPON_NI_STAT_ID_RX_ALLOCATIONS_DISABLED
+#define bcmolt_xgpon_ni_stat_id_rx_ploams                                                       BCMOLT_XGPON_NI_STAT_ID_RX_PLOAMS
+#define bcmolt_xgpon_ni_stat_id_rx_ploams_non_idle                                              BCMOLT_XGPON_NI_STAT_ID_RX_PLOAMS_NON_IDLE
+#define bcmolt_xgpon_ni_stat_id_rx_ploams_error                                                 BCMOLT_XGPON_NI_STAT_ID_RX_PLOAMS_ERROR
+#define bcmolt_xgpon_ni_stat_id_rx_cpu                                                          BCMOLT_XGPON_NI_STAT_ID_RX_CPU
+#define bcmolt_xgpon_ni_stat_id_rx_omci                                                         BCMOLT_XGPON_NI_STAT_ID_RX_OMCI
+#define bcmolt_xgpon_ni_stat_id_rx_omci_packets_crc_error                                       BCMOLT_XGPON_NI_STAT_ID_RX_OMCI_PACKETS_CRC_ERROR
+#define bcmolt_xgpon_ni_stat_id_tx_packets                                                      BCMOLT_XGPON_NI_STAT_ID_TX_PACKETS
+#define bcmolt_xgpon_ni_stat_id_tx_xgem                                                         BCMOLT_XGPON_NI_STAT_ID_TX_XGEM
+#define bcmolt_xgpon_ni_stat_id_tx_cpu                                                          BCMOLT_XGPON_NI_STAT_ID_TX_CPU
+#define bcmolt_xgpon_ni_stat_id_tx_omci                                                         BCMOLT_XGPON_NI_STAT_ID_TX_OMCI
+#define bcmolt_xgpon_ni_stat_id_tx_cpu_omci_packets_dropped                                     BCMOLT_XGPON_NI_STAT_ID_TX_CPU_OMCI_PACKETS_DROPPED
+#define bcmolt_xgpon_ni_stat_id_tx_dropped_illegal_length                                       BCMOLT_XGPON_NI_STAT_ID_TX_DROPPED_ILLEGAL_LENGTH
+#define bcmolt_xgpon_ni_stat_id_tx_dropped_tpid_miss                                            BCMOLT_XGPON_NI_STAT_ID_TX_DROPPED_TPID_MISS
+#define bcmolt_xgpon_ni_stat_id_tx_dropped_vid_miss                                             BCMOLT_XGPON_NI_STAT_ID_TX_DROPPED_VID_MISS
+#define bcmolt_xgpon_ni_stat_id__num_of                                                         BCMOLT_XGPON_NI_STAT_ID__NUM_OF
+#define bcmolt_xgpon_ni_stat_cfg_id_cfg                                                         BCMOLT_XGPON_NI_STAT_CFG_ID_CFG
+#define bcmolt_xgpon_ni_stat_cfg_id__num_of                                                     BCMOLT_XGPON_NI_STAT_CFG_ID__NUM_OF
+#define bcmolt_xgpon_ni_activate_all_onus_completed_id__num_of                                  BCMOLT_XGPON_NI_ACTIVATE_ALL_ONUS_COMPLETED_ID__NUM_OF
+#define bcmolt_xgpon_ni_cpu_packets_failure_id_error                                            BCMOLT_XGPON_NI_CPU_PACKETS_FAILURE_ID_ERROR
+#define bcmolt_xgpon_ni_cpu_packets_failure_id_gem_port_id                                      BCMOLT_XGPON_NI_CPU_PACKETS_FAILURE_ID_GEM_PORT_ID
+#define bcmolt_xgpon_ni_cpu_packets_failure_id__num_of                                          BCMOLT_XGPON_NI_CPU_PACKETS_FAILURE_ID__NUM_OF
+#define bcmolt_xgpon_ni_deactivate_all_onus_completed_id__num_of                                BCMOLT_XGPON_NI_DEACTIVATE_ALL_ONUS_COMPLETED_ID__NUM_OF
+#define bcmolt_xgpon_ni_disable_all_onus_completed_id__num_of                                   BCMOLT_XGPON_NI_DISABLE_ALL_ONUS_COMPLETED_ID__NUM_OF
+#define bcmolt_xgpon_ni_enable_all_onus_completed_id__num_of                                    BCMOLT_XGPON_NI_ENABLE_ALL_ONUS_COMPLETED_ID__NUM_OF
+#define bcmolt_xgpon_ni_los_id_status                                                           BCMOLT_XGPON_NI_LOS_ID_STATUS
+#define bcmolt_xgpon_ni_los_id__num_of                                                          BCMOLT_XGPON_NI_LOS_ID__NUM_OF
+#define bcmolt_xgpon_ni_onu_discovered_id_serial_number                                         BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_SERIAL_NUMBER
+#define bcmolt_xgpon_ni_onu_discovered_id_ranging_time                                          BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_RANGING_TIME
+#define bcmolt_xgpon_ni_onu_discovered_id_onu_id                                                BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_ONU_ID
+#define bcmolt_xgpon_ni_onu_discovered_id_upstream_line_rate_capabilities                       BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_UPSTREAM_LINE_RATE_CAPABILITIES
+#define bcmolt_xgpon_ni_onu_discovered_id_current_downstream_pon_id                             BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_CURRENT_DOWNSTREAM_PON_ID
+#define bcmolt_xgpon_ni_onu_discovered_id_current_upstream_pon_id                               BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_CURRENT_UPSTREAM_PON_ID
+#define bcmolt_xgpon_ni_onu_discovered_id_calibration_record                                    BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_CALIBRATION_RECORD
+#define bcmolt_xgpon_ni_onu_discovered_id_tuning_granularity                                    BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_TUNING_GRANULARITY
+#define bcmolt_xgpon_ni_onu_discovered_id_step_tuning_time                                      BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_STEP_TUNING_TIME
+#define bcmolt_xgpon_ni_onu_discovered_id_attenuation                                           BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_ATTENUATION
+#define bcmolt_xgpon_ni_onu_discovered_id_power_levelling_capabilities                          BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_POWER_LEVELLING_CAPABILITIES
+#define bcmolt_xgpon_ni_onu_discovered_id__num_of                                               BCMOLT_XGPON_NI_ONU_DISCOVERED_ID__NUM_OF
+#define bcmolt_xgpon_ni_onu_upgrade_complete_id_status                                          BCMOLT_XGPON_NI_ONU_UPGRADE_COMPLETE_ID_STATUS
+#define bcmolt_xgpon_ni_onu_upgrade_complete_id_list_of_failed_entities                         BCMOLT_XGPON_NI_ONU_UPGRADE_COMPLETE_ID_LIST_OF_FAILED_ENTITIES
+#define bcmolt_xgpon_ni_onu_upgrade_complete_id__num_of                                         BCMOLT_XGPON_NI_ONU_UPGRADE_COMPLETE_ID__NUM_OF
+#define bcmolt_xgpon_ni_protection_switching_onus_ranged_id_onus                                BCMOLT_XGPON_NI_PROTECTION_SWITCHING_ONUS_RANGED_ID_ONUS
+#define bcmolt_xgpon_ni_protection_switching_onus_ranged_id__num_of                             BCMOLT_XGPON_NI_PROTECTION_SWITCHING_ONUS_RANGED_ID__NUM_OF
+#define bcmolt_xgpon_ni_protection_switching_switchover_completed_id_result                     BCMOLT_XGPON_NI_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED_ID_RESULT
+#define bcmolt_xgpon_ni_protection_switching_switchover_completed_id__num_of                    BCMOLT_XGPON_NI_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED_ID__NUM_OF
+#define bcmolt_xgpon_ni_protection_switching_traffic_resume_id_result                           BCMOLT_XGPON_NI_PROTECTION_SWITCHING_TRAFFIC_RESUME_ID_RESULT
+#define bcmolt_xgpon_ni_protection_switching_traffic_resume_id__num_of                          BCMOLT_XGPON_NI_PROTECTION_SWITCHING_TRAFFIC_RESUME_ID__NUM_OF
+#define bcmolt_xgpon_ni_rogue_detection_completed_id_window_type                                BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_WINDOW_TYPE
+#define bcmolt_xgpon_ni_rogue_detection_completed_id_measurement_status                         BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_MEASUREMENT_STATUS
+#define bcmolt_xgpon_ni_rogue_detection_completed_id_alloc_id                                   BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_ALLOC_ID
+#define bcmolt_xgpon_ni_rogue_detection_completed_id_onu_id                                     BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_ONU_ID
+#define bcmolt_xgpon_ni_rogue_detection_completed_id_is_delineation                             BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_IS_DELINEATION
+#define bcmolt_xgpon_ni_rogue_detection_completed_id_is_ed                                      BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_IS_ED
+#define bcmolt_xgpon_ni_rogue_detection_completed_id_rx_data                                    BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_RX_DATA
+#define bcmolt_xgpon_ni_rogue_detection_completed_id_ploam_received_onu_id                      BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_PLOAM_RECEIVED_ONU_ID
+#define bcmolt_xgpon_ni_rogue_detection_completed_id_ploam_received_mic_error                   BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_PLOAM_RECEIVED_MIC_ERROR
+#define bcmolt_xgpon_ni_rogue_detection_completed_id__num_of                                    BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID__NUM_OF
+#define bcmolt_xgpon_ni_rogue_onu_special_map_cycle_start_id__num_of                            BCMOLT_XGPON_NI_ROGUE_ONU_SPECIAL_MAP_CYCLE_START_ID__NUM_OF
+#define bcmolt_xgpon_ni_serial_number_acquisition_cycle_start_id__num_of                        BCMOLT_XGPON_NI_SERIAL_NUMBER_ACQUISITION_CYCLE_START_ID__NUM_OF
+#define bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_id_number_of_detected_delimiter  BCMOLT_XGPON_NI_STANDBY_PON_MONITORING_CYCLE_COMPLETED_ID_NUMBER_OF_DETECTED_DELIMITER
+#define bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_id_energy_detect_signal          BCMOLT_XGPON_NI_STANDBY_PON_MONITORING_CYCLE_COMPLETED_ID_ENERGY_DETECT_SIGNAL
+#define bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_id__num_of                       BCMOLT_XGPON_NI_STANDBY_PON_MONITORING_CYCLE_COMPLETED_ID__NUM_OF
+#define bcmolt_xgpon_ni_stat_alarm_cleared_id_stat                                              BCMOLT_XGPON_NI_STAT_ALARM_CLEARED_ID_STAT
+#define bcmolt_xgpon_ni_stat_alarm_cleared_id__num_of                                           BCMOLT_XGPON_NI_STAT_ALARM_CLEARED_ID__NUM_OF
+#define bcmolt_xgpon_ni_stat_alarm_raised_id_stat                                               BCMOLT_XGPON_NI_STAT_ALARM_RAISED_ID_STAT
+#define bcmolt_xgpon_ni_stat_alarm_raised_id__num_of                                            BCMOLT_XGPON_NI_STAT_ALARM_RAISED_ID__NUM_OF
+#define bcmolt_xgpon_ni_state_change_completed_id_result                                        BCMOLT_XGPON_NI_STATE_CHANGE_COMPLETED_ID_RESULT
+#define bcmolt_xgpon_ni_state_change_completed_id_previous_state                                BCMOLT_XGPON_NI_STATE_CHANGE_COMPLETED_ID_PREVIOUS_STATE
+#define bcmolt_xgpon_ni_state_change_completed_id_new_state                                     BCMOLT_XGPON_NI_STATE_CHANGE_COMPLETED_ID_NEW_STATE
+#define bcmolt_xgpon_ni_state_change_completed_id__num_of                                       BCMOLT_XGPON_NI_STATE_CHANGE_COMPLETED_ID__NUM_OF
+#define bcmolt_xgpon_ni_tod_request_completed_id_tod_string                                     BCMOLT_XGPON_NI_TOD_REQUEST_COMPLETED_ID_TOD_STRING
+#define bcmolt_xgpon_ni_tod_request_completed_id_sfc                                            BCMOLT_XGPON_NI_TOD_REQUEST_COMPLETED_ID_SFC
+#define bcmolt_xgpon_ni_tod_request_completed_id_rtc_offset_sec                                 BCMOLT_XGPON_NI_TOD_REQUEST_COMPLETED_ID_RTC_OFFSET_SEC
+#define bcmolt_xgpon_ni_tod_request_completed_id_rtc_offset_nsec                                BCMOLT_XGPON_NI_TOD_REQUEST_COMPLETED_ID_RTC_OFFSET_NSEC
+#define bcmolt_xgpon_ni_tod_request_completed_id_status                                         BCMOLT_XGPON_NI_TOD_REQUEST_COMPLETED_ID_STATUS
+#define bcmolt_xgpon_ni_tod_request_completed_id__num_of                                        BCMOLT_XGPON_NI_TOD_REQUEST_COMPLETED_ID__NUM_OF
+#define bcmolt_xgpon_ni_auto_cfg_id_activate_all_onus_completed                                 BCMOLT_XGPON_NI_AUTO_CFG_ID_ACTIVATE_ALL_ONUS_COMPLETED
+#define bcmolt_xgpon_ni_auto_cfg_id_cpu_packets_failure                                         BCMOLT_XGPON_NI_AUTO_CFG_ID_CPU_PACKETS_FAILURE
+#define bcmolt_xgpon_ni_auto_cfg_id_deactivate_all_onus_completed                               BCMOLT_XGPON_NI_AUTO_CFG_ID_DEACTIVATE_ALL_ONUS_COMPLETED
+#define bcmolt_xgpon_ni_auto_cfg_id_disable_all_onus_completed                                  BCMOLT_XGPON_NI_AUTO_CFG_ID_DISABLE_ALL_ONUS_COMPLETED
+#define bcmolt_xgpon_ni_auto_cfg_id_enable_all_onus_completed                                   BCMOLT_XGPON_NI_AUTO_CFG_ID_ENABLE_ALL_ONUS_COMPLETED
+#define bcmolt_xgpon_ni_auto_cfg_id_los                                                         BCMOLT_XGPON_NI_AUTO_CFG_ID_LOS
+#define bcmolt_xgpon_ni_auto_cfg_id_onu_discovered                                              BCMOLT_XGPON_NI_AUTO_CFG_ID_ONU_DISCOVERED
+#define bcmolt_xgpon_ni_auto_cfg_id_onu_upgrade_complete                                        BCMOLT_XGPON_NI_AUTO_CFG_ID_ONU_UPGRADE_COMPLETE
+#define bcmolt_xgpon_ni_auto_cfg_id_protection_switching_onus_ranged                            BCMOLT_XGPON_NI_AUTO_CFG_ID_PROTECTION_SWITCHING_ONUS_RANGED
+#define bcmolt_xgpon_ni_auto_cfg_id_protection_switching_switchover_completed                   BCMOLT_XGPON_NI_AUTO_CFG_ID_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED
+#define bcmolt_xgpon_ni_auto_cfg_id_protection_switching_traffic_resume                         BCMOLT_XGPON_NI_AUTO_CFG_ID_PROTECTION_SWITCHING_TRAFFIC_RESUME
+#define bcmolt_xgpon_ni_auto_cfg_id_rogue_detection_completed                                   BCMOLT_XGPON_NI_AUTO_CFG_ID_ROGUE_DETECTION_COMPLETED
+#define bcmolt_xgpon_ni_auto_cfg_id_rogue_onu_special_map_cycle_start                           BCMOLT_XGPON_NI_AUTO_CFG_ID_ROGUE_ONU_SPECIAL_MAP_CYCLE_START
+#define bcmolt_xgpon_ni_auto_cfg_id_serial_number_acquisition_cycle_start                       BCMOLT_XGPON_NI_AUTO_CFG_ID_SERIAL_NUMBER_ACQUISITION_CYCLE_START
+#define bcmolt_xgpon_ni_auto_cfg_id_standby_pon_monitoring_cycle_completed                      BCMOLT_XGPON_NI_AUTO_CFG_ID_STANDBY_PON_MONITORING_CYCLE_COMPLETED
+#define bcmolt_xgpon_ni_auto_cfg_id_stat_alarm_cleared                                          BCMOLT_XGPON_NI_AUTO_CFG_ID_STAT_ALARM_CLEARED
+#define bcmolt_xgpon_ni_auto_cfg_id_stat_alarm_raised                                           BCMOLT_XGPON_NI_AUTO_CFG_ID_STAT_ALARM_RAISED
+#define bcmolt_xgpon_ni_auto_cfg_id_state_change_completed                                      BCMOLT_XGPON_NI_AUTO_CFG_ID_STATE_CHANGE_COMPLETED
+#define bcmolt_xgpon_ni_auto_cfg_id_tod_request_completed                                       BCMOLT_XGPON_NI_AUTO_CFG_ID_TOD_REQUEST_COMPLETED
+#define bcmolt_xgpon_ni_auto_cfg_id__num_of                                                     BCMOLT_XGPON_NI_AUTO_CFG_ID__NUM_OF
+#define bcmolt_xgpon_ni_adjust_tx_wavelength_id_serial_number                                   BCMOLT_XGPON_NI_ADJUST_TX_WAVELENGTH_ID_SERIAL_NUMBER
+#define bcmolt_xgpon_ni_adjust_tx_wavelength_id_freqency_adjustment_direction                   BCMOLT_XGPON_NI_ADJUST_TX_WAVELENGTH_ID_FREQENCY_ADJUSTMENT_DIRECTION
+#define bcmolt_xgpon_ni_adjust_tx_wavelength_id_frequency_adjustment_size                       BCMOLT_XGPON_NI_ADJUST_TX_WAVELENGTH_ID_FREQUENCY_ADJUSTMENT_SIZE
+#define bcmolt_xgpon_ni_adjust_tx_wavelength_id__num_of                                         BCMOLT_XGPON_NI_ADJUST_TX_WAVELENGTH_ID__NUM_OF
+#define bcmolt_xgpon_ni_disable_serial_number_id_control                                        BCMOLT_XGPON_NI_DISABLE_SERIAL_NUMBER_ID_CONTROL
+#define bcmolt_xgpon_ni_disable_serial_number_id_serial_number                                  BCMOLT_XGPON_NI_DISABLE_SERIAL_NUMBER_ID_SERIAL_NUMBER
+#define bcmolt_xgpon_ni_disable_serial_number_id__num_of                                        BCMOLT_XGPON_NI_DISABLE_SERIAL_NUMBER_ID__NUM_OF
+#define bcmolt_xgpon_ni_reset_id__num_of                                                        BCMOLT_XGPON_NI_RESET_ID__NUM_OF
+#define bcmolt_xgpon_ni_rogue_detection_window_id_window_type                                   BCMOLT_XGPON_NI_ROGUE_DETECTION_WINDOW_ID_WINDOW_TYPE
+#define bcmolt_xgpon_ni_rogue_detection_window_id_alloc_id                                      BCMOLT_XGPON_NI_ROGUE_DETECTION_WINDOW_ID_ALLOC_ID
+#define bcmolt_xgpon_ni_rogue_detection_window_id_onu_id                                        BCMOLT_XGPON_NI_ROGUE_DETECTION_WINDOW_ID_ONU_ID
+#define bcmolt_xgpon_ni_rogue_detection_window_id_second_ranging_window                         BCMOLT_XGPON_NI_ROGUE_DETECTION_WINDOW_ID_SECOND_RANGING_WINDOW
+#define bcmolt_xgpon_ni_rogue_detection_window_id__num_of                                       BCMOLT_XGPON_NI_ROGUE_DETECTION_WINDOW_ID__NUM_OF
+#define bcmolt_xgpon_ni_run_special_bw_map_id_number_of_cycle                                   BCMOLT_XGPON_NI_RUN_SPECIAL_BW_MAP_ID_NUMBER_OF_CYCLE
+#define bcmolt_xgpon_ni_run_special_bw_map_id_allocation_number                                 BCMOLT_XGPON_NI_RUN_SPECIAL_BW_MAP_ID_ALLOCATION_NUMBER
+#define bcmolt_xgpon_ni_run_special_bw_map_id_bw_map_array                                      BCMOLT_XGPON_NI_RUN_SPECIAL_BW_MAP_ID_BW_MAP_ARRAY
+#define bcmolt_xgpon_ni_run_special_bw_map_id__num_of                                           BCMOLT_XGPON_NI_RUN_SPECIAL_BW_MAP_ID__NUM_OF
+#define bcmolt_xgpon_ni_set_onu_state_id_onu_state                                              BCMOLT_XGPON_NI_SET_ONU_STATE_ID_ONU_STATE
+#define bcmolt_xgpon_ni_set_onu_state_id__num_of                                                BCMOLT_XGPON_NI_SET_ONU_STATE_ID__NUM_OF
+#define bcmolt_xgpon_ni_set_pon_state_id_pon_state                                              BCMOLT_XGPON_NI_SET_PON_STATE_ID_PON_STATE
+#define bcmolt_xgpon_ni_set_pon_state_id__num_of                                                BCMOLT_XGPON_NI_SET_PON_STATE_ID__NUM_OF
+#define bcmolt_xgpon_ni_single_request_standby_pon_monitoring_id__num_of                        BCMOLT_XGPON_NI_SINGLE_REQUEST_STANDBY_PON_MONITORING_ID__NUM_OF
+#define bcmolt_xgpon_ni_start_onu_upgrade_id_list_of_onu_ids                                    BCMOLT_XGPON_NI_START_ONU_UPGRADE_ID_LIST_OF_ONU_IDS
+#define bcmolt_xgpon_ni_start_onu_upgrade_id__num_of                                            BCMOLT_XGPON_NI_START_ONU_UPGRADE_ID__NUM_OF
+#define bcmolt_xgpon_ni_tod_request_id__num_of                                                  BCMOLT_XGPON_NI_TOD_REQUEST_ID__NUM_OF
+#define bcmolt_xgpon_ni_broadcast_ploam_packet_id_ploam                                         BCMOLT_XGPON_NI_BROADCAST_PLOAM_PACKET_ID_PLOAM
+#define bcmolt_xgpon_ni_broadcast_ploam_packet_id__num_of                                       BCMOLT_XGPON_NI_BROADCAST_PLOAM_PACKET_ID__NUM_OF
+#define bcmolt_xgpon_ni_cpu_packets_id_packet_type                                              BCMOLT_XGPON_NI_CPU_PACKETS_ID_PACKET_TYPE
+#define bcmolt_xgpon_ni_cpu_packets_id_calc_crc                                                 BCMOLT_XGPON_NI_CPU_PACKETS_ID_CALC_CRC
+#define bcmolt_xgpon_ni_cpu_packets_id_gem_port_list                                            BCMOLT_XGPON_NI_CPU_PACKETS_ID_GEM_PORT_LIST
+#define bcmolt_xgpon_ni_cpu_packets_id_buffer                                                   BCMOLT_XGPON_NI_CPU_PACKETS_ID_BUFFER
+#define bcmolt_xgpon_ni_cpu_packets_id__num_of                                                  BCMOLT_XGPON_NI_CPU_PACKETS_ID__NUM_OF
+#define bcmolt_xgpon_onu_key_id_pon_ni                                                          BCMOLT_XGPON_ONU_KEY_ID_PON_NI
+#define bcmolt_xgpon_onu_key_id_onu_id                                                          BCMOLT_XGPON_ONU_KEY_ID_ONU_ID
+#define bcmolt_xgpon_onu_key_id__num_of                                                         BCMOLT_XGPON_ONU_KEY_ID__NUM_OF
+#define bcmolt_xgpon_onu_cfg_id_onu_state                                                       BCMOLT_XGPON_ONU_CFG_ID_ONU_STATE
+#define bcmolt_xgpon_onu_cfg_id_onu_old_state                                                   BCMOLT_XGPON_ONU_CFG_ID_ONU_OLD_STATE
+#define bcmolt_xgpon_onu_cfg_id_alarm_state                                                     BCMOLT_XGPON_ONU_CFG_ID_ALARM_STATE
+#define bcmolt_xgpon_onu_cfg_id_registration_encryption_keys                                    BCMOLT_XGPON_ONU_CFG_ID_REGISTRATION_ENCRYPTION_KEYS
+#define bcmolt_xgpon_onu_cfg_id_current_encryption_key                                          BCMOLT_XGPON_ONU_CFG_ID_CURRENT_ENCRYPTION_KEY
+#define bcmolt_xgpon_onu_cfg_id_serial_number                                                   BCMOLT_XGPON_ONU_CFG_ID_SERIAL_NUMBER
+#define bcmolt_xgpon_onu_cfg_id_registration_id                                                 BCMOLT_XGPON_ONU_CFG_ID_REGISTRATION_ID
+#define bcmolt_xgpon_onu_cfg_id_registration_id_auto_learning                                   BCMOLT_XGPON_ONU_CFG_ID_REGISTRATION_ID_AUTO_LEARNING
+#define bcmolt_xgpon_onu_cfg_id_ranging_burst_profile                                           BCMOLT_XGPON_ONU_CFG_ID_RANGING_BURST_PROFILE
+#define bcmolt_xgpon_onu_cfg_id_data_burst_profile                                              BCMOLT_XGPON_ONU_CFG_ID_DATA_BURST_PROFILE
+#define bcmolt_xgpon_onu_cfg_id_ranging_time                                                    BCMOLT_XGPON_ONU_CFG_ID_RANGING_TIME
+#define bcmolt_xgpon_onu_cfg_id_disabled_after_discovery                                        BCMOLT_XGPON_ONU_CFG_ID_DISABLED_AFTER_DISCOVERY
+#define bcmolt_xgpon_onu_cfg_id_deactivation_reason                                             BCMOLT_XGPON_ONU_CFG_ID_DEACTIVATION_REASON
+#define bcmolt_xgpon_onu_cfg_id_all_gem_ports                                                   BCMOLT_XGPON_ONU_CFG_ID_ALL_GEM_PORTS
+#define bcmolt_xgpon_onu_cfg_id_all_allocs                                                      BCMOLT_XGPON_ONU_CFG_ID_ALL_ALLOCS
+#define bcmolt_xgpon_onu_cfg_id_extended_guard_time                                             BCMOLT_XGPON_ONU_CFG_ID_EXTENDED_GUARD_TIME
+#define bcmolt_xgpon_onu_cfg_id_us_line_rate                                                    BCMOLT_XGPON_ONU_CFG_ID_US_LINE_RATE
+#define bcmolt_xgpon_onu_cfg_id_calibration_record                                              BCMOLT_XGPON_ONU_CFG_ID_CALIBRATION_RECORD
+#define bcmolt_xgpon_onu_cfg_id_tuning_granularity                                              BCMOLT_XGPON_ONU_CFG_ID_TUNING_GRANULARITY
+#define bcmolt_xgpon_onu_cfg_id_step_tuning_time                                                BCMOLT_XGPON_ONU_CFG_ID_STEP_TUNING_TIME
+#define bcmolt_xgpon_onu_cfg_id_power_levelling_capabilities                                    BCMOLT_XGPON_ONU_CFG_ID_POWER_LEVELLING_CAPABILITIES
+#define bcmolt_xgpon_onu_cfg_id_request_registration_status                                     BCMOLT_XGPON_ONU_CFG_ID_REQUEST_REGISTRATION_STATUS
+#define bcmolt_xgpon_onu_cfg_id__num_of                                                         BCMOLT_XGPON_ONU_CFG_ID__NUM_OF
+#define bcmolt_xgpon_onu_stat_id_positive_drift                                                 BCMOLT_XGPON_ONU_STAT_ID_POSITIVE_DRIFT
+#define bcmolt_xgpon_onu_stat_id_negative_drift                                                 BCMOLT_XGPON_ONU_STAT_ID_NEGATIVE_DRIFT
+#define bcmolt_xgpon_onu_stat_id_delimiter_miss_detection                                       BCMOLT_XGPON_ONU_STAT_ID_DELIMITER_MISS_DETECTION
+#define bcmolt_xgpon_onu_stat_id_bip32_errors                                                   BCMOLT_XGPON_ONU_STAT_ID_BIP32_ERRORS
+#define bcmolt_xgpon_onu_stat_id_rx_words                                                       BCMOLT_XGPON_ONU_STAT_ID_RX_WORDS
+#define bcmolt_xgpon_onu_stat_id_fec_corrected_symbols                                          BCMOLT_XGPON_ONU_STAT_ID_FEC_CORRECTED_SYMBOLS
+#define bcmolt_xgpon_onu_stat_id_fec_corrected_codewords                                        BCMOLT_XGPON_ONU_STAT_ID_FEC_CORRECTED_CODEWORDS
+#define bcmolt_xgpon_onu_stat_id_fec_uncorrectable_codewords                                    BCMOLT_XGPON_ONU_STAT_ID_FEC_UNCORRECTABLE_CODEWORDS
+#define bcmolt_xgpon_onu_stat_id_fec_codewords                                                  BCMOLT_XGPON_ONU_STAT_ID_FEC_CODEWORDS
+#define bcmolt_xgpon_onu_stat_id_fec_corrected_bits                                             BCMOLT_XGPON_ONU_STAT_ID_FEC_CORRECTED_BITS
+#define bcmolt_xgpon_onu_stat_id_xgem_key_errors                                                BCMOLT_XGPON_ONU_STAT_ID_XGEM_KEY_ERRORS
+#define bcmolt_xgpon_onu_stat_id_xgem_loss                                                      BCMOLT_XGPON_ONU_STAT_ID_XGEM_LOSS
+#define bcmolt_xgpon_onu_stat_id_rx_ploams_mic_error                                            BCMOLT_XGPON_ONU_STAT_ID_RX_PLOAMS_MIC_ERROR
+#define bcmolt_xgpon_onu_stat_id_rx_ploams_non_idle                                             BCMOLT_XGPON_ONU_STAT_ID_RX_PLOAMS_NON_IDLE
+#define bcmolt_xgpon_onu_stat_id_rx_omci                                                        BCMOLT_XGPON_ONU_STAT_ID_RX_OMCI
+#define bcmolt_xgpon_onu_stat_id_rx_omci_packets_crc_error                                      BCMOLT_XGPON_ONU_STAT_ID_RX_OMCI_PACKETS_CRC_ERROR
+#define bcmolt_xgpon_onu_stat_id_rx_bytes                                                       BCMOLT_XGPON_ONU_STAT_ID_RX_BYTES
+#define bcmolt_xgpon_onu_stat_id_rx_packets                                                     BCMOLT_XGPON_ONU_STAT_ID_RX_PACKETS
+#define bcmolt_xgpon_onu_stat_id_tx_bytes                                                       BCMOLT_XGPON_ONU_STAT_ID_TX_BYTES
+#define bcmolt_xgpon_onu_stat_id_tx_packets                                                     BCMOLT_XGPON_ONU_STAT_ID_TX_PACKETS
+#define bcmolt_xgpon_onu_stat_id__num_of                                                        BCMOLT_XGPON_ONU_STAT_ID__NUM_OF
+#define bcmolt_xgpon_onu_stat_cfg_id_cfg                                                        BCMOLT_XGPON_ONU_STAT_CFG_ID_CFG
+#define bcmolt_xgpon_onu_stat_cfg_id__num_of                                                    BCMOLT_XGPON_ONU_STAT_CFG_ID__NUM_OF
+#define bcmolt_xgpon_onu_dfi_id_alarm_status                                                    BCMOLT_XGPON_ONU_DFI_ID_ALARM_STATUS
+#define bcmolt_xgpon_onu_dfi_id__num_of                                                         BCMOLT_XGPON_ONU_DFI_ID__NUM_OF
+#define bcmolt_xgpon_onu_dgi_id_alarm_status                                                    BCMOLT_XGPON_ONU_DGI_ID_ALARM_STATUS
+#define bcmolt_xgpon_onu_dgi_id__num_of                                                         BCMOLT_XGPON_ONU_DGI_ID__NUM_OF
+#define bcmolt_xgpon_onu_dowi_id_alarm_status                                                   BCMOLT_XGPON_ONU_DOWI_ID_ALARM_STATUS
+#define bcmolt_xgpon_onu_dowi_id_drift_value                                                    BCMOLT_XGPON_ONU_DOWI_ID_DRIFT_VALUE
+#define bcmolt_xgpon_onu_dowi_id_new_eqd                                                        BCMOLT_XGPON_ONU_DOWI_ID_NEW_EQD
+#define bcmolt_xgpon_onu_dowi_id__num_of                                                        BCMOLT_XGPON_ONU_DOWI_ID__NUM_OF
+#define bcmolt_xgpon_onu_invalid_dbru_report_id_alloc_id                                        BCMOLT_XGPON_ONU_INVALID_DBRU_REPORT_ID_ALLOC_ID
+#define bcmolt_xgpon_onu_invalid_dbru_report_id__num_of                                         BCMOLT_XGPON_ONU_INVALID_DBRU_REPORT_ID__NUM_OF
+#define bcmolt_xgpon_onu_key_exchange_completed_id_new_key                                      BCMOLT_XGPON_ONU_KEY_EXCHANGE_COMPLETED_ID_NEW_KEY
+#define bcmolt_xgpon_onu_key_exchange_completed_id__num_of                                      BCMOLT_XGPON_ONU_KEY_EXCHANGE_COMPLETED_ID__NUM_OF
+#define bcmolt_xgpon_onu_key_exchange_cycle_skipped_id__num_of                                  BCMOLT_XGPON_ONU_KEY_EXCHANGE_CYCLE_SKIPPED_ID__NUM_OF
+#define bcmolt_xgpon_onu_key_exchange_key_mismatch_id_expected_key                              BCMOLT_XGPON_ONU_KEY_EXCHANGE_KEY_MISMATCH_ID_EXPECTED_KEY
+#define bcmolt_xgpon_onu_key_exchange_key_mismatch_id_received_key                              BCMOLT_XGPON_ONU_KEY_EXCHANGE_KEY_MISMATCH_ID_RECEIVED_KEY
+#define bcmolt_xgpon_onu_key_exchange_key_mismatch_id__num_of                                   BCMOLT_XGPON_ONU_KEY_EXCHANGE_KEY_MISMATCH_ID__NUM_OF
+#define bcmolt_xgpon_onu_key_exchange_key_request_timeout_id__num_of                            BCMOLT_XGPON_ONU_KEY_EXCHANGE_KEY_REQUEST_TIMEOUT_ID__NUM_OF
+#define bcmolt_xgpon_onu_looci_id_alarm_status                                                  BCMOLT_XGPON_ONU_LOOCI_ID_ALARM_STATUS
+#define bcmolt_xgpon_onu_looci_id__num_of                                                       BCMOLT_XGPON_ONU_LOOCI_ID__NUM_OF
+#define bcmolt_xgpon_onu_onu_activation_completed_id_status                                     BCMOLT_XGPON_ONU_ONU_ACTIVATION_COMPLETED_ID_STATUS
+#define bcmolt_xgpon_onu_onu_activation_completed_id_fail_reason                                BCMOLT_XGPON_ONU_ONU_ACTIVATION_COMPLETED_ID_FAIL_REASON
+#define bcmolt_xgpon_onu_onu_activation_completed_id_registration_id                            BCMOLT_XGPON_ONU_ONU_ACTIVATION_COMPLETED_ID_REGISTRATION_ID
+#define bcmolt_xgpon_onu_onu_activation_completed_id_registration_encryption_keys               BCMOLT_XGPON_ONU_ONU_ACTIVATION_COMPLETED_ID_REGISTRATION_ENCRYPTION_KEYS
+#define bcmolt_xgpon_onu_onu_activation_completed_id__num_of                                    BCMOLT_XGPON_ONU_ONU_ACTIVATION_COMPLETED_ID__NUM_OF
+#define bcmolt_xgpon_onu_onu_alarm_id_onu_alarm                                                 BCMOLT_XGPON_ONU_ONU_ALARM_ID_ONU_ALARM
+#define bcmolt_xgpon_onu_onu_alarm_id__num_of                                                   BCMOLT_XGPON_ONU_ONU_ALARM_ID__NUM_OF
+#define bcmolt_xgpon_onu_onu_deactivation_completed_id_status                                   BCMOLT_XGPON_ONU_ONU_DEACTIVATION_COMPLETED_ID_STATUS
+#define bcmolt_xgpon_onu_onu_deactivation_completed_id__num_of                                  BCMOLT_XGPON_ONU_ONU_DEACTIVATION_COMPLETED_ID__NUM_OF
+#define bcmolt_xgpon_onu_onu_disable_completed_id_serial_number                                 BCMOLT_XGPON_ONU_ONU_DISABLE_COMPLETED_ID_SERIAL_NUMBER
+#define bcmolt_xgpon_onu_onu_disable_completed_id__num_of                                       BCMOLT_XGPON_ONU_ONU_DISABLE_COMPLETED_ID__NUM_OF
+#define bcmolt_xgpon_onu_onu_enable_completed_id_serial_number                                  BCMOLT_XGPON_ONU_ONU_ENABLE_COMPLETED_ID_SERIAL_NUMBER
+#define bcmolt_xgpon_onu_onu_enable_completed_id__num_of                                        BCMOLT_XGPON_ONU_ONU_ENABLE_COMPLETED_ID__NUM_OF
+#define bcmolt_xgpon_onu_onu_tuning_in_completed_id_result                                      BCMOLT_XGPON_ONU_ONU_TUNING_IN_COMPLETED_ID_RESULT
+#define bcmolt_xgpon_onu_onu_tuning_in_completed_id_fail_reason                                 BCMOLT_XGPON_ONU_ONU_TUNING_IN_COMPLETED_ID_FAIL_REASON
+#define bcmolt_xgpon_onu_onu_tuning_in_completed_id__num_of                                     BCMOLT_XGPON_ONU_ONU_TUNING_IN_COMPLETED_ID__NUM_OF
+#define bcmolt_xgpon_onu_onu_tuning_out_completed_id_result                                     BCMOLT_XGPON_ONU_ONU_TUNING_OUT_COMPLETED_ID_RESULT
+#define bcmolt_xgpon_onu_onu_tuning_out_completed_id_fail_reason                                BCMOLT_XGPON_ONU_ONU_TUNING_OUT_COMPLETED_ID_FAIL_REASON
+#define bcmolt_xgpon_onu_onu_tuning_out_completed_id__num_of                                    BCMOLT_XGPON_ONU_ONU_TUNING_OUT_COMPLETED_ID__NUM_OF
+#define bcmolt_xgpon_onu_optical_reflection_id__num_of                                          BCMOLT_XGPON_ONU_OPTICAL_REFLECTION_ID__NUM_OF
+#define bcmolt_xgpon_onu_possible_drift_id_alarm_status                                         BCMOLT_XGPON_ONU_POSSIBLE_DRIFT_ID_ALARM_STATUS
+#define bcmolt_xgpon_onu_possible_drift_id_estimated_drift                                      BCMOLT_XGPON_ONU_POSSIBLE_DRIFT_ID_ESTIMATED_DRIFT
+#define bcmolt_xgpon_onu_possible_drift_id__num_of                                              BCMOLT_XGPON_ONU_POSSIBLE_DRIFT_ID__NUM_OF
+#define bcmolt_xgpon_onu_power_consumption_report_id_power_consumption_report                   BCMOLT_XGPON_ONU_POWER_CONSUMPTION_REPORT_ID_POWER_CONSUMPTION_REPORT
+#define bcmolt_xgpon_onu_power_consumption_report_id__num_of                                    BCMOLT_XGPON_ONU_POWER_CONSUMPTION_REPORT_ID__NUM_OF
+#define bcmolt_xgpon_onu_power_level_report_id_attenuation                                      BCMOLT_XGPON_ONU_POWER_LEVEL_REPORT_ID_ATTENUATION
+#define bcmolt_xgpon_onu_power_level_report_id_power_levelling_capability                       BCMOLT_XGPON_ONU_POWER_LEVEL_REPORT_ID_POWER_LEVELLING_CAPABILITY
+#define bcmolt_xgpon_onu_power_level_report_id__num_of                                          BCMOLT_XGPON_ONU_POWER_LEVEL_REPORT_ID__NUM_OF
+#define bcmolt_xgpon_onu_power_management_state_change_id_old_state                             BCMOLT_XGPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_OLD_STATE
+#define bcmolt_xgpon_onu_power_management_state_change_id_new_state                             BCMOLT_XGPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_NEW_STATE
+#define bcmolt_xgpon_onu_power_management_state_change_id_reason                                BCMOLT_XGPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_REASON
+#define bcmolt_xgpon_onu_power_management_state_change_id__num_of                               BCMOLT_XGPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID__NUM_OF
+#define bcmolt_xgpon_onu_pqsi_id_alarm_status                                                   BCMOLT_XGPON_ONU_PQSI_ID_ALARM_STATUS
+#define bcmolt_xgpon_onu_pqsi_id__num_of                                                        BCMOLT_XGPON_ONU_PQSI_ID__NUM_OF
+#define bcmolt_xgpon_onu_ranging_completed_id_status                                            BCMOLT_XGPON_ONU_RANGING_COMPLETED_ID_STATUS
+#define bcmolt_xgpon_onu_ranging_completed_id_fail_reason                                       BCMOLT_XGPON_ONU_RANGING_COMPLETED_ID_FAIL_REASON
+#define bcmolt_xgpon_onu_ranging_completed_id_eqd                                               BCMOLT_XGPON_ONU_RANGING_COMPLETED_ID_EQD
+#define bcmolt_xgpon_onu_ranging_completed_id_number_of_ploams                                  BCMOLT_XGPON_ONU_RANGING_COMPLETED_ID_NUMBER_OF_PLOAMS
+#define bcmolt_xgpon_onu_ranging_completed_id_power_level                                       BCMOLT_XGPON_ONU_RANGING_COMPLETED_ID_POWER_LEVEL
+#define bcmolt_xgpon_onu_ranging_completed_id__num_of                                           BCMOLT_XGPON_ONU_RANGING_COMPLETED_ID__NUM_OF
+#define bcmolt_xgpon_onu_registration_id_id_registration_id                                     BCMOLT_XGPON_ONU_REGISTRATION_ID_ID_REGISTRATION_ID
+#define bcmolt_xgpon_onu_registration_id_id_request_registration_status                         BCMOLT_XGPON_ONU_REGISTRATION_ID_ID_REQUEST_REGISTRATION_STATUS
+#define bcmolt_xgpon_onu_registration_id_id_request_registration_fail_reason                    BCMOLT_XGPON_ONU_REGISTRATION_ID_ID_REQUEST_REGISTRATION_FAIL_REASON
+#define bcmolt_xgpon_onu_registration_id_id__num_of                                             BCMOLT_XGPON_ONU_REGISTRATION_ID_ID__NUM_OF
+#define bcmolt_xgpon_onu_rssi_measurement_completed_id_status                                   BCMOLT_XGPON_ONU_RSSI_MEASUREMENT_COMPLETED_ID_STATUS
+#define bcmolt_xgpon_onu_rssi_measurement_completed_id_fail_reason                              BCMOLT_XGPON_ONU_RSSI_MEASUREMENT_COMPLETED_ID_FAIL_REASON
+#define bcmolt_xgpon_onu_rssi_measurement_completed_id__num_of                                  BCMOLT_XGPON_ONU_RSSI_MEASUREMENT_COMPLETED_ID__NUM_OF
+#define bcmolt_xgpon_onu_sdi_id_alarm_status                                                    BCMOLT_XGPON_ONU_SDI_ID_ALARM_STATUS
+#define bcmolt_xgpon_onu_sdi_id_ber                                                             BCMOLT_XGPON_ONU_SDI_ID_BER
+#define bcmolt_xgpon_onu_sdi_id__num_of                                                         BCMOLT_XGPON_ONU_SDI_ID__NUM_OF
+#define bcmolt_xgpon_onu_secure_mutual_authentication_failure_id_status                         BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_FAILURE_ID_STATUS
+#define bcmolt_xgpon_onu_secure_mutual_authentication_failure_id_fail_reason                    BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_FAILURE_ID_FAIL_REASON
+#define bcmolt_xgpon_onu_secure_mutual_authentication_failure_id__num_of                        BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_FAILURE_ID__NUM_OF
+#define bcmolt_xgpon_onu_sfi_id_alarm_status                                                    BCMOLT_XGPON_ONU_SFI_ID_ALARM_STATUS
+#define bcmolt_xgpon_onu_sfi_id_ber                                                             BCMOLT_XGPON_ONU_SFI_ID_BER
+#define bcmolt_xgpon_onu_sfi_id__num_of                                                         BCMOLT_XGPON_ONU_SFI_ID__NUM_OF
+#define bcmolt_xgpon_onu_stat_alarm_cleared_id_stat                                             BCMOLT_XGPON_ONU_STAT_ALARM_CLEARED_ID_STAT
+#define bcmolt_xgpon_onu_stat_alarm_cleared_id__num_of                                          BCMOLT_XGPON_ONU_STAT_ALARM_CLEARED_ID__NUM_OF
+#define bcmolt_xgpon_onu_stat_alarm_raised_id_stat                                              BCMOLT_XGPON_ONU_STAT_ALARM_RAISED_ID_STAT
+#define bcmolt_xgpon_onu_stat_alarm_raised_id__num_of                                           BCMOLT_XGPON_ONU_STAT_ALARM_RAISED_ID__NUM_OF
+#define bcmolt_xgpon_onu_sufi_id_alarm_status                                                   BCMOLT_XGPON_ONU_SUFI_ID_ALARM_STATUS
+#define bcmolt_xgpon_onu_sufi_id__num_of                                                        BCMOLT_XGPON_ONU_SUFI_ID__NUM_OF
+#define bcmolt_xgpon_onu_tiwi_id_alarm_status                                                   BCMOLT_XGPON_ONU_TIWI_ID_ALARM_STATUS
+#define bcmolt_xgpon_onu_tiwi_id_drift_value                                                    BCMOLT_XGPON_ONU_TIWI_ID_DRIFT_VALUE
+#define bcmolt_xgpon_onu_tiwi_id__num_of                                                        BCMOLT_XGPON_ONU_TIWI_ID__NUM_OF
+#define bcmolt_xgpon_onu_tuning_response_id_ack                                                 BCMOLT_XGPON_ONU_TUNING_RESPONSE_ID_ACK
+#define bcmolt_xgpon_onu_tuning_response_id_result                                              BCMOLT_XGPON_ONU_TUNING_RESPONSE_ID_RESULT
+#define bcmolt_xgpon_onu_tuning_response_id__num_of                                             BCMOLT_XGPON_ONU_TUNING_RESPONSE_ID__NUM_OF
+#define bcmolt_xgpon_onu_auto_cfg_id_dfi                                                        BCMOLT_XGPON_ONU_AUTO_CFG_ID_DFI
+#define bcmolt_xgpon_onu_auto_cfg_id_dgi                                                        BCMOLT_XGPON_ONU_AUTO_CFG_ID_DGI
+#define bcmolt_xgpon_onu_auto_cfg_id_dowi                                                       BCMOLT_XGPON_ONU_AUTO_CFG_ID_DOWI
+#define bcmolt_xgpon_onu_auto_cfg_id_invalid_dbru_report                                        BCMOLT_XGPON_ONU_AUTO_CFG_ID_INVALID_DBRU_REPORT
+#define bcmolt_xgpon_onu_auto_cfg_id_key_exchange_completed                                     BCMOLT_XGPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_COMPLETED
+#define bcmolt_xgpon_onu_auto_cfg_id_key_exchange_cycle_skipped                                 BCMOLT_XGPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_CYCLE_SKIPPED
+#define bcmolt_xgpon_onu_auto_cfg_id_key_exchange_key_mismatch                                  BCMOLT_XGPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_KEY_MISMATCH
+#define bcmolt_xgpon_onu_auto_cfg_id_key_exchange_key_request_timeout                           BCMOLT_XGPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_KEY_REQUEST_TIMEOUT
+#define bcmolt_xgpon_onu_auto_cfg_id_looci                                                      BCMOLT_XGPON_ONU_AUTO_CFG_ID_LOOCI
+#define bcmolt_xgpon_onu_auto_cfg_id_onu_activation_completed                                   BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_ACTIVATION_COMPLETED
+#define bcmolt_xgpon_onu_auto_cfg_id_onu_alarm                                                  BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_ALARM
+#define bcmolt_xgpon_onu_auto_cfg_id_onu_deactivation_completed                                 BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_DEACTIVATION_COMPLETED
+#define bcmolt_xgpon_onu_auto_cfg_id_onu_disable_completed                                      BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_DISABLE_COMPLETED
+#define bcmolt_xgpon_onu_auto_cfg_id_onu_enable_completed                                       BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_ENABLE_COMPLETED
+#define bcmolt_xgpon_onu_auto_cfg_id_onu_tuning_in_completed                                    BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_TUNING_IN_COMPLETED
+#define bcmolt_xgpon_onu_auto_cfg_id_onu_tuning_out_completed                                   BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_TUNING_OUT_COMPLETED
+#define bcmolt_xgpon_onu_auto_cfg_id_optical_reflection                                         BCMOLT_XGPON_ONU_AUTO_CFG_ID_OPTICAL_REFLECTION
+#define bcmolt_xgpon_onu_auto_cfg_id_possible_drift                                             BCMOLT_XGPON_ONU_AUTO_CFG_ID_POSSIBLE_DRIFT
+#define bcmolt_xgpon_onu_auto_cfg_id_power_consumption_report                                   BCMOLT_XGPON_ONU_AUTO_CFG_ID_POWER_CONSUMPTION_REPORT
+#define bcmolt_xgpon_onu_auto_cfg_id_power_level_report                                         BCMOLT_XGPON_ONU_AUTO_CFG_ID_POWER_LEVEL_REPORT
+#define bcmolt_xgpon_onu_auto_cfg_id_power_management_state_change                              BCMOLT_XGPON_ONU_AUTO_CFG_ID_POWER_MANAGEMENT_STATE_CHANGE
+#define bcmolt_xgpon_onu_auto_cfg_id_pqsi                                                       BCMOLT_XGPON_ONU_AUTO_CFG_ID_PQSI
+#define bcmolt_xgpon_onu_auto_cfg_id_ranging_completed                                          BCMOLT_XGPON_ONU_AUTO_CFG_ID_RANGING_COMPLETED
+#define bcmolt_xgpon_onu_auto_cfg_id_registration_id                                            BCMOLT_XGPON_ONU_AUTO_CFG_ID_REGISTRATION_ID
+#define bcmolt_xgpon_onu_auto_cfg_id_rssi_measurement_completed                                 BCMOLT_XGPON_ONU_AUTO_CFG_ID_RSSI_MEASUREMENT_COMPLETED
+#define bcmolt_xgpon_onu_auto_cfg_id_sdi                                                        BCMOLT_XGPON_ONU_AUTO_CFG_ID_SDI
+#define bcmolt_xgpon_onu_auto_cfg_id_secure_mutual_authentication_failure                       BCMOLT_XGPON_ONU_AUTO_CFG_ID_SECURE_MUTUAL_AUTHENTICATION_FAILURE
+#define bcmolt_xgpon_onu_auto_cfg_id_sfi                                                        BCMOLT_XGPON_ONU_AUTO_CFG_ID_SFI
+#define bcmolt_xgpon_onu_auto_cfg_id_stat_alarm_cleared                                         BCMOLT_XGPON_ONU_AUTO_CFG_ID_STAT_ALARM_CLEARED
+#define bcmolt_xgpon_onu_auto_cfg_id_stat_alarm_raised                                          BCMOLT_XGPON_ONU_AUTO_CFG_ID_STAT_ALARM_RAISED
+#define bcmolt_xgpon_onu_auto_cfg_id_sufi                                                       BCMOLT_XGPON_ONU_AUTO_CFG_ID_SUFI
+#define bcmolt_xgpon_onu_auto_cfg_id_tiwi                                                       BCMOLT_XGPON_ONU_AUTO_CFG_ID_TIWI
+#define bcmolt_xgpon_onu_auto_cfg_id_tuning_response                                            BCMOLT_XGPON_ONU_AUTO_CFG_ID_TUNING_RESPONSE
+#define bcmolt_xgpon_onu_auto_cfg_id__num_of                                                    BCMOLT_XGPON_ONU_AUTO_CFG_ID__NUM_OF
+#define bcmolt_xgpon_onu_adjust_tx_wavelength_id_frequency_adjustment_direction                 BCMOLT_XGPON_ONU_ADJUST_TX_WAVELENGTH_ID_FREQUENCY_ADJUSTMENT_DIRECTION
+#define bcmolt_xgpon_onu_adjust_tx_wavelength_id_frequency_adjustment_size                      BCMOLT_XGPON_ONU_ADJUST_TX_WAVELENGTH_ID_FREQUENCY_ADJUSTMENT_SIZE
+#define bcmolt_xgpon_onu_adjust_tx_wavelength_id__num_of                                        BCMOLT_XGPON_ONU_ADJUST_TX_WAVELENGTH_ID__NUM_OF
+#define bcmolt_xgpon_onu_change_power_levelling_id_control                                      BCMOLT_XGPON_ONU_CHANGE_POWER_LEVELLING_ID_CONTROL
+#define bcmolt_xgpon_onu_change_power_levelling_id_attenuation                                  BCMOLT_XGPON_ONU_CHANGE_POWER_LEVELLING_ID_ATTENUATION
+#define bcmolt_xgpon_onu_change_power_levelling_id__num_of                                      BCMOLT_XGPON_ONU_CHANGE_POWER_LEVELLING_ID__NUM_OF
+#define bcmolt_xgpon_onu_get_power_consumption_id__num_of                                       BCMOLT_XGPON_ONU_GET_POWER_CONSUMPTION_ID__NUM_OF
+#define bcmolt_xgpon_onu_get_power_level_id__num_of                                             BCMOLT_XGPON_ONU_GET_POWER_LEVEL_ID__NUM_OF
+#define bcmolt_xgpon_onu_onu_tuning_in_id__num_of                                               BCMOLT_XGPON_ONU_ONU_TUNING_IN_ID__NUM_OF
+#define bcmolt_xgpon_onu_onu_tuning_out_id_target_ds_pon_id                                     BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID_TARGET_DS_PON_ID
+#define bcmolt_xgpon_onu_onu_tuning_out_id_target_us_pon_id                                     BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID_TARGET_US_PON_ID
+#define bcmolt_xgpon_onu_onu_tuning_out_id_time_to_switch                                       BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID_TIME_TO_SWITCH
+#define bcmolt_xgpon_onu_onu_tuning_out_id_rollback                                             BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID_ROLLBACK
+#define bcmolt_xgpon_onu_onu_tuning_out_id_status                                               BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID_STATUS
+#define bcmolt_xgpon_onu_onu_tuning_out_id__num_of                                              BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID__NUM_OF
+#define bcmolt_xgpon_onu_request_registration_id_sma_flag                                       BCMOLT_XGPON_ONU_REQUEST_REGISTRATION_ID_SMA_FLAG
+#define bcmolt_xgpon_onu_request_registration_id__num_of                                        BCMOLT_XGPON_ONU_REQUEST_REGISTRATION_ID__NUM_OF
+#define bcmolt_xgpon_onu_rssi_measurement_id__num_of                                            BCMOLT_XGPON_ONU_RSSI_MEASUREMENT_ID__NUM_OF
+#define bcmolt_xgpon_onu_secure_mutual_authentication_id_master_key                             BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_ID_MASTER_KEY
+#define bcmolt_xgpon_onu_secure_mutual_authentication_id_buffer                                 BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_ID_BUFFER
+#define bcmolt_xgpon_onu_secure_mutual_authentication_id_mic                                    BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_ID_MIC
+#define bcmolt_xgpon_onu_secure_mutual_authentication_id__num_of                                BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_ID__NUM_OF
+#define bcmolt_xgpon_onu_set_onu_state_id_onu_state                                             BCMOLT_XGPON_ONU_SET_ONU_STATE_ID_ONU_STATE
+#define bcmolt_xgpon_onu_set_onu_state_id__num_of                                               BCMOLT_XGPON_ONU_SET_ONU_STATE_ID__NUM_OF
+#define bcmolt_xgpon_onu_cpu_packets_id_packet_type                                             BCMOLT_XGPON_ONU_CPU_PACKETS_ID_PACKET_TYPE
+#define bcmolt_xgpon_onu_cpu_packets_id_calc_crc                                                BCMOLT_XGPON_ONU_CPU_PACKETS_ID_CALC_CRC
+#define bcmolt_xgpon_onu_cpu_packets_id_number_of_packets                                       BCMOLT_XGPON_ONU_CPU_PACKETS_ID_NUMBER_OF_PACKETS
+#define bcmolt_xgpon_onu_cpu_packets_id_packet_size                                             BCMOLT_XGPON_ONU_CPU_PACKETS_ID_PACKET_SIZE
+#define bcmolt_xgpon_onu_cpu_packets_id_buffer                                                  BCMOLT_XGPON_ONU_CPU_PACKETS_ID_BUFFER
+#define bcmolt_xgpon_onu_cpu_packets_id__num_of                                                 BCMOLT_XGPON_ONU_CPU_PACKETS_ID__NUM_OF
+#define bcmolt_xgpon_onu_ploam_packet_id_default_key                                            BCMOLT_XGPON_ONU_PLOAM_PACKET_ID_DEFAULT_KEY
+#define bcmolt_xgpon_onu_ploam_packet_id_ploam                                                  BCMOLT_XGPON_ONU_PLOAM_PACKET_ID_PLOAM
+#define bcmolt_xgpon_onu_ploam_packet_id__num_of                                                BCMOLT_XGPON_ONU_PLOAM_PACKET_ID__NUM_OF
+#define bcmolt_xgpon_onu_cpu_packet_id_port_id                                                  BCMOLT_XGPON_ONU_CPU_PACKET_ID_PORT_ID
+#define bcmolt_xgpon_onu_cpu_packet_id_crc_ok                                                   BCMOLT_XGPON_ONU_CPU_PACKET_ID_CRC_OK
+#define bcmolt_xgpon_onu_cpu_packet_id_packet_size                                              BCMOLT_XGPON_ONU_CPU_PACKET_ID_PACKET_SIZE
+#define bcmolt_xgpon_onu_cpu_packet_id_buffer                                                   BCMOLT_XGPON_ONU_CPU_PACKET_ID_BUFFER
+#define bcmolt_xgpon_onu_cpu_packet_id__num_of                                                  BCMOLT_XGPON_ONU_CPU_PACKET_ID__NUM_OF
+#define bcmolt_xgpon_onu_omci_packet_id_port_id                                                 BCMOLT_XGPON_ONU_OMCI_PACKET_ID_PORT_ID
+#define bcmolt_xgpon_onu_omci_packet_id_crc_ok                                                  BCMOLT_XGPON_ONU_OMCI_PACKET_ID_CRC_OK
+#define bcmolt_xgpon_onu_omci_packet_id_packet_size                                             BCMOLT_XGPON_ONU_OMCI_PACKET_ID_PACKET_SIZE
+#define bcmolt_xgpon_onu_omci_packet_id_buffer                                                  BCMOLT_XGPON_ONU_OMCI_PACKET_ID_BUFFER
+#define bcmolt_xgpon_onu_omci_packet_id__num_of                                                 BCMOLT_XGPON_ONU_OMCI_PACKET_ID__NUM_OF
+#define bcmolt_xgpon_trx_key_id_pon_ni                                                          BCMOLT_XGPON_TRX_KEY_ID_PON_NI
+#define bcmolt_xgpon_trx_key_id__num_of                                                         BCMOLT_XGPON_TRX_KEY_ID__NUM_OF
+#define bcmolt_xgpon_trx_cfg_id_burst_profile                                                   BCMOLT_XGPON_TRX_CFG_ID_BURST_PROFILE
+#define bcmolt_xgpon_trx_cfg_id_transceiver_config                                              BCMOLT_XGPON_TRX_CFG_ID_TRANSCEIVER_CONFIG
+#define bcmolt_xgpon_trx_cfg_id_transceiver_type                                                BCMOLT_XGPON_TRX_CFG_ID_TRANSCEIVER_TYPE
+#define bcmolt_xgpon_trx_cfg_id_debug                                                           BCMOLT_XGPON_TRX_CFG_ID_DEBUG
+#define bcmolt_xgpon_trx_cfg_id_rssi_normal_config                                              BCMOLT_XGPON_TRX_CFG_ID_RSSI_NORMAL_CONFIG
+#define bcmolt_xgpon_trx_cfg_id_rssi_ranging_config                                             BCMOLT_XGPON_TRX_CFG_ID_RSSI_RANGING_CONFIG
+#define bcmolt_xgpon_trx_cfg_id_serdes_configuration                                            BCMOLT_XGPON_TRX_CFG_ID_SERDES_CONFIGURATION
+#define bcmolt_xgpon_trx_cfg_id_burst_profile_delimiter_max_errors                              BCMOLT_XGPON_TRX_CFG_ID_BURST_PROFILE_DELIMITER_MAX_ERRORS
+#define bcmolt_xgpon_trx_cfg_id_ranging_sm_patterns_at_init                                     BCMOLT_XGPON_TRX_CFG_ID_RANGING_SM_PATTERNS_AT_INIT
+#define bcmolt_xgpon_trx_cfg_id_ranging_sm_patterns_ed_failure                                  BCMOLT_XGPON_TRX_CFG_ID_RANGING_SM_PATTERNS_ED_FAILURE
+#define bcmolt_xgpon_trx_cfg_id_reset_on_del_miss                                               BCMOLT_XGPON_TRX_CFG_ID_RESET_ON_DEL_MISS
+#define bcmolt_xgpon_trx_cfg_id_ed_state                                                        BCMOLT_XGPON_TRX_CFG_ID_ED_STATE
+#define bcmolt_xgpon_trx_cfg_id_invert_ed                                                       BCMOLT_XGPON_TRX_CFG_ID_INVERT_ED
+#define bcmolt_xgpon_trx_cfg_id_end_of_burst_reset                                              BCMOLT_XGPON_TRX_CFG_ID_END_OF_BURST_RESET
+#define bcmolt_xgpon_trx_cfg_id_trx_rst_polarity                                                BCMOLT_XGPON_TRX_CFG_ID_TRX_RST_POLARITY
+#define bcmolt_xgpon_trx_cfg_id__num_of                                                         BCMOLT_XGPON_TRX_CFG_ID__NUM_OF
+#define bcmolt_xpon_serdes_key_id_pon_ni                                                        BCMOLT_XPON_SERDES_KEY_ID_PON_NI
+#define bcmolt_xpon_serdes_key_id_instance                                                      BCMOLT_XPON_SERDES_KEY_ID_INSTANCE
+#define bcmolt_xpon_serdes_key_id__num_of                                                       BCMOLT_XPON_SERDES_KEY_ID__NUM_OF
+#define bcmolt_xpon_serdes_cfg_id_rx_vga                                                        BCMOLT_XPON_SERDES_CFG_ID_RX_VGA
+#define bcmolt_xpon_serdes_cfg_id_rx_pf                                                         BCMOLT_XPON_SERDES_CFG_ID_RX_PF
+#define bcmolt_xpon_serdes_cfg_id_rx_lfpf                                                       BCMOLT_XPON_SERDES_CFG_ID_RX_LFPF
+#define bcmolt_xpon_serdes_cfg_id_rx_dfe1                                                       BCMOLT_XPON_SERDES_CFG_ID_RX_DFE1
+#define bcmolt_xpon_serdes_cfg_id_rx_dfe2                                                       BCMOLT_XPON_SERDES_CFG_ID_RX_DFE2
+#define bcmolt_xpon_serdes_cfg_id_rx_dfe3                                                       BCMOLT_XPON_SERDES_CFG_ID_RX_DFE3
+#define bcmolt_xpon_serdes_cfg_id_rx_dfe4                                                       BCMOLT_XPON_SERDES_CFG_ID_RX_DFE4
+#define bcmolt_xpon_serdes_cfg_id_rx_dfe5                                                       BCMOLT_XPON_SERDES_CFG_ID_RX_DFE5
+#define bcmolt_xpon_serdes_cfg_id_tx_pre                                                        BCMOLT_XPON_SERDES_CFG_ID_TX_PRE
+#define bcmolt_xpon_serdes_cfg_id_tx_main                                                       BCMOLT_XPON_SERDES_CFG_ID_TX_MAIN
+#define bcmolt_xpon_serdes_cfg_id_tx_post1                                                      BCMOLT_XPON_SERDES_CFG_ID_TX_POST1
+#define bcmolt_xpon_serdes_cfg_id_tx_post2                                                      BCMOLT_XPON_SERDES_CFG_ID_TX_POST2
+#define bcmolt_xpon_serdes_cfg_id_tx_post3                                                      BCMOLT_XPON_SERDES_CFG_ID_TX_POST3
+#define bcmolt_xpon_serdes_cfg_id_tx_amp                                                        BCMOLT_XPON_SERDES_CFG_ID_TX_AMP
+#define bcmolt_xpon_serdes_cfg_id__num_of                                                       BCMOLT_XPON_SERDES_CFG_ID__NUM_OF
+
+/** Checks whether the given object type has the given tag. 
+ *
+ * \return true if the given object has the given tag, false otherwise 
+ */
+bcmos_bool bcmolt_obj_has_tag(bcmolt_obj_id obj, bcmolt_obj_tag tag);
+
+/** @} */
+#endif /* BCMOLT_MODEL_IDS_H_ */
diff --git a/bcm68620_release/release/host_driver/model/bcmolt_model_revision.h b/bcm68620_release/release/host_driver/model/bcmolt_model_revision.h
new file mode 100755
index 0000000..5f93880
--- /dev/null
+++ b/bcm68620_release/release/host_driver/model/bcmolt_model_revision.h
@@ -0,0 +1,47 @@
+/*
+<:copyright-BRCM:2016:proprietary:standard
+ 
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+ 
+This program is the proprietary software of Broadcom Corporation and/or its
+licensors, and may only be used, duplicated, modified or distributed pursuant
+to the terms and conditions of a separate, written license agreement executed
+between you and Broadcom (an "Authorized License").  Except as set forth in
+an Authorized License, Broadcom grants no license (express or implied), right
+to use, or waiver of any kind with respect to the Software, and Broadcom
+expressly reserves all rights in and to the Software and all intellectual
+property rights therein.  IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE
+NO RIGHT TO USE THIS SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY
+BROADCOM AND DISCONTINUE ALL USE OF THE SOFTWARE.
+ 
+Except as expressly set forth in the Authorized License,
+ 
+1. This program, including its structure, sequence and organization,
+    constitutes the valuable trade secrets of Broadcom, and you shall use
+    all reasonable efforts to protect the confidentiality thereof, and to
+    use this information only in connection with your use of Broadcom
+    integrated circuit products.
+ 
+2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
+    AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, REPRESENTATIONS OR
+    WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH
+    RESPECT TO THE SOFTWARE.  BROADCOM SPECIFICALLY DISCLAIMS ANY AND
+    ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, NONINFRINGEMENT,
+    FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, ACCURACY OR
+    COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR CORRESPONDENCE
+    TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT OF USE OR
+    PERFORMANCE OF THE SOFTWARE.
+ 
+3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR
+    ITS LICENSORS BE LIABLE FOR (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL,
+    INDIRECT, OR EXEMPLARY DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY
+    WAY RELATING TO YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN
+    IF BROADCOM HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES;
+    OR (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE
+    SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE LIMITATIONS
+    SHALL APPLY NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF ANY
+    LIMITED REMEDY.
+:>
+*/
+#define BCMOLT_MODEL_REVISION 1
diff --git a/bcm68620_release/release/host_driver/model/bcmolt_model_types.c b/bcm68620_release/release/host_driver/model/bcmolt_model_types.c
new file mode 100644
index 0000000..cce3c31
--- /dev/null
+++ b/bcm68620_release/release/host_driver/model/bcmolt_model_types.c
@@ -0,0 +1,105484 @@
+/*
+<:copyright-BRCM:2016:proprietary:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+This program is the proprietary software of Broadcom Corporation and/or its
+licensors, and may only be used, duplicated, modified or distributed pursuant
+to the terms and conditions of a separate, written license agreement executed
+between you and Broadcom (an "Authorized License").  Except as set forth in
+an Authorized License, Broadcom grants no license (express or implied), right
+to use, or waiver of any kind with respect to the Software, and Broadcom
+expressly reserves all rights in and to the Software and all intellectual
+property rights therein.  IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE
+NO RIGHT TO USE THIS SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY
+BROADCOM AND DISCONTINUE ALL USE OF THE SOFTWARE.
+
+Except as expressly set forth in the Authorized License,
+
+1. This program, including its structure, sequence and organization,
+    constitutes the valuable trade secrets of Broadcom, and you shall use
+    all reasonable efforts to protect the confidentiality thereof, and to
+    use this information only in connection with your use of Broadcom
+    integrated circuit products.
+
+2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
+    AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, REPRESENTATIONS OR
+    WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH
+    RESPECT TO THE SOFTWARE.  BROADCOM SPECIFICALLY DISCLAIMS ANY AND
+    ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, NONINFRINGEMENT,
+    FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, ACCURACY OR
+    COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR CORRESPONDENCE
+    TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT OF USE OR
+    PERFORMANCE OF THE SOFTWARE.
+
+3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR
+    ITS LICENSORS BE LIABLE FOR (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL,
+    INDIRECT, OR EXEMPLARY DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY
+    WAY RELATING TO YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN
+    IF BROADCOM HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES;
+    OR (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE
+    SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE LIMITATIONS
+    SHALL APPLY NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF ANY
+    LIMITED REMEDY.
+:>
+*/
+#include "bcmolt_model_types.h"
+#include "bcmolt_model_ids.h"
+
+/******************************************************************************/
+bcmos_bool bcmolt_activation_fail_reason_pack(bcmolt_activation_fail_reason this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_activation_fail_reason_unpack(bcmolt_activation_fail_reason *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_additional_bw_eligibility_pack(bcmolt_additional_bw_eligibility this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_additional_bw_eligibility_unpack(bcmolt_additional_bw_eligibility *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_ni_cfg_id_pack(bcmolt_ae_ni_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_ni_cfg_id_unpack(bcmolt_ae_ni_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_ni_en_state_pack(bcmolt_ae_ni_en_state this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_ni_en_state_unpack(bcmolt_ae_ni_en_state *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_ni_key_id_pack(bcmolt_ae_ni_key_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_ni_key_id_unpack(bcmolt_ae_ni_key_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_ni_set_ae_ni_en_state_id_pack(bcmolt_ae_ni_set_ae_ni_en_state_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_ni_set_ae_ni_en_state_id_unpack(bcmolt_ae_ni_set_ae_ni_en_state_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_ds_auto_cfg_id_pack(bcmolt_ae_path_ds_auto_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_ds_auto_cfg_id_unpack(bcmolt_ae_path_ds_auto_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_ds_key_id_pack(bcmolt_ae_path_ds_key_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_ds_key_id_unpack(bcmolt_ae_path_ds_key_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_ds_stat_alarm_cleared_id_pack(bcmolt_ae_path_ds_stat_alarm_cleared_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_ds_stat_alarm_cleared_id_unpack(bcmolt_ae_path_ds_stat_alarm_cleared_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_ds_stat_alarm_raised_id_pack(bcmolt_ae_path_ds_stat_alarm_raised_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_ds_stat_alarm_raised_id_unpack(bcmolt_ae_path_ds_stat_alarm_raised_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_ds_stat_cfg_id_pack(bcmolt_ae_path_ds_stat_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_ds_stat_cfg_id_unpack(bcmolt_ae_path_ds_stat_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_ds_stat_id_pack(bcmolt_ae_path_ds_stat_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_ds_stat_id_unpack(bcmolt_ae_path_ds_stat_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_us_auto_cfg_id_pack(bcmolt_ae_path_us_auto_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_us_auto_cfg_id_unpack(bcmolt_ae_path_us_auto_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_us_key_id_pack(bcmolt_ae_path_us_key_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_us_key_id_unpack(bcmolt_ae_path_us_key_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_us_stat_alarm_cleared_id_pack(bcmolt_ae_path_us_stat_alarm_cleared_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_us_stat_alarm_cleared_id_unpack(bcmolt_ae_path_us_stat_alarm_cleared_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_us_stat_alarm_raised_id_pack(bcmolt_ae_path_us_stat_alarm_raised_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_us_stat_alarm_raised_id_unpack(bcmolt_ae_path_us_stat_alarm_raised_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_us_stat_cfg_id_pack(bcmolt_ae_path_us_stat_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_us_stat_cfg_id_unpack(bcmolt_ae_path_us_stat_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_us_stat_id_pack(bcmolt_ae_path_us_stat_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_us_stat_id_unpack(bcmolt_ae_path_us_stat_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_alloc_operation_pack(bcmolt_alloc_operation this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_alloc_operation_unpack(bcmolt_alloc_operation *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_alloc_state_pack(bcmolt_alloc_state this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_alloc_state_unpack(bcmolt_alloc_state *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_alloc_type_pack(bcmolt_alloc_type this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_alloc_type_unpack(bcmolt_alloc_type *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_alloc_type_to_scan_pack(bcmolt_alloc_type_to_scan this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_alloc_type_to_scan_unpack(bcmolt_alloc_type_to_scan *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_api_capture_buffer_mode_pack(bcmolt_api_capture_buffer_mode this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_api_capture_buffer_mode_unpack(bcmolt_api_capture_buffer_mode *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_api_capture_location_pack(bcmolt_api_capture_location this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_api_capture_location_unpack(bcmolt_api_capture_location *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_calibration_record_pack(bcmolt_calibration_record this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_calibration_record_unpack(bcmolt_calibration_record *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_sign_pack(bcmolt_sign this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_sign_unpack(bcmolt_sign *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_upstream_line_rate_capabilities_pack(bcmolt_upstream_line_rate_capabilities this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_upstream_line_rate_capabilities_unpack(bcmolt_upstream_line_rate_capabilities *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_link_type_pack(bcmolt_link_type this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_link_type_unpack(bcmolt_link_type *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_capture_strobe_signal_pack(bcmolt_capture_strobe_signal this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_capture_strobe_signal_unpack(bcmolt_capture_strobe_signal *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_channel_cfg_id_pack(bcmolt_channel_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_channel_cfg_id_unpack(bcmolt_channel_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_channel_key_id_pack(bcmolt_channel_key_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_channel_key_id_unpack(bcmolt_channel_key_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_console_redirection_pack(bcmolt_console_redirection this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_console_redirection_unpack(bcmolt_console_redirection *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_control_state_pack(bcmolt_control_state this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_control_state_unpack(bcmolt_control_state *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_dba_mode_pack(bcmolt_dba_mode this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_dba_mode_unpack(bcmolt_dba_mode *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_dba_ram_pack(bcmolt_dba_ram this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_dba_ram_unpack(bcmolt_dba_ram *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_dba_type_pack(bcmolt_dba_type this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_dba_type_unpack(bcmolt_dba_type *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ddr_test_status_pack(bcmolt_ddr_test_status this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ddr_test_status_unpack(bcmolt_ddr_test_status *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ddr_test_result_pack(bcmolt_ddr_test_result this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ddr_test_result_unpack(bcmolt_ddr_test_result *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_host_connection_fail_reason_pack(bcmolt_host_connection_fail_reason this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_host_connection_fail_reason_unpack(bcmolt_host_connection_fail_reason *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_deactivation_reason_pack(bcmolt_deactivation_reason this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_deactivation_reason_unpack(bcmolt_deactivation_reason *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_debug_auto_cfg_id_pack(bcmolt_debug_auto_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_debug_auto_cfg_id_unpack(bcmolt_debug_auto_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_debug_cfg_id_pack(bcmolt_debug_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_debug_cfg_id_unpack(bcmolt_debug_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_debug_cli_input_id_pack(bcmolt_debug_cli_input_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_debug_cli_input_id_unpack(bcmolt_debug_cli_input_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_debug_cli_output_id_pack(bcmolt_debug_cli_output_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_debug_cli_output_id_unpack(bcmolt_debug_cli_output_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_debug_file_almost_full_id_pack(bcmolt_debug_file_almost_full_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_debug_file_almost_full_id_unpack(bcmolt_debug_file_almost_full_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_debug_key_id_pack(bcmolt_debug_key_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_debug_key_id_unpack(bcmolt_debug_key_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_debug_reset_api_capture_id_pack(bcmolt_debug_reset_api_capture_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_debug_reset_api_capture_id_unpack(bcmolt_debug_reset_api_capture_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_debug_start_api_capture_id_pack(bcmolt_debug_start_api_capture_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_debug_start_api_capture_id_unpack(bcmolt_debug_start_api_capture_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_debug_stop_api_capture_id_pack(bcmolt_debug_stop_api_capture_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_debug_stop_api_capture_id_unpack(bcmolt_debug_stop_api_capture_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_auto_cfg_id_pack(bcmolt_device_auto_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_auto_cfg_id_unpack(bcmolt_device_auto_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_cfg_id_pack(bcmolt_device_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_cfg_id_unpack(bcmolt_device_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_chip_revision_pack(bcmolt_device_chip_revision this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_chip_revision_unpack(bcmolt_device_chip_revision *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_connect_id_pack(bcmolt_device_connect_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_connect_id_unpack(bcmolt_device_connect_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_connection_complete_id_pack(bcmolt_device_connection_complete_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_connection_complete_id_unpack(bcmolt_device_connection_complete_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_connection_established_id_pack(bcmolt_device_connection_established_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_connection_established_id_unpack(bcmolt_device_connection_established_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_connection_failure_id_pack(bcmolt_device_connection_failure_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_connection_failure_id_unpack(bcmolt_device_connection_failure_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_ddr_test_complete_id_pack(bcmolt_device_ddr_test_complete_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_ddr_test_complete_id_unpack(bcmolt_device_ddr_test_complete_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_device_keep_alive_id_pack(bcmolt_device_device_keep_alive_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_device_keep_alive_id_unpack(bcmolt_device_device_keep_alive_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_device_ready_id_pack(bcmolt_device_device_ready_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_device_ready_id_unpack(bcmolt_device_device_ready_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_disconnect_id_pack(bcmolt_device_disconnect_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_disconnect_id_unpack(bcmolt_device_disconnect_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_disconnection_complete_id_pack(bcmolt_device_disconnection_complete_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_disconnection_complete_id_unpack(bcmolt_device_disconnection_complete_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_host_keep_alive_id_pack(bcmolt_device_host_keep_alive_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_host_keep_alive_id_unpack(bcmolt_device_host_keep_alive_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_image_transfer_complete_id_pack(bcmolt_device_image_transfer_complete_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_image_transfer_complete_id_unpack(bcmolt_device_image_transfer_complete_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_image_transfer_data_id_pack(bcmolt_device_image_transfer_data_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_image_transfer_data_id_unpack(bcmolt_device_image_transfer_data_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_image_transfer_start_id_pack(bcmolt_device_image_transfer_start_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_image_transfer_start_id_unpack(bcmolt_device_image_transfer_start_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_image_type_pack(bcmolt_device_image_type this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_image_type_unpack(bcmolt_device_image_type *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_indications_dropped_id_pack(bcmolt_device_indications_dropped_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_indications_dropped_id_unpack(bcmolt_device_indications_dropped_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_key_id_pack(bcmolt_device_key_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_key_id_unpack(bcmolt_device_key_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_speed_pack(bcmolt_nni_speed this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_speed_unpack(bcmolt_nni_speed *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_reset_id_pack(bcmolt_device_reset_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_reset_id_unpack(bcmolt_device_reset_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_reset_mode_pack(bcmolt_device_reset_mode this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_reset_mode_unpack(bcmolt_device_reset_mode *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_run_ddr_test_id_pack(bcmolt_device_run_ddr_test_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_run_ddr_test_id_unpack(bcmolt_device_run_ddr_test_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_state_pack(bcmolt_device_state this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_state_unpack(bcmolt_device_state *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_sw_error_id_pack(bcmolt_device_sw_error_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_sw_error_id_unpack(bcmolt_device_sw_error_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_sw_exception_id_pack(bcmolt_device_sw_exception_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_sw_exception_id_unpack(bcmolt_device_sw_exception_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_sw_upgrade_activate_id_pack(bcmolt_device_sw_upgrade_activate_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_sw_upgrade_activate_id_unpack(bcmolt_device_sw_upgrade_activate_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_disable_serial_number_control_pack(bcmolt_disable_serial_number_control this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_disable_serial_number_control_unpack(bcmolt_disable_serial_number_control *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_drv_icf_id_pack(bcmolt_drv_icf_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_drv_icf_id_unpack(bcmolt_drv_icf_id *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_drv_sgb_id_pack(bcmolt_drv_sgb_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_drv_sgb_id_unpack(bcmolt_drv_sgb_id *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ds_vlan_action_pack(bcmolt_ds_vlan_action this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ds_vlan_action_unpack(bcmolt_ds_vlan_action *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_tfb_trap_behavior_pack(bcmolt_tfb_trap_behavior this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_tfb_trap_behavior_unpack(bcmolt_tfb_trap_behavior *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_tfb_mode_pack(bcmolt_tfb_mode this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_tfb_mode_unpack(bcmolt_tfb_mode *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_lim_sec_mode_up_pack(bcmolt_lim_sec_mode_up this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_lim_sec_mode_up_unpack(bcmolt_lim_sec_mode_up *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_lim_sec_mode_dn_pack(bcmolt_lim_sec_mode_dn this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_lim_sec_mode_dn_unpack(bcmolt_lim_sec_mode_dn *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xim_sec_mode_pack(bcmolt_xim_sec_mode this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xim_sec_mode_unpack(bcmolt_xim_sec_mode *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_hsc_ram_pack(bcmolt_hsc_ram this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_hsc_ram_unpack(bcmolt_hsc_ram *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_lim_ram_pack(bcmolt_lim_ram this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_lim_ram_unpack(bcmolt_lim_ram *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_lky_ram_pack(bcmolt_lky_ram this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_lky_ram_unpack(bcmolt_lky_ram *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_mic_ram_pack(bcmolt_mic_ram this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_mic_ram_unpack(bcmolt_mic_ram *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xpcsrm_ram_pack(bcmolt_xpcsrm_ram this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xpcsrm_ram_unpack(bcmolt_xpcsrm_ram *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_embedded_image_transfer_status_pack(bcmolt_embedded_image_transfer_status this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_embedded_image_transfer_status_unpack(bcmolt_embedded_image_transfer_status *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_encryption_information_format_pack(bcmolt_epon_encryption_information_format this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_encryption_information_format_unpack(bcmolt_epon_encryption_information_format *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_energy_detect_source_pack(bcmolt_energy_detect_source this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_energy_detect_source_unpack(bcmolt_energy_detect_source *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_1g_turbo_mode_pack(bcmolt_epon_1g_turbo_mode this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_1g_turbo_mode_unpack(bcmolt_epon_1g_turbo_mode *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_clock_transport_mode_pack(bcmolt_epon_clock_transport_mode this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_clock_transport_mode_unpack(bcmolt_epon_clock_transport_mode *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_dba_reporting_mode_pack(bcmolt_epon_dba_reporting_mode this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_dba_reporting_mode_unpack(bcmolt_epon_dba_reporting_mode *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_rate_pack(bcmolt_epon_link_rate this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_rate_unpack(bcmolt_epon_link_rate *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_status_pack(bcmolt_status this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_status_unpack(bcmolt_status *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_auto_cfg_id_pack(bcmolt_epon_denied_link_auto_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_auto_cfg_id_unpack(bcmolt_epon_denied_link_auto_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_cfg_id_pack(bcmolt_epon_denied_link_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_cfg_id_unpack(bcmolt_epon_denied_link_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_key_id_pack(bcmolt_epon_denied_link_key_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_key_id_unpack(bcmolt_epon_denied_link_key_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_laser_on_off_violation_id_pack(bcmolt_epon_denied_link_laser_on_off_violation_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_laser_on_off_violation_id_unpack(bcmolt_epon_denied_link_laser_on_off_violation_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_llid_pool_empty_violation_id_pack(bcmolt_epon_denied_link_llid_pool_empty_violation_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_llid_pool_empty_violation_id_unpack(bcmolt_epon_denied_link_llid_pool_empty_violation_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_max_link_violation_id_pack(bcmolt_epon_denied_link_max_link_violation_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_max_link_violation_id_unpack(bcmolt_epon_denied_link_max_link_violation_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_overhead_profile_violation_id_pack(bcmolt_epon_denied_link_overhead_profile_violation_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_overhead_profile_violation_id_unpack(bcmolt_epon_denied_link_overhead_profile_violation_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_range_violation_id_pack(bcmolt_epon_denied_link_range_violation_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_range_violation_id_unpack(bcmolt_epon_denied_link_range_violation_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_rogue_violation_id_pack(bcmolt_epon_denied_link_rogue_violation_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_rogue_violation_id_unpack(bcmolt_epon_denied_link_rogue_violation_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_system_resource_violation_id_pack(bcmolt_epon_denied_link_system_resource_violation_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_system_resource_violation_id_unpack(bcmolt_epon_denied_link_system_resource_violation_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_tdm_channels_exhausted_id_pack(bcmolt_epon_denied_link_tdm_channels_exhausted_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_tdm_channels_exhausted_id_unpack(bcmolt_epon_denied_link_tdm_channels_exhausted_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_unknown_link_violation_id_pack(bcmolt_epon_denied_link_unknown_link_violation_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_unknown_link_violation_id_unpack(bcmolt_epon_denied_link_unknown_link_violation_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_upstream_bandwidth_violation_id_pack(bcmolt_epon_denied_link_upstream_bandwidth_violation_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_upstream_bandwidth_violation_id_unpack(bcmolt_epon_denied_link_upstream_bandwidth_violation_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_encryption_mode_pack(bcmolt_epon_encryption_mode this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_encryption_mode_unpack(bcmolt_epon_encryption_mode *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_key_choice_pack(bcmolt_epon_key_choice this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_key_choice_unpack(bcmolt_epon_key_choice *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_encryption_direction_pack(bcmolt_epon_encryption_direction this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_encryption_direction_unpack(bcmolt_epon_encryption_direction *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_fec_en_state_pack(bcmolt_epon_fec_en_state this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_fec_en_state_unpack(bcmolt_epon_fec_en_state *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_oam_type_pack(bcmolt_epon_oam_type this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_oam_type_unpack(bcmolt_epon_oam_type *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_auto_cfg_id_pack(bcmolt_epon_link_auto_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_auto_cfg_id_unpack(bcmolt_epon_link_auto_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_cfg_id_pack(bcmolt_epon_link_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_cfg_id_unpack(bcmolt_epon_link_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_delete_link_id_pack(bcmolt_epon_link_delete_link_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_delete_link_id_unpack(bcmolt_epon_link_delete_link_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_duplicate_mpcp_registration_request_id_pack(bcmolt_epon_link_duplicate_mpcp_registration_request_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_duplicate_mpcp_registration_request_id_unpack(bcmolt_epon_link_duplicate_mpcp_registration_request_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_encryption_enabled_id_pack(bcmolt_epon_link_encryption_enabled_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_encryption_enabled_id_unpack(bcmolt_epon_link_encryption_enabled_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_fec_state_pack(bcmolt_epon_link_fec_state this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_fec_state_unpack(bcmolt_epon_link_fec_state *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_force_rediscovery_id_pack(bcmolt_epon_link_force_rediscovery_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_force_rediscovery_id_unpack(bcmolt_epon_link_force_rediscovery_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_frame_captured_id_pack(bcmolt_epon_link_frame_captured_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_frame_captured_id_unpack(bcmolt_epon_link_frame_captured_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_status_pack(bcmolt_epon_link_status this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_status_unpack(bcmolt_epon_link_status *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_mpcp_discovery_info_pack(bcmolt_mpcp_discovery_info this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_mpcp_discovery_info_unpack(bcmolt_mpcp_discovery_info *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_inject_frame_id_pack(bcmolt_epon_link_inject_frame_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_inject_frame_id_unpack(bcmolt_epon_link_inject_frame_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_key_exchange_failure_id_pack(bcmolt_epon_link_key_exchange_failure_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_key_exchange_failure_id_unpack(bcmolt_epon_link_key_exchange_failure_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_key_exchange_start_id_pack(bcmolt_epon_link_key_exchange_start_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_key_exchange_start_id_unpack(bcmolt_epon_link_key_exchange_start_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_key_exchange_started_id_pack(bcmolt_epon_link_key_exchange_started_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_key_exchange_started_id_unpack(bcmolt_epon_link_key_exchange_started_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_key_exchange_stop_id_pack(bcmolt_epon_link_key_exchange_stop_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_key_exchange_stop_id_unpack(bcmolt_epon_link_key_exchange_stop_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_key_exchange_stopped_id_pack(bcmolt_epon_link_key_exchange_stopped_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_key_exchange_stopped_id_unpack(bcmolt_epon_link_key_exchange_stopped_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_key_id_pack(bcmolt_epon_link_key_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_key_id_unpack(bcmolt_epon_link_key_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_link_deleted_id_pack(bcmolt_epon_link_link_deleted_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_link_deleted_id_unpack(bcmolt_epon_link_link_deleted_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_link_speed_mismatch_id_pack(bcmolt_epon_link_link_speed_mismatch_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_link_speed_mismatch_id_unpack(bcmolt_epon_link_link_speed_mismatch_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_mpcp_deregistered_id_pack(bcmolt_epon_link_mpcp_deregistered_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_mpcp_deregistered_id_unpack(bcmolt_epon_link_mpcp_deregistered_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_mpcp_discovered_id_pack(bcmolt_epon_link_mpcp_discovered_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_mpcp_discovered_id_unpack(bcmolt_epon_link_mpcp_discovered_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_mpcp_reg_ack_timeout_id_pack(bcmolt_epon_link_mpcp_reg_ack_timeout_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_mpcp_reg_ack_timeout_id_unpack(bcmolt_epon_link_mpcp_reg_ack_timeout_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_mpcp_report_timeout_id_pack(bcmolt_epon_link_mpcp_report_timeout_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_mpcp_report_timeout_id_unpack(bcmolt_epon_link_mpcp_report_timeout_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_oam_keepalive_timeout_id_pack(bcmolt_epon_link_oam_keepalive_timeout_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_oam_keepalive_timeout_id_unpack(bcmolt_epon_link_oam_keepalive_timeout_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_oam_keepalive_timer_start_id_pack(bcmolt_epon_link_oam_keepalive_timer_start_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_oam_keepalive_timer_start_id_unpack(bcmolt_epon_link_oam_keepalive_timer_start_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_oam_keepalive_timer_started_id_pack(bcmolt_epon_link_oam_keepalive_timer_started_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_oam_keepalive_timer_started_id_unpack(bcmolt_epon_link_oam_keepalive_timer_started_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_oam_keepalive_timer_stop_id_pack(bcmolt_epon_link_oam_keepalive_timer_stop_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_oam_keepalive_timer_stop_id_unpack(bcmolt_epon_link_oam_keepalive_timer_stop_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_oam_keepalive_timer_stopped_id_pack(bcmolt_epon_link_oam_keepalive_timer_stopped_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_oam_keepalive_timer_stopped_id_unpack(bcmolt_epon_link_oam_keepalive_timer_stopped_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_preprovisioned_link_created_id_pack(bcmolt_epon_link_preprovisioned_link_created_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_preprovisioned_link_created_id_unpack(bcmolt_epon_link_preprovisioned_link_created_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_protection_switch_occurred_id_pack(bcmolt_epon_link_protection_switch_occurred_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_protection_switch_occurred_id_unpack(bcmolt_epon_link_protection_switch_occurred_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_range_value_changed_id_pack(bcmolt_epon_link_range_value_changed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_range_value_changed_id_unpack(bcmolt_epon_link_range_value_changed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_rerange_failure_id_pack(bcmolt_epon_link_rerange_failure_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_rerange_failure_id_unpack(bcmolt_epon_link_rerange_failure_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_stat_alarm_cleared_id_pack(bcmolt_epon_link_stat_alarm_cleared_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_stat_alarm_cleared_id_unpack(bcmolt_epon_link_stat_alarm_cleared_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_stat_alarm_raised_id_pack(bcmolt_epon_link_stat_alarm_raised_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_stat_alarm_raised_id_unpack(bcmolt_epon_link_stat_alarm_raised_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_stat_cfg_id_pack(bcmolt_epon_link_stat_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_stat_cfg_id_unpack(bcmolt_epon_link_stat_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_stat_id_pack(bcmolt_epon_link_stat_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_stat_id_unpack(bcmolt_epon_link_stat_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_state_flags_pack(bcmolt_epon_link_state_flags this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_state_flags_unpack(bcmolt_epon_link_state_flags *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_static_registration_done_id_pack(bcmolt_epon_link_static_registration_done_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_static_registration_done_id_unpack(bcmolt_epon_link_static_registration_done_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_static_registration_id_pack(bcmolt_epon_link_static_registration_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_static_registration_id_unpack(bcmolt_epon_link_static_registration_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_type_pack(bcmolt_epon_link_type this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_type_unpack(bcmolt_epon_link_type *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_mpcp_gate_mode_pack(bcmolt_mpcp_gate_mode this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_mpcp_gate_mode_unpack(bcmolt_mpcp_gate_mode *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_mpcp_registration_gate_flags_pack(bcmolt_mpcp_registration_gate_flags this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u32(buf, (uint32_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_mpcp_registration_gate_flags_unpack(bcmolt_mpcp_registration_gate_flags *this, bcmolt_buf *buf)
+{
+    uint32_t num_val;
+    if (!bcmolt_buf_read_u32(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_add_link_id_pack(bcmolt_epon_ni_add_link_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_add_link_id_unpack(bcmolt_epon_ni_add_link_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_add_multicast_link_id_pack(bcmolt_epon_ni_add_multicast_link_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_add_multicast_link_id_unpack(bcmolt_epon_ni_add_multicast_link_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_add_protected_standby_link_id_pack(bcmolt_epon_ni_add_protected_standby_link_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_add_protected_standby_link_id_unpack(bcmolt_epon_ni_add_protected_standby_link_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_auto_cfg_id_pack(bcmolt_epon_ni_auto_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_auto_cfg_id_unpack(bcmolt_epon_ni_auto_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_auto_rogue_scan_10g_failure_id_pack(bcmolt_epon_ni_auto_rogue_scan_10g_failure_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_auto_rogue_scan_10g_failure_id_unpack(bcmolt_epon_ni_auto_rogue_scan_10g_failure_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_auto_rogue_scan_1g_failure_id_pack(bcmolt_epon_ni_auto_rogue_scan_1g_failure_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_auto_rogue_scan_1g_failure_id_unpack(bcmolt_epon_ni_auto_rogue_scan_1g_failure_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_cfg_id_pack(bcmolt_epon_ni_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_cfg_id_unpack(bcmolt_epon_ni_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_en_state_pack(bcmolt_epon_ni_en_state this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_en_state_unpack(bcmolt_epon_ni_en_state *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_issue_rssi_grant_id_pack(bcmolt_epon_ni_issue_rssi_grant_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_issue_rssi_grant_id_unpack(bcmolt_epon_ni_issue_rssi_grant_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_key_id_pack(bcmolt_epon_ni_key_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_key_id_unpack(bcmolt_epon_ni_key_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_llid_quarantined_id_pack(bcmolt_epon_ni_llid_quarantined_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_llid_quarantined_id_unpack(bcmolt_epon_ni_llid_quarantined_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_mpcp_timestamp_changed_id_pack(bcmolt_epon_ni_mpcp_timestamp_changed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_mpcp_timestamp_changed_id_unpack(bcmolt_epon_ni_mpcp_timestamp_changed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_no_reports_id_pack(bcmolt_epon_ni_no_reports_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_no_reports_id_unpack(bcmolt_epon_ni_no_reports_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_onu_upgrade_complete_id_pack(bcmolt_epon_ni_onu_upgrade_complete_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_onu_upgrade_complete_id_unpack(bcmolt_epon_ni_onu_upgrade_complete_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_protection_switching_apply_rerange_delta_id_pack(bcmolt_epon_ni_protection_switching_apply_rerange_delta_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_protection_switching_apply_rerange_delta_id_unpack(bcmolt_epon_ni_protection_switching_apply_rerange_delta_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_rerange_failure_id_pack(bcmolt_epon_ni_rerange_failure_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_rerange_failure_id_unpack(bcmolt_epon_ni_rerange_failure_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_rogue_llid_scan_id_pack(bcmolt_epon_ni_rogue_llid_scan_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_rogue_llid_scan_id_unpack(bcmolt_epon_ni_rogue_llid_scan_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_rogue_scan_complete_id_pack(bcmolt_epon_ni_rogue_scan_complete_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_rogue_scan_complete_id_unpack(bcmolt_epon_ni_rogue_scan_complete_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_rssi_measurement_completed_id_pack(bcmolt_epon_ni_rssi_measurement_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_rssi_measurement_completed_id_unpack(bcmolt_epon_ni_rssi_measurement_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_set_epon_ni_en_state_id_pack(bcmolt_epon_ni_set_epon_ni_en_state_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_set_epon_ni_en_state_id_unpack(bcmolt_epon_ni_set_epon_ni_en_state_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_start_onu_upgrade_id_pack(bcmolt_epon_ni_start_onu_upgrade_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_start_onu_upgrade_id_unpack(bcmolt_epon_ni_start_onu_upgrade_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_state_change_completed_id_pack(bcmolt_epon_ni_state_change_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_state_change_completed_id_unpack(bcmolt_epon_ni_state_change_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_oam_extension_type_pack(bcmolt_epon_oam_extension_type this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_oam_extension_type_unpack(bcmolt_epon_oam_extension_type *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_10g_us_auto_cfg_id_pack(bcmolt_epon_onu_10g_us_auto_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_10g_us_auto_cfg_id_unpack(bcmolt_epon_onu_10g_us_auto_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_10g_us_cfg_id_pack(bcmolt_epon_onu_10g_us_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_10g_us_cfg_id_unpack(bcmolt_epon_onu_10g_us_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_10g_us_key_id_pack(bcmolt_epon_onu_10g_us_key_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_10g_us_key_id_unpack(bcmolt_epon_onu_10g_us_key_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_10g_us_stat_alarm_cleared_id_pack(bcmolt_epon_onu_10g_us_stat_alarm_cleared_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_10g_us_stat_alarm_cleared_id_unpack(bcmolt_epon_onu_10g_us_stat_alarm_cleared_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_10g_us_stat_alarm_raised_id_pack(bcmolt_epon_onu_10g_us_stat_alarm_raised_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_10g_us_stat_alarm_raised_id_unpack(bcmolt_epon_onu_10g_us_stat_alarm_raised_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_10g_us_stat_cfg_id_pack(bcmolt_epon_onu_10g_us_stat_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_10g_us_stat_cfg_id_unpack(bcmolt_epon_onu_10g_us_stat_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_10g_us_stat_id_pack(bcmolt_epon_onu_10g_us_stat_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_10g_us_stat_id_unpack(bcmolt_epon_onu_10g_us_stat_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_1g_us_auto_cfg_id_pack(bcmolt_epon_onu_1g_us_auto_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_1g_us_auto_cfg_id_unpack(bcmolt_epon_onu_1g_us_auto_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_1g_us_cfg_id_pack(bcmolt_epon_onu_1g_us_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_1g_us_cfg_id_unpack(bcmolt_epon_onu_1g_us_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_1g_us_key_id_pack(bcmolt_epon_onu_1g_us_key_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_1g_us_key_id_unpack(bcmolt_epon_onu_1g_us_key_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_1g_us_stat_alarm_cleared_id_pack(bcmolt_epon_onu_1g_us_stat_alarm_cleared_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_1g_us_stat_alarm_cleared_id_unpack(bcmolt_epon_onu_1g_us_stat_alarm_cleared_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_1g_us_stat_alarm_raised_id_pack(bcmolt_epon_onu_1g_us_stat_alarm_raised_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_1g_us_stat_alarm_raised_id_unpack(bcmolt_epon_onu_1g_us_stat_alarm_raised_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_1g_us_stat_cfg_id_pack(bcmolt_epon_onu_1g_us_stat_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_1g_us_stat_cfg_id_unpack(bcmolt_epon_onu_1g_us_stat_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_1g_us_stat_id_pack(bcmolt_epon_onu_1g_us_stat_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_1g_us_stat_id_unpack(bcmolt_epon_onu_1g_us_stat_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_upgrade_onu_response_code_pack(bcmolt_epon_onu_upgrade_onu_response_code this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_upgrade_onu_response_code_unpack(bcmolt_epon_onu_upgrade_onu_response_code *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_upgrade_return_code_pack(bcmolt_epon_onu_upgrade_return_code this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_upgrade_return_code_unpack(bcmolt_epon_onu_upgrade_return_code *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_ds_auto_cfg_id_pack(bcmolt_epon_path_10g_ds_auto_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_ds_auto_cfg_id_unpack(bcmolt_epon_path_10g_ds_auto_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_ds_cfg_id_pack(bcmolt_epon_path_10g_ds_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_ds_cfg_id_unpack(bcmolt_epon_path_10g_ds_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_ds_key_id_pack(bcmolt_epon_path_10g_ds_key_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_ds_key_id_unpack(bcmolt_epon_path_10g_ds_key_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_ds_stat_alarm_cleared_id_pack(bcmolt_epon_path_10g_ds_stat_alarm_cleared_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_ds_stat_alarm_cleared_id_unpack(bcmolt_epon_path_10g_ds_stat_alarm_cleared_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_ds_stat_alarm_raised_id_pack(bcmolt_epon_path_10g_ds_stat_alarm_raised_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_ds_stat_alarm_raised_id_unpack(bcmolt_epon_path_10g_ds_stat_alarm_raised_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_ds_stat_cfg_id_pack(bcmolt_epon_path_10g_ds_stat_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_ds_stat_cfg_id_unpack(bcmolt_epon_path_10g_ds_stat_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_ds_stat_id_pack(bcmolt_epon_path_10g_ds_stat_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_ds_stat_id_unpack(bcmolt_epon_path_10g_ds_stat_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_us_auto_cfg_id_pack(bcmolt_epon_path_10g_us_auto_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_us_auto_cfg_id_unpack(bcmolt_epon_path_10g_us_auto_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_us_cfg_id_pack(bcmolt_epon_path_10g_us_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_us_cfg_id_unpack(bcmolt_epon_path_10g_us_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_us_key_id_pack(bcmolt_epon_path_10g_us_key_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_us_key_id_unpack(bcmolt_epon_path_10g_us_key_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_us_stat_alarm_cleared_id_pack(bcmolt_epon_path_10g_us_stat_alarm_cleared_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_us_stat_alarm_cleared_id_unpack(bcmolt_epon_path_10g_us_stat_alarm_cleared_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_us_stat_alarm_raised_id_pack(bcmolt_epon_path_10g_us_stat_alarm_raised_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_us_stat_alarm_raised_id_unpack(bcmolt_epon_path_10g_us_stat_alarm_raised_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_us_stat_cfg_id_pack(bcmolt_epon_path_10g_us_stat_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_us_stat_cfg_id_unpack(bcmolt_epon_path_10g_us_stat_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_us_stat_id_pack(bcmolt_epon_path_10g_us_stat_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_us_stat_id_unpack(bcmolt_epon_path_10g_us_stat_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_ds_auto_cfg_id_pack(bcmolt_epon_path_1g_ds_auto_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_ds_auto_cfg_id_unpack(bcmolt_epon_path_1g_ds_auto_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_ds_cfg_id_pack(bcmolt_epon_path_1g_ds_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_ds_cfg_id_unpack(bcmolt_epon_path_1g_ds_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_ds_key_id_pack(bcmolt_epon_path_1g_ds_key_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_ds_key_id_unpack(bcmolt_epon_path_1g_ds_key_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_ds_stat_alarm_cleared_id_pack(bcmolt_epon_path_1g_ds_stat_alarm_cleared_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_ds_stat_alarm_cleared_id_unpack(bcmolt_epon_path_1g_ds_stat_alarm_cleared_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_ds_stat_alarm_raised_id_pack(bcmolt_epon_path_1g_ds_stat_alarm_raised_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_ds_stat_alarm_raised_id_unpack(bcmolt_epon_path_1g_ds_stat_alarm_raised_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_ds_stat_cfg_id_pack(bcmolt_epon_path_1g_ds_stat_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_ds_stat_cfg_id_unpack(bcmolt_epon_path_1g_ds_stat_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_ds_stat_id_pack(bcmolt_epon_path_1g_ds_stat_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_ds_stat_id_unpack(bcmolt_epon_path_1g_ds_stat_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_us_auto_cfg_id_pack(bcmolt_epon_path_1g_us_auto_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_us_auto_cfg_id_unpack(bcmolt_epon_path_1g_us_auto_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_us_cfg_id_pack(bcmolt_epon_path_1g_us_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_us_cfg_id_unpack(bcmolt_epon_path_1g_us_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_us_key_id_pack(bcmolt_epon_path_1g_us_key_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_us_key_id_unpack(bcmolt_epon_path_1g_us_key_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_us_stat_alarm_cleared_id_pack(bcmolt_epon_path_1g_us_stat_alarm_cleared_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_us_stat_alarm_cleared_id_unpack(bcmolt_epon_path_1g_us_stat_alarm_cleared_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_us_stat_alarm_raised_id_pack(bcmolt_epon_path_1g_us_stat_alarm_raised_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_us_stat_alarm_raised_id_unpack(bcmolt_epon_path_1g_us_stat_alarm_raised_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_us_stat_cfg_id_pack(bcmolt_epon_path_1g_us_stat_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_us_stat_cfg_id_unpack(bcmolt_epon_path_1g_us_stat_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_us_stat_id_pack(bcmolt_epon_path_1g_us_stat_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_us_stat_id_unpack(bcmolt_epon_path_1g_us_stat_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_protection_state_pack(bcmolt_epon_protection_state this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_protection_state_unpack(bcmolt_epon_protection_state *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_protection_switching_type_pack(bcmolt_epon_protection_switching_type this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_protection_switching_type_unpack(bcmolt_epon_protection_switching_type *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_protection_switching_detection_options_pack(bcmolt_protection_switching_detection_options this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_protection_switching_detection_options_unpack(bcmolt_protection_switching_detection_options *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_protection_switching_reranging_options_pack(bcmolt_epon_protection_switching_reranging_options this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_protection_switching_reranging_options_unpack(bcmolt_epon_protection_switching_reranging_options *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpio_pin_pack(bcmolt_gpio_pin this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpio_pin_unpack(bcmolt_gpio_pin *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpio_polarity_pack(bcmolt_gpio_polarity this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpio_polarity_unpack(bcmolt_gpio_polarity *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_rp_cfg_id_pack(bcmolt_epon_rp_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_rp_cfg_id_unpack(bcmolt_epon_rp_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_rp_key_id_pack(bcmolt_epon_rp_key_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_rp_key_id_unpack(bcmolt_epon_rp_key_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ext_irq_pack(bcmolt_ext_irq this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ext_irq_unpack(bcmolt_ext_irq *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_flush_mac_table_option_pack(bcmolt_flush_mac_table_option this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_flush_mac_table_option_unpack(bcmolt_flush_mac_table_option *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_frequency_adjustment_direction_pack(bcmolt_frequency_adjustment_direction this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_frequency_adjustment_direction_unpack(bcmolt_frequency_adjustment_direction *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gem_port_direction_pack(bcmolt_gem_port_direction this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gem_port_direction_unpack(bcmolt_gem_port_direction *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gem_port_type_pack(bcmolt_gem_port_type this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gem_port_type_unpack(bcmolt_gem_port_type *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gem_port_operation_pack(bcmolt_gem_port_operation this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gem_port_operation_unpack(bcmolt_gem_port_operation *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpio_cfg_id_pack(bcmolt_gpio_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpio_cfg_id_unpack(bcmolt_gpio_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpio_key_id_pack(bcmolt_gpio_key_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpio_key_id_unpack(bcmolt_gpio_key_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpio_pin_dir_pack(bcmolt_gpio_pin_dir this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpio_pin_dir_unpack(bcmolt_gpio_pin_dir *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpio_value_pack(bcmolt_gpio_value this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpio_value_unpack(bcmolt_gpio_value *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_auto_cfg_id_pack(bcmolt_gpon_alloc_auto_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_auto_cfg_id_unpack(bcmolt_gpon_alloc_auto_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_cfg_id_pack(bcmolt_gpon_alloc_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_cfg_id_unpack(bcmolt_gpon_alloc_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_configuration_completed_id_pack(bcmolt_gpon_alloc_configuration_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_configuration_completed_id_unpack(bcmolt_gpon_alloc_configuration_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_get_alloc_stats_completed_id_pack(bcmolt_gpon_alloc_get_alloc_stats_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_get_alloc_stats_completed_id_unpack(bcmolt_gpon_alloc_get_alloc_stats_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_get_stats_id_pack(bcmolt_gpon_alloc_get_stats_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_get_stats_id_unpack(bcmolt_gpon_alloc_get_stats_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_key_id_pack(bcmolt_gpon_alloc_key_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_key_id_unpack(bcmolt_gpon_alloc_key_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_set_state_id_pack(bcmolt_gpon_alloc_set_state_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_set_state_id_unpack(bcmolt_gpon_alloc_set_state_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_stat_alarm_cleared_id_pack(bcmolt_gpon_alloc_stat_alarm_cleared_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_stat_alarm_cleared_id_unpack(bcmolt_gpon_alloc_stat_alarm_cleared_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_stat_alarm_raised_id_pack(bcmolt_gpon_alloc_stat_alarm_raised_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_stat_alarm_raised_id_unpack(bcmolt_gpon_alloc_stat_alarm_raised_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_stat_cfg_id_pack(bcmolt_gpon_alloc_stat_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_stat_cfg_id_unpack(bcmolt_gpon_alloc_stat_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_stat_id_pack(bcmolt_gpon_alloc_stat_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_stat_id_unpack(bcmolt_gpon_alloc_stat_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_auto_cfg_id_pack(bcmolt_gpon_gem_port_auto_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_auto_cfg_id_unpack(bcmolt_gpon_gem_port_auto_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_cfg_id_pack(bcmolt_gpon_gem_port_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_cfg_id_unpack(bcmolt_gpon_gem_port_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_configuration_completed_id_pack(bcmolt_gpon_gem_port_configuration_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_configuration_completed_id_unpack(bcmolt_gpon_gem_port_configuration_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_key_id_pack(bcmolt_gpon_gem_port_key_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_key_id_unpack(bcmolt_gpon_gem_port_key_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_set_state_id_pack(bcmolt_gpon_gem_port_set_state_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_set_state_id_unpack(bcmolt_gpon_gem_port_set_state_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_stat_alarm_cleared_id_pack(bcmolt_gpon_gem_port_stat_alarm_cleared_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_stat_alarm_cleared_id_unpack(bcmolt_gpon_gem_port_stat_alarm_cleared_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_stat_alarm_raised_id_pack(bcmolt_gpon_gem_port_stat_alarm_raised_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_stat_alarm_raised_id_unpack(bcmolt_gpon_gem_port_stat_alarm_raised_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_stat_cfg_id_pack(bcmolt_gpon_gem_port_stat_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_stat_cfg_id_unpack(bcmolt_gpon_gem_port_stat_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_stat_id_pack(bcmolt_gpon_gem_port_stat_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_stat_id_unpack(bcmolt_gpon_gem_port_stat_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_state_pack(bcmolt_gpon_gem_port_state this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_state_unpack(bcmolt_gpon_gem_port_state *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_auto_cfg_id_pack(bcmolt_gpon_iwf_auto_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_auto_cfg_id_unpack(bcmolt_gpon_iwf_auto_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_cfg_id_pack(bcmolt_gpon_iwf_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_cfg_id_unpack(bcmolt_gpon_iwf_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_ds_egress_flow_cfg_id_pack(bcmolt_gpon_iwf_ds_egress_flow_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_ds_egress_flow_cfg_id_unpack(bcmolt_gpon_iwf_ds_egress_flow_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_ds_egress_flow_key_id_pack(bcmolt_gpon_iwf_ds_egress_flow_key_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_ds_egress_flow_key_id_unpack(bcmolt_gpon_iwf_ds_egress_flow_key_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_ds_ingress_flow_cfg_id_pack(bcmolt_gpon_iwf_ds_ingress_flow_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_ds_ingress_flow_cfg_id_unpack(bcmolt_gpon_iwf_ds_ingress_flow_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_ds_ingress_flow_key_id_pack(bcmolt_gpon_iwf_ds_ingress_flow_key_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_ds_ingress_flow_key_id_unpack(bcmolt_gpon_iwf_ds_ingress_flow_key_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_flush_mac_table_completed_id_pack(bcmolt_gpon_iwf_flush_mac_table_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_flush_mac_table_completed_id_unpack(bcmolt_gpon_iwf_flush_mac_table_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_flush_mac_table_id_pack(bcmolt_gpon_iwf_flush_mac_table_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_flush_mac_table_id_unpack(bcmolt_gpon_iwf_flush_mac_table_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_key_id_pack(bcmolt_gpon_iwf_key_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_key_id_unpack(bcmolt_gpon_iwf_key_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_mac_table_auto_cfg_id_pack(bcmolt_gpon_iwf_mac_table_auto_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_mac_table_auto_cfg_id_unpack(bcmolt_gpon_iwf_mac_table_auto_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_mac_table_cfg_id_pack(bcmolt_gpon_iwf_mac_table_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_mac_table_cfg_id_unpack(bcmolt_gpon_iwf_mac_table_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_mac_table_key_id_pack(bcmolt_gpon_iwf_mac_table_key_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_mac_table_key_id_unpack(bcmolt_gpon_iwf_mac_table_key_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_mac_table_mac_aged_id_pack(bcmolt_gpon_iwf_mac_table_mac_aged_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_mac_table_mac_aged_id_unpack(bcmolt_gpon_iwf_mac_table_mac_aged_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_mac_table_mac_dropped_id_pack(bcmolt_gpon_iwf_mac_table_mac_dropped_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_mac_table_mac_dropped_id_unpack(bcmolt_gpon_iwf_mac_table_mac_dropped_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_mac_table_mac_move_id_pack(bcmolt_gpon_iwf_mac_table_mac_move_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_mac_table_mac_move_id_unpack(bcmolt_gpon_iwf_mac_table_mac_move_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_mac_table_new_mac_id_pack(bcmolt_gpon_iwf_mac_table_new_mac_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_mac_table_new_mac_id_unpack(bcmolt_gpon_iwf_mac_table_new_mac_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_scan_mac_table_completed_id_pack(bcmolt_gpon_iwf_scan_mac_table_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_scan_mac_table_completed_id_unpack(bcmolt_gpon_iwf_scan_mac_table_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_scan_mac_table_id_pack(bcmolt_gpon_iwf_scan_mac_table_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_scan_mac_table_id_unpack(bcmolt_gpon_iwf_scan_mac_table_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_stat_alarm_cleared_id_pack(bcmolt_gpon_iwf_stat_alarm_cleared_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_stat_alarm_cleared_id_unpack(bcmolt_gpon_iwf_stat_alarm_cleared_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_stat_alarm_raised_id_pack(bcmolt_gpon_iwf_stat_alarm_raised_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_stat_alarm_raised_id_unpack(bcmolt_gpon_iwf_stat_alarm_raised_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_stat_cfg_id_pack(bcmolt_gpon_iwf_stat_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_stat_cfg_id_unpack(bcmolt_gpon_iwf_stat_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_stat_id_pack(bcmolt_gpon_iwf_stat_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_stat_id_unpack(bcmolt_gpon_iwf_stat_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_us_flow_cfg_id_pack(bcmolt_gpon_iwf_us_flow_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_us_flow_cfg_id_unpack(bcmolt_gpon_iwf_us_flow_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_us_flow_key_id_pack(bcmolt_gpon_iwf_us_flow_key_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_us_flow_key_id_unpack(bcmolt_gpon_iwf_us_flow_key_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_key_exchange_mode_pack(bcmolt_key_exchange_mode this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_key_exchange_mode_unpack(bcmolt_key_exchange_mode *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_activate_all_onus_completed_id_pack(bcmolt_gpon_ni_activate_all_onus_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_activate_all_onus_completed_id_unpack(bcmolt_gpon_ni_activate_all_onus_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_auto_cfg_id_pack(bcmolt_gpon_ni_auto_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_auto_cfg_id_unpack(bcmolt_gpon_ni_auto_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_broadcast_ploam_packet_id_pack(bcmolt_gpon_ni_broadcast_ploam_packet_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_broadcast_ploam_packet_id_unpack(bcmolt_gpon_ni_broadcast_ploam_packet_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_cfg_id_pack(bcmolt_gpon_ni_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_cfg_id_unpack(bcmolt_gpon_ni_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_cpu_packets_failure_id_pack(bcmolt_gpon_ni_cpu_packets_failure_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_cpu_packets_failure_id_unpack(bcmolt_gpon_ni_cpu_packets_failure_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_cpu_packets_id_pack(bcmolt_gpon_ni_cpu_packets_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_cpu_packets_id_unpack(bcmolt_gpon_ni_cpu_packets_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_deactivate_all_onus_completed_id_pack(bcmolt_gpon_ni_deactivate_all_onus_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_deactivate_all_onus_completed_id_unpack(bcmolt_gpon_ni_deactivate_all_onus_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_disable_all_onus_completed_id_pack(bcmolt_gpon_ni_disable_all_onus_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_disable_all_onus_completed_id_unpack(bcmolt_gpon_ni_disable_all_onus_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_disable_serial_number_id_pack(bcmolt_gpon_ni_disable_serial_number_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_disable_serial_number_id_unpack(bcmolt_gpon_ni_disable_serial_number_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_enable_all_onus_completed_id_pack(bcmolt_gpon_ni_enable_all_onus_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_enable_all_onus_completed_id_unpack(bcmolt_gpon_ni_enable_all_onus_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_key_id_pack(bcmolt_gpon_ni_key_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_key_id_unpack(bcmolt_gpon_ni_key_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_los_id_pack(bcmolt_gpon_ni_los_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_los_id_unpack(bcmolt_gpon_ni_los_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_onu_discovered_id_pack(bcmolt_gpon_ni_onu_discovered_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_onu_discovered_id_unpack(bcmolt_gpon_ni_onu_discovered_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_onu_upgrade_complete_id_pack(bcmolt_gpon_ni_onu_upgrade_complete_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_onu_upgrade_complete_id_unpack(bcmolt_gpon_ni_onu_upgrade_complete_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_protection_switching_onus_ranged_id_pack(bcmolt_gpon_ni_protection_switching_onus_ranged_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_protection_switching_onus_ranged_id_unpack(bcmolt_gpon_ni_protection_switching_onus_ranged_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_protection_switching_switchover_completed_id_pack(bcmolt_gpon_ni_protection_switching_switchover_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_protection_switching_switchover_completed_id_unpack(bcmolt_gpon_ni_protection_switching_switchover_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_protection_switching_traffic_resume_id_pack(bcmolt_gpon_ni_protection_switching_traffic_resume_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_protection_switching_traffic_resume_id_unpack(bcmolt_gpon_ni_protection_switching_traffic_resume_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_id_pack(bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_id_unpack(bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_reset_id_pack(bcmolt_gpon_ni_reset_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_reset_id_unpack(bcmolt_gpon_ni_reset_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_rogue_detection_completed_id_pack(bcmolt_gpon_ni_rogue_detection_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_rogue_detection_completed_id_unpack(bcmolt_gpon_ni_rogue_detection_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_rogue_detection_window_id_pack(bcmolt_gpon_ni_rogue_detection_window_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_rogue_detection_window_id_unpack(bcmolt_gpon_ni_rogue_detection_window_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_rogue_onu_special_map_cycle_start_id_pack(bcmolt_gpon_ni_rogue_onu_special_map_cycle_start_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_rogue_onu_special_map_cycle_start_id_unpack(bcmolt_gpon_ni_rogue_onu_special_map_cycle_start_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_serial_number_acquisition_cycle_start_id_pack(bcmolt_gpon_ni_serial_number_acquisition_cycle_start_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_serial_number_acquisition_cycle_start_id_unpack(bcmolt_gpon_ni_serial_number_acquisition_cycle_start_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_set_onu_state_id_pack(bcmolt_gpon_ni_set_onu_state_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_set_onu_state_id_unpack(bcmolt_gpon_ni_set_onu_state_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_set_pon_state_id_pack(bcmolt_gpon_ni_set_pon_state_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_set_pon_state_id_unpack(bcmolt_gpon_ni_set_pon_state_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_single_request_standby_pon_monitoring_id_pack(bcmolt_gpon_ni_single_request_standby_pon_monitoring_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_single_request_standby_pon_monitoring_id_unpack(bcmolt_gpon_ni_single_request_standby_pon_monitoring_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_id_pack(bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_id_unpack(bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_start_onu_upgrade_id_pack(bcmolt_gpon_ni_start_onu_upgrade_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_start_onu_upgrade_id_unpack(bcmolt_gpon_ni_start_onu_upgrade_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_stat_alarm_cleared_id_pack(bcmolt_gpon_ni_stat_alarm_cleared_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_stat_alarm_cleared_id_unpack(bcmolt_gpon_ni_stat_alarm_cleared_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_stat_alarm_raised_id_pack(bcmolt_gpon_ni_stat_alarm_raised_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_stat_alarm_raised_id_unpack(bcmolt_gpon_ni_stat_alarm_raised_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_stat_cfg_id_pack(bcmolt_gpon_ni_stat_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_stat_cfg_id_unpack(bcmolt_gpon_ni_stat_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_stat_id_pack(bcmolt_gpon_ni_stat_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_stat_id_unpack(bcmolt_gpon_ni_stat_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_state_change_completed_id_pack(bcmolt_gpon_ni_state_change_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_state_change_completed_id_unpack(bcmolt_gpon_ni_state_change_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_tod_request_completed_id_pack(bcmolt_gpon_ni_tod_request_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_tod_request_completed_id_unpack(bcmolt_gpon_ni_tod_request_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_tod_request_id_pack(bcmolt_gpon_ni_tod_request_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_tod_request_id_unpack(bcmolt_gpon_ni_tod_request_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_auto_cfg_id_pack(bcmolt_gpon_onu_auto_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_auto_cfg_id_unpack(bcmolt_gpon_onu_auto_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_ber_interval_configuration_completed_id_pack(bcmolt_gpon_onu_ber_interval_configuration_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_ber_interval_configuration_completed_id_unpack(bcmolt_gpon_onu_ber_interval_configuration_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_cfg_id_pack(bcmolt_gpon_onu_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_cfg_id_unpack(bcmolt_gpon_onu_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_change_power_level_id_pack(bcmolt_gpon_onu_change_power_level_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_change_power_level_id_unpack(bcmolt_gpon_onu_change_power_level_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_cpu_packet_id_pack(bcmolt_gpon_onu_cpu_packet_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_cpu_packet_id_unpack(bcmolt_gpon_onu_cpu_packet_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_cpu_packets_id_pack(bcmolt_gpon_onu_cpu_packets_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_cpu_packets_id_unpack(bcmolt_gpon_onu_cpu_packets_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_dfi_id_pack(bcmolt_gpon_onu_dfi_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_dfi_id_unpack(bcmolt_gpon_onu_dfi_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_dgi_id_pack(bcmolt_gpon_onu_dgi_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_dgi_id_unpack(bcmolt_gpon_onu_dgi_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_dowi_id_pack(bcmolt_gpon_onu_dowi_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_dowi_id_unpack(bcmolt_gpon_onu_dowi_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_err_id_pack(bcmolt_gpon_onu_err_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_err_id_unpack(bcmolt_gpon_onu_err_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_invalid_dbru_report_id_pack(bcmolt_gpon_onu_invalid_dbru_report_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_invalid_dbru_report_id_unpack(bcmolt_gpon_onu_invalid_dbru_report_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_key_exchange_completed_id_pack(bcmolt_gpon_onu_key_exchange_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_key_exchange_completed_id_unpack(bcmolt_gpon_onu_key_exchange_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_key_exchange_cycle_skipped_id_pack(bcmolt_gpon_onu_key_exchange_cycle_skipped_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_key_exchange_cycle_skipped_id_unpack(bcmolt_gpon_onu_key_exchange_cycle_skipped_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_key_exchange_decrypt_required_id_pack(bcmolt_gpon_onu_key_exchange_decrypt_required_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_key_exchange_decrypt_required_id_unpack(bcmolt_gpon_onu_key_exchange_decrypt_required_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_key_exchange_key_mismatch_id_pack(bcmolt_gpon_onu_key_exchange_key_mismatch_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_key_exchange_key_mismatch_id_unpack(bcmolt_gpon_onu_key_exchange_key_mismatch_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_key_exchange_key_request_timeout_id_pack(bcmolt_gpon_onu_key_exchange_key_request_timeout_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_key_exchange_key_request_timeout_id_unpack(bcmolt_gpon_onu_key_exchange_key_request_timeout_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_key_exchange_unconsecutive_index_id_pack(bcmolt_gpon_onu_key_exchange_unconsecutive_index_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_key_exchange_unconsecutive_index_id_unpack(bcmolt_gpon_onu_key_exchange_unconsecutive_index_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_key_id_pack(bcmolt_gpon_onu_key_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_key_id_unpack(bcmolt_gpon_onu_key_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_loai_id_pack(bcmolt_gpon_onu_loai_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_loai_id_unpack(bcmolt_gpon_onu_loai_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_loki_id_pack(bcmolt_gpon_onu_loki_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_loki_id_unpack(bcmolt_gpon_onu_loki_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_memi_id_pack(bcmolt_gpon_onu_memi_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_memi_id_unpack(bcmolt_gpon_onu_memi_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_omci_packet_id_pack(bcmolt_gpon_onu_omci_packet_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_omci_packet_id_unpack(bcmolt_gpon_onu_omci_packet_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_omci_port_id_configuration_completed_id_pack(bcmolt_gpon_onu_omci_port_id_configuration_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_omci_port_id_configuration_completed_id_unpack(bcmolt_gpon_onu_omci_port_id_configuration_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_onu_activation_completed_id_pack(bcmolt_gpon_onu_onu_activation_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_onu_activation_completed_id_unpack(bcmolt_gpon_onu_onu_activation_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_onu_activation_standby_completed_id_pack(bcmolt_gpon_onu_onu_activation_standby_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_onu_activation_standby_completed_id_unpack(bcmolt_gpon_onu_onu_activation_standby_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_onu_alarm_id_pack(bcmolt_gpon_onu_onu_alarm_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_onu_alarm_id_unpack(bcmolt_gpon_onu_onu_alarm_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_onu_deactivation_completed_id_pack(bcmolt_gpon_onu_onu_deactivation_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_onu_deactivation_completed_id_unpack(bcmolt_gpon_onu_onu_deactivation_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_onu_disable_completed_id_pack(bcmolt_gpon_onu_onu_disable_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_onu_disable_completed_id_unpack(bcmolt_gpon_onu_onu_disable_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_onu_enable_completed_id_pack(bcmolt_gpon_onu_onu_enable_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_onu_enable_completed_id_unpack(bcmolt_gpon_onu_onu_enable_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_optical_reflection_id_pack(bcmolt_gpon_onu_optical_reflection_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_optical_reflection_id_unpack(bcmolt_gpon_onu_optical_reflection_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_password_authentication_completed_id_pack(bcmolt_gpon_onu_password_authentication_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_password_authentication_completed_id_unpack(bcmolt_gpon_onu_password_authentication_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_pee_id_pack(bcmolt_gpon_onu_pee_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_pee_id_unpack(bcmolt_gpon_onu_pee_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_ploam_packet_id_pack(bcmolt_gpon_onu_ploam_packet_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_ploam_packet_id_unpack(bcmolt_gpon_onu_ploam_packet_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_possible_drift_id_pack(bcmolt_gpon_onu_possible_drift_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_possible_drift_id_unpack(bcmolt_gpon_onu_possible_drift_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_power_management_state_change_id_pack(bcmolt_gpon_onu_power_management_state_change_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_power_management_state_change_id_unpack(bcmolt_gpon_onu_power_management_state_change_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_pst_id_pack(bcmolt_gpon_onu_pst_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_pst_id_unpack(bcmolt_gpon_onu_pst_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_ranging_completed_id_pack(bcmolt_gpon_onu_ranging_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_ranging_completed_id_unpack(bcmolt_gpon_onu_ranging_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_rei_id_pack(bcmolt_gpon_onu_rei_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_rei_id_unpack(bcmolt_gpon_onu_rei_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_rssi_measurement_completed_id_pack(bcmolt_gpon_onu_rssi_measurement_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_rssi_measurement_completed_id_unpack(bcmolt_gpon_onu_rssi_measurement_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_rssi_measurement_id_pack(bcmolt_gpon_onu_rssi_measurement_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_rssi_measurement_id_unpack(bcmolt_gpon_onu_rssi_measurement_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_sdi_id_pack(bcmolt_gpon_onu_sdi_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_sdi_id_unpack(bcmolt_gpon_onu_sdi_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_set_onu_state_id_pack(bcmolt_gpon_onu_set_onu_state_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_set_onu_state_id_unpack(bcmolt_gpon_onu_set_onu_state_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_sfi_id_pack(bcmolt_gpon_onu_sfi_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_sfi_id_unpack(bcmolt_gpon_onu_sfi_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_stat_alarm_cleared_id_pack(bcmolt_gpon_onu_stat_alarm_cleared_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_stat_alarm_cleared_id_unpack(bcmolt_gpon_onu_stat_alarm_cleared_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_stat_alarm_raised_id_pack(bcmolt_gpon_onu_stat_alarm_raised_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_stat_alarm_raised_id_unpack(bcmolt_gpon_onu_stat_alarm_raised_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_stat_cfg_id_pack(bcmolt_gpon_onu_stat_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_stat_cfg_id_unpack(bcmolt_gpon_onu_stat_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_stat_id_pack(bcmolt_gpon_onu_stat_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_stat_id_unpack(bcmolt_gpon_onu_stat_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_sufi_id_pack(bcmolt_gpon_onu_sufi_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_sufi_id_unpack(bcmolt_gpon_onu_sufi_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_tiwi_id_pack(bcmolt_gpon_onu_tiwi_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_tiwi_id_unpack(bcmolt_gpon_onu_tiwi_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_omci_device_id_pack(bcmolt_omci_device_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_omci_device_id_unpack(bcmolt_omci_device_id *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_upgrade_return_code_pack(bcmolt_gpon_onu_upgrade_return_code this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_upgrade_return_code_unpack(bcmolt_gpon_onu_upgrade_return_code *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_omci_result_code_pack(bcmolt_omci_result_code this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_omci_result_code_unpack(bcmolt_omci_result_code *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_onu_state_pack(bcmolt_onu_state this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_onu_state_unpack(bcmolt_onu_state *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_rssi_location_sign_pack(bcmolt_rssi_location_sign this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_rssi_location_sign_unpack(bcmolt_rssi_location_sign *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_onu_post_discovery_mode_pack(bcmolt_onu_post_discovery_mode this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_onu_post_discovery_mode_unpack(bcmolt_onu_post_discovery_mode *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_trx_cfg_id_pack(bcmolt_gpon_trx_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_trx_cfg_id_unpack(bcmolt_gpon_trx_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_trx_key_id_pack(bcmolt_gpon_trx_key_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_trx_key_id_unpack(bcmolt_gpon_trx_key_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_image_transfer_status_pack(bcmolt_image_transfer_status this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_image_transfer_status_unpack(bcmolt_image_transfer_status *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_iwf_mode_pack(bcmolt_iwf_mode this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_iwf_mode_unpack(bcmolt_iwf_mode *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_entry_auto_cfg_id_pack(bcmolt_log_entry_auto_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_entry_auto_cfg_id_unpack(bcmolt_log_entry_auto_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_entry_cfg_id_pack(bcmolt_log_entry_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_entry_cfg_id_unpack(bcmolt_log_entry_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_entry_key_id_pack(bcmolt_log_entry_key_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_entry_key_id_unpack(bcmolt_log_entry_key_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_entry_stat_alarm_cleared_id_pack(bcmolt_log_entry_stat_alarm_cleared_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_entry_stat_alarm_cleared_id_unpack(bcmolt_log_entry_stat_alarm_cleared_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_entry_stat_alarm_raised_id_pack(bcmolt_log_entry_stat_alarm_raised_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_entry_stat_alarm_raised_id_unpack(bcmolt_log_entry_stat_alarm_raised_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_entry_stat_cfg_id_pack(bcmolt_log_entry_stat_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_entry_stat_cfg_id_unpack(bcmolt_log_entry_stat_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_entry_stat_id_pack(bcmolt_log_entry_stat_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_entry_stat_id_unpack(bcmolt_log_entry_stat_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_file_id_pack(bcmolt_log_file_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_file_id_unpack(bcmolt_log_file_id *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_level_pack(bcmolt_log_level this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_level_unpack(bcmolt_log_level *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_style_pack(bcmolt_log_style this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_style_unpack(bcmolt_log_style *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_type_pack(bcmolt_log_type this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_type_unpack(bcmolt_log_type *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_logger_auto_cfg_id_pack(bcmolt_logger_auto_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_logger_auto_cfg_id_unpack(bcmolt_logger_auto_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_logger_cfg_id_pack(bcmolt_logger_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_logger_cfg_id_unpack(bcmolt_logger_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_logger_clear_log_id_pack(bcmolt_logger_clear_log_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_logger_clear_log_id_unpack(bcmolt_logger_clear_log_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_logger_key_id_pack(bcmolt_logger_key_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_logger_key_id_unpack(bcmolt_logger_key_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_logger_stat_alarm_cleared_id_pack(bcmolt_logger_stat_alarm_cleared_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_logger_stat_alarm_cleared_id_unpack(bcmolt_logger_stat_alarm_cleared_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_logger_stat_alarm_raised_id_pack(bcmolt_logger_stat_alarm_raised_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_logger_stat_alarm_raised_id_unpack(bcmolt_logger_stat_alarm_raised_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_logger_stat_cfg_id_pack(bcmolt_logger_stat_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_logger_stat_cfg_id_unpack(bcmolt_logger_stat_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_logger_stat_id_pack(bcmolt_logger_stat_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_logger_stat_id_unpack(bcmolt_logger_stat_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_mac_table_miss_fallback_pack(bcmolt_mac_table_miss_fallback this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_mac_table_miss_fallback_unpack(bcmolt_mac_table_miss_fallback *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_mac_table_learning_mode_pack(bcmolt_mac_table_learning_mode this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_mac_table_learning_mode_unpack(bcmolt_mac_table_learning_mode *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_mapping_tag_method_pack(bcmolt_mapping_tag_method this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_mapping_tag_method_unpack(bcmolt_mapping_tag_method *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_auto_cfg_id_pack(bcmolt_nni_auto_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_auto_cfg_id_unpack(bcmolt_nni_auto_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_cfg_id_pack(bcmolt_nni_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_cfg_id_unpack(bcmolt_nni_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_connection_pack(bcmolt_nni_connection this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_connection_unpack(bcmolt_nni_connection *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_key_id_pack(bcmolt_nni_key_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_key_id_unpack(bcmolt_nni_key_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trivalent_pack(bcmolt_trivalent this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trivalent_unpack(bcmolt_trivalent *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_serdes_cfg_id_pack(bcmolt_nni_serdes_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_serdes_cfg_id_unpack(bcmolt_nni_serdes_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_serdes_key_id_pack(bcmolt_nni_serdes_key_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_serdes_key_id_unpack(bcmolt_nni_serdes_key_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_stat_alarm_cleared_id_pack(bcmolt_nni_stat_alarm_cleared_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_stat_alarm_cleared_id_unpack(bcmolt_nni_stat_alarm_cleared_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_stat_alarm_raised_id_pack(bcmolt_nni_stat_alarm_raised_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_stat_alarm_raised_id_unpack(bcmolt_nni_stat_alarm_raised_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_stat_cfg_id_pack(bcmolt_nni_stat_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_stat_cfg_id_unpack(bcmolt_nni_stat_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_stat_id_pack(bcmolt_nni_stat_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_stat_id_unpack(bcmolt_nni_stat_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_status_changed_id_pack(bcmolt_nni_status_changed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_status_changed_id_unpack(bcmolt_nni_status_changed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_odn_class_pack(bcmolt_odn_class this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_odn_class_unpack(bcmolt_odn_class *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_omci_port_id_operation_pack(bcmolt_omci_port_id_operation this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_omci_port_id_operation_unpack(bcmolt_omci_port_id_operation *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_onu_operation_pack(bcmolt_onu_operation this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_onu_operation_unpack(bcmolt_onu_operation *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_onu_power_level_pack(bcmolt_onu_power_level this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_onu_power_level_unpack(bcmolt_onu_power_level *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_tc_protocol_pack(bcmolt_tc_protocol this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_tc_protocol_unpack(bcmolt_tc_protocol *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_packet_injection_error_pack(bcmolt_packet_injection_error this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_packet_injection_error_unpack(bcmolt_packet_injection_error *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_packet_type_pack(bcmolt_packet_type this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_packet_type_unpack(bcmolt_packet_type *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_password_authentication_fail_reason_pack(bcmolt_password_authentication_fail_reason this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_password_authentication_fail_reason_unpack(bcmolt_password_authentication_fail_reason *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_polarity_pack(bcmolt_polarity this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_polarity_unpack(bcmolt_polarity *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_polling_interval_pack(bcmolt_polling_interval this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_s32(buf, (int32_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_polling_interval_unpack(bcmolt_polling_interval *this, bcmolt_buf *buf)
+{
+    int32_t num_val;
+    if (!bcmolt_buf_read_s32(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_operation_pack(bcmolt_pon_operation this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_operation_unpack(bcmolt_pon_operation *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_protection_switching_options_pack(bcmolt_pon_protection_switching_options this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u32(buf, (uint32_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_protection_switching_options_unpack(bcmolt_pon_protection_switching_options *this, bcmolt_buf *buf)
+{
+    uint32_t num_val;
+    if (!bcmolt_buf_read_u32(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_state_pack(bcmolt_pon_state this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_state_unpack(bcmolt_pon_state *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_power_levelling_control_pack(bcmolt_power_levelling_control this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_power_levelling_control_unpack(bcmolt_power_levelling_control *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_power_management_transition_reason_pack(bcmolt_power_management_transition_reason this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_power_management_transition_reason_unpack(bcmolt_power_management_transition_reason *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_prbs_polynomial_pack(bcmolt_prbs_polynomial this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_prbs_polynomial_unpack(bcmolt_prbs_polynomial *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_prbs_checker_mode_pack(bcmolt_prbs_checker_mode this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_prbs_checker_mode_unpack(bcmolt_prbs_checker_mode *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_prbs_lock_state_pack(bcmolt_prbs_lock_state this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_prbs_lock_state_unpack(bcmolt_prbs_lock_state *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_raman_mitigation_mode_pack(bcmolt_raman_mitigation_mode this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_raman_mitigation_mode_unpack(bcmolt_raman_mitigation_mode *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ranging_fail_reason_pack(bcmolt_ranging_fail_reason this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ranging_fail_reason_unpack(bcmolt_ranging_fail_reason *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_registration_behavior_pack(bcmolt_registration_behavior this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_registration_behavior_unpack(bcmolt_registration_behavior *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_request_registration_fail_reason_pack(bcmolt_request_registration_fail_reason this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_request_registration_fail_reason_unpack(bcmolt_request_registration_fail_reason *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_result_pack(bcmolt_result this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_result_unpack(bcmolt_result *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_rogue_detection_algorithm_type_pack(bcmolt_rogue_detection_algorithm_type this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_rogue_detection_algorithm_type_unpack(bcmolt_rogue_detection_algorithm_type *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_rogue_detection_window_pack(bcmolt_rogue_detection_window this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_rogue_detection_window_unpack(bcmolt_rogue_detection_window *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_rogue_measurement_result_pack(bcmolt_rogue_measurement_result this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_rogue_measurement_result_unpack(bcmolt_rogue_measurement_result *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_rogue_scan_status_pack(bcmolt_rogue_scan_status this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_rogue_scan_status_unpack(bcmolt_rogue_scan_status *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_rssi_measurement_fail_reason_pack(bcmolt_rssi_measurement_fail_reason this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_rssi_measurement_fail_reason_unpack(bcmolt_rssi_measurement_fail_reason *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_secure_mutual_authentication_fail_reason_pack(bcmolt_secure_mutual_authentication_fail_reason this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_secure_mutual_authentication_fail_reason_unpack(bcmolt_secure_mutual_authentication_fail_reason *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_serdes_ranging_mode_pack(bcmolt_serdes_ranging_mode this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_serdes_ranging_mode_unpack(bcmolt_serdes_ranging_mode *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_serdes_instance_pack(bcmolt_serdes_instance this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_serdes_instance_unpack(bcmolt_serdes_instance *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_shaper_mode_pack(bcmolt_shaper_mode this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_shaper_mode_unpack(bcmolt_shaper_mode *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_software_error_cfg_id_pack(bcmolt_software_error_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_software_error_cfg_id_unpack(bcmolt_software_error_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_software_error_key_id_pack(bcmolt_software_error_key_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_software_error_key_id_unpack(bcmolt_software_error_key_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_stat_condition_type_pack(bcmolt_stat_condition_type this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_stat_condition_type_unpack(bcmolt_stat_condition_type *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_switch_over_type_c_onu_state_pack(bcmolt_switch_over_type_c_onu_state this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_switch_over_type_c_onu_state_unpack(bcmolt_switch_over_type_c_onu_state *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_system_mode_pack(bcmolt_system_mode this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_system_mode_unpack(bcmolt_system_mode *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_us_operating_wavelength_bands_pack(bcmolt_us_operating_wavelength_bands this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_us_operating_wavelength_bands_unpack(bcmolt_us_operating_wavelength_bands *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_traffic_resume_result_pack(bcmolt_traffic_resume_result this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_traffic_resume_result_unpack(bcmolt_traffic_resume_result *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_calibration_auto_cfg_id_pack(bcmolt_trx_calibration_auto_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_calibration_auto_cfg_id_unpack(bcmolt_trx_calibration_auto_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_calibration_capture_window_and_statistic_completed_id_pack(bcmolt_trx_calibration_capture_window_and_statistic_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_calibration_capture_window_and_statistic_completed_id_unpack(bcmolt_trx_calibration_capture_window_and_statistic_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_calibration_key_id_pack(bcmolt_trx_calibration_key_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_calibration_key_id_unpack(bcmolt_trx_calibration_key_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_calibration_start_capture_window_id_pack(bcmolt_trx_calibration_start_capture_window_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_calibration_start_capture_window_id_unpack(bcmolt_trx_calibration_start_capture_window_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_calibration_stop_capture_window_id_pack(bcmolt_trx_calibration_stop_capture_window_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_calibration_stop_capture_window_id_unpack(bcmolt_trx_calibration_stop_capture_window_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_calibration_trigger_pack(bcmolt_trx_calibration_trigger this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_calibration_trigger_unpack(bcmolt_trx_calibration_trigger *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_calibration_trigger_position_pack(bcmolt_trx_calibration_trigger_position this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_calibration_trigger_position_unpack(bcmolt_trx_calibration_trigger_position *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_calibration_window_mode_pack(bcmolt_trx_calibration_window_mode this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_calibration_window_mode_unpack(bcmolt_trx_calibration_window_mode *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_type_pack(bcmolt_trx_type this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_type_unpack(bcmolt_trx_type *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_tune_in_fail_reason_pack(bcmolt_tune_in_fail_reason this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_tune_in_fail_reason_unpack(bcmolt_tune_in_fail_reason *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_tune_out_fail_reason_pack(bcmolt_tune_out_fail_reason this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_tune_out_fail_reason_unpack(bcmolt_tune_out_fail_reason *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_uart_baudrate_pack(bcmolt_uart_baudrate this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_uart_baudrate_unpack(bcmolt_uart_baudrate *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_us_gem_port_destination_pack(bcmolt_us_gem_port_destination this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_us_gem_port_destination_unpack(bcmolt_us_gem_port_destination *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_us_vlan_action_pack(bcmolt_us_vlan_action this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_us_vlan_action_unpack(bcmolt_us_vlan_action *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_vlan_to_flow_mapping_method_pack(bcmolt_vlan_to_flow_mapping_method this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_vlan_to_flow_mapping_method_unpack(bcmolt_vlan_to_flow_mapping_method *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_auto_cfg_id_pack(bcmolt_xgpon_alloc_auto_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_auto_cfg_id_unpack(bcmolt_xgpon_alloc_auto_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_cfg_id_pack(bcmolt_xgpon_alloc_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_cfg_id_unpack(bcmolt_xgpon_alloc_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_configuration_completed_id_pack(bcmolt_xgpon_alloc_configuration_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_configuration_completed_id_unpack(bcmolt_xgpon_alloc_configuration_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_get_alloc_stats_completed_id_pack(bcmolt_xgpon_alloc_get_alloc_stats_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_get_alloc_stats_completed_id_unpack(bcmolt_xgpon_alloc_get_alloc_stats_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_get_stats_id_pack(bcmolt_xgpon_alloc_get_stats_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_get_stats_id_unpack(bcmolt_xgpon_alloc_get_stats_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_key_id_pack(bcmolt_xgpon_alloc_key_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_key_id_unpack(bcmolt_xgpon_alloc_key_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_set_state_id_pack(bcmolt_xgpon_alloc_set_state_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_set_state_id_unpack(bcmolt_xgpon_alloc_set_state_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_stat_alarm_cleared_id_pack(bcmolt_xgpon_alloc_stat_alarm_cleared_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_stat_alarm_cleared_id_unpack(bcmolt_xgpon_alloc_stat_alarm_cleared_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_stat_alarm_raised_id_pack(bcmolt_xgpon_alloc_stat_alarm_raised_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_stat_alarm_raised_id_unpack(bcmolt_xgpon_alloc_stat_alarm_raised_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_stat_cfg_id_pack(bcmolt_xgpon_alloc_stat_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_stat_cfg_id_unpack(bcmolt_xgpon_alloc_stat_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_stat_id_pack(bcmolt_xgpon_alloc_stat_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_stat_id_unpack(bcmolt_xgpon_alloc_stat_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_auto_cfg_id_pack(bcmolt_xgpon_gem_port_auto_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_auto_cfg_id_unpack(bcmolt_xgpon_gem_port_auto_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_cfg_id_pack(bcmolt_xgpon_gem_port_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_cfg_id_unpack(bcmolt_xgpon_gem_port_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_key_id_pack(bcmolt_xgpon_gem_port_key_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_key_id_unpack(bcmolt_xgpon_gem_port_key_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_stat_alarm_cleared_id_pack(bcmolt_xgpon_gem_port_stat_alarm_cleared_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_stat_alarm_cleared_id_unpack(bcmolt_xgpon_gem_port_stat_alarm_cleared_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_stat_alarm_raised_id_pack(bcmolt_xgpon_gem_port_stat_alarm_raised_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_stat_alarm_raised_id_unpack(bcmolt_xgpon_gem_port_stat_alarm_raised_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_stat_cfg_id_pack(bcmolt_xgpon_gem_port_stat_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_stat_cfg_id_unpack(bcmolt_xgpon_gem_port_stat_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_stat_id_pack(bcmolt_xgpon_gem_port_stat_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_stat_id_unpack(bcmolt_xgpon_gem_port_stat_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_state_pack(bcmolt_xgpon_gem_port_state this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_state_unpack(bcmolt_xgpon_gem_port_state *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_iwf_cfg_id_pack(bcmolt_xgpon_iwf_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_iwf_cfg_id_unpack(bcmolt_xgpon_iwf_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_iwf_key_id_pack(bcmolt_xgpon_iwf_key_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_iwf_key_id_unpack(bcmolt_xgpon_iwf_key_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_activate_all_onus_completed_id_pack(bcmolt_xgpon_ni_activate_all_onus_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_activate_all_onus_completed_id_unpack(bcmolt_xgpon_ni_activate_all_onus_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_adjust_tx_wavelength_id_pack(bcmolt_xgpon_ni_adjust_tx_wavelength_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_adjust_tx_wavelength_id_unpack(bcmolt_xgpon_ni_adjust_tx_wavelength_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_auto_cfg_id_pack(bcmolt_xgpon_ni_auto_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_auto_cfg_id_unpack(bcmolt_xgpon_ni_auto_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_broadcast_ploam_packet_id_pack(bcmolt_xgpon_ni_broadcast_ploam_packet_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_broadcast_ploam_packet_id_unpack(bcmolt_xgpon_ni_broadcast_ploam_packet_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_cfg_id_pack(bcmolt_xgpon_ni_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_cfg_id_unpack(bcmolt_xgpon_ni_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_cpu_packets_failure_id_pack(bcmolt_xgpon_ni_cpu_packets_failure_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_cpu_packets_failure_id_unpack(bcmolt_xgpon_ni_cpu_packets_failure_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_cpu_packets_id_pack(bcmolt_xgpon_ni_cpu_packets_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_cpu_packets_id_unpack(bcmolt_xgpon_ni_cpu_packets_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_deactivate_all_onus_completed_id_pack(bcmolt_xgpon_ni_deactivate_all_onus_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_deactivate_all_onus_completed_id_unpack(bcmolt_xgpon_ni_deactivate_all_onus_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_disable_all_onus_completed_id_pack(bcmolt_xgpon_ni_disable_all_onus_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_disable_all_onus_completed_id_unpack(bcmolt_xgpon_ni_disable_all_onus_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_disable_serial_number_id_pack(bcmolt_xgpon_ni_disable_serial_number_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_disable_serial_number_id_unpack(bcmolt_xgpon_ni_disable_serial_number_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_enable_all_onus_completed_id_pack(bcmolt_xgpon_ni_enable_all_onus_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_enable_all_onus_completed_id_unpack(bcmolt_xgpon_ni_enable_all_onus_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_key_id_pack(bcmolt_xgpon_ni_key_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_key_id_unpack(bcmolt_xgpon_ni_key_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_los_id_pack(bcmolt_xgpon_ni_los_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_los_id_unpack(bcmolt_xgpon_ni_los_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_onu_discovered_id_pack(bcmolt_xgpon_ni_onu_discovered_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_onu_discovered_id_unpack(bcmolt_xgpon_ni_onu_discovered_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_onu_upgrade_complete_id_pack(bcmolt_xgpon_ni_onu_upgrade_complete_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_onu_upgrade_complete_id_unpack(bcmolt_xgpon_ni_onu_upgrade_complete_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_protection_switching_onus_ranged_id_pack(bcmolt_xgpon_ni_protection_switching_onus_ranged_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_protection_switching_onus_ranged_id_unpack(bcmolt_xgpon_ni_protection_switching_onus_ranged_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_protection_switching_switchover_completed_id_pack(bcmolt_xgpon_ni_protection_switching_switchover_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_protection_switching_switchover_completed_id_unpack(bcmolt_xgpon_ni_protection_switching_switchover_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_protection_switching_traffic_resume_id_pack(bcmolt_xgpon_ni_protection_switching_traffic_resume_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_protection_switching_traffic_resume_id_unpack(bcmolt_xgpon_ni_protection_switching_traffic_resume_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_reset_id_pack(bcmolt_xgpon_ni_reset_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_reset_id_unpack(bcmolt_xgpon_ni_reset_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_rogue_detection_completed_id_pack(bcmolt_xgpon_ni_rogue_detection_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_rogue_detection_completed_id_unpack(bcmolt_xgpon_ni_rogue_detection_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_rogue_detection_window_id_pack(bcmolt_xgpon_ni_rogue_detection_window_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_rogue_detection_window_id_unpack(bcmolt_xgpon_ni_rogue_detection_window_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_rogue_onu_special_map_cycle_start_id_pack(bcmolt_xgpon_ni_rogue_onu_special_map_cycle_start_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_rogue_onu_special_map_cycle_start_id_unpack(bcmolt_xgpon_ni_rogue_onu_special_map_cycle_start_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_run_special_bw_map_id_pack(bcmolt_xgpon_ni_run_special_bw_map_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_run_special_bw_map_id_unpack(bcmolt_xgpon_ni_run_special_bw_map_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_serial_number_acquisition_cycle_start_id_pack(bcmolt_xgpon_ni_serial_number_acquisition_cycle_start_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_serial_number_acquisition_cycle_start_id_unpack(bcmolt_xgpon_ni_serial_number_acquisition_cycle_start_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_set_onu_state_id_pack(bcmolt_xgpon_ni_set_onu_state_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_set_onu_state_id_unpack(bcmolt_xgpon_ni_set_onu_state_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_set_pon_state_id_pack(bcmolt_xgpon_ni_set_pon_state_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_set_pon_state_id_unpack(bcmolt_xgpon_ni_set_pon_state_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_single_request_standby_pon_monitoring_id_pack(bcmolt_xgpon_ni_single_request_standby_pon_monitoring_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_single_request_standby_pon_monitoring_id_unpack(bcmolt_xgpon_ni_single_request_standby_pon_monitoring_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_id_pack(bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_id_unpack(bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_start_onu_upgrade_id_pack(bcmolt_xgpon_ni_start_onu_upgrade_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_start_onu_upgrade_id_unpack(bcmolt_xgpon_ni_start_onu_upgrade_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_stat_alarm_cleared_id_pack(bcmolt_xgpon_ni_stat_alarm_cleared_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_stat_alarm_cleared_id_unpack(bcmolt_xgpon_ni_stat_alarm_cleared_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_stat_alarm_raised_id_pack(bcmolt_xgpon_ni_stat_alarm_raised_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_stat_alarm_raised_id_unpack(bcmolt_xgpon_ni_stat_alarm_raised_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_stat_cfg_id_pack(bcmolt_xgpon_ni_stat_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_stat_cfg_id_unpack(bcmolt_xgpon_ni_stat_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_stat_id_pack(bcmolt_xgpon_ni_stat_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_stat_id_unpack(bcmolt_xgpon_ni_stat_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_state_change_completed_id_pack(bcmolt_xgpon_ni_state_change_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_state_change_completed_id_unpack(bcmolt_xgpon_ni_state_change_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_tod_request_completed_id_pack(bcmolt_xgpon_ni_tod_request_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_tod_request_completed_id_unpack(bcmolt_xgpon_ni_tod_request_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_tod_request_id_pack(bcmolt_xgpon_ni_tod_request_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_tod_request_id_unpack(bcmolt_xgpon_ni_tod_request_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_num_of_onus_pack(bcmolt_xgpon_num_of_onus this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_num_of_onus_unpack(bcmolt_xgpon_num_of_onus *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_adjust_tx_wavelength_id_pack(bcmolt_xgpon_onu_adjust_tx_wavelength_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_adjust_tx_wavelength_id_unpack(bcmolt_xgpon_onu_adjust_tx_wavelength_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_auto_cfg_id_pack(bcmolt_xgpon_onu_auto_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_auto_cfg_id_unpack(bcmolt_xgpon_onu_auto_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_cfg_id_pack(bcmolt_xgpon_onu_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_cfg_id_unpack(bcmolt_xgpon_onu_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_change_power_levelling_id_pack(bcmolt_xgpon_onu_change_power_levelling_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_change_power_levelling_id_unpack(bcmolt_xgpon_onu_change_power_levelling_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_cpu_packet_id_pack(bcmolt_xgpon_onu_cpu_packet_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_cpu_packet_id_unpack(bcmolt_xgpon_onu_cpu_packet_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_cpu_packets_id_pack(bcmolt_xgpon_onu_cpu_packets_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_cpu_packets_id_unpack(bcmolt_xgpon_onu_cpu_packets_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_dfi_id_pack(bcmolt_xgpon_onu_dfi_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_dfi_id_unpack(bcmolt_xgpon_onu_dfi_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_dgi_id_pack(bcmolt_xgpon_onu_dgi_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_dgi_id_unpack(bcmolt_xgpon_onu_dgi_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_dowi_id_pack(bcmolt_xgpon_onu_dowi_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_dowi_id_unpack(bcmolt_xgpon_onu_dowi_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_get_power_consumption_id_pack(bcmolt_xgpon_onu_get_power_consumption_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_get_power_consumption_id_unpack(bcmolt_xgpon_onu_get_power_consumption_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_get_power_level_id_pack(bcmolt_xgpon_onu_get_power_level_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_get_power_level_id_unpack(bcmolt_xgpon_onu_get_power_level_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_invalid_dbru_report_id_pack(bcmolt_xgpon_onu_invalid_dbru_report_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_invalid_dbru_report_id_unpack(bcmolt_xgpon_onu_invalid_dbru_report_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_key_exchange_completed_id_pack(bcmolt_xgpon_onu_key_exchange_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_key_exchange_completed_id_unpack(bcmolt_xgpon_onu_key_exchange_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_key_exchange_cycle_skipped_id_pack(bcmolt_xgpon_onu_key_exchange_cycle_skipped_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_key_exchange_cycle_skipped_id_unpack(bcmolt_xgpon_onu_key_exchange_cycle_skipped_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_key_exchange_key_mismatch_id_pack(bcmolt_xgpon_onu_key_exchange_key_mismatch_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_key_exchange_key_mismatch_id_unpack(bcmolt_xgpon_onu_key_exchange_key_mismatch_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_key_exchange_key_request_timeout_id_pack(bcmolt_xgpon_onu_key_exchange_key_request_timeout_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_key_exchange_key_request_timeout_id_unpack(bcmolt_xgpon_onu_key_exchange_key_request_timeout_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_key_id_pack(bcmolt_xgpon_onu_key_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_key_id_unpack(bcmolt_xgpon_onu_key_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_looci_id_pack(bcmolt_xgpon_onu_looci_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_looci_id_unpack(bcmolt_xgpon_onu_looci_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_omci_packet_id_pack(bcmolt_xgpon_onu_omci_packet_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_omci_packet_id_unpack(bcmolt_xgpon_onu_omci_packet_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_activation_completed_id_pack(bcmolt_xgpon_onu_onu_activation_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_activation_completed_id_unpack(bcmolt_xgpon_onu_onu_activation_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_alarm_id_pack(bcmolt_xgpon_onu_onu_alarm_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_alarm_id_unpack(bcmolt_xgpon_onu_onu_alarm_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_deactivation_completed_id_pack(bcmolt_xgpon_onu_onu_deactivation_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_deactivation_completed_id_unpack(bcmolt_xgpon_onu_onu_deactivation_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_disable_completed_id_pack(bcmolt_xgpon_onu_onu_disable_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_disable_completed_id_unpack(bcmolt_xgpon_onu_onu_disable_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_enable_completed_id_pack(bcmolt_xgpon_onu_onu_enable_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_enable_completed_id_unpack(bcmolt_xgpon_onu_onu_enable_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_tuning_in_completed_id_pack(bcmolt_xgpon_onu_onu_tuning_in_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_tuning_in_completed_id_unpack(bcmolt_xgpon_onu_onu_tuning_in_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_tuning_in_id_pack(bcmolt_xgpon_onu_onu_tuning_in_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_tuning_in_id_unpack(bcmolt_xgpon_onu_onu_tuning_in_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_tuning_out_completed_id_pack(bcmolt_xgpon_onu_onu_tuning_out_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_tuning_out_completed_id_unpack(bcmolt_xgpon_onu_onu_tuning_out_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_tuning_out_id_pack(bcmolt_xgpon_onu_onu_tuning_out_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_tuning_out_id_unpack(bcmolt_xgpon_onu_onu_tuning_out_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_optical_reflection_id_pack(bcmolt_xgpon_onu_optical_reflection_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_optical_reflection_id_unpack(bcmolt_xgpon_onu_optical_reflection_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_ploam_packet_id_pack(bcmolt_xgpon_onu_ploam_packet_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_ploam_packet_id_unpack(bcmolt_xgpon_onu_ploam_packet_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_possible_drift_id_pack(bcmolt_xgpon_onu_possible_drift_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_possible_drift_id_unpack(bcmolt_xgpon_onu_possible_drift_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_power_consumption_report_id_pack(bcmolt_xgpon_onu_power_consumption_report_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_power_consumption_report_id_unpack(bcmolt_xgpon_onu_power_consumption_report_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_power_level_report_id_pack(bcmolt_xgpon_onu_power_level_report_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_power_level_report_id_unpack(bcmolt_xgpon_onu_power_level_report_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_power_management_state_change_id_pack(bcmolt_xgpon_onu_power_management_state_change_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_power_management_state_change_id_unpack(bcmolt_xgpon_onu_power_management_state_change_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_pqsi_id_pack(bcmolt_xgpon_onu_pqsi_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_pqsi_id_unpack(bcmolt_xgpon_onu_pqsi_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_ranging_completed_id_pack(bcmolt_xgpon_onu_ranging_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_ranging_completed_id_unpack(bcmolt_xgpon_onu_ranging_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_registration_id_id_pack(bcmolt_xgpon_onu_registration_id_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_registration_id_id_unpack(bcmolt_xgpon_onu_registration_id_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_request_registration_id_pack(bcmolt_xgpon_onu_request_registration_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_request_registration_id_unpack(bcmolt_xgpon_onu_request_registration_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_rssi_measurement_completed_id_pack(bcmolt_xgpon_onu_rssi_measurement_completed_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_rssi_measurement_completed_id_unpack(bcmolt_xgpon_onu_rssi_measurement_completed_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_rssi_measurement_id_pack(bcmolt_xgpon_onu_rssi_measurement_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_rssi_measurement_id_unpack(bcmolt_xgpon_onu_rssi_measurement_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_sdi_id_pack(bcmolt_xgpon_onu_sdi_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_sdi_id_unpack(bcmolt_xgpon_onu_sdi_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_secure_mutual_authentication_failure_id_pack(bcmolt_xgpon_onu_secure_mutual_authentication_failure_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_secure_mutual_authentication_failure_id_unpack(bcmolt_xgpon_onu_secure_mutual_authentication_failure_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_secure_mutual_authentication_id_pack(bcmolt_xgpon_onu_secure_mutual_authentication_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_secure_mutual_authentication_id_unpack(bcmolt_xgpon_onu_secure_mutual_authentication_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_set_onu_state_id_pack(bcmolt_xgpon_onu_set_onu_state_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_set_onu_state_id_unpack(bcmolt_xgpon_onu_set_onu_state_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_sfi_id_pack(bcmolt_xgpon_onu_sfi_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_sfi_id_unpack(bcmolt_xgpon_onu_sfi_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_stat_alarm_cleared_id_pack(bcmolt_xgpon_onu_stat_alarm_cleared_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_stat_alarm_cleared_id_unpack(bcmolt_xgpon_onu_stat_alarm_cleared_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_stat_alarm_raised_id_pack(bcmolt_xgpon_onu_stat_alarm_raised_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_stat_alarm_raised_id_unpack(bcmolt_xgpon_onu_stat_alarm_raised_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_stat_cfg_id_pack(bcmolt_xgpon_onu_stat_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_stat_cfg_id_unpack(bcmolt_xgpon_onu_stat_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_stat_id_pack(bcmolt_xgpon_onu_stat_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_stat_id_unpack(bcmolt_xgpon_onu_stat_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_sufi_id_pack(bcmolt_xgpon_onu_sufi_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_sufi_id_unpack(bcmolt_xgpon_onu_sufi_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_tiwi_id_pack(bcmolt_xgpon_onu_tiwi_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_tiwi_id_unpack(bcmolt_xgpon_onu_tiwi_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_tuning_response_id_pack(bcmolt_xgpon_onu_tuning_response_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_tuning_response_id_unpack(bcmolt_xgpon_onu_tuning_response_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_serdes_ranging_mode_pack(bcmolt_xgpon_serdes_ranging_mode this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_serdes_ranging_mode_unpack(bcmolt_xgpon_serdes_ranging_mode *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_trx_cfg_id_pack(bcmolt_xgpon_trx_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_trx_cfg_id_unpack(bcmolt_xgpon_trx_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_trx_key_id_pack(bcmolt_xgpon_trx_key_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_trx_key_id_unpack(bcmolt_xgpon_trx_key_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_trx_type_pack(bcmolt_xgpon_trx_type this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_trx_type_unpack(bcmolt_xgpon_trx_type *this, bcmolt_buf *buf)
+{
+    uint8_t num_val;
+    if (!bcmolt_buf_read_u8(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xpon_serdes_cfg_id_pack(bcmolt_xpon_serdes_cfg_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xpon_serdes_cfg_id_unpack(bcmolt_xpon_serdes_cfg_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xpon_serdes_key_id_pack(bcmolt_xpon_serdes_key_id this, bcmolt_buf *buf)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t) this);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xpon_serdes_key_id_unpack(bcmolt_xpon_serdes_key_id *this, bcmolt_buf *buf)
+{
+    uint16_t num_val;
+    if (!bcmolt_buf_read_u16(buf, &num_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *this = num_val;
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_actual_schedulershaper_set_default(bcmolt_actual_schedulershaper *this)
+{
+    this->actual_mbs_tq = (bcmolt_time_quanta) 0;
+    this->actual_weight_tq = (bcmolt_time_quanta) 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_actual_schedulershaper_pack(const bcmolt_actual_schedulershaper *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u32(buf, (uint32_t) this->actual_mbs_tq))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, (uint32_t) this->actual_weight_tq))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_actual_schedulershaper_unpack(bcmolt_actual_schedulershaper *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u32(buf, (uint32_t *) &this->actual_mbs_tq))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, (uint32_t *) &this->actual_weight_tq))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_actual_schedulershaper_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 8);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_actual_schedulershaper_bounds_check(const bcmolt_actual_schedulershaper *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_aes_key_set_default(bcmolt_aes_key *this)
+{
+    memset(this->bytes, 0, sizeof(this->bytes));
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_aes_key_pack(const bcmolt_aes_key *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write(buf, this->bytes, 16))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_aes_key_unpack(bcmolt_aes_key *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read(buf, this->bytes, 16))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_aes_key_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 16);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_aes_key_bounds_check(const bcmolt_aes_key *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_api_capture_buffer_reader_set_default(bcmolt_api_capture_buffer_reader *this)
+{
+    this->offset = 0;
+    this->size = 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_api_capture_buffer_reader_pack(const bcmolt_api_capture_buffer_reader *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u32(buf, this->offset))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->size))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_api_capture_buffer_reader_unpack(bcmolt_api_capture_buffer_reader *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u32(buf, &this->offset))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->size))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_api_capture_buffer_reader_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 8);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_api_capture_buffer_reader_bounds_check(const bcmolt_api_capture_buffer_reader *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_api_capture_config_set_default(bcmolt_api_capture_config *this)
+{
+    this->location = BCMOLT_API_CAPTURE_LOCATION_DEVICE;
+    this->buffer_size_bytes = 16384;
+    this->buffer_mode = BCMOLT_API_CAPTURE_BUFFER_MODE_WRAP;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_api_capture_config_pack(const bcmolt_api_capture_config *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_api_capture_location_pack(this->location, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->buffer_size_bytes))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_api_capture_buffer_mode_pack(this->buffer_mode, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_api_capture_config_unpack(bcmolt_api_capture_config *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_api_capture_location_unpack(&this->location, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->buffer_size_bytes))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_api_capture_buffer_mode_unpack(&this->buffer_mode, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_api_capture_config_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 6);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_api_capture_config_bounds_check(const bcmolt_api_capture_config *this)
+{
+    switch (this->location)
+    {
+        case BCMOLT_API_CAPTURE_LOCATION_DEVICE:
+            break;
+        case BCMOLT_API_CAPTURE_LOCATION_HOST:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    if (this->buffer_size_bytes < 16384)
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (this->buffer_mode)
+    {
+        case BCMOLT_API_CAPTURE_BUFFER_MODE_OVERFLOW:
+            break;
+        case BCMOLT_API_CAPTURE_BUFFER_MODE_WRAP:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_api_capture_stats_set_default(bcmolt_api_capture_stats *this)
+{
+    this->buffer_used_bytes = 0;
+    this->buffer_wrap_count = 0;
+    this->events_recorded = 0;
+    this->events_dropped = 0;
+    this->readable_bytes = 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_api_capture_stats_pack(const bcmolt_api_capture_stats *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u32(buf, this->buffer_used_bytes))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->buffer_wrap_count))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->events_recorded))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->events_dropped))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->readable_bytes))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_api_capture_stats_unpack(bcmolt_api_capture_stats *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u32(buf, &this->buffer_used_bytes))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->buffer_wrap_count))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->events_recorded))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->events_dropped))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->readable_bytes))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_api_capture_stats_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 20);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_api_capture_stats_bounds_check(const bcmolt_api_capture_stats *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_bounds_set_default(bcmolt_bounds *this)
+{
+    this->best_case = 0;
+    this->worst_case = 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_bounds_pack(const bcmolt_bounds *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u32(buf, this->best_case))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->worst_case))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_bounds_unpack(bcmolt_bounds *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u32(buf, &this->best_case))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->worst_case))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_bounds_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 8);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_bounds_bounds_check(const bcmolt_bounds *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_arr_bounds_8_set_default(bcmolt_arr_bounds_8 *this)
+{
+    memset(this->arr, 0, sizeof(this->arr));
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_bounds_8_pack(const bcmolt_arr_bounds_8 *this, bcmolt_buf *buf)
+{
+    uint32_t i0;
+    for (i0 = 0; i0 < 8; i0++)
+    {
+        if (!bcmolt_bounds_pack(&this->arr[i0], buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_bounds_8_unpack(bcmolt_arr_bounds_8 *this, bcmolt_buf *buf, void **extra_mem)
+{
+    uint32_t i0;
+    for (i0 = 0; i0 < 8; i0++)
+    {
+        if (!bcmolt_bounds_unpack(&this->arr[i0], buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_bounds_8_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 64);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_bounds_8_bounds_check(const bcmolt_arr_bounds_8 *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_arr_calibration_record_8_set_default(bcmolt_arr_calibration_record_8 *this)
+{
+    memset(this->arr, 0, sizeof(this->arr));
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_calibration_record_8_pack(const bcmolt_arr_calibration_record_8 *this, bcmolt_buf *buf)
+{
+    uint32_t i0;
+    for (i0 = 0; i0 < 8; i0++)
+    {
+        if (!bcmolt_calibration_record_pack(this->arr[i0], buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_calibration_record_8_unpack(bcmolt_arr_calibration_record_8 *this, bcmolt_buf *buf, void **extra_mem)
+{
+    uint32_t i0;
+    for (i0 = 0; i0 < 8; i0++)
+    {
+        if (!bcmolt_calibration_record_unpack(&this->arr[i0], buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_calibration_record_8_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 8);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_calibration_record_8_bounds_check(const bcmolt_arr_calibration_record_8 *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_ds_frequency_offset_set_default(bcmolt_ds_frequency_offset *this)
+{
+    this->sign = BCMOLT_SIGN_POSITIVE;
+    this->value = 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ds_frequency_offset_pack(const bcmolt_ds_frequency_offset *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_sign_pack(this->sign, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->value))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ds_frequency_offset_unpack(bcmolt_ds_frequency_offset *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_sign_unpack(&this->sign, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->value))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ds_frequency_offset_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 2);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ds_frequency_offset_bounds_check(const bcmolt_ds_frequency_offset *this)
+{
+    switch (this->sign)
+    {
+        case BCMOLT_SIGN_POSITIVE:
+            break;
+        case BCMOLT_SIGN_NEGATIVE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_channel_profile_set_default(bcmolt_channel_profile *this)
+{
+    this->version = 0;
+    this->channel_index = 0;
+    this->ds_frequency_offset.sign = BCMOLT_SIGN_POSITIVE;
+    this->ds_frequency_offset.value = 0;
+    this->channel_partition = 0;
+    this->uwlch_id = 0;
+    this->us_frequency = 0;
+    this->us_rate = BCMOLT_UPSTREAM_LINE_RATE_CAPABILITIES_RATE_2_P_5_G;
+    this->default_onu_attenuation = 0;
+    this->response_threshold = 0;
+    this->us_link_type = BCMOLT_LINK_TYPE_UNSPECIFIED;
+    this->is_valid = BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_channel_profile_pack(const bcmolt_channel_profile *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u8(buf, this->version))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->channel_index))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_ds_frequency_offset_pack(&this->ds_frequency_offset, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->channel_partition))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->uwlch_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->us_frequency))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_upstream_line_rate_capabilities_pack(this->us_rate, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->default_onu_attenuation))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->response_threshold))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_link_type_pack(this->us_link_type, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_bool(buf, this->is_valid))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_channel_profile_unpack(bcmolt_channel_profile *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u8(buf, &this->version))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->channel_index))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_ds_frequency_offset_unpack(&this->ds_frequency_offset, buf, extra_mem))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->channel_partition))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->uwlch_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->us_frequency))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_upstream_line_rate_capabilities_unpack(&this->us_rate, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->default_onu_attenuation))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->response_threshold))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_link_type_unpack(&this->us_link_type, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_bool(buf, &this->is_valid))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_channel_profile_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 15);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_channel_profile_bounds_check(const bcmolt_channel_profile *this)
+{
+    if (this->version > 15)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->channel_index > 15)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_ds_frequency_offset_bounds_check(&this->ds_frequency_offset))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->channel_partition > 15)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->uwlch_id > 15)
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (this->us_rate)
+    {
+        case BCMOLT_UPSTREAM_LINE_RATE_CAPABILITIES_RATE_2_P_5_G:
+            break;
+        case BCMOLT_UPSTREAM_LINE_RATE_CAPABILITIES_RATE_10_G:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    if (this->default_onu_attenuation > 7)
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (this->us_link_type)
+    {
+        case BCMOLT_LINK_TYPE_UNSPECIFIED:
+            break;
+        case BCMOLT_LINK_TYPE_B:
+            break;
+        case BCMOLT_LINK_TYPE_A:
+            break;
+        case BCMOLT_LINK_TYPE_A_AND_B:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_arr_channel_profile_8_set_default(bcmolt_arr_channel_profile_8 *this)
+{
+    memset(this->arr, 0, sizeof(this->arr));
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_channel_profile_8_pack(const bcmolt_arr_channel_profile_8 *this, bcmolt_buf *buf)
+{
+    uint32_t i0;
+    for (i0 = 0; i0 < 8; i0++)
+    {
+        if (!bcmolt_channel_profile_pack(&this->arr[i0], buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_channel_profile_8_unpack(bcmolt_arr_channel_profile_8 *this, bcmolt_buf *buf, void **extra_mem)
+{
+    uint32_t i0;
+    for (i0 = 0; i0 < 8; i0++)
+    {
+        if (!bcmolt_channel_profile_unpack(&this->arr[i0], buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_channel_profile_8_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 120);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_channel_profile_8_bounds_check(const bcmolt_arr_channel_profile_8 *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_power_consumption_channel_report_set_default(bcmolt_power_consumption_channel_report *this)
+{
+    this->ds_wavelength_channel_id = 0;
+    this->us_wavelength_channel_id = 0;
+    this->power_consumption = 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_power_consumption_channel_report_pack(const bcmolt_power_consumption_channel_report *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u8(buf, this->ds_wavelength_channel_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->us_wavelength_channel_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u16(buf, this->power_consumption))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_power_consumption_channel_report_unpack(bcmolt_power_consumption_channel_report *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u8(buf, &this->ds_wavelength_channel_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->us_wavelength_channel_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u16(buf, &this->power_consumption))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_power_consumption_channel_report_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 4);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_power_consumption_channel_report_bounds_check(const bcmolt_power_consumption_channel_report *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_arr_power_consumption_channel_report_8_set_default(bcmolt_arr_power_consumption_channel_report_8 *this)
+{
+    memset(this->arr, 0, sizeof(this->arr));
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_power_consumption_channel_report_8_pack(const bcmolt_arr_power_consumption_channel_report_8 *this, bcmolt_buf *buf)
+{
+    uint32_t i0;
+    for (i0 = 0; i0 < 8; i0++)
+    {
+        if (!bcmolt_power_consumption_channel_report_pack(&this->arr[i0], buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_power_consumption_channel_report_8_unpack(bcmolt_arr_power_consumption_channel_report_8 *this, bcmolt_buf *buf, void **extra_mem)
+{
+    uint32_t i0;
+    for (i0 = 0; i0 < 8; i0++)
+    {
+        if (!bcmolt_power_consumption_channel_report_unpack(&this->arr[i0], buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_power_consumption_channel_report_8_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 32);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_power_consumption_channel_report_8_bounds_check(const bcmolt_arr_power_consumption_channel_report_8 *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_arr_u16_2_set_default(bcmolt_arr_u16_2 *this)
+{
+    this->arr[0] = 4096;
+    this->arr[1] = 8192;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_u16_2_pack(const bcmolt_arr_u16_2 *this, bcmolt_buf *buf)
+{
+    uint32_t i0;
+    for (i0 = 0; i0 < 2; i0++)
+    {
+        if (!bcmolt_buf_write_u16(buf, this->arr[i0]))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_u16_2_unpack(bcmolt_arr_u16_2 *this, bcmolt_buf *buf, void **extra_mem)
+{
+    uint32_t i0;
+    for (i0 = 0; i0 < 2; i0++)
+    {
+        if (!bcmolt_buf_read_u16(buf, &this->arr[i0]))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_u16_2_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 4);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_u16_2_bounds_check(const bcmolt_arr_u16_2 *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_arr_u16_2_hex_set_default(bcmolt_arr_u16_2_hex *this)
+{
+    this->arr[0] = 33024U;
+    this->arr[1] = 33024U;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_u16_2_hex_pack(const bcmolt_arr_u16_2_hex *this, bcmolt_buf *buf)
+{
+    uint32_t i0;
+    for (i0 = 0; i0 < 2; i0++)
+    {
+        if (!bcmolt_buf_write_u16(buf, this->arr[i0]))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_u16_2_hex_unpack(bcmolt_arr_u16_2_hex *this, bcmolt_buf *buf, void **extra_mem)
+{
+    uint32_t i0;
+    for (i0 = 0; i0 < 2; i0++)
+    {
+        if (!bcmolt_buf_read_u16(buf, &this->arr[i0]))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_u16_2_hex_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 4);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_u16_2_hex_bounds_check(const bcmolt_arr_u16_2_hex *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_arr_u16_5_hex_set_default(bcmolt_arr_u16_5_hex *this)
+{
+    this->arr[0] = 33024U;
+    this->arr[1] = 34984U;
+    this->arr[2] = 37120U;
+    this->arr[3] = 37376U;
+    this->arr[4] = 33024U;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_u16_5_hex_pack(const bcmolt_arr_u16_5_hex *this, bcmolt_buf *buf)
+{
+    uint32_t i0;
+    for (i0 = 0; i0 < 5; i0++)
+    {
+        if (!bcmolt_buf_write_u16(buf, this->arr[i0]))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_u16_5_hex_unpack(bcmolt_arr_u16_5_hex *this, bcmolt_buf *buf, void **extra_mem)
+{
+    uint32_t i0;
+    for (i0 = 0; i0 < 5; i0++)
+    {
+        if (!bcmolt_buf_read_u16(buf, &this->arr[i0]))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_u16_5_hex_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 10);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_u16_5_hex_bounds_check(const bcmolt_arr_u16_5_hex *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_arr_u16_7_set_default(bcmolt_arr_u16_7 *this)
+{
+    memset(this->arr, 0, sizeof(this->arr));
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_u16_7_pack(const bcmolt_arr_u16_7 *this, bcmolt_buf *buf)
+{
+    uint32_t i0;
+    for (i0 = 0; i0 < 7; i0++)
+    {
+        if (!bcmolt_buf_write_u16(buf, this->arr[i0]))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_u16_7_unpack(bcmolt_arr_u16_7 *this, bcmolt_buf *buf, void **extra_mem)
+{
+    uint32_t i0;
+    for (i0 = 0; i0 < 7; i0++)
+    {
+        if (!bcmolt_buf_read_u16(buf, &this->arr[i0]))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_u16_7_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 14);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_u16_7_bounds_check(const bcmolt_arr_u16_7 *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_arr_u32_6_set_default(bcmolt_arr_u32_6 *this)
+{
+    memset(this->arr, 0, sizeof(this->arr));
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_u32_6_pack(const bcmolt_arr_u32_6 *this, bcmolt_buf *buf)
+{
+    uint32_t i0;
+    for (i0 = 0; i0 < 6; i0++)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->arr[i0]))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_u32_6_unpack(bcmolt_arr_u32_6 *this, bcmolt_buf *buf, void **extra_mem)
+{
+    uint32_t i0;
+    for (i0 = 0; i0 < 6; i0++)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->arr[i0]))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_u32_6_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 24);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_u32_6_bounds_check(const bcmolt_arr_u32_6 *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_arr_u8_10_set_default(bcmolt_arr_u8_10 *this)
+{
+    memset(this->arr, 0, sizeof(this->arr));
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_u8_10_pack(const bcmolt_arr_u8_10 *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write(buf, this->arr, 10))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_u8_10_unpack(bcmolt_arr_u8_10 *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read(buf, this->arr, 10))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_u8_10_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 10);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_u8_10_bounds_check(const bcmolt_arr_u8_10 *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_arr_u8_12_set_default(bcmolt_arr_u8_12 *this)
+{
+    memset(this->arr, 0, sizeof(this->arr));
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_u8_12_pack(const bcmolt_arr_u8_12 *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write(buf, this->arr, 12))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_u8_12_unpack(bcmolt_arr_u8_12 *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read(buf, this->arr, 12))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_u8_12_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 12);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_u8_12_bounds_check(const bcmolt_arr_u8_12 *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_arr_u8_13_set_default(bcmolt_arr_u8_13 *this)
+{
+    memset(this->arr, 0, sizeof(this->arr));
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_u8_13_pack(const bcmolt_arr_u8_13 *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write(buf, this->arr, 13))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_u8_13_unpack(bcmolt_arr_u8_13 *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read(buf, this->arr, 13))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_u8_13_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 13);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_u8_13_bounds_check(const bcmolt_arr_u8_13 *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_arr_u8_36_set_default(bcmolt_arr_u8_36 *this)
+{
+    memset(this->arr, 0, sizeof(this->arr));
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_u8_36_pack(const bcmolt_arr_u8_36 *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write(buf, this->arr, 36))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_u8_36_unpack(bcmolt_arr_u8_36 *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read(buf, this->arr, 36))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_u8_36_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 36);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_u8_36_bounds_check(const bcmolt_arr_u8_36 *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_arr_u8_4_set_default(bcmolt_arr_u8_4 *this)
+{
+    this->arr[0] = 7;
+    this->arr[1] = 7;
+    this->arr[2] = 7;
+    this->arr[3] = 7;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_u8_4_pack(const bcmolt_arr_u8_4 *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write(buf, this->arr, 4))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_u8_4_unpack(bcmolt_arr_u8_4 *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read(buf, this->arr, 4))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_u8_4_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 4);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_u8_4_bounds_check(const bcmolt_arr_u8_4 *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_arr_u8_40_set_default(bcmolt_arr_u8_40 *this)
+{
+    memset(this->arr, 0, sizeof(this->arr));
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_u8_40_pack(const bcmolt_arr_u8_40 *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write(buf, this->arr, 40))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_u8_40_unpack(bcmolt_arr_u8_40 *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read(buf, this->arr, 40))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_u8_40_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 40);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_u8_40_bounds_check(const bcmolt_arr_u8_40 *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_burst_profile_set_default(bcmolt_xgpon_burst_profile *this)
+{
+    this->profile_version = 0;
+    this->is_fec_on = BCMOS_FALSE;
+    this->delimiter_size_in_bytes = 0;
+    this->delimiter_pattern_high = 0;
+    this->delimiter_pattern_low = 8;
+    this->preamble_length_in_bytes = 8;
+    this->preamble_repeats_count = 0;
+    this->preamble_pattern_high = 0;
+    this->preamble_pattern_low = 0;
+    this->pon_tag = 0;
+    this->num_of_guard_bytes = 0;
+    this->is_profile_valid = BCMOS_FALSE;
+    this->burst_overhead_size_in_words = 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_burst_profile_pack(const bcmolt_xgpon_burst_profile *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u8(buf, this->profile_version))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_bool(buf, this->is_fec_on))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->delimiter_size_in_bytes))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->delimiter_pattern_high))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->delimiter_pattern_low))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->preamble_length_in_bytes))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->preamble_repeats_count))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->preamble_pattern_high))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->preamble_pattern_low))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u64(buf, this->pon_tag))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->num_of_guard_bytes))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_bool(buf, this->is_profile_valid))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->burst_overhead_size_in_words))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_burst_profile_unpack(bcmolt_xgpon_burst_profile *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u8(buf, &this->profile_version))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_bool(buf, &this->is_fec_on))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->delimiter_size_in_bytes))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->delimiter_pattern_high))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->delimiter_pattern_low))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->preamble_length_in_bytes))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->preamble_repeats_count))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->preamble_pattern_high))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->preamble_pattern_low))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u64(buf, &this->pon_tag))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->num_of_guard_bytes))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_bool(buf, &this->is_profile_valid))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->burst_overhead_size_in_words))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_burst_profile_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 38);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_burst_profile_bounds_check(const bcmolt_xgpon_burst_profile *this)
+{
+    if (this->delimiter_size_in_bytes > 8)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->preamble_length_in_bytes < 1)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->preamble_length_in_bytes > 8)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_arr_xgpon_burst_profile_4_set_default(bcmolt_arr_xgpon_burst_profile_4 *this)
+{
+    this->arr[0].profile_version = 0;
+    this->arr[0].is_fec_on = BCMOS_FALSE;
+    this->arr[0].delimiter_size_in_bytes = 8;
+    this->arr[0].delimiter_pattern_high = 3015562000UL;
+    this->arr[0].delimiter_pattern_low = 2999259041UL;
+    this->arr[0].preamble_length_in_bytes = 8;
+    this->arr[0].preamble_repeats_count = 20;
+    this->arr[0].preamble_pattern_high = 2863311530UL;
+    this->arr[0].preamble_pattern_low = 2863311530UL;
+    this->arr[0].pon_tag = 0;
+    this->arr[0].num_of_guard_bytes = 16;
+    this->arr[0].is_profile_valid = BCMOS_TRUE;
+    this->arr[0].burst_overhead_size_in_words = 78;
+    this->arr[1].profile_version = 0;
+    this->arr[1].is_fec_on = BCMOS_FALSE;
+    this->arr[1].delimiter_size_in_bytes = 8;
+    this->arr[1].delimiter_pattern_high = 3015562000UL;
+    this->arr[1].delimiter_pattern_low = 2999259041UL;
+    this->arr[1].preamble_length_in_bytes = 8;
+    this->arr[1].preamble_repeats_count = 9;
+    this->arr[1].preamble_pattern_high = 2863311530UL;
+    this->arr[1].preamble_pattern_low = 2863311530UL;
+    this->arr[1].pon_tag = 0;
+    this->arr[1].num_of_guard_bytes = 16;
+    this->arr[1].is_profile_valid = BCMOS_TRUE;
+    this->arr[1].burst_overhead_size_in_words = 56;
+    this->arr[2].profile_version = 0;
+    this->arr[2].is_fec_on = BCMOS_TRUE;
+    this->arr[2].delimiter_size_in_bytes = 8;
+    this->arr[2].delimiter_pattern_high = 3015562000UL;
+    this->arr[2].delimiter_pattern_low = 2999259041UL;
+    this->arr[2].preamble_length_in_bytes = 8;
+    this->arr[2].preamble_repeats_count = 20;
+    this->arr[2].preamble_pattern_high = 2863311530UL;
+    this->arr[2].preamble_pattern_low = 2863311530UL;
+    this->arr[2].pon_tag = 0;
+    this->arr[2].num_of_guard_bytes = 16;
+    this->arr[2].is_profile_valid = BCMOS_TRUE;
+    this->arr[2].burst_overhead_size_in_words = 78;
+    this->arr[3].profile_version = 0;
+    this->arr[3].is_fec_on = BCMOS_TRUE;
+    this->arr[3].delimiter_size_in_bytes = 8;
+    this->arr[3].delimiter_pattern_high = 3015562000UL;
+    this->arr[3].delimiter_pattern_low = 2999259041UL;
+    this->arr[3].preamble_length_in_bytes = 8;
+    this->arr[3].preamble_repeats_count = 9;
+    this->arr[3].preamble_pattern_high = 2863311530UL;
+    this->arr[3].preamble_pattern_low = 2863311530UL;
+    this->arr[3].pon_tag = 0;
+    this->arr[3].num_of_guard_bytes = 16;
+    this->arr[3].is_profile_valid = BCMOS_TRUE;
+    this->arr[3].burst_overhead_size_in_words = 56;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_xgpon_burst_profile_4_pack(const bcmolt_arr_xgpon_burst_profile_4 *this, bcmolt_buf *buf)
+{
+    uint32_t i0;
+    for (i0 = 0; i0 < 4; i0++)
+    {
+        if (!bcmolt_xgpon_burst_profile_pack(&this->arr[i0], buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_xgpon_burst_profile_4_unpack(bcmolt_arr_xgpon_burst_profile_4 *this, bcmolt_buf *buf, void **extra_mem)
+{
+    uint32_t i0;
+    for (i0 = 0; i0 < 4; i0++)
+    {
+        if (!bcmolt_xgpon_burst_profile_unpack(&this->arr[i0], buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_xgpon_burst_profile_4_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 152);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_xgpon_burst_profile_4_bounds_check(const bcmolt_arr_xgpon_burst_profile_4 *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_trx_configuration_set_default(bcmolt_xgpon_trx_configuration *this)
+{
+    this->trx_reset_pattern_first = 0;
+    this->trx_reset_pattern_middle = 0;
+    this->trx_reset_pattern_last = 0;
+    this->trx_reset_middle_repeats_count = 0;
+    this->trx_reset_location = 0;
+    this->trx_reset_polarity = BCMOS_FALSE;
+    this->bcdr_reset_pattern_first = 0;
+    this->bcdr_reset_pattern_middle = 0;
+    this->bcdr_reset_pattern_last = 0;
+    this->bcdr_reset_middle_repeats_count = 0;
+    this->bcdr_reset_location = 0;
+    this->bcdr_reset_polarity = BCMOS_FALSE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_trx_configuration_pack(const bcmolt_xgpon_trx_configuration *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u32(buf, this->trx_reset_pattern_first))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->trx_reset_pattern_middle))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->trx_reset_pattern_last))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->trx_reset_middle_repeats_count))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u16(buf, this->trx_reset_location))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_bool(buf, this->trx_reset_polarity))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->bcdr_reset_pattern_first))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->bcdr_reset_pattern_middle))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->bcdr_reset_pattern_last))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->bcdr_reset_middle_repeats_count))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->bcdr_reset_location))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_bool(buf, this->bcdr_reset_polarity))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_trx_configuration_unpack(bcmolt_xgpon_trx_configuration *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u32(buf, &this->trx_reset_pattern_first))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->trx_reset_pattern_middle))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->trx_reset_pattern_last))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->trx_reset_middle_repeats_count))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u16(buf, &this->trx_reset_location))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_bool(buf, &this->trx_reset_polarity))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->bcdr_reset_pattern_first))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->bcdr_reset_pattern_middle))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->bcdr_reset_pattern_last))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->bcdr_reset_middle_repeats_count))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->bcdr_reset_location))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_bool(buf, &this->bcdr_reset_polarity))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_trx_configuration_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 31);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_trx_configuration_bounds_check(const bcmolt_xgpon_trx_configuration *this)
+{
+    if (this->trx_reset_location > 511)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_arr_xgpon_trx_configuration_4_set_default(bcmolt_arr_xgpon_trx_configuration_4 *this)
+{
+    this->arr[0].trx_reset_pattern_first = 0;
+    this->arr[0].trx_reset_pattern_middle = 4294967295UL;
+    this->arr[0].trx_reset_pattern_last = 0;
+    this->arr[0].trx_reset_middle_repeats_count = 4;
+    this->arr[0].trx_reset_location = 0;
+    this->arr[0].trx_reset_polarity = BCMOS_FALSE;
+    this->arr[0].bcdr_reset_pattern_first = 0;
+    this->arr[0].bcdr_reset_pattern_middle = 255;
+    this->arr[0].bcdr_reset_pattern_last = 0;
+    this->arr[0].bcdr_reset_middle_repeats_count = 1;
+    this->arr[0].bcdr_reset_location = 20;
+    this->arr[0].bcdr_reset_polarity = BCMOS_FALSE;
+    this->arr[1].trx_reset_pattern_first = 0;
+    this->arr[1].trx_reset_pattern_middle = 4294967295UL;
+    this->arr[1].trx_reset_pattern_last = 0;
+    this->arr[1].trx_reset_middle_repeats_count = 4;
+    this->arr[1].trx_reset_location = 33;
+    this->arr[1].trx_reset_polarity = BCMOS_FALSE;
+    this->arr[1].bcdr_reset_pattern_first = 0;
+    this->arr[1].bcdr_reset_pattern_middle = 255;
+    this->arr[1].bcdr_reset_pattern_last = 0;
+    this->arr[1].bcdr_reset_middle_repeats_count = 1;
+    this->arr[1].bcdr_reset_location = 23;
+    this->arr[1].bcdr_reset_polarity = BCMOS_FALSE;
+    this->arr[2].trx_reset_pattern_first = 0;
+    this->arr[2].trx_reset_pattern_middle = 4294967295UL;
+    this->arr[2].trx_reset_pattern_last = 0;
+    this->arr[2].trx_reset_middle_repeats_count = 4;
+    this->arr[2].trx_reset_location = 0;
+    this->arr[2].trx_reset_polarity = BCMOS_FALSE;
+    this->arr[2].bcdr_reset_pattern_first = 0;
+    this->arr[2].bcdr_reset_pattern_middle = 255;
+    this->arr[2].bcdr_reset_pattern_last = 0;
+    this->arr[2].bcdr_reset_middle_repeats_count = 1;
+    this->arr[2].bcdr_reset_location = 20;
+    this->arr[2].bcdr_reset_polarity = BCMOS_FALSE;
+    this->arr[3].trx_reset_pattern_first = 0;
+    this->arr[3].trx_reset_pattern_middle = 4294967295UL;
+    this->arr[3].trx_reset_pattern_last = 0;
+    this->arr[3].trx_reset_middle_repeats_count = 4;
+    this->arr[3].trx_reset_location = 33;
+    this->arr[3].trx_reset_polarity = BCMOS_FALSE;
+    this->arr[3].bcdr_reset_pattern_first = 0;
+    this->arr[3].bcdr_reset_pattern_middle = 255;
+    this->arr[3].bcdr_reset_pattern_last = 0;
+    this->arr[3].bcdr_reset_middle_repeats_count = 1;
+    this->arr[3].bcdr_reset_location = 23;
+    this->arr[3].bcdr_reset_polarity = BCMOS_FALSE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_xgpon_trx_configuration_4_pack(const bcmolt_arr_xgpon_trx_configuration_4 *this, bcmolt_buf *buf)
+{
+    uint32_t i0;
+    for (i0 = 0; i0 < 4; i0++)
+    {
+        if (!bcmolt_xgpon_trx_configuration_pack(&this->arr[i0], buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_xgpon_trx_configuration_4_unpack(bcmolt_arr_xgpon_trx_configuration_4 *this, bcmolt_buf *buf, void **extra_mem)
+{
+    uint32_t i0;
+    for (i0 = 0; i0 < 4; i0++)
+    {
+        if (!bcmolt_xgpon_trx_configuration_unpack(&this->arr[i0], buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_xgpon_trx_configuration_4_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 124);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_arr_xgpon_trx_configuration_4_bounds_check(const bcmolt_arr_xgpon_trx_configuration_4 *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_automatic_onu_deactivation_set_default(bcmolt_automatic_onu_deactivation *this)
+{
+    this->los = BCMOS_FALSE;
+    this->onu_alarms = BCMOS_FALSE;
+    this->tiwi = BCMOS_FALSE;
+    this->ack_timeout = BCMOS_FALSE;
+    this->sfi = BCMOS_FALSE;
+    this->loki = BCMOS_FALSE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_automatic_onu_deactivation_pack(const bcmolt_automatic_onu_deactivation *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_bool(buf, this->los))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_bool(buf, this->onu_alarms))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_bool(buf, this->tiwi))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_bool(buf, this->ack_timeout))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_bool(buf, this->sfi))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_bool(buf, this->loki))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_automatic_onu_deactivation_unpack(bcmolt_automatic_onu_deactivation *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_bool(buf, &this->los))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_bool(buf, &this->onu_alarms))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_bool(buf, &this->tiwi))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_bool(buf, &this->ack_timeout))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_bool(buf, &this->sfi))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_bool(buf, &this->loki))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_automatic_onu_deactivation_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 6);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_automatic_onu_deactivation_bounds_check(const bcmolt_automatic_onu_deactivation *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_resync_control_set_default(bcmolt_resync_control *this)
+{
+    this->start_pattern = 15;
+    this->middle_pattern = 0;
+    this->last_pattern = 0;
+    this->middle_repetition = 0;
+    this->location = 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_resync_control_pack(const bcmolt_resync_control *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u8(buf, this->start_pattern))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->middle_pattern))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->last_pattern))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->middle_repetition))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->location))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_resync_control_unpack(bcmolt_resync_control *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u8(buf, &this->start_pattern))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->middle_pattern))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->last_pattern))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->middle_repetition))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->location))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_resync_control_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 5);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_resync_control_bounds_check(const bcmolt_resync_control *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_bcdr_resync_pattern_configuration_set_default(bcmolt_bcdr_resync_pattern_configuration *this)
+{
+    this->resync_control.start_pattern = 15;
+    this->resync_control.middle_pattern = 0;
+    this->resync_control.last_pattern = 0;
+    this->resync_control.middle_repetition = 0;
+    this->resync_control.location = 34;
+    this->ranging_resync_control.start_pattern = 15;
+    this->ranging_resync_control.middle_pattern = 0;
+    this->ranging_resync_control.last_pattern = 0;
+    this->ranging_resync_control.middle_repetition = 0;
+    this->ranging_resync_control.location = 7;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_bcdr_resync_pattern_configuration_pack(const bcmolt_bcdr_resync_pattern_configuration *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_resync_control_pack(&this->resync_control, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_resync_control_pack(&this->ranging_resync_control, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_bcdr_resync_pattern_configuration_unpack(bcmolt_bcdr_resync_pattern_configuration *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_resync_control_unpack(&this->resync_control, buf, extra_mem))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_resync_control_unpack(&this->ranging_resync_control, buf, extra_mem))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_bcdr_resync_pattern_configuration_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 10);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_bcdr_resync_pattern_configuration_bounds_check(const bcmolt_bcdr_resync_pattern_configuration *this)
+{
+    if (!bcmolt_resync_control_bounds_check(&this->resync_control))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_resync_control_bounds_check(&this->ranging_resync_control))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_ber_monitor_params_set_default(bcmolt_ber_monitor_params *this)
+{
+    this->us_ber_interval = 5000;
+    this->sf_threshold = 3;
+    this->sd_threshold = 5;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ber_monitor_params_pack(const bcmolt_ber_monitor_params *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u32(buf, this->us_ber_interval))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->sf_threshold))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->sd_threshold))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ber_monitor_params_unpack(bcmolt_ber_monitor_params *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u32(buf, &this->us_ber_interval))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->sf_threshold))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->sd_threshold))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ber_monitor_params_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 6);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ber_monitor_params_bounds_check(const bcmolt_ber_monitor_params *this)
+{
+    if (this->us_ber_interval > 60000UL)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->sf_threshold < 3)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->sf_threshold > 8)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->sd_threshold < 4)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->sd_threshold > 9)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_cbr_rt_allocation_profile_set_default(bcmolt_cbr_rt_allocation_profile *this)
+{
+    this->ma_7 = 64;
+    this->ma_3 = 256;
+    this->ma_1 = 512;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_cbr_rt_allocation_profile_pack(const bcmolt_cbr_rt_allocation_profile *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u16(buf, this->ma_7))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u16(buf, this->ma_3))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u16(buf, this->ma_1))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_cbr_rt_allocation_profile_unpack(bcmolt_cbr_rt_allocation_profile *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u16(buf, &this->ma_7))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u16(buf, &this->ma_3))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u16(buf, &this->ma_1))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_cbr_rt_allocation_profile_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 6);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_cbr_rt_allocation_profile_bounds_check(const bcmolt_cbr_rt_allocation_profile *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_ddr_test_completed_set_default(bcmolt_ddr_test_completed *this)
+{
+    this->status = (bcmolt_ddr_test_status) 2;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ddr_test_completed_pack(const bcmolt_ddr_test_completed *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_ddr_test_status_pack(this->status, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (this->status)
+    {
+        case BCMOLT_DDR_TEST_STATUS_COMPLETED:
+            {
+                if (!bcmolt_ddr_test_result_pack(this->u.completed.cpu_result, buf))
+                {
+                    return BCMOS_FALSE;
+                }
+
+                if (!bcmolt_ddr_test_result_pack(this->u.completed.ras_0_result, buf))
+                {
+                    return BCMOS_FALSE;
+                }
+
+                if (!bcmolt_ddr_test_result_pack(this->u.completed.ras_1_result, buf))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_DDR_TEST_STATUS_CONNECTION_FAILED:
+            {
+                if (!bcmolt_host_connection_fail_reason_pack(this->u.connection_failed.reason, buf))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_DDR_TEST_STATUS_TIMEOUT:
+        default:
+            {
+            }
+            break;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_ddr_test_completed_get_packed_length(const bcmolt_ddr_test_completed *this)
+{
+    uint32_t count = 1;
+    switch (this->status)
+    {
+        case BCMOLT_DDR_TEST_STATUS_COMPLETED:
+            {
+                count += 3;
+            }
+            break;
+        case BCMOLT_DDR_TEST_STATUS_CONNECTION_FAILED:
+            {
+                count += 1;
+            }
+            break;
+        case BCMOLT_DDR_TEST_STATUS_TIMEOUT:
+        default:
+            {
+            }
+            break;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ddr_test_completed_unpack(bcmolt_ddr_test_completed *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_ddr_test_status_unpack(&this->status, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (this->status)
+    {
+        case BCMOLT_DDR_TEST_STATUS_COMPLETED:
+            {
+                if (!bcmolt_ddr_test_result_unpack(&this->u.completed.cpu_result, buf))
+                {
+                    return BCMOS_FALSE;
+                }
+
+                if (!bcmolt_ddr_test_result_unpack(&this->u.completed.ras_0_result, buf))
+                {
+                    return BCMOS_FALSE;
+                }
+
+                if (!bcmolt_ddr_test_result_unpack(&this->u.completed.ras_1_result, buf))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_DDR_TEST_STATUS_CONNECTION_FAILED:
+            {
+                if (!bcmolt_host_connection_fail_reason_unpack(&this->u.connection_failed.reason, buf))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_DDR_TEST_STATUS_TIMEOUT:
+        default:
+            {
+            }
+            break;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ddr_test_completed_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    bcmolt_ddr_test_status status;
+    if (!bcmolt_ddr_test_status_unpack(&status, packed))
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (status)
+    {
+        case BCMOLT_DDR_TEST_STATUS_COMPLETED:
+            {
+                if (!bcmolt_buf_skip(packed, 1))
+                {
+                    return BCMOS_FALSE;
+                }
+
+                if (!bcmolt_buf_skip(packed, 1))
+                {
+                    return BCMOS_FALSE;
+                }
+
+                if (!bcmolt_buf_skip(packed, 1))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_DDR_TEST_STATUS_CONNECTION_FAILED:
+            {
+                if (!bcmolt_buf_skip(packed, 1))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_DDR_TEST_STATUS_TIMEOUT:
+        default:
+            {
+            }
+            break;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ddr_test_completed_bounds_check(const bcmolt_ddr_test_completed *this)
+{
+    switch (this->status)
+    {
+        case BCMOLT_DDR_TEST_STATUS_COMPLETED:
+            {
+                switch (this->u.completed.cpu_result)
+                {
+                    case BCMOLT_DDR_TEST_RESULT_SUCCESS:
+                        break;
+                    case BCMOLT_DDR_TEST_RESULT_PHY_INIT_ERROR:
+                        break;
+                    case BCMOLT_DDR_TEST_RESULT_DRAM_INIT_ERROR:
+                        break;
+                    case BCMOLT_DDR_TEST_RESULT_SHMOO_ERROR:
+                        break;
+                    case BCMOLT_DDR_TEST_RESULT_EDIS_TEST_ERROR:
+                        break;
+                    case BCMOLT_DDR_TEST_RESULT_MEM_TEST_ERROR:
+                        break;
+                    case BCMOLT_DDR_TEST_RESULT_NOT_TESTED:
+                        break;
+                    default:
+                        return BCMOS_FALSE;
+                }
+
+                switch (this->u.completed.ras_0_result)
+                {
+                    case BCMOLT_DDR_TEST_RESULT_SUCCESS:
+                        break;
+                    case BCMOLT_DDR_TEST_RESULT_PHY_INIT_ERROR:
+                        break;
+                    case BCMOLT_DDR_TEST_RESULT_DRAM_INIT_ERROR:
+                        break;
+                    case BCMOLT_DDR_TEST_RESULT_SHMOO_ERROR:
+                        break;
+                    case BCMOLT_DDR_TEST_RESULT_EDIS_TEST_ERROR:
+                        break;
+                    case BCMOLT_DDR_TEST_RESULT_MEM_TEST_ERROR:
+                        break;
+                    case BCMOLT_DDR_TEST_RESULT_NOT_TESTED:
+                        break;
+                    default:
+                        return BCMOS_FALSE;
+                }
+
+                switch (this->u.completed.ras_1_result)
+                {
+                    case BCMOLT_DDR_TEST_RESULT_SUCCESS:
+                        break;
+                    case BCMOLT_DDR_TEST_RESULT_PHY_INIT_ERROR:
+                        break;
+                    case BCMOLT_DDR_TEST_RESULT_DRAM_INIT_ERROR:
+                        break;
+                    case BCMOLT_DDR_TEST_RESULT_SHMOO_ERROR:
+                        break;
+                    case BCMOLT_DDR_TEST_RESULT_EDIS_TEST_ERROR:
+                        break;
+                    case BCMOLT_DDR_TEST_RESULT_MEM_TEST_ERROR:
+                        break;
+                    case BCMOLT_DDR_TEST_RESULT_NOT_TESTED:
+                        break;
+                    default:
+                        return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_DDR_TEST_STATUS_CONNECTION_FAILED:
+            {
+                switch (this->u.connection_failed.reason)
+                {
+                    case BCMOLT_HOST_CONNECTION_FAIL_REASON_TIMEOUT:
+                        break;
+                    case BCMOLT_HOST_CONNECTION_FAIL_REASON_KEEPALIVE:
+                        break;
+                    case BCMOLT_HOST_CONNECTION_FAIL_REASON_USER_CALLBACK_ERROR:
+                        break;
+                    case BCMOLT_HOST_CONNECTION_FAIL_REASON_SOFTWARE_VERSION_MISMATCH:
+                        break;
+                    case BCMOLT_HOST_CONNECTION_FAIL_REASON_SYSTEM_MODE_MISMATCH:
+                        break;
+                    case BCMOLT_HOST_CONNECTION_FAIL_REASON_NNI_SPEED_MISMATCH:
+                        break;
+                    case BCMOLT_HOST_CONNECTION_FAIL_REASON_RECONNECT_TIMEOUT:
+                        break;
+                    case BCMOLT_HOST_CONNECTION_FAIL_REASON_INTERNAL_ERROR:
+                        break;
+                    case BCMOLT_HOST_CONNECTION_FAIL_REASON_SYSTEM_MODE_NOT_SUPPORTED:
+                        break;
+                    case BCMOLT_HOST_CONNECTION_FAIL_REASON_PARAMETER:
+                        break;
+                    default:
+                        return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_DDR_TEST_STATUS_TIMEOUT:
+            break;
+        default:
+            {
+            }
+
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_debug_device_cfg_set_default(bcmolt_debug_device_cfg *this)
+{
+    this->host_dma_rx_queue_size = 128;
+    this->host_dma_tx_queue_size = 128;
+    this->avs_control = BCMOS_FALSE;
+    this->use_prev_pon_serdes_firmware = BCMOS_FALSE;
+    this->use_prev_nni_serdes_firmware = BCMOS_FALSE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_debug_device_cfg_pack(const bcmolt_debug_device_cfg *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u16(buf, this->host_dma_rx_queue_size))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u16(buf, this->host_dma_tx_queue_size))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_bool(buf, this->avs_control))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_bool(buf, this->use_prev_pon_serdes_firmware))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_bool(buf, this->use_prev_nni_serdes_firmware))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_debug_device_cfg_unpack(bcmolt_debug_device_cfg *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u16(buf, &this->host_dma_rx_queue_size))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u16(buf, &this->host_dma_tx_queue_size))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_bool(buf, &this->avs_control))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_bool(buf, &this->use_prev_pon_serdes_firmware))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_bool(buf, &this->use_prev_nni_serdes_firmware))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_debug_device_cfg_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 7);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_debug_device_cfg_bounds_check(const bcmolt_debug_device_cfg *this)
+{
+    if (this->host_dma_rx_queue_size < 1)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->host_dma_rx_queue_size > 1024)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->host_dma_tx_queue_size < 1)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->host_dma_tx_queue_size > 1024)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_device_nni_speed_set_default(bcmolt_device_nni_speed *this)
+{
+    this->first_half = BCMOLT_NNI_SPEED_GBPS_1;
+    this->second_half = BCMOLT_NNI_SPEED_GBPS_1;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_nni_speed_pack(const bcmolt_device_nni_speed *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_nni_speed_pack(this->first_half, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_nni_speed_pack(this->second_half, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_nni_speed_unpack(bcmolt_device_nni_speed *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_nni_speed_unpack(&this->first_half, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_nni_speed_unpack(&this->second_half, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_nni_speed_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 2);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_nni_speed_bounds_check(const bcmolt_device_nni_speed *this)
+{
+    switch (this->first_half)
+    {
+        case BCMOLT_NNI_SPEED_GBPS_1:
+            break;
+        case BCMOLT_NNI_SPEED_GBPS_2P5:
+            break;
+        case BCMOLT_NNI_SPEED_GBPS_10:
+            break;
+        case BCMOLT_NNI_SPEED_GBPS_12P5:
+            break;
+        case BCMOLT_NNI_SPEED_GBPS_10_G_MUX:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->second_half)
+    {
+        case BCMOLT_NNI_SPEED_GBPS_1:
+            break;
+        case BCMOLT_NNI_SPEED_GBPS_2P5:
+            break;
+        case BCMOLT_NNI_SPEED_GBPS_10:
+            break;
+        case BCMOLT_NNI_SPEED_GBPS_12P5:
+            break;
+        case BCMOLT_NNI_SPEED_GBPS_10_G_MUX:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/* \cond UNDOCUMENTED_SYMBOLS */
+
+/******************************************************************************/
+void bcmolt_dummy_struct_for_embedded_types_set_default(bcmolt_dummy_struct_for_embedded_types *this)
+{
+    this->ad = (bcmolt_aggregation_domain) 0;
+    this->et = (bcmolt_epon_top) 0;
+    this->elg = (bcmolt_epm_lim_global) 0;
+    this->dba_port = (bcmolt_dba_port) 0;
+    this->sgb = BCMOLT_DRV_SGB_ID_IDX0;
+    this->icf = BCMOLT_DRV_ICF_ID_IDX0;
+    this->tfb_trap_behavior = BCMOLT_TFB_TRAP_BEHAVIOR_DROP;
+    this->tfb_mode = BCMOLT_TFB_MODE_GPON;
+    this->lim_sec_mode_up = BCMOLT_LIM_SEC_MODE_UP_TEK;
+    this->lim_sec_mode_dn = BCMOLT_LIM_SEC_MODE_DN_TEK;
+    this->xim_sec_mode = BCMOLT_XIM_SEC_MODE_RESERVED_0;
+    this->dba_ram = BCMOLT_DBA_RAM_GRANT_FIFO_RAM_0;
+    this->hsc_ram = BCMOLT_HSC_RAM_LLC_T1;
+    this->lim_ram = BCMOLT_LIM_RAM_LLID_UP;
+    this->lky_ram = BCMOLT_LKY_RAM_TX_KEY_RAM;
+    this->mic_ram = BCMOLT_MIC_RAM_RANGE;
+    this->xpcs_ram = BCMOLT_XPCSRM_RAM_CAPTURE_FIFO;
+    this->xg2g_id = (bcmolt_xg2g_id) 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_dummy_struct_for_embedded_types_pack(const bcmolt_dummy_struct_for_embedded_types *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u8(buf, (uint8_t) this->ad))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, (uint8_t) this->et))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, (uint8_t) this->elg))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, (uint8_t) this->dba_port))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_drv_sgb_id_pack(this->sgb, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_drv_icf_id_pack(this->icf, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_tfb_trap_behavior_pack(this->tfb_trap_behavior, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_tfb_mode_pack(this->tfb_mode, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_lim_sec_mode_up_pack(this->lim_sec_mode_up, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_lim_sec_mode_dn_pack(this->lim_sec_mode_dn, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_xim_sec_mode_pack(this->xim_sec_mode, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_dba_ram_pack(this->dba_ram, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_hsc_ram_pack(this->hsc_ram, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_lim_ram_pack(this->lim_ram, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_lky_ram_pack(this->lky_ram, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_mic_ram_pack(this->mic_ram, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_xpcsrm_ram_pack(this->xpcs_ram, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, (uint8_t) this->xg2g_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_dummy_struct_for_embedded_types_unpack(bcmolt_dummy_struct_for_embedded_types *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u8(buf, (uint8_t *) &this->ad))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, (uint8_t *) &this->et))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, (uint8_t *) &this->elg))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, (uint8_t *) &this->dba_port))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_drv_sgb_id_unpack(&this->sgb, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_drv_icf_id_unpack(&this->icf, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_tfb_trap_behavior_unpack(&this->tfb_trap_behavior, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_tfb_mode_unpack(&this->tfb_mode, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_lim_sec_mode_up_unpack(&this->lim_sec_mode_up, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_lim_sec_mode_dn_unpack(&this->lim_sec_mode_dn, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_xim_sec_mode_unpack(&this->xim_sec_mode, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_dba_ram_unpack(&this->dba_ram, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_hsc_ram_unpack(&this->hsc_ram, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_lim_ram_unpack(&this->lim_ram, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_lky_ram_unpack(&this->lky_ram, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_mic_ram_unpack(&this->mic_ram, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_xpcsrm_ram_unpack(&this->xpcs_ram, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, (uint8_t *) &this->xg2g_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_dummy_struct_for_embedded_types_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 18);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_dummy_struct_for_embedded_types_bounds_check(const bcmolt_dummy_struct_for_embedded_types *this)
+{
+    if (this->ad > (bcmolt_aggregation_domain) 1)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->et > (bcmolt_epon_top) 7)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->elg > (bcmolt_epm_lim_global) 15)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->dba_port > (bcmolt_dba_port) 7)
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (this->sgb)
+    {
+        case BCMOLT_DRV_SGB_ID_IDX0:
+            break;
+        case BCMOLT_DRV_SGB_ID_IDX1:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->icf)
+    {
+        case BCMOLT_DRV_ICF_ID_IDX0:
+            break;
+        case BCMOLT_DRV_ICF_ID_IDX1:
+            break;
+        case BCMOLT_DRV_ICF_ID_IDX2:
+            break;
+        case BCMOLT_DRV_ICF_ID_IDX3:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->tfb_trap_behavior)
+    {
+        case BCMOLT_TFB_TRAP_BEHAVIOR_DROP:
+            break;
+        case BCMOLT_TFB_TRAP_BEHAVIOR_FORWARD_NNI:
+            break;
+        case BCMOLT_TFB_TRAP_BEHAVIOR_FORWARD_CPU:
+            break;
+        case BCMOLT_TFB_TRAP_BEHAVIOR_SNOOP:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->tfb_mode)
+    {
+        case BCMOLT_TFB_MODE_GPON:
+            break;
+        case BCMOLT_TFB_MODE_XGPON:
+            break;
+        case BCMOLT_TFB_MODE_EPON:
+            break;
+        case BCMOLT_TFB_MODE_XEPON:
+            break;
+        case BCMOLT_TFB_MODE_COEX:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->lim_sec_mode_up)
+    {
+        case BCMOLT_LIM_SEC_MODE_UP_TEK:
+            break;
+        case BCMOLT_LIM_SEC_MODE_UP_PER_LLID:
+            break;
+        case BCMOLT_LIM_SEC_MODE_UP_NTT:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->lim_sec_mode_dn)
+    {
+        case BCMOLT_LIM_SEC_MODE_DN_TEK:
+            break;
+        case BCMOLT_LIM_SEC_MODE_DN_PER_LLID:
+            break;
+        case BCMOLT_LIM_SEC_MODE_DN_NTT:
+            break;
+        case BCMOLT_LIM_SEC_MODE_DN_CEPON:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->xim_sec_mode)
+    {
+        case BCMOLT_XIM_SEC_MODE_RESERVED_0:
+            break;
+        case BCMOLT_XIM_SEC_MODE_PER_LLID:
+            break;
+        case BCMOLT_XIM_SEC_MODE_RESERVED_2:
+            break;
+        case BCMOLT_XIM_SEC_MODE_CEPON:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->dba_ram)
+    {
+        case BCMOLT_DBA_RAM_GRANT_FIFO_RAM_0:
+            break;
+        case BCMOLT_DBA_RAM_GRANT_FIFO_RAM_1:
+            break;
+        case BCMOLT_DBA_RAM_GRANT_FIFO_RAM_2:
+            break;
+        case BCMOLT_DBA_RAM_GRANT_FIFO_RAM_3:
+            break;
+        case BCMOLT_DBA_RAM_GRANT_FIFO_RAM_4:
+            break;
+        case BCMOLT_DBA_RAM_GRANT_FIFO_RAM_5:
+            break;
+        case BCMOLT_DBA_RAM_GRANT_FIFO_RAM_6:
+            break;
+        case BCMOLT_DBA_RAM_GRANT_FIFO_RAM_7:
+            break;
+        case BCMOLT_DBA_RAM_GRANTS_OUT_RAM:
+            break;
+        case BCMOLT_DBA_RAM_GRANTS_IN_RAM:
+            break;
+        case BCMOLT_DBA_RAM_GRANTS_RETIRED_RAM:
+            break;
+        case BCMOLT_DBA_RAM_REPORT_RAM:
+            break;
+        case BCMOLT_DBA_RAM_GRANT_CFG_RAM:
+            break;
+        case BCMOLT_DBA_RAM_DEFAULT_TOKENS_RAM:
+            break;
+        case BCMOLT_DBA_RAM_POLL_RECORDS_RAM:
+            break;
+        case BCMOLT_DBA_RAM_HEIR_POLL_RAM:
+            break;
+        case BCMOLT_DBA_RAM_LAST_POLL_TIME_RAM:
+            break;
+        case BCMOLT_DBA_RAM_POLL_ORDER_RAM:
+            break;
+        case BCMOLT_DBA_RAM_TDM_RAM_0:
+            break;
+        case BCMOLT_DBA_RAM_TDM_RAM_1:
+            break;
+        case BCMOLT_DBA_RAM_TDM_RAM_2:
+            break;
+        case BCMOLT_DBA_RAM_TDM_RAM_3:
+            break;
+        case BCMOLT_DBA_RAM_TDM_RAM_4:
+            break;
+        case BCMOLT_DBA_RAM_TDM_RAM_5:
+            break;
+        case BCMOLT_DBA_RAM_TDM_RAM_6:
+            break;
+        case BCMOLT_DBA_RAM_TDM_RAM_7:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->hsc_ram)
+    {
+        case BCMOLT_HSC_RAM_LLC_T1:
+            break;
+        case BCMOLT_HSC_RAM_LLC_T2:
+            break;
+        case BCMOLT_HSC_RAM_LLC_T3:
+            break;
+        case BCMOLT_HSC_RAM_GRP_T2:
+            break;
+        case BCMOLT_HSC_RAM_GRP_T3:
+            break;
+        case BCMOLT_HSC_RAM_SHP_T1:
+            break;
+        case BCMOLT_HSC_RAM_SHP_T2:
+            break;
+        case BCMOLT_HSC_RAM_SHP_T3:
+            break;
+        case BCMOLT_HSC_RAM_PRF_T1:
+            break;
+        case BCMOLT_HSC_RAM_PRF_T2:
+            break;
+        case BCMOLT_HSC_RAM_PRF_T3:
+            break;
+        case BCMOLT_HSC_RAM_CRE_T1:
+            break;
+        case BCMOLT_HSC_RAM_CRE_T2:
+            break;
+        case BCMOLT_HSC_RAM_CRE_T3:
+            break;
+        case BCMOLT_HSC_RAM_ELU:
+            break;
+        case BCMOLT_HSC_RAM_PTR_T1:
+            break;
+        case BCMOLT_HSC_RAM_PTR_T2:
+            break;
+        case BCMOLT_HSC_RAM_AGR_SHP_T1:
+            break;
+        case BCMOLT_HSC_RAM_AEM:
+            break;
+        case BCMOLT_HSC_RAM_ALL_LLC:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->lim_ram)
+    {
+        case BCMOLT_LIM_RAM_LLID_UP:
+            break;
+        case BCMOLT_LIM_RAM_PER_ONU_STAT:
+            break;
+        case BCMOLT_LIM_RAM_FEC_UP_FULL_S:
+            break;
+        case BCMOLT_LIM_RAM_FEC_UP_DATA:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->lky_ram)
+    {
+        case BCMOLT_LKY_RAM_TX_KEY_RAM:
+            break;
+        case BCMOLT_LKY_RAM_TX_KEY_BUFFER:
+            break;
+        case BCMOLT_LKY_RAM_RX_KEY_RAM:
+            break;
+        case BCMOLT_LKY_RAM_RX_KEY_BUFFER:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->mic_ram)
+    {
+        case BCMOLT_MIC_RAM_RANGE:
+            break;
+        case BCMOLT_MIC_RAM_LLID:
+            break;
+        case BCMOLT_MIC_RAM_IDX:
+            break;
+        case BCMOLT_MIC_RAM_GRANT_MISS:
+            break;
+        case BCMOLT_MIC_RAM_GRANT_ID:
+            break;
+        case BCMOLT_MIC_RAM_TX_IV:
+            break;
+        case BCMOLT_MIC_RAM_RX_IV:
+            break;
+        case BCMOLT_MIC_RAM_TX_PORT_STAT:
+            break;
+        case BCMOLT_MIC_RAM_RX_PORT_STAT:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->xpcs_ram)
+    {
+        case BCMOLT_XPCSRM_RAM_CAPTURE_FIFO:
+            break;
+        case BCMOLT_XPCSRM_RAM_FEC_DECODE:
+            break;
+        case BCMOLT_XPCSRM_RAM_FEC_STATS:
+            break;
+        case BCMOLT_XPCSRM_RAM_FEC_ENQUEUE:
+            break;
+        case BCMOLT_XPCSRM_RAM_IDLE_INSERT:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    if (this->xg2g_id > (bcmolt_xg2g_id) 7)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/* \endcond */
+
+/******************************************************************************/
+void bcmolt_embedded_image_entry_set_default(bcmolt_embedded_image_entry *this)
+{
+    this->image_type = BCMOLT_DEVICE_IMAGE_TYPE_BOOTLOADER;
+    this->image_size = 0;
+    this->crc32 = 0;
+    this->status = BCMOLT_EMBEDDED_IMAGE_TRANSFER_STATUS_NONE;
+    memset(this->image_name, 0, 64);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_embedded_image_entry_pack(const bcmolt_embedded_image_entry *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_device_image_type_pack(this->image_type, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->image_size))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->crc32))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_embedded_image_transfer_status_pack(this->status, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write(buf, this->image_name, 64))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_embedded_image_entry_unpack(bcmolt_embedded_image_entry *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_device_image_type_unpack(&this->image_type, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->image_size))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->crc32))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_embedded_image_transfer_status_unpack(&this->status, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read(buf, this->image_name, 64))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_embedded_image_entry_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 74);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_embedded_image_entry_bounds_check(const bcmolt_embedded_image_entry *this)
+{
+    switch (this->image_type)
+    {
+        case BCMOLT_DEVICE_IMAGE_TYPE_BOOTLOADER:
+            break;
+        case BCMOLT_DEVICE_IMAGE_TYPE_APPLICATION:
+            break;
+        case BCMOLT_DEVICE_IMAGE_TYPE_ITU_PON_ONU_FIRMWARE:
+            break;
+        case BCMOLT_DEVICE_IMAGE_TYPE_EPON_ONU_FIRMWARE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->status)
+    {
+        case BCMOLT_EMBEDDED_IMAGE_TRANSFER_STATUS_NONE:
+            break;
+        case BCMOLT_EMBEDDED_IMAGE_TRANSFER_STATUS_IN_PROGRESS:
+            break;
+        case BCMOLT_EMBEDDED_IMAGE_TRANSFER_STATUS_SUCCESS:
+            break;
+        case BCMOLT_EMBEDDED_IMAGE_TRANSFER_STATUS_FAILURE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_embedded_image_entry_list_u8_set_default(bcmolt_embedded_image_entry_list_u8 *this)
+{
+    this->len = 0;
+    this->val = NULL;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_embedded_image_entry_list_u8_pack(const bcmolt_embedded_image_entry_list_u8 *this, bcmolt_buf *buf)
+{
+    uint8_t i0;
+    if (!bcmolt_buf_write_u8(buf, this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_embedded_image_entry_list_u8\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+        return BCMOS_FALSE;
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_embedded_image_entry_pack(&this->val[i0], buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_embedded_image_entry_list_u8_get_packed_length(const bcmolt_embedded_image_entry_list_u8 *this)
+{
+    return 1 + (74 * this->len);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_embedded_image_entry_list_u8_unpack(bcmolt_embedded_image_entry_list_u8 *this, bcmolt_buf *buf, void **extra_mem)
+{
+    uint8_t i0;
+    if (!bcmolt_buf_read_u8(buf, &this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        if (extra_mem == NULL)
+        {
+            bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_embedded_image_entry_list_u8\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+            return BCMOS_FALSE;
+        }
+        else
+        {
+            this->val = (bcmolt_embedded_image_entry *) *extra_mem;
+            *extra_mem = ((uint8_t *) *extra_mem) + BCMOS_ROUND_TO_WORD(this->len * sizeof(bcmolt_embedded_image_entry));
+        }
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_embedded_image_entry_unpack(&this->val[i0], buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_embedded_image_entry_list_u8_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    uint8_t len;
+    if (!bcmolt_buf_read_u8(packed, &len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *extra_mem += BCMOS_ROUND_TO_WORD(sizeof(bcmolt_embedded_image_entry) * len);
+    if (!bcmolt_buf_skip(packed, len * 74))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_embedded_image_entry_list_u8_bounds_check(const bcmolt_embedded_image_entry_list_u8 *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_encryption_information_container_set_default(bcmolt_encryption_information_container *this)
+{
+    this->format = (bcmolt_epon_encryption_information_format) 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_encryption_information_container_pack(const bcmolt_encryption_information_container *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_epon_encryption_information_format_pack(this->format, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (this->format)
+    {
+        case BCMOLT_EPON_ENCRYPTION_INFORMATION_FORMAT_CFB:
+            {
+                if (!bcmolt_buf_write(buf, this->u.cfb.key, 16))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_EPON_ENCRYPTION_INFORMATION_FORMAT_CTR:
+            {
+                if (!bcmolt_buf_write(buf, this->u.ctr.key, 16))
+                {
+                    return BCMOS_FALSE;
+                }
+
+                if (!bcmolt_buf_write(buf, this->u.ctr.sci, 8))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_encryption_information_container_get_packed_length(const bcmolt_encryption_information_container *this)
+{
+    uint32_t count = 1;
+    switch (this->format)
+    {
+        case BCMOLT_EPON_ENCRYPTION_INFORMATION_FORMAT_CFB:
+            {
+                count += 16;
+            }
+            break;
+        case BCMOLT_EPON_ENCRYPTION_INFORMATION_FORMAT_CTR:
+            {
+                count += 24;
+            }
+            break;
+        default:
+            break;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_encryption_information_container_unpack(bcmolt_encryption_information_container *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_epon_encryption_information_format_unpack(&this->format, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (this->format)
+    {
+        case BCMOLT_EPON_ENCRYPTION_INFORMATION_FORMAT_CFB:
+            {
+                if (!bcmolt_buf_read(buf, this->u.cfb.key, 16))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_EPON_ENCRYPTION_INFORMATION_FORMAT_CTR:
+            {
+                if (!bcmolt_buf_read(buf, this->u.ctr.key, 16))
+                {
+                    return BCMOS_FALSE;
+                }
+
+                if (!bcmolt_buf_read(buf, this->u.ctr.sci, 8))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_encryption_information_container_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    bcmolt_epon_encryption_information_format format;
+    if (!bcmolt_epon_encryption_information_format_unpack(&format, packed))
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (format)
+    {
+        case BCMOLT_EPON_ENCRYPTION_INFORMATION_FORMAT_CFB:
+            {
+                if (!bcmolt_buf_skip(packed, 16))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_EPON_ENCRYPTION_INFORMATION_FORMAT_CTR:
+            {
+                if (!bcmolt_buf_skip(packed, 16))
+                {
+                    return BCMOS_FALSE;
+                }
+
+                if (!bcmolt_buf_skip(packed, 8))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_encryption_information_container_bounds_check(const bcmolt_encryption_information_container *this)
+{
+    switch (this->format)
+    {
+        case BCMOLT_EPON_ENCRYPTION_INFORMATION_FORMAT_CFB:
+            {
+            }
+            break;
+        case BCMOLT_EPON_ENCRYPTION_INFORMATION_FORMAT_CTR:
+            {
+            }
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_clock_transport_configuration_set_default(bcmolt_epon_clock_transport_configuration *this)
+{
+    this->epon_clock_transport_mode = BCMOLT_EPON_CLOCK_TRANSPORT_MODE_HOST_DRIVEN;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_clock_transport_configuration_pack(const bcmolt_epon_clock_transport_configuration *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_epon_clock_transport_mode_pack(this->epon_clock_transport_mode, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_clock_transport_configuration_unpack(bcmolt_epon_clock_transport_configuration *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_epon_clock_transport_mode_unpack(&this->epon_clock_transport_mode, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_clock_transport_configuration_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 1);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_clock_transport_configuration_bounds_check(const bcmolt_epon_clock_transport_configuration *this)
+{
+    switch (this->epon_clock_transport_mode)
+    {
+        case BCMOLT_EPON_CLOCK_TRANSPORT_MODE_HOST_DRIVEN:
+            break;
+        case BCMOLT_EPON_CLOCK_TRANSPORT_MODE_EMBEDDED_DRIVEN:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_unknown_link_status_set_default(bcmolt_unknown_link_status *this)
+{
+    this->link_rate = BCMOLT_EPON_LINK_RATE_TEN_TEN;
+    this->alarm_status = BCMOLT_STATUS_OFF;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_unknown_link_status_pack(const bcmolt_unknown_link_status *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_epon_link_rate_pack(this->link_rate, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_pack(this->alarm_status, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_unknown_link_status_unpack(bcmolt_unknown_link_status *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_epon_link_rate_unpack(&this->link_rate, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_unpack(&this->alarm_status, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_unknown_link_status_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 3);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_unknown_link_status_bounds_check(const bcmolt_unknown_link_status *this)
+{
+    switch (this->link_rate)
+    {
+        case BCMOLT_EPON_LINK_RATE_TEN_TEN:
+            break;
+        case BCMOLT_EPON_LINK_RATE_TEN_ONE:
+            break;
+        case BCMOLT_EPON_LINK_RATE_ONE_ONE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->alarm_status)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_laser_on_off_status_set_default(bcmolt_laser_on_off_status *this)
+{
+    this->laser_on_time = (bcmolt_time_quanta) 0;
+    this->laser_off_time = (bcmolt_time_quanta) 0;
+    this->alarm_status = BCMOLT_STATUS_OFF;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_laser_on_off_status_pack(const bcmolt_laser_on_off_status *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u32(buf, (uint32_t) this->laser_on_time))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, (uint32_t) this->laser_off_time))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_pack(this->alarm_status, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_laser_on_off_status_unpack(bcmolt_laser_on_off_status *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u32(buf, (uint32_t *) &this->laser_on_time))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, (uint32_t *) &this->laser_off_time))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_unpack(&this->alarm_status, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_laser_on_off_status_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 9);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_laser_on_off_status_bounds_check(const bcmolt_laser_on_off_status *this)
+{
+    switch (this->alarm_status)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_range_status_set_default(bcmolt_range_status *this)
+{
+    this->range = (bcmolt_time_quanta) 0;
+    this->alarm_status = BCMOLT_STATUS_OFF;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_range_status_pack(const bcmolt_range_status *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u32(buf, (uint32_t) this->range))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_pack(this->alarm_status, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_range_status_unpack(bcmolt_range_status *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u32(buf, (uint32_t *) &this->range))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_unpack(&this->alarm_status, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_range_status_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 5);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_range_status_bounds_check(const bcmolt_range_status *this)
+{
+    switch (this->alarm_status)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_rogue_status_set_default(bcmolt_rogue_status *this)
+{
+    this->denied_llid = (bcmolt_epon_llid) 0;
+    this->denied_range = (bcmolt_time_quanta) 0;
+    this->alarm_status = BCMOLT_STATUS_OFF;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_rogue_status_pack(const bcmolt_rogue_status *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u16(buf, (uint16_t) this->denied_llid))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, (uint32_t) this->denied_range))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_pack(this->alarm_status, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_rogue_status_unpack(bcmolt_rogue_status *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->denied_llid))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, (uint32_t *) &this->denied_range))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_unpack(&this->alarm_status, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_rogue_status_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 7);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_rogue_status_bounds_check(const bcmolt_rogue_status *this)
+{
+    switch (this->alarm_status)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_denied_link_alarm_state_set_default(bcmolt_epon_denied_link_alarm_state *this)
+{
+    this->unknown_link_violation.link_rate = BCMOLT_EPON_LINK_RATE_TEN_TEN;
+    this->unknown_link_violation.alarm_status = BCMOLT_STATUS_OFF;
+    this->overhead_profile_violation = BCMOLT_STATUS_OFF;
+    this->max_link_violation = BCMOLT_STATUS_OFF;
+    this->llid_pool_empty_violation = BCMOLT_STATUS_OFF;
+    this->laser_on_off_violation.laser_on_time = (bcmolt_time_quanta) 0;
+    this->laser_on_off_violation.laser_off_time = (bcmolt_time_quanta) 0;
+    this->laser_on_off_violation.alarm_status = BCMOLT_STATUS_OFF;
+    this->system_resource_violation = BCMOLT_STATUS_OFF;
+    this->range_violation.range = (bcmolt_time_quanta) 0;
+    this->range_violation.alarm_status = BCMOLT_STATUS_OFF;
+    this->tdm_channels_exhausted = BCMOLT_STATUS_OFF;
+    this->rogue_violation.denied_llid = (bcmolt_epon_llid) 0;
+    this->rogue_violation.denied_range = (bcmolt_time_quanta) 0;
+    this->rogue_violation.alarm_status = BCMOLT_STATUS_OFF;
+    this->upstream_bandwidth_violation = BCMOLT_STATUS_OFF;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_alarm_state_pack(const bcmolt_epon_denied_link_alarm_state *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_unknown_link_status_pack(&this->unknown_link_violation, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_pack(this->overhead_profile_violation, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_pack(this->max_link_violation, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_pack(this->llid_pool_empty_violation, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_laser_on_off_status_pack(&this->laser_on_off_violation, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_pack(this->system_resource_violation, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_range_status_pack(&this->range_violation, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_pack(this->tdm_channels_exhausted, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_rogue_status_pack(&this->rogue_violation, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_pack(this->upstream_bandwidth_violation, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_alarm_state_unpack(bcmolt_epon_denied_link_alarm_state *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_unknown_link_status_unpack(&this->unknown_link_violation, buf, extra_mem))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_unpack(&this->overhead_profile_violation, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_unpack(&this->max_link_violation, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_unpack(&this->llid_pool_empty_violation, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_laser_on_off_status_unpack(&this->laser_on_off_violation, buf, extra_mem))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_unpack(&this->system_resource_violation, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_range_status_unpack(&this->range_violation, buf, extra_mem))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_unpack(&this->tdm_channels_exhausted, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_rogue_status_unpack(&this->rogue_violation, buf, extra_mem))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_unpack(&this->upstream_bandwidth_violation, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_alarm_state_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 30);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_alarm_state_bounds_check(const bcmolt_epon_denied_link_alarm_state *this)
+{
+    if (!bcmolt_unknown_link_status_bounds_check(&this->unknown_link_violation))
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (this->overhead_profile_violation)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->max_link_violation)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->llid_pool_empty_violation)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_laser_on_off_status_bounds_check(&this->laser_on_off_violation))
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (this->system_resource_violation)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_range_status_bounds_check(&this->range_violation))
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (this->tdm_channels_exhausted)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_rogue_status_bounds_check(&this->rogue_violation))
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (this->upstream_bandwidth_violation)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_encryption_config_set_default(bcmolt_epon_encryption_config *this)
+{
+    this->downstream_mode = BCMOLT_EPON_ENCRYPTION_MODE_NO_ENCRYPTION;
+    this->downstream_key_choice = BCMOLT_EPON_KEY_CHOICE_KEY_0;
+    this->downstream_encryption_information.format = BCMOLT_EPON_ENCRYPTION_INFORMATION_FORMAT_CFB;
+    memset(this->downstream_encryption_information.u.cfb.key, 0, sizeof(this->downstream_encryption_information.u.cfb.key));
+    this->upstream_mode = BCMOLT_EPON_ENCRYPTION_MODE_NO_ENCRYPTION;
+    this->upstream_key_choice = BCMOLT_EPON_KEY_CHOICE_KEY_0;
+    this->upstream_encryption_information.format = BCMOLT_EPON_ENCRYPTION_INFORMATION_FORMAT_CFB;
+    memset(this->upstream_encryption_information.u.cfb.key, 0, sizeof(this->upstream_encryption_information.u.cfb.key));
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_encryption_config_pack(const bcmolt_epon_encryption_config *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_epon_encryption_mode_pack(this->downstream_mode, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_epon_key_choice_pack(this->downstream_key_choice, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_encryption_information_container_pack(&this->downstream_encryption_information, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_epon_encryption_mode_pack(this->upstream_mode, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_epon_key_choice_pack(this->upstream_key_choice, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_encryption_information_container_pack(&this->upstream_encryption_information, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_encryption_config_get_packed_length(const bcmolt_epon_encryption_config *this)
+{
+    return 6 + bcmolt_encryption_information_container_get_packed_length(&this->downstream_encryption_information) + bcmolt_encryption_information_container_get_packed_length(&this->upstream_encryption_information);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_encryption_config_unpack(bcmolt_epon_encryption_config *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_epon_encryption_mode_unpack(&this->downstream_mode, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_epon_key_choice_unpack(&this->downstream_key_choice, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_encryption_information_container_unpack(&this->downstream_encryption_information, buf, extra_mem))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_epon_encryption_mode_unpack(&this->upstream_mode, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_epon_key_choice_unpack(&this->upstream_key_choice, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_encryption_information_container_unpack(&this->upstream_encryption_information, buf, extra_mem))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_encryption_config_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    if (!bcmolt_buf_skip(packed, 2))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_skip(packed, 1))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_encryption_information_container_scan(packed, extra_mem))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_skip(packed, 2))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_skip(packed, 1))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_encryption_information_container_scan(packed, extra_mem))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_encryption_config_bounds_check(const bcmolt_epon_encryption_config *this)
+{
+    switch (this->downstream_mode)
+    {
+        case BCMOLT_EPON_ENCRYPTION_MODE_NO_ENCRYPTION:
+            break;
+        case BCMOLT_EPON_ENCRYPTION_MODE_EPON_TRIPLE_CHURNING:
+            break;
+        case BCMOLT_EPON_ENCRYPTION_MODE_EPON_ZERO_OVERHEAD_AES:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->downstream_key_choice)
+    {
+        case BCMOLT_EPON_KEY_CHOICE_KEY_0:
+            break;
+        case BCMOLT_EPON_KEY_CHOICE_KEY_1:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_encryption_information_container_bounds_check(&this->downstream_encryption_information))
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (this->upstream_mode)
+    {
+        case BCMOLT_EPON_ENCRYPTION_MODE_NO_ENCRYPTION:
+            break;
+        case BCMOLT_EPON_ENCRYPTION_MODE_EPON_TRIPLE_CHURNING:
+            break;
+        case BCMOLT_EPON_ENCRYPTION_MODE_EPON_ZERO_OVERHEAD_AES:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->upstream_key_choice)
+    {
+        case BCMOLT_EPON_KEY_CHOICE_KEY_0:
+            break;
+        case BCMOLT_EPON_KEY_CHOICE_KEY_1:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_encryption_information_container_bounds_check(&this->upstream_encryption_information))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_key_exchange_config_set_default(bcmolt_epon_key_exchange_config *this)
+{
+    this->oam_type = BCMOLT_EPON_OAM_TYPE_BROADCOM;
+    this->period = 0;
+    this->direction = BCMOLT_EPON_ENCRYPTION_DIRECTION_DOWNSTREAM_ONLY;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_key_exchange_config_pack(const bcmolt_epon_key_exchange_config *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_epon_oam_type_pack(this->oam_type, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u16(buf, this->period))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_epon_encryption_direction_pack(this->direction, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_key_exchange_config_unpack(bcmolt_epon_key_exchange_config *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_epon_oam_type_unpack(&this->oam_type, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u16(buf, &this->period))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_epon_encryption_direction_unpack(&this->direction, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_key_exchange_config_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 5);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_key_exchange_config_bounds_check(const bcmolt_epon_key_exchange_config *this)
+{
+    switch (this->oam_type)
+    {
+        case BCMOLT_EPON_OAM_TYPE_BROADCOM:
+            break;
+        case BCMOLT_EPON_OAM_TYPE_CTC:
+            break;
+        case BCMOLT_EPON_OAM_TYPE_DPOE:
+            break;
+        case BCMOLT_EPON_OAM_TYPE_SIEPONA:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->direction)
+    {
+        case BCMOLT_EPON_ENCRYPTION_DIRECTION_DOWNSTREAM_ONLY:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_laser_overhead_parameters_set_default(bcmolt_epon_laser_overhead_parameters *this)
+{
+    this->laser_on_time = (bcmolt_time_quanta) 32;
+    this->laser_off_time = (bcmolt_time_quanta) 32;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_laser_overhead_parameters_pack(const bcmolt_epon_laser_overhead_parameters *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u32(buf, (uint32_t) this->laser_on_time))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, (uint32_t) this->laser_off_time))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_laser_overhead_parameters_unpack(bcmolt_epon_laser_overhead_parameters *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u32(buf, (uint32_t *) &this->laser_on_time))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, (uint32_t *) &this->laser_off_time))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_laser_overhead_parameters_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 8);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_laser_overhead_parameters_bounds_check(const bcmolt_epon_laser_overhead_parameters *this)
+{
+    if (this->laser_on_time > (bcmolt_time_quanta) 62)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->laser_off_time > (bcmolt_time_quanta) 62)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_link_alarm_state_set_default(bcmolt_epon_link_alarm_state *this)
+{
+    this->key_exchange_failure = BCMOLT_STATUS_OFF;
+    this->invalid_mpcp_report_received = BCMOLT_STATUS_OFF;
+    this->mpcp_report_timeout = BCMOLT_STATUS_OFF;
+    this->oam_keepalive_timeout = BCMOLT_STATUS_OFF;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_alarm_state_pack(const bcmolt_epon_link_alarm_state *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_status_pack(this->key_exchange_failure, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_pack(this->invalid_mpcp_report_received, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_pack(this->mpcp_report_timeout, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_pack(this->oam_keepalive_timeout, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_alarm_state_unpack(bcmolt_epon_link_alarm_state *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_status_unpack(&this->key_exchange_failure, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_unpack(&this->invalid_mpcp_report_received, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_unpack(&this->mpcp_report_timeout, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_unpack(&this->oam_keepalive_timeout, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_alarm_state_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 4);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_alarm_state_bounds_check(const bcmolt_epon_link_alarm_state *this)
+{
+    switch (this->key_exchange_failure)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->invalid_mpcp_report_received)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->mpcp_report_timeout)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->oam_keepalive_timeout)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_link_fec_en_set_default(bcmolt_epon_link_fec_en *this)
+{
+    this->upstream = BCMOLT_EPON_LINK_FEC_STATE_USE_DEFAULT;
+    this->downstream = BCMOLT_EPON_LINK_FEC_STATE_USE_DEFAULT;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_fec_en_pack(const bcmolt_epon_link_fec_en *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_epon_link_fec_state_pack(this->upstream, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_epon_link_fec_state_pack(this->downstream, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_fec_en_unpack(bcmolt_epon_link_fec_en *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_epon_link_fec_state_unpack(&this->upstream, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_epon_link_fec_state_unpack(&this->downstream, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_fec_en_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 2);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_fec_en_bounds_check(const bcmolt_epon_link_fec_en *this)
+{
+    switch (this->upstream)
+    {
+        case BCMOLT_EPON_LINK_FEC_STATE_DISABLED:
+            break;
+        case BCMOLT_EPON_LINK_FEC_STATE_ENABLED:
+            break;
+        case BCMOLT_EPON_LINK_FEC_STATE_USE_DEFAULT:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->downstream)
+    {
+        case BCMOLT_EPON_LINK_FEC_STATE_DISABLED:
+            break;
+        case BCMOLT_EPON_LINK_FEC_STATE_ENABLED:
+            break;
+        case BCMOLT_EPON_LINK_FEC_STATE_USE_DEFAULT:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_link_info_set_default(bcmolt_epon_link_info *this)
+{
+    this->link_status = (bcmolt_epon_link_status) 0;
+    this->rate = BCMOLT_EPON_LINK_RATE_TEN_TEN;
+    this->llid = (bcmolt_epon_llid) 0;
+    this->mpcp_discovery_info = (bcmolt_mpcp_discovery_info) 0;
+    this->onu_laser_on_time_tq = (bcmolt_time_quanta) 0;
+    this->onu_laser_off_time_tq = (bcmolt_time_quanta) 0;
+    this->pending_grants = 0;
+    this->range_value_tq = (bcmolt_time_quanta) 0;
+    this->tunnel_id = (bcmolt_epon_tunnel_id) 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_info_pack(const bcmolt_epon_link_info *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_epon_link_status_pack(this->link_status, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_epon_link_rate_pack(this->rate, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u16(buf, (uint16_t) this->llid))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_mpcp_discovery_info_pack(this->mpcp_discovery_info, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, (uint32_t) this->onu_laser_on_time_tq))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, (uint32_t) this->onu_laser_off_time_tq))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->pending_grants))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, (uint32_t) this->range_value_tq))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, (uint32_t) this->tunnel_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_info_unpack(bcmolt_epon_link_info *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_epon_link_status_unpack(&this->link_status, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_epon_link_rate_unpack(&this->rate, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->llid))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_mpcp_discovery_info_unpack(&this->mpcp_discovery_info, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, (uint32_t *) &this->onu_laser_on_time_tq))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, (uint32_t *) &this->onu_laser_off_time_tq))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->pending_grants))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, (uint32_t *) &this->range_value_tq))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, (uint32_t *) &this->tunnel_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_info_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 24);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_info_bounds_check(const bcmolt_epon_link_info *this)
+{
+    if ((this->link_status & 0x00F6) != 0)
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (this->rate)
+    {
+        case BCMOLT_EPON_LINK_RATE_TEN_TEN:
+            break;
+        case BCMOLT_EPON_LINK_RATE_TEN_ONE:
+            break;
+        case BCMOLT_EPON_LINK_RATE_ONE_ONE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    if ((this->mpcp_discovery_info & 0xFFCCU) != 0)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gate_parameters_set_default(bcmolt_gate_parameters *this)
+{
+    this->flags = (bcmolt_mpcp_registration_gate_flags) 0;
+    this->delay_before_ms = 50;
+    this->gate_size_tq = (bcmolt_time_quanta) 42;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gate_parameters_pack(const bcmolt_gate_parameters *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_mpcp_registration_gate_flags_pack(this->flags, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->delay_before_ms))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, (uint32_t) this->gate_size_tq))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gate_parameters_unpack(bcmolt_gate_parameters *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_mpcp_registration_gate_flags_unpack(&this->flags, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->delay_before_ms))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, (uint32_t *) &this->gate_size_tq))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gate_parameters_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 12);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gate_parameters_bounds_check(const bcmolt_gate_parameters *this)
+{
+    if ((this->flags & 0xFFFFFFFEUL) != 0)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->delay_before_ms > 3600000UL)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->gate_size_tq > (bcmolt_time_quanta) 65535UL)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gate_parameters_list_u32_set_default(bcmolt_gate_parameters_list_u32 *this)
+{
+    this->len = 0;
+    this->val = NULL;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gate_parameters_list_u32_pack(const bcmolt_gate_parameters_list_u32 *this, bcmolt_buf *buf)
+{
+    uint32_t i0;
+    if (!bcmolt_buf_write_u32(buf, this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_gate_parameters_list_u32\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+        return BCMOS_FALSE;
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_gate_parameters_pack(&this->val[i0], buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gate_parameters_list_u32_get_packed_length(const bcmolt_gate_parameters_list_u32 *this)
+{
+    return 4 + (12 * this->len);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gate_parameters_list_u32_unpack(bcmolt_gate_parameters_list_u32 *this, bcmolt_buf *buf, void **extra_mem)
+{
+    uint32_t i0;
+    if (!bcmolt_buf_read_u32(buf, &this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        if (extra_mem == NULL)
+        {
+            bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_gate_parameters_list_u32\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+            return BCMOS_FALSE;
+        }
+        else
+        {
+            this->val = (bcmolt_gate_parameters *) *extra_mem;
+            *extra_mem = ((uint8_t *) *extra_mem) + BCMOS_ROUND_TO_WORD(this->len * sizeof(bcmolt_gate_parameters));
+        }
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_gate_parameters_unpack(&this->val[i0], buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gate_parameters_list_u32_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    uint32_t len;
+    if (!bcmolt_buf_read_u32(packed, &len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *extra_mem += BCMOS_ROUND_TO_WORD(sizeof(bcmolt_gate_parameters) * len);
+    if (!bcmolt_buf_skip(packed, len * 12))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gate_parameters_list_u32_bounds_check(const bcmolt_gate_parameters_list_u32 *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_registration_gate_mode_set_default(bcmolt_epon_registration_gate_mode *this)
+{
+    this->registration_gate_mode = (bcmolt_mpcp_gate_mode) 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_registration_gate_mode_pack(const bcmolt_epon_registration_gate_mode *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_mpcp_gate_mode_pack(this->registration_gate_mode, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (this->registration_gate_mode)
+    {
+        case BCMOLT_MPCP_GATE_MODE_TEKNOVUS:
+            {
+                if (!bcmolt_buf_write_u16(buf, this->u.teknovus.reg_ack_timeout_ms))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_MPCP_GATE_MODE_CUSTOM:
+            {
+                if (!bcmolt_gate_parameters_list_u32_pack(&this->u.custom.gates, buf))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_registration_gate_mode_get_packed_length(const bcmolt_epon_registration_gate_mode *this)
+{
+    uint32_t count = 1;
+    switch (this->registration_gate_mode)
+    {
+        case BCMOLT_MPCP_GATE_MODE_TEKNOVUS:
+            {
+                count += 2;
+            }
+            break;
+        case BCMOLT_MPCP_GATE_MODE_CUSTOM:
+            {
+                count += bcmolt_gate_parameters_list_u32_get_packed_length(&this->u.custom.gates);
+            }
+            break;
+        default:
+            break;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_registration_gate_mode_unpack(bcmolt_epon_registration_gate_mode *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_mpcp_gate_mode_unpack(&this->registration_gate_mode, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (this->registration_gate_mode)
+    {
+        case BCMOLT_MPCP_GATE_MODE_TEKNOVUS:
+            {
+                if (!bcmolt_buf_read_u16(buf, &this->u.teknovus.reg_ack_timeout_ms))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_MPCP_GATE_MODE_CUSTOM:
+            {
+                if (!bcmolt_gate_parameters_list_u32_unpack(&this->u.custom.gates, buf, extra_mem))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_registration_gate_mode_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    bcmolt_mpcp_gate_mode registration_gate_mode;
+    if (!bcmolt_mpcp_gate_mode_unpack(&registration_gate_mode, packed))
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (registration_gate_mode)
+    {
+        case BCMOLT_MPCP_GATE_MODE_TEKNOVUS:
+            {
+                if (!bcmolt_buf_skip(packed, 2))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_MPCP_GATE_MODE_CUSTOM:
+            {
+                if (!bcmolt_gate_parameters_list_u32_scan(packed, extra_mem))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_registration_gate_mode_bounds_check(const bcmolt_epon_registration_gate_mode *this)
+{
+    switch (this->registration_gate_mode)
+    {
+        case BCMOLT_MPCP_GATE_MODE_TEKNOVUS:
+            {
+                if (this->u.teknovus.reg_ack_timeout_ms < 50)
+                {
+                    return BCMOS_FALSE;
+                }
+
+                if (this->u.teknovus.reg_ack_timeout_ms > 200)
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_MPCP_GATE_MODE_CUSTOM:
+            {
+                if (!bcmolt_gate_parameters_list_u32_bounds_check(&this->u.custom.gates))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_logical_link_options_set_default(bcmolt_epon_logical_link_options *this)
+{
+    this->registration_gate_mode.registration_gate_mode = BCMOLT_MPCP_GATE_MODE_TEKNOVUS;
+    this->registration_gate_mode.u.teknovus.reg_ack_timeout_ms = 100;
+    this->reporting_mode = BCMOLT_EPON_DBA_REPORTING_MODE_SIEPON_A;
+    this->max_links = 512;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_logical_link_options_pack(const bcmolt_epon_logical_link_options *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_epon_registration_gate_mode_pack(&this->registration_gate_mode, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_epon_dba_reporting_mode_pack(this->reporting_mode, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u16(buf, this->max_links))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_logical_link_options_get_packed_length(const bcmolt_epon_logical_link_options *this)
+{
+    return 3 + bcmolt_epon_registration_gate_mode_get_packed_length(&this->registration_gate_mode);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_logical_link_options_unpack(bcmolt_epon_logical_link_options *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_epon_registration_gate_mode_unpack(&this->registration_gate_mode, buf, extra_mem))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_epon_dba_reporting_mode_unpack(&this->reporting_mode, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u16(buf, &this->max_links))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_logical_link_options_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    if (!bcmolt_epon_registration_gate_mode_scan(packed, extra_mem))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_skip(packed, 1))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_skip(packed, 2))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_logical_link_options_bounds_check(const bcmolt_epon_logical_link_options *this)
+{
+    if (!bcmolt_epon_registration_gate_mode_bounds_check(&this->registration_gate_mode))
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (this->reporting_mode)
+    {
+        case BCMOLT_EPON_DBA_REPORTING_MODE_SIEPON_A:
+            break;
+        case BCMOLT_EPON_DBA_REPORTING_MODE_SIEPON_B:
+            break;
+        case BCMOLT_EPON_DBA_REPORTING_MODE_SIEPON_C:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    if (this->max_links > 2044)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_ni_alarm_state_set_default(bcmolt_epon_ni_alarm_state *this)
+{
+    this->no_reports = BCMOLT_STATUS_OFF;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_alarm_state_pack(const bcmolt_epon_ni_alarm_state *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_status_pack(this->no_reports, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_alarm_state_unpack(bcmolt_epon_ni_alarm_state *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_status_unpack(&this->no_reports, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_alarm_state_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 1);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_alarm_state_bounds_check(const bcmolt_epon_ni_alarm_state *this)
+{
+    switch (this->no_reports)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_ni_encryption_cfg_set_default(bcmolt_epon_ni_encryption_cfg *this)
+{
+    this->downstream_encryption_mode = BCMOLT_EPON_ENCRYPTION_MODE_NO_ENCRYPTION;
+    this->upstream_encryption_mode = BCMOLT_EPON_ENCRYPTION_MODE_NO_ENCRYPTION;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_encryption_cfg_pack(const bcmolt_epon_ni_encryption_cfg *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_epon_encryption_mode_pack(this->downstream_encryption_mode, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_epon_encryption_mode_pack(this->upstream_encryption_mode, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_encryption_cfg_unpack(bcmolt_epon_ni_encryption_cfg *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_epon_encryption_mode_unpack(&this->downstream_encryption_mode, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_epon_encryption_mode_unpack(&this->upstream_encryption_mode, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_encryption_cfg_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 4);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_encryption_cfg_bounds_check(const bcmolt_epon_ni_encryption_cfg *this)
+{
+    switch (this->downstream_encryption_mode)
+    {
+        case BCMOLT_EPON_ENCRYPTION_MODE_NO_ENCRYPTION:
+            break;
+        case BCMOLT_EPON_ENCRYPTION_MODE_EPON_TRIPLE_CHURNING:
+            break;
+        case BCMOLT_EPON_ENCRYPTION_MODE_EPON_ZERO_OVERHEAD_AES:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->upstream_encryption_mode)
+    {
+        case BCMOLT_EPON_ENCRYPTION_MODE_NO_ENCRYPTION:
+            break;
+        case BCMOLT_EPON_ENCRYPTION_MODE_EPON_TRIPLE_CHURNING:
+            break;
+        case BCMOLT_EPON_ENCRYPTION_MODE_EPON_ZERO_OVERHEAD_AES:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_onu_upgrade_params_set_default(bcmolt_epon_onu_upgrade_params *this)
+{
+    this->oam_extension_type = (bcmolt_epon_oam_extension_type) 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_upgrade_params_pack(const bcmolt_epon_onu_upgrade_params *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_epon_oam_extension_type_pack(this->oam_extension_type, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (this->oam_extension_type)
+    {
+        case BCMOLT_EPON_OAM_EXTENSION_TYPE_RESERVED:
+            {
+            }
+            break;
+        case BCMOLT_EPON_OAM_EXTENSION_TYPE_BROADCOM:
+            {
+                if (!bcmolt_buf_write_u32(buf, this->u.broadcom.response_timeout_ms))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_EPON_OAM_EXTENSION_TYPE_CTC:
+            {
+                if (!bcmolt_buf_write_u32(buf, this->u.ctc.response_timeout_ms))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_EPON_OAM_EXTENSION_TYPE_DASAN:
+            {
+                if (!bcmolt_buf_write_u32(buf, this->u.dasan.response_timeout_ms))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_EPON_OAM_EXTENSION_TYPE_KT:
+            {
+                if (!bcmolt_buf_write_u32(buf, this->u.kt.response_timeout_ms))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_EPON_OAM_EXTENSION_TYPE_DPOE:
+            {
+                if (!bcmolt_buf_write_u32(buf, this->u.dpoe.response_timeout_ms))
+                {
+                    return BCMOS_FALSE;
+                }
+
+                if (!bcmolt_buf_write_u16(buf, this->u.dpoe.block_size))
+                {
+                    return BCMOS_FALSE;
+                }
+
+                if (!bcmolt_buf_write_u32(buf, this->u.dpoe.final_ack_response_timeout))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_onu_upgrade_params_get_packed_length(const bcmolt_epon_onu_upgrade_params *this)
+{
+    uint32_t count = 1;
+    switch (this->oam_extension_type)
+    {
+        case BCMOLT_EPON_OAM_EXTENSION_TYPE_RESERVED:
+            {
+            }
+            break;
+        case BCMOLT_EPON_OAM_EXTENSION_TYPE_BROADCOM:
+            {
+                count += 4;
+            }
+            break;
+        case BCMOLT_EPON_OAM_EXTENSION_TYPE_CTC:
+            {
+                count += 4;
+            }
+            break;
+        case BCMOLT_EPON_OAM_EXTENSION_TYPE_DASAN:
+            {
+                count += 4;
+            }
+            break;
+        case BCMOLT_EPON_OAM_EXTENSION_TYPE_KT:
+            {
+                count += 4;
+            }
+            break;
+        case BCMOLT_EPON_OAM_EXTENSION_TYPE_DPOE:
+            {
+                count += 10;
+            }
+            break;
+        default:
+            break;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_upgrade_params_unpack(bcmolt_epon_onu_upgrade_params *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_epon_oam_extension_type_unpack(&this->oam_extension_type, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (this->oam_extension_type)
+    {
+        case BCMOLT_EPON_OAM_EXTENSION_TYPE_RESERVED:
+            {
+            }
+            break;
+        case BCMOLT_EPON_OAM_EXTENSION_TYPE_BROADCOM:
+            {
+                if (!bcmolt_buf_read_u32(buf, &this->u.broadcom.response_timeout_ms))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_EPON_OAM_EXTENSION_TYPE_CTC:
+            {
+                if (!bcmolt_buf_read_u32(buf, &this->u.ctc.response_timeout_ms))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_EPON_OAM_EXTENSION_TYPE_DASAN:
+            {
+                if (!bcmolt_buf_read_u32(buf, &this->u.dasan.response_timeout_ms))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_EPON_OAM_EXTENSION_TYPE_KT:
+            {
+                if (!bcmolt_buf_read_u32(buf, &this->u.kt.response_timeout_ms))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_EPON_OAM_EXTENSION_TYPE_DPOE:
+            {
+                if (!bcmolt_buf_read_u32(buf, &this->u.dpoe.response_timeout_ms))
+                {
+                    return BCMOS_FALSE;
+                }
+
+                if (!bcmolt_buf_read_u16(buf, &this->u.dpoe.block_size))
+                {
+                    return BCMOS_FALSE;
+                }
+
+                if (!bcmolt_buf_read_u32(buf, &this->u.dpoe.final_ack_response_timeout))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_upgrade_params_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    bcmolt_epon_oam_extension_type oam_extension_type;
+    if (!bcmolt_epon_oam_extension_type_unpack(&oam_extension_type, packed))
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (oam_extension_type)
+    {
+        case BCMOLT_EPON_OAM_EXTENSION_TYPE_RESERVED:
+            {
+            }
+            break;
+        case BCMOLT_EPON_OAM_EXTENSION_TYPE_BROADCOM:
+            {
+                if (!bcmolt_buf_skip(packed, 4))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_EPON_OAM_EXTENSION_TYPE_CTC:
+            {
+                if (!bcmolt_buf_skip(packed, 4))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_EPON_OAM_EXTENSION_TYPE_DASAN:
+            {
+                if (!bcmolt_buf_skip(packed, 4))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_EPON_OAM_EXTENSION_TYPE_KT:
+            {
+                if (!bcmolt_buf_skip(packed, 4))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_EPON_OAM_EXTENSION_TYPE_DPOE:
+            {
+                if (!bcmolt_buf_skip(packed, 4))
+                {
+                    return BCMOS_FALSE;
+                }
+
+                if (!bcmolt_buf_skip(packed, 2))
+                {
+                    return BCMOS_FALSE;
+                }
+
+                if (!bcmolt_buf_skip(packed, 4))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_upgrade_params_bounds_check(const bcmolt_epon_onu_upgrade_params *this)
+{
+    switch (this->oam_extension_type)
+    {
+        case BCMOLT_EPON_OAM_EXTENSION_TYPE_RESERVED:
+            {
+            }
+            break;
+        case BCMOLT_EPON_OAM_EXTENSION_TYPE_BROADCOM:
+            {
+                if (this->u.broadcom.response_timeout_ms < 50)
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_EPON_OAM_EXTENSION_TYPE_CTC:
+            {
+                if (this->u.ctc.response_timeout_ms < 100)
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_EPON_OAM_EXTENSION_TYPE_DASAN:
+            {
+                if (this->u.dasan.response_timeout_ms < 50)
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_EPON_OAM_EXTENSION_TYPE_KT:
+            {
+                if (this->u.kt.response_timeout_ms < 50)
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_EPON_OAM_EXTENSION_TYPE_DPOE:
+            {
+                if (this->u.dpoe.response_timeout_ms < 1000)
+                {
+                    return BCMOS_FALSE;
+                }
+
+                if (this->u.dpoe.block_size < 1)
+                {
+                    return BCMOS_FALSE;
+                }
+
+                if (this->u.dpoe.final_ack_response_timeout < 15)
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_onu_upgrade_status_set_default(bcmolt_epon_onu_upgrade_status *this)
+{
+    bcmos_mac_address_init(&this->onu_id);
+    this->error_code = BCMOLT_EPON_ONU_UPGRADE_RETURN_CODE_SUCCESS;
+    this->onu_return_code = BCMOLT_EPON_ONU_UPGRADE_ONU_RESPONSE_CODE_OK;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_upgrade_status_pack(const bcmolt_epon_onu_upgrade_status *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_mac_address(buf, this->onu_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_epon_onu_upgrade_return_code_pack(this->error_code, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_epon_onu_upgrade_onu_response_code_pack(this->onu_return_code, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_upgrade_status_unpack(bcmolt_epon_onu_upgrade_status *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_mac_address(buf, &this->onu_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_epon_onu_upgrade_return_code_unpack(&this->error_code, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_epon_onu_upgrade_onu_response_code_unpack(&this->onu_return_code, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_upgrade_status_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 8);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_upgrade_status_bounds_check(const bcmolt_epon_onu_upgrade_status *this)
+{
+    switch (this->error_code)
+    {
+        case BCMOLT_EPON_ONU_UPGRADE_RETURN_CODE_SUCCESS:
+            break;
+        case BCMOLT_EPON_ONU_UPGRADE_RETURN_CODE_ONU_RESPONSE_TIMEOUT:
+            break;
+        case BCMOLT_EPON_ONU_UPGRADE_RETURN_CODE_ONU_ERROR_RESPONSE:
+            break;
+        case BCMOLT_EPON_ONU_UPGRADE_RETURN_CODE_SYNC_ERROR:
+            break;
+        case BCMOLT_EPON_ONU_UPGRADE_RETURN_CODE_COMMIT_FAILED:
+            break;
+        case BCMOLT_EPON_ONU_UPGRADE_RETURN_CODE_INTERNAL:
+            break;
+        case BCMOLT_EPON_ONU_UPGRADE_RETURN_CODE_PARSE_ERROR:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->onu_return_code)
+    {
+        case BCMOLT_EPON_ONU_UPGRADE_ONU_RESPONSE_CODE_OK:
+            break;
+        case BCMOLT_EPON_ONU_UPGRADE_ONU_RESPONSE_CODE_UNDEFINED:
+            break;
+        case BCMOLT_EPON_ONU_UPGRADE_ONU_RESPONSE_CODE_NOT_FOUND:
+            break;
+        case BCMOLT_EPON_ONU_UPGRADE_ONU_RESPONSE_CODE_NO_ACCESS:
+            break;
+        case BCMOLT_EPON_ONU_UPGRADE_ONU_RESPONSE_CODE_FULL:
+            break;
+        case BCMOLT_EPON_ONU_UPGRADE_ONU_RESPONSE_CODE_ILLEGAL_OPERATION:
+            break;
+        case BCMOLT_EPON_ONU_UPGRADE_ONU_RESPONSE_CODE_UNKNOWN_ID:
+            break;
+        case BCMOLT_EPON_ONU_UPGRADE_ONU_RESPONSE_CODE_BAD_BLOCK:
+            break;
+        case BCMOLT_EPON_ONU_UPGRADE_ONU_RESPONSE_CODE_TIMEOUT:
+            break;
+        case BCMOLT_EPON_ONU_UPGRADE_ONU_RESPONSE_CODE_BUSY:
+            break;
+        case BCMOLT_EPON_ONU_UPGRADE_ONU_RESPONSE_CODE_INCOMPATIBLE_FILE:
+            break;
+        case BCMOLT_EPON_ONU_UPGRADE_ONU_RESPONSE_CODE_CORRUPTED_FILE:
+            break;
+        case BCMOLT_EPON_ONU_UPGRADE_ONU_RESPONSE_CODE_ERROR_NOT_DEFINED:
+            break;
+        case BCMOLT_EPON_ONU_UPGRADE_ONU_RESPONSE_CODE_ERROR_ALLOC_EXCEEDED:
+            break;
+        case BCMOLT_EPON_ONU_UPGRADE_ONU_RESPONSE_CODE_ERROR_ILLEGAL_OP:
+            break;
+        case BCMOLT_EPON_ONU_UPGRADE_ONU_RESPONSE_CODE_ERROR_FILE_EXISTS:
+            break;
+        case BCMOLT_EPON_ONU_UPGRADE_ONU_RESPONSE_CODE_END_WRITING_NVS:
+            break;
+        case BCMOLT_EPON_ONU_UPGRADE_ONU_RESPONSE_CODE_END_CRC_ERROR:
+            break;
+        case BCMOLT_EPON_ONU_UPGRADE_ONU_RESPONSE_CODE_END_PARAM_ERROR:
+            break;
+        case BCMOLT_EPON_ONU_UPGRADE_ONU_RESPONSE_CODE_END_CMD_UNSUPPORTED:
+            break;
+        case BCMOLT_EPON_ONU_UPGRADE_ONU_RESPONSE_CODE_LAST:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_onu_upgrade_status_list_u32_set_default(bcmolt_epon_onu_upgrade_status_list_u32 *this)
+{
+    this->len = 0;
+    this->val = NULL;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_upgrade_status_list_u32_pack(const bcmolt_epon_onu_upgrade_status_list_u32 *this, bcmolt_buf *buf)
+{
+    uint32_t i0;
+    if (!bcmolt_buf_write_u32(buf, this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_epon_onu_upgrade_status_list_u32\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+        return BCMOS_FALSE;
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_epon_onu_upgrade_status_pack(&this->val[i0], buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_onu_upgrade_status_list_u32_get_packed_length(const bcmolt_epon_onu_upgrade_status_list_u32 *this)
+{
+    return 4 + (8 * this->len);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_upgrade_status_list_u32_unpack(bcmolt_epon_onu_upgrade_status_list_u32 *this, bcmolt_buf *buf, void **extra_mem)
+{
+    uint32_t i0;
+    if (!bcmolt_buf_read_u32(buf, &this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        if (extra_mem == NULL)
+        {
+            bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_epon_onu_upgrade_status_list_u32\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+            return BCMOS_FALSE;
+        }
+        else
+        {
+            this->val = (bcmolt_epon_onu_upgrade_status *) *extra_mem;
+            *extra_mem = ((uint8_t *) *extra_mem) + BCMOS_ROUND_TO_WORD(this->len * sizeof(bcmolt_epon_onu_upgrade_status));
+        }
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_epon_onu_upgrade_status_unpack(&this->val[i0], buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_upgrade_status_list_u32_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    uint32_t len;
+    if (!bcmolt_buf_read_u32(packed, &len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *extra_mem += BCMOS_ROUND_TO_WORD(sizeof(bcmolt_epon_onu_upgrade_status) * len);
+    if (!bcmolt_buf_skip(packed, len * 8))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_upgrade_status_list_u32_bounds_check(const bcmolt_epon_onu_upgrade_status_list_u32 *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_protection_switching_configuration_set_default(bcmolt_epon_protection_switching_configuration *this)
+{
+    this->protection_type = BCMOLT_EPON_PROTECTION_SWITCHING_TYPE_NO_PROTECTION_SWTICHING;
+    this->protection_switching_options = (bcmolt_protection_switching_detection_options) 0;
+    this->rerange_options = BCMOLT_EPON_PROTECTION_SWITCHING_RERANGING_OPTIONS_RERANGE_NONE;
+    this->rerange_attempts = 0;
+    this->rerange_interval = 0;
+    this->sync_gate_duration = 0;
+    this->gpio_input = BCMOLT_GPIO_PIN_UNCONFIGURED;
+    this->gpio_input_polarity = BCMOLT_GPIO_POLARITY_ACTIVE_HIGH;
+    this->gpio_output = BCMOLT_GPIO_PIN_UNCONFIGURED;
+    this->gpio_output_polarity = BCMOLT_GPIO_POLARITY_ACTIVE_HIGH;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_protection_switching_configuration_pack(const bcmolt_epon_protection_switching_configuration *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_epon_protection_switching_type_pack(this->protection_type, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_protection_switching_detection_options_pack(this->protection_switching_options, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_epon_protection_switching_reranging_options_pack(this->rerange_options, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->rerange_attempts))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u16(buf, this->rerange_interval))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u16(buf, this->sync_gate_duration))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_gpio_pin_pack(this->gpio_input, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_gpio_polarity_pack(this->gpio_input_polarity, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_gpio_pin_pack(this->gpio_output, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_gpio_polarity_pack(this->gpio_output_polarity, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_protection_switching_configuration_unpack(bcmolt_epon_protection_switching_configuration *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_epon_protection_switching_type_unpack(&this->protection_type, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_protection_switching_detection_options_unpack(&this->protection_switching_options, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_epon_protection_switching_reranging_options_unpack(&this->rerange_options, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->rerange_attempts))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u16(buf, &this->rerange_interval))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u16(buf, &this->sync_gate_duration))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_gpio_pin_unpack(&this->gpio_input, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_gpio_polarity_unpack(&this->gpio_input_polarity, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_gpio_pin_unpack(&this->gpio_output, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_gpio_polarity_unpack(&this->gpio_output_polarity, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_protection_switching_configuration_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 12);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_protection_switching_configuration_bounds_check(const bcmolt_epon_protection_switching_configuration *this)
+{
+    switch (this->protection_type)
+    {
+        case BCMOLT_EPON_PROTECTION_SWITCHING_TYPE_NO_PROTECTION_SWTICHING:
+            break;
+        case BCMOLT_EPON_PROTECTION_SWITCHING_TYPE_LINE_CARD_PROTECTION_SWITCHING:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    if ((this->protection_switching_options & 0x00FE) != 0)
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (this->rerange_options)
+    {
+        case BCMOLT_EPON_PROTECTION_SWITCHING_RERANGING_OPTIONS_RERANGE_NONE:
+            break;
+        case BCMOLT_EPON_PROTECTION_SWITCHING_RERANGING_OPTIONS_RERANGE_SINGLE_LOGICAL_LINK:
+            break;
+        case BCMOLT_EPON_PROTECTION_SWITCHING_RERANGING_OPTIONS_RERANGE_ALL_LOGICAL_LINKS:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->gpio_input)
+    {
+        case BCMOLT_GPIO_PIN_PIN0:
+            break;
+        case BCMOLT_GPIO_PIN_PIN1:
+            break;
+        case BCMOLT_GPIO_PIN_PIN2:
+            break;
+        case BCMOLT_GPIO_PIN_PIN3:
+            break;
+        case BCMOLT_GPIO_PIN_PIN4:
+            break;
+        case BCMOLT_GPIO_PIN_PIN5:
+            break;
+        case BCMOLT_GPIO_PIN_PIN6:
+            break;
+        case BCMOLT_GPIO_PIN_PIN7:
+            break;
+        case BCMOLT_GPIO_PIN_PIN8:
+            break;
+        case BCMOLT_GPIO_PIN_PIN9:
+            break;
+        case BCMOLT_GPIO_PIN_PIN10:
+            break;
+        case BCMOLT_GPIO_PIN_PIN11:
+            break;
+        case BCMOLT_GPIO_PIN_PIN12:
+            break;
+        case BCMOLT_GPIO_PIN_PIN13:
+            break;
+        case BCMOLT_GPIO_PIN_PIN14:
+            break;
+        case BCMOLT_GPIO_PIN_PIN15:
+            break;
+        case BCMOLT_GPIO_PIN_PIN16:
+            break;
+        case BCMOLT_GPIO_PIN_PIN17:
+            break;
+        case BCMOLT_GPIO_PIN_PIN18:
+            break;
+        case BCMOLT_GPIO_PIN_PIN19:
+            break;
+        case BCMOLT_GPIO_PIN_PIN20:
+            break;
+        case BCMOLT_GPIO_PIN_PIN21:
+            break;
+        case BCMOLT_GPIO_PIN_PIN22:
+            break;
+        case BCMOLT_GPIO_PIN_PIN23:
+            break;
+        case BCMOLT_GPIO_PIN_PIN24:
+            break;
+        case BCMOLT_GPIO_PIN_PIN25:
+            break;
+        case BCMOLT_GPIO_PIN_PIN26:
+            break;
+        case BCMOLT_GPIO_PIN_PIN27:
+            break;
+        case BCMOLT_GPIO_PIN_PIN28:
+            break;
+        case BCMOLT_GPIO_PIN_PIN29:
+            break;
+        case BCMOLT_GPIO_PIN_PIN30:
+            break;
+        case BCMOLT_GPIO_PIN_PIN31:
+            break;
+        case BCMOLT_GPIO_PIN_PIN32:
+            break;
+        case BCMOLT_GPIO_PIN_PIN33:
+            break;
+        case BCMOLT_GPIO_PIN_PIN34:
+            break;
+        case BCMOLT_GPIO_PIN_PIN35:
+            break;
+        case BCMOLT_GPIO_PIN_PIN36:
+            break;
+        case BCMOLT_GPIO_PIN_PIN37:
+            break;
+        case BCMOLT_GPIO_PIN_PIN38:
+            break;
+        case BCMOLT_GPIO_PIN_PIN39:
+            break;
+        case BCMOLT_GPIO_PIN_PIN40:
+            break;
+        case BCMOLT_GPIO_PIN_PIN41:
+            break;
+        case BCMOLT_GPIO_PIN_PIN42:
+            break;
+        case BCMOLT_GPIO_PIN_PIN43:
+            break;
+        case BCMOLT_GPIO_PIN_PIN44:
+            break;
+        case BCMOLT_GPIO_PIN_PIN45:
+            break;
+        case BCMOLT_GPIO_PIN_PIN46:
+            break;
+        case BCMOLT_GPIO_PIN_PIN47:
+            break;
+        case BCMOLT_GPIO_PIN_PIN48:
+            break;
+        case BCMOLT_GPIO_PIN_PIN49:
+            break;
+        case BCMOLT_GPIO_PIN_PIN50:
+            break;
+        case BCMOLT_GPIO_PIN_PIN51:
+            break;
+        case BCMOLT_GPIO_PIN_PIN52:
+            break;
+        case BCMOLT_GPIO_PIN_PIN53:
+            break;
+        case BCMOLT_GPIO_PIN_PIN54:
+            break;
+        case BCMOLT_GPIO_PIN_PIN55:
+            break;
+        case BCMOLT_GPIO_PIN_PIN56:
+            break;
+        case BCMOLT_GPIO_PIN_PIN57:
+            break;
+        case BCMOLT_GPIO_PIN_PIN58:
+            break;
+        case BCMOLT_GPIO_PIN_PIN59:
+            break;
+        case BCMOLT_GPIO_PIN_PIN60:
+            break;
+        case BCMOLT_GPIO_PIN_PIN61:
+            break;
+        case BCMOLT_GPIO_PIN_PIN62:
+            break;
+        case BCMOLT_GPIO_PIN_PIN63:
+            break;
+        case BCMOLT_GPIO_PIN_PIN64:
+            break;
+        case BCMOLT_GPIO_PIN_PIN65:
+            break;
+        case BCMOLT_GPIO_PIN_PIN66:
+            break;
+        case BCMOLT_GPIO_PIN_PIN67:
+            break;
+        case BCMOLT_GPIO_PIN_PIN68:
+            break;
+        case BCMOLT_GPIO_PIN_PIN69:
+            break;
+        case BCMOLT_GPIO_PIN_PIN70:
+            break;
+        case BCMOLT_GPIO_PIN_PIN71:
+            break;
+        case BCMOLT_GPIO_PIN_PIN72:
+            break;
+        case BCMOLT_GPIO_PIN_PIN73:
+            break;
+        case BCMOLT_GPIO_PIN_PIN74:
+            break;
+        case BCMOLT_GPIO_PIN_PIN75:
+            break;
+        case BCMOLT_GPIO_PIN_PIN76:
+            break;
+        case BCMOLT_GPIO_PIN_PIN77:
+            break;
+        case BCMOLT_GPIO_PIN_PIN78:
+            break;
+        case BCMOLT_GPIO_PIN_PIN79:
+            break;
+        case BCMOLT_GPIO_PIN_PIN80:
+            break;
+        case BCMOLT_GPIO_PIN_PIN81:
+            break;
+        case BCMOLT_GPIO_PIN_PIN82:
+            break;
+        case BCMOLT_GPIO_PIN_PIN83:
+            break;
+        case BCMOLT_GPIO_PIN_PIN84:
+            break;
+        case BCMOLT_GPIO_PIN_PIN85:
+            break;
+        case BCMOLT_GPIO_PIN_PIN86:
+            break;
+        case BCMOLT_GPIO_PIN_PIN87:
+            break;
+        case BCMOLT_GPIO_PIN_PIN88:
+            break;
+        case BCMOLT_GPIO_PIN_PIN89:
+            break;
+        case BCMOLT_GPIO_PIN_PIN90:
+            break;
+        case BCMOLT_GPIO_PIN_PIN91:
+            break;
+        case BCMOLT_GPIO_PIN_PIN92:
+            break;
+        case BCMOLT_GPIO_PIN_PIN93:
+            break;
+        case BCMOLT_GPIO_PIN_PIN94:
+            break;
+        case BCMOLT_GPIO_PIN_PIN95:
+            break;
+        case BCMOLT_GPIO_PIN_PIN96:
+            break;
+        case BCMOLT_GPIO_PIN_PIN97:
+            break;
+        case BCMOLT_GPIO_PIN_PIN98:
+            break;
+        case BCMOLT_GPIO_PIN_PIN99:
+            break;
+        case BCMOLT_GPIO_PIN_PIN100:
+            break;
+        case BCMOLT_GPIO_PIN_PIN101:
+            break;
+        case BCMOLT_GPIO_PIN_PIN102:
+            break;
+        case BCMOLT_GPIO_PIN_PIN103:
+            break;
+        case BCMOLT_GPIO_PIN_PIN104:
+            break;
+        case BCMOLT_GPIO_PIN_PIN105:
+            break;
+        case BCMOLT_GPIO_PIN_PIN106:
+            break;
+        case BCMOLT_GPIO_PIN_UNCONFIGURED:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->gpio_input_polarity)
+    {
+        case BCMOLT_GPIO_POLARITY_ACTIVE_LOW:
+            break;
+        case BCMOLT_GPIO_POLARITY_ACTIVE_HIGH:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->gpio_output)
+    {
+        case BCMOLT_GPIO_PIN_PIN0:
+            break;
+        case BCMOLT_GPIO_PIN_PIN1:
+            break;
+        case BCMOLT_GPIO_PIN_PIN2:
+            break;
+        case BCMOLT_GPIO_PIN_PIN3:
+            break;
+        case BCMOLT_GPIO_PIN_PIN4:
+            break;
+        case BCMOLT_GPIO_PIN_PIN5:
+            break;
+        case BCMOLT_GPIO_PIN_PIN6:
+            break;
+        case BCMOLT_GPIO_PIN_PIN7:
+            break;
+        case BCMOLT_GPIO_PIN_PIN8:
+            break;
+        case BCMOLT_GPIO_PIN_PIN9:
+            break;
+        case BCMOLT_GPIO_PIN_PIN10:
+            break;
+        case BCMOLT_GPIO_PIN_PIN11:
+            break;
+        case BCMOLT_GPIO_PIN_PIN12:
+            break;
+        case BCMOLT_GPIO_PIN_PIN13:
+            break;
+        case BCMOLT_GPIO_PIN_PIN14:
+            break;
+        case BCMOLT_GPIO_PIN_PIN15:
+            break;
+        case BCMOLT_GPIO_PIN_PIN16:
+            break;
+        case BCMOLT_GPIO_PIN_PIN17:
+            break;
+        case BCMOLT_GPIO_PIN_PIN18:
+            break;
+        case BCMOLT_GPIO_PIN_PIN19:
+            break;
+        case BCMOLT_GPIO_PIN_PIN20:
+            break;
+        case BCMOLT_GPIO_PIN_PIN21:
+            break;
+        case BCMOLT_GPIO_PIN_PIN22:
+            break;
+        case BCMOLT_GPIO_PIN_PIN23:
+            break;
+        case BCMOLT_GPIO_PIN_PIN24:
+            break;
+        case BCMOLT_GPIO_PIN_PIN25:
+            break;
+        case BCMOLT_GPIO_PIN_PIN26:
+            break;
+        case BCMOLT_GPIO_PIN_PIN27:
+            break;
+        case BCMOLT_GPIO_PIN_PIN28:
+            break;
+        case BCMOLT_GPIO_PIN_PIN29:
+            break;
+        case BCMOLT_GPIO_PIN_PIN30:
+            break;
+        case BCMOLT_GPIO_PIN_PIN31:
+            break;
+        case BCMOLT_GPIO_PIN_PIN32:
+            break;
+        case BCMOLT_GPIO_PIN_PIN33:
+            break;
+        case BCMOLT_GPIO_PIN_PIN34:
+            break;
+        case BCMOLT_GPIO_PIN_PIN35:
+            break;
+        case BCMOLT_GPIO_PIN_PIN36:
+            break;
+        case BCMOLT_GPIO_PIN_PIN37:
+            break;
+        case BCMOLT_GPIO_PIN_PIN38:
+            break;
+        case BCMOLT_GPIO_PIN_PIN39:
+            break;
+        case BCMOLT_GPIO_PIN_PIN40:
+            break;
+        case BCMOLT_GPIO_PIN_PIN41:
+            break;
+        case BCMOLT_GPIO_PIN_PIN42:
+            break;
+        case BCMOLT_GPIO_PIN_PIN43:
+            break;
+        case BCMOLT_GPIO_PIN_PIN44:
+            break;
+        case BCMOLT_GPIO_PIN_PIN45:
+            break;
+        case BCMOLT_GPIO_PIN_PIN46:
+            break;
+        case BCMOLT_GPIO_PIN_PIN47:
+            break;
+        case BCMOLT_GPIO_PIN_PIN48:
+            break;
+        case BCMOLT_GPIO_PIN_PIN49:
+            break;
+        case BCMOLT_GPIO_PIN_PIN50:
+            break;
+        case BCMOLT_GPIO_PIN_PIN51:
+            break;
+        case BCMOLT_GPIO_PIN_PIN52:
+            break;
+        case BCMOLT_GPIO_PIN_PIN53:
+            break;
+        case BCMOLT_GPIO_PIN_PIN54:
+            break;
+        case BCMOLT_GPIO_PIN_PIN55:
+            break;
+        case BCMOLT_GPIO_PIN_PIN56:
+            break;
+        case BCMOLT_GPIO_PIN_PIN57:
+            break;
+        case BCMOLT_GPIO_PIN_PIN58:
+            break;
+        case BCMOLT_GPIO_PIN_PIN59:
+            break;
+        case BCMOLT_GPIO_PIN_PIN60:
+            break;
+        case BCMOLT_GPIO_PIN_PIN61:
+            break;
+        case BCMOLT_GPIO_PIN_PIN62:
+            break;
+        case BCMOLT_GPIO_PIN_PIN63:
+            break;
+        case BCMOLT_GPIO_PIN_PIN64:
+            break;
+        case BCMOLT_GPIO_PIN_PIN65:
+            break;
+        case BCMOLT_GPIO_PIN_PIN66:
+            break;
+        case BCMOLT_GPIO_PIN_PIN67:
+            break;
+        case BCMOLT_GPIO_PIN_PIN68:
+            break;
+        case BCMOLT_GPIO_PIN_PIN69:
+            break;
+        case BCMOLT_GPIO_PIN_PIN70:
+            break;
+        case BCMOLT_GPIO_PIN_PIN71:
+            break;
+        case BCMOLT_GPIO_PIN_PIN72:
+            break;
+        case BCMOLT_GPIO_PIN_PIN73:
+            break;
+        case BCMOLT_GPIO_PIN_PIN74:
+            break;
+        case BCMOLT_GPIO_PIN_PIN75:
+            break;
+        case BCMOLT_GPIO_PIN_PIN76:
+            break;
+        case BCMOLT_GPIO_PIN_PIN77:
+            break;
+        case BCMOLT_GPIO_PIN_PIN78:
+            break;
+        case BCMOLT_GPIO_PIN_PIN79:
+            break;
+        case BCMOLT_GPIO_PIN_PIN80:
+            break;
+        case BCMOLT_GPIO_PIN_PIN81:
+            break;
+        case BCMOLT_GPIO_PIN_PIN82:
+            break;
+        case BCMOLT_GPIO_PIN_PIN83:
+            break;
+        case BCMOLT_GPIO_PIN_PIN84:
+            break;
+        case BCMOLT_GPIO_PIN_PIN85:
+            break;
+        case BCMOLT_GPIO_PIN_PIN86:
+            break;
+        case BCMOLT_GPIO_PIN_PIN87:
+            break;
+        case BCMOLT_GPIO_PIN_PIN88:
+            break;
+        case BCMOLT_GPIO_PIN_PIN89:
+            break;
+        case BCMOLT_GPIO_PIN_PIN90:
+            break;
+        case BCMOLT_GPIO_PIN_PIN91:
+            break;
+        case BCMOLT_GPIO_PIN_PIN92:
+            break;
+        case BCMOLT_GPIO_PIN_PIN93:
+            break;
+        case BCMOLT_GPIO_PIN_PIN94:
+            break;
+        case BCMOLT_GPIO_PIN_PIN95:
+            break;
+        case BCMOLT_GPIO_PIN_PIN96:
+            break;
+        case BCMOLT_GPIO_PIN_PIN97:
+            break;
+        case BCMOLT_GPIO_PIN_PIN98:
+            break;
+        case BCMOLT_GPIO_PIN_PIN99:
+            break;
+        case BCMOLT_GPIO_PIN_PIN100:
+            break;
+        case BCMOLT_GPIO_PIN_PIN101:
+            break;
+        case BCMOLT_GPIO_PIN_PIN102:
+            break;
+        case BCMOLT_GPIO_PIN_PIN103:
+            break;
+        case BCMOLT_GPIO_PIN_PIN104:
+            break;
+        case BCMOLT_GPIO_PIN_PIN105:
+            break;
+        case BCMOLT_GPIO_PIN_PIN106:
+            break;
+        case BCMOLT_GPIO_PIN_UNCONFIGURED:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->gpio_output_polarity)
+    {
+        case BCMOLT_GPIO_POLARITY_ACTIVE_LOW:
+            break;
+        case BCMOLT_GPIO_POLARITY_ACTIVE_HIGH:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_u8_list_u16_set_default(bcmolt_u8_list_u16 *this)
+{
+    this->len = 0;
+    this->val = NULL;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_u8_list_u16_pack(const bcmolt_u8_list_u16 *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u16(buf, this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_u8_list_u16\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write(buf, this->val, this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_u8_list_u16_get_packed_length(const bcmolt_u8_list_u16 *this)
+{
+    return 2 + this->len;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_u8_list_u16_unpack(bcmolt_u8_list_u16 *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u16(buf, &this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        if (extra_mem == NULL)
+        {
+            bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_u8_list_u16\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+            return BCMOS_FALSE;
+        }
+        else
+        {
+            this->val = (uint8_t *) *extra_mem;
+            *extra_mem = ((uint8_t *) *extra_mem) + BCMOS_ROUND_TO_WORD(this->len * sizeof(uint8_t));
+        }
+    }
+
+    if (!bcmolt_buf_read(buf, this->val, this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_u8_list_u16_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    uint16_t len;
+    if (!bcmolt_buf_read_u16(packed, &len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *extra_mem += BCMOS_ROUND_TO_WORD(sizeof(uint8_t) * len);
+    if (!bcmolt_buf_skip(packed, len * 1))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_u8_list_u16_bounds_check(const bcmolt_u8_list_u16 *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_ethernet_frame_masked_set_default(bcmolt_ethernet_frame_masked *this)
+{
+    this->frame_octets.len = 0;
+    this->frame_octets.val = NULL;
+    this->mask_octets.len = 0;
+    this->mask_octets.val = NULL;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ethernet_frame_masked_pack(const bcmolt_ethernet_frame_masked *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_u8_list_u16_pack(&this->frame_octets, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_u8_list_u16_pack(&this->mask_octets, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_ethernet_frame_masked_get_packed_length(const bcmolt_ethernet_frame_masked *this)
+{
+    return bcmolt_u8_list_u16_get_packed_length(&this->frame_octets) + bcmolt_u8_list_u16_get_packed_length(&this->mask_octets);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ethernet_frame_masked_unpack(bcmolt_ethernet_frame_masked *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_u8_list_u16_unpack(&this->frame_octets, buf, extra_mem))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_u8_list_u16_unpack(&this->mask_octets, buf, extra_mem))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ethernet_frame_masked_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    if (!bcmolt_u8_list_u16_scan(packed, extra_mem))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_u8_list_u16_scan(packed, extra_mem))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ethernet_frame_masked_bounds_check(const bcmolt_ethernet_frame_masked *this)
+{
+    if (!bcmolt_u8_list_u16_bounds_check(&this->frame_octets))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_u8_list_u16_bounds_check(&this->mask_octets))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_ethernet_frame_unmasked_set_default(bcmolt_ethernet_frame_unmasked *this)
+{
+    this->frame_octets.len = 0;
+    this->frame_octets.val = NULL;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ethernet_frame_unmasked_pack(const bcmolt_ethernet_frame_unmasked *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_u8_list_u16_pack(&this->frame_octets, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_ethernet_frame_unmasked_get_packed_length(const bcmolt_ethernet_frame_unmasked *this)
+{
+    return bcmolt_u8_list_u16_get_packed_length(&this->frame_octets);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ethernet_frame_unmasked_unpack(bcmolt_ethernet_frame_unmasked *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_u8_list_u16_unpack(&this->frame_octets, buf, extra_mem))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ethernet_frame_unmasked_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    if (!bcmolt_u8_list_u16_scan(packed, extra_mem))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ethernet_frame_unmasked_bounds_check(const bcmolt_ethernet_frame_unmasked *this)
+{
+    if (!bcmolt_u8_list_u16_bounds_check(&this->frame_octets))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_extended_guard_time_set_default(bcmolt_extended_guard_time *this)
+{
+    this->additional_preburst_guard_time = 0;
+    this->additional_postburst_guard_time = 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_extended_guard_time_pack(const bcmolt_extended_guard_time *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u32(buf, this->additional_preburst_guard_time))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->additional_postburst_guard_time))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_extended_guard_time_unpack(bcmolt_extended_guard_time *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u32(buf, &this->additional_preburst_guard_time))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->additional_postburst_guard_time))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_extended_guard_time_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 8);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_extended_guard_time_bounds_check(const bcmolt_extended_guard_time *this)
+{
+    if (this->additional_preburst_guard_time > 500)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->additional_postburst_guard_time > 500)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_firmware_sw_version_set_default(bcmolt_firmware_sw_version *this)
+{
+    this->major = 0;
+    this->minor = 0;
+    this->revision = 0;
+    this->model = 0;
+    memset(this->build_time, 0, 32);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_firmware_sw_version_pack(const bcmolt_firmware_sw_version *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u8(buf, this->major))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->minor))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->revision))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->model))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write(buf, this->build_time, 32))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_firmware_sw_version_unpack(bcmolt_firmware_sw_version *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u8(buf, &this->major))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->minor))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->revision))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->model))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read(buf, this->build_time, 32))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_firmware_sw_version_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 39);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_firmware_sw_version_bounds_check(const bcmolt_firmware_sw_version *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gem_port_configuration_set_default(bcmolt_gem_port_configuration *this)
+{
+    this->direction = BCMOLT_GEM_PORT_DIRECTION_DOWNSTREAM;
+    this->type = BCMOLT_GEM_PORT_TYPE_UNICAST;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gem_port_configuration_pack(const bcmolt_gem_port_configuration *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_gem_port_direction_pack(this->direction, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_gem_port_type_pack(this->type, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gem_port_configuration_unpack(bcmolt_gem_port_configuration *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_gem_port_direction_unpack(&this->direction, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_gem_port_type_unpack(&this->type, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gem_port_configuration_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 2);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gem_port_configuration_bounds_check(const bcmolt_gem_port_configuration *this)
+{
+    switch (this->direction)
+    {
+        case BCMOLT_GEM_PORT_DIRECTION_DOWNSTREAM:
+            break;
+        case BCMOLT_GEM_PORT_DIRECTION_UPSTREAM:
+            break;
+        case BCMOLT_GEM_PORT_DIRECTION_BIDIRECTIONAL:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->type)
+    {
+        case BCMOLT_GEM_PORT_TYPE_UNICAST:
+            break;
+        case BCMOLT_GEM_PORT_TYPE_MULTICAST:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_alloc_with_state_set_default(bcmolt_gpon_alloc_with_state *this)
+{
+    this->alloc_id = (bcmolt_gpon_alloc_id) 0;
+    this->state = BCMOLT_ALLOC_STATE_NOT_CONFIGURED;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_with_state_pack(const bcmolt_gpon_alloc_with_state *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u16(buf, (uint16_t) this->alloc_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_alloc_state_pack(this->state, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_with_state_unpack(bcmolt_gpon_alloc_with_state *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->alloc_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_alloc_state_unpack(&this->state, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_with_state_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 3);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_with_state_bounds_check(const bcmolt_gpon_alloc_with_state *this)
+{
+    if (this->alloc_id > (bcmolt_gpon_alloc_id) 4095)
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (this->state)
+    {
+        case BCMOLT_ALLOC_STATE_NOT_CONFIGURED:
+            break;
+        case BCMOLT_ALLOC_STATE_INACTIVE:
+            break;
+        case BCMOLT_ALLOC_STATE_PROCESSING:
+            break;
+        case BCMOLT_ALLOC_STATE_ACTIVE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_alloc_with_state_list_u16_max_32_set_default(bcmolt_gpon_alloc_with_state_list_u16_max_32 *this)
+{
+    this->len = 0;
+    this->val = NULL;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_with_state_list_u16_max_32_pack(const bcmolt_gpon_alloc_with_state_list_u16_max_32 *this, bcmolt_buf *buf)
+{
+    uint16_t i0;
+    if (!bcmolt_buf_write_u16(buf, this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_gpon_alloc_with_state_list_u16_max_32\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+        return BCMOS_FALSE;
+    }
+
+    if (this->len > 32)
+    {
+        return BCMOS_FALSE;
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_gpon_alloc_with_state_pack(&this->val[i0], buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_alloc_with_state_list_u16_max_32_get_packed_length(const bcmolt_gpon_alloc_with_state_list_u16_max_32 *this)
+{
+    return 2 + (3 * this->len);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_with_state_list_u16_max_32_unpack(bcmolt_gpon_alloc_with_state_list_u16_max_32 *this, bcmolt_buf *buf, void **extra_mem)
+{
+    uint16_t i0;
+    if (!bcmolt_buf_read_u16(buf, &this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        if (extra_mem == NULL)
+        {
+            bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_gpon_alloc_with_state_list_u16_max_32\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+            return BCMOS_FALSE;
+        }
+        else
+        {
+            this->val = (bcmolt_gpon_alloc_with_state *) *extra_mem;
+            *extra_mem = ((uint8_t *) *extra_mem) + BCMOS_ROUND_TO_WORD(this->len * sizeof(bcmolt_gpon_alloc_with_state));
+        }
+    }
+
+    if (this->len > 32)
+    {
+        return BCMOS_FALSE;
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_gpon_alloc_with_state_unpack(&this->val[i0], buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_with_state_list_u16_max_32_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    uint16_t len;
+    if (!bcmolt_buf_read_u16(packed, &len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *extra_mem += BCMOS_ROUND_TO_WORD(sizeof(bcmolt_gpon_alloc_with_state) * len);
+    if (!bcmolt_buf_skip(packed, len * 3))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_with_state_list_u16_max_32_bounds_check(const bcmolt_gpon_alloc_with_state_list_u16_max_32 *this)
+{
+    if (this->len > 32)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_debug_flow_config_set_default(bcmolt_gpon_debug_flow_config *this)
+{
+    this->untagged_flow = BCMOLT_CONTROL_STATE_DISABLE;
+    this->untagged_vid = (bcmolt_vlan_id) 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_debug_flow_config_pack(const bcmolt_gpon_debug_flow_config *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_control_state_pack(this->untagged_flow, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u16(buf, (uint16_t) this->untagged_vid))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_debug_flow_config_unpack(bcmolt_gpon_debug_flow_config *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_control_state_unpack(&this->untagged_flow, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->untagged_vid))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_debug_flow_config_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 3);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_debug_flow_config_bounds_check(const bcmolt_gpon_debug_flow_config *this)
+{
+    switch (this->untagged_flow)
+    {
+        case BCMOLT_CONTROL_STATE_DISABLE:
+            break;
+        case BCMOLT_CONTROL_STATE_ENABLE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    if (this->untagged_vid > (bcmolt_vlan_id) 4095)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_gem_id_list_u8_max_16_set_default(bcmolt_gpon_gem_id_list_u8_max_16 *this)
+{
+    this->len = 0;
+    this->val = NULL;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_id_list_u8_max_16_pack(const bcmolt_gpon_gem_id_list_u8_max_16 *this, bcmolt_buf *buf)
+{
+    uint8_t i0;
+    if (!bcmolt_buf_write_u8(buf, this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_gpon_gem_id_list_u8_max_16\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+        return BCMOS_FALSE;
+    }
+
+    if (this->len > 16)
+    {
+        return BCMOS_FALSE;
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->val[i0]))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_gem_id_list_u8_max_16_get_packed_length(const bcmolt_gpon_gem_id_list_u8_max_16 *this)
+{
+    return 1 + (2 * this->len);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_id_list_u8_max_16_unpack(bcmolt_gpon_gem_id_list_u8_max_16 *this, bcmolt_buf *buf, void **extra_mem)
+{
+    uint8_t i0;
+    if (!bcmolt_buf_read_u8(buf, &this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        if (extra_mem == NULL)
+        {
+            bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_gpon_gem_id_list_u8_max_16\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+            return BCMOS_FALSE;
+        }
+        else
+        {
+            this->val = (bcmolt_gpon_gem_id *) *extra_mem;
+            *extra_mem = ((uint8_t *) *extra_mem) + BCMOS_ROUND_TO_WORD(this->len * sizeof(bcmolt_gpon_gem_id));
+        }
+    }
+
+    if (this->len > 16)
+    {
+        return BCMOS_FALSE;
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->val[i0]))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_id_list_u8_max_16_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    uint8_t len;
+    if (!bcmolt_buf_read_u8(packed, &len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *extra_mem += BCMOS_ROUND_TO_WORD(sizeof(bcmolt_gpon_gem_id) * len);
+    if (!bcmolt_buf_skip(packed, len * 2))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_id_list_u8_max_16_bounds_check(const bcmolt_gpon_gem_id_list_u8_max_16 *this)
+{
+    if (this->len > 16)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_gem_port_with_state_set_default(bcmolt_gpon_gem_port_with_state *this)
+{
+    this->gem_id = (bcmolt_gpon_gem_id) 0;
+    this->state = BCMOLT_GPON_GEM_PORT_STATE_NOT_CONFIGURED;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_with_state_pack(const bcmolt_gpon_gem_port_with_state *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u16(buf, (uint16_t) this->gem_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_gpon_gem_port_state_pack(this->state, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_with_state_unpack(bcmolt_gpon_gem_port_with_state *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->gem_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_gpon_gem_port_state_unpack(&this->state, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_with_state_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 3);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_with_state_bounds_check(const bcmolt_gpon_gem_port_with_state *this)
+{
+    if (this->gem_id > (bcmolt_gpon_gem_id) 4095)
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (this->state)
+    {
+        case BCMOLT_GPON_GEM_PORT_STATE_NOT_CONFIGURED:
+            break;
+        case BCMOLT_GPON_GEM_PORT_STATE_INACTIVE:
+            break;
+        case BCMOLT_GPON_GEM_PORT_STATE_PROCESSING:
+            break;
+        case BCMOLT_GPON_GEM_PORT_STATE_ACTIVE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_gem_port_with_state_list_u16_max_128_set_default(bcmolt_gpon_gem_port_with_state_list_u16_max_128 *this)
+{
+    this->len = 0;
+    this->val = NULL;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_with_state_list_u16_max_128_pack(const bcmolt_gpon_gem_port_with_state_list_u16_max_128 *this, bcmolt_buf *buf)
+{
+    uint16_t i0;
+    if (!bcmolt_buf_write_u16(buf, this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_gpon_gem_port_with_state_list_u16_max_128\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+        return BCMOS_FALSE;
+    }
+
+    if (this->len > 128)
+    {
+        return BCMOS_FALSE;
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_gpon_gem_port_with_state_pack(&this->val[i0], buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_gem_port_with_state_list_u16_max_128_get_packed_length(const bcmolt_gpon_gem_port_with_state_list_u16_max_128 *this)
+{
+    return 2 + (3 * this->len);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_with_state_list_u16_max_128_unpack(bcmolt_gpon_gem_port_with_state_list_u16_max_128 *this, bcmolt_buf *buf, void **extra_mem)
+{
+    uint16_t i0;
+    if (!bcmolt_buf_read_u16(buf, &this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        if (extra_mem == NULL)
+        {
+            bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_gpon_gem_port_with_state_list_u16_max_128\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+            return BCMOS_FALSE;
+        }
+        else
+        {
+            this->val = (bcmolt_gpon_gem_port_with_state *) *extra_mem;
+            *extra_mem = ((uint8_t *) *extra_mem) + BCMOS_ROUND_TO_WORD(this->len * sizeof(bcmolt_gpon_gem_port_with_state));
+        }
+    }
+
+    if (this->len > 128)
+    {
+        return BCMOS_FALSE;
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_gpon_gem_port_with_state_unpack(&this->val[i0], buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_with_state_list_u16_max_128_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    uint16_t len;
+    if (!bcmolt_buf_read_u16(packed, &len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *extra_mem += BCMOS_ROUND_TO_WORD(sizeof(bcmolt_gpon_gem_port_with_state) * len);
+    if (!bcmolt_buf_skip(packed, len * 3))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_with_state_list_u16_max_128_bounds_check(const bcmolt_gpon_gem_port_with_state_list_u16_max_128 *this)
+{
+    if (this->len > 128)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_gem_port_with_state_list_u16_max_256_set_default(bcmolt_gpon_gem_port_with_state_list_u16_max_256 *this)
+{
+    this->len = 0;
+    this->val = NULL;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_with_state_list_u16_max_256_pack(const bcmolt_gpon_gem_port_with_state_list_u16_max_256 *this, bcmolt_buf *buf)
+{
+    uint16_t i0;
+    if (!bcmolt_buf_write_u16(buf, this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_gpon_gem_port_with_state_list_u16_max_256\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+        return BCMOS_FALSE;
+    }
+
+    if (this->len > 256)
+    {
+        return BCMOS_FALSE;
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_gpon_gem_port_with_state_pack(&this->val[i0], buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_gem_port_with_state_list_u16_max_256_get_packed_length(const bcmolt_gpon_gem_port_with_state_list_u16_max_256 *this)
+{
+    return 2 + (3 * this->len);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_with_state_list_u16_max_256_unpack(bcmolt_gpon_gem_port_with_state_list_u16_max_256 *this, bcmolt_buf *buf, void **extra_mem)
+{
+    uint16_t i0;
+    if (!bcmolt_buf_read_u16(buf, &this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        if (extra_mem == NULL)
+        {
+            bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_gpon_gem_port_with_state_list_u16_max_256\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+            return BCMOS_FALSE;
+        }
+        else
+        {
+            this->val = (bcmolt_gpon_gem_port_with_state *) *extra_mem;
+            *extra_mem = ((uint8_t *) *extra_mem) + BCMOS_ROUND_TO_WORD(this->len * sizeof(bcmolt_gpon_gem_port_with_state));
+        }
+    }
+
+    if (this->len > 256)
+    {
+        return BCMOS_FALSE;
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_gpon_gem_port_with_state_unpack(&this->val[i0], buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_with_state_list_u16_max_256_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    uint16_t len;
+    if (!bcmolt_buf_read_u16(packed, &len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *extra_mem += BCMOS_ROUND_TO_WORD(sizeof(bcmolt_gpon_gem_port_with_state) * len);
+    if (!bcmolt_buf_skip(packed, len * 3))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_with_state_list_u16_max_256_bounds_check(const bcmolt_gpon_gem_port_with_state_list_u16_max_256 *this)
+{
+    if (this->len > 256)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_iwf_debug_flow_config_set_default(bcmolt_gpon_iwf_debug_flow_config *this)
+{
+    this->learn_untagged_flow_vids = BCMOS_FALSE;
+    this->untagged_flow_shaping_ms_per_sec = 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_debug_flow_config_pack(const bcmolt_gpon_iwf_debug_flow_config *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_bool(buf, this->learn_untagged_flow_vids))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u16(buf, this->untagged_flow_shaping_ms_per_sec))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_debug_flow_config_unpack(bcmolt_gpon_iwf_debug_flow_config *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_bool(buf, &this->learn_untagged_flow_vids))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u16(buf, &this->untagged_flow_shaping_ms_per_sec))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_debug_flow_config_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 3);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_debug_flow_config_bounds_check(const bcmolt_gpon_iwf_debug_flow_config *this)
+{
+    if (this->untagged_flow_shaping_ms_per_sec > 1000)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_key_exchange_set_default(bcmolt_gpon_key_exchange *this)
+{
+    this->interval = 10000;
+    this->control = BCMOLT_CONTROL_STATE_DISABLE;
+    this->mode = BCMOLT_KEY_EXCHANGE_MODE_NORMAL;
+    this->encrypted_ports_only = BCMOLT_CONTROL_STATE_ENABLE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_key_exchange_pack(const bcmolt_gpon_key_exchange *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u32(buf, this->interval))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_control_state_pack(this->control, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_key_exchange_mode_pack(this->mode, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_control_state_pack(this->encrypted_ports_only, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_key_exchange_unpack(bcmolt_gpon_key_exchange *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u32(buf, &this->interval))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_control_state_unpack(&this->control, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_key_exchange_mode_unpack(&this->mode, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_control_state_unpack(&this->encrypted_ports_only, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_key_exchange_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 7);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_key_exchange_bounds_check(const bcmolt_gpon_key_exchange *this)
+{
+    if (this->interval < 1000)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->interval > 3600000UL)
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (this->control)
+    {
+        case BCMOLT_CONTROL_STATE_DISABLE:
+            break;
+        case BCMOLT_CONTROL_STATE_ENABLE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->mode)
+    {
+        case BCMOLT_KEY_EXCHANGE_MODE_NORMAL:
+            break;
+        case BCMOLT_KEY_EXCHANGE_MODE_ENHANCED:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->encrypted_ports_only)
+    {
+        case BCMOLT_CONTROL_STATE_DISABLE:
+            break;
+        case BCMOLT_CONTROL_STATE_ENABLE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_mac_table_scan_result_set_default(bcmolt_gpon_mac_table_scan_result *this)
+{
+    this->vlan = (bcmolt_vlan_id) 0;
+    this->flow_id = (bcmolt_flow_id) 0;
+    this->stat = BCMOS_FALSE;
+    this->gem_port_id = (bcmolt_gpon_gem_id) 0;
+    this->onu_id = (bcmolt_gpon_onu_id) 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_mac_table_scan_result_pack(const bcmolt_gpon_mac_table_scan_result *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u16(buf, (uint16_t) this->vlan))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u16(buf, (uint16_t) this->flow_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_bool(buf, this->stat))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u16(buf, (uint16_t) this->gem_port_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u16(buf, (uint16_t) this->onu_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_mac_table_scan_result_unpack(bcmolt_gpon_mac_table_scan_result *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->vlan))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->flow_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_bool(buf, &this->stat))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->gem_port_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->onu_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_mac_table_scan_result_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 9);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_mac_table_scan_result_bounds_check(const bcmolt_gpon_mac_table_scan_result *this)
+{
+    if (this->flow_id > (bcmolt_flow_id) 4095)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->gem_port_id > (bcmolt_gpon_gem_id) 4095)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->onu_id > (bcmolt_gpon_onu_id) 127)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_mac_table_scan_result_list_u16_set_default(bcmolt_gpon_mac_table_scan_result_list_u16 *this)
+{
+    this->len = 0;
+    this->val = NULL;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_mac_table_scan_result_list_u16_pack(const bcmolt_gpon_mac_table_scan_result_list_u16 *this, bcmolt_buf *buf)
+{
+    uint16_t i0;
+    if (!bcmolt_buf_write_u16(buf, this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_gpon_mac_table_scan_result_list_u16\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+        return BCMOS_FALSE;
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_gpon_mac_table_scan_result_pack(&this->val[i0], buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_mac_table_scan_result_list_u16_get_packed_length(const bcmolt_gpon_mac_table_scan_result_list_u16 *this)
+{
+    return 2 + (9 * this->len);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_mac_table_scan_result_list_u16_unpack(bcmolt_gpon_mac_table_scan_result_list_u16 *this, bcmolt_buf *buf, void **extra_mem)
+{
+    uint16_t i0;
+    if (!bcmolt_buf_read_u16(buf, &this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        if (extra_mem == NULL)
+        {
+            bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_gpon_mac_table_scan_result_list_u16\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+            return BCMOS_FALSE;
+        }
+        else
+        {
+            this->val = (bcmolt_gpon_mac_table_scan_result *) *extra_mem;
+            *extra_mem = ((uint8_t *) *extra_mem) + BCMOS_ROUND_TO_WORD(this->len * sizeof(bcmolt_gpon_mac_table_scan_result));
+        }
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_gpon_mac_table_scan_result_unpack(&this->val[i0], buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_mac_table_scan_result_list_u16_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    uint16_t len;
+    if (!bcmolt_buf_read_u16(packed, &len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *extra_mem += BCMOS_ROUND_TO_WORD(sizeof(bcmolt_gpon_mac_table_scan_result) * len);
+    if (!bcmolt_buf_skip(packed, len * 9))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_mac_table_scan_result_list_u16_bounds_check(const bcmolt_gpon_mac_table_scan_result_list_u16 *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_ni_debug_set_default(bcmolt_gpon_ni_debug *this)
+{
+    this->number_of_gem_ports_per_onu = 64;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_debug_pack(const bcmolt_gpon_ni_debug *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u16(buf, this->number_of_gem_ports_per_onu))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_debug_unpack(bcmolt_gpon_ni_debug *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u16(buf, &this->number_of_gem_ports_per_onu))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_debug_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 2);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_debug_bounds_check(const bcmolt_gpon_ni_debug *this)
+{
+    if (this->number_of_gem_ports_per_onu < 8)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->number_of_gem_ports_per_onu > 256)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_activation_set_default(bcmolt_gpon_onu_activation *this)
+{
+    this->key_exchange = BCMOLT_CONTROL_STATE_DISABLE;
+    this->password_authentication = BCMOLT_CONTROL_STATE_ENABLE;
+    this->fail_due_to_password_authentication_failure = BCMOLT_CONTROL_STATE_ENABLE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_activation_pack(const bcmolt_gpon_onu_activation *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_control_state_pack(this->key_exchange, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_control_state_pack(this->password_authentication, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_control_state_pack(this->fail_due_to_password_authentication_failure, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_activation_unpack(bcmolt_gpon_onu_activation *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_control_state_unpack(&this->key_exchange, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_control_state_unpack(&this->password_authentication, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_control_state_unpack(&this->fail_due_to_password_authentication_failure, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_activation_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 3);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_activation_bounds_check(const bcmolt_gpon_onu_activation *this)
+{
+    switch (this->key_exchange)
+    {
+        case BCMOLT_CONTROL_STATE_DISABLE:
+            break;
+        case BCMOLT_CONTROL_STATE_ENABLE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->password_authentication)
+    {
+        case BCMOLT_CONTROL_STATE_DISABLE:
+            break;
+        case BCMOLT_CONTROL_STATE_ENABLE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->fail_due_to_password_authentication_failure)
+    {
+        case BCMOLT_CONTROL_STATE_DISABLE:
+            break;
+        case BCMOLT_CONTROL_STATE_ENABLE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_alarm_state_set_default(bcmolt_gpon_onu_alarm_state *this)
+{
+    this->losi = BCMOLT_STATUS_OFF;
+    this->lofi = BCMOLT_STATUS_OFF;
+    this->loami = BCMOLT_STATUS_OFF;
+    this->dgi = BCMOLT_STATUS_OFF;
+    this->tiwi = BCMOLT_STATUS_OFF;
+    this->dowi = BCMOLT_STATUS_OFF;
+    this->sufi = BCMOLT_STATUS_OFF;
+    this->sfi = BCMOLT_STATUS_OFF;
+    this->sdi = BCMOLT_STATUS_OFF;
+    this->dfi = BCMOLT_STATUS_OFF;
+    this->loai = BCMOLT_STATUS_OFF;
+    this->loki = BCMOLT_STATUS_OFF;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_alarm_state_pack(const bcmolt_gpon_onu_alarm_state *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_status_pack(this->losi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_pack(this->lofi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_pack(this->loami, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_pack(this->dgi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_pack(this->tiwi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_pack(this->dowi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_pack(this->sufi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_pack(this->sfi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_pack(this->sdi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_pack(this->dfi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_pack(this->loai, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_pack(this->loki, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_alarm_state_unpack(bcmolt_gpon_onu_alarm_state *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_status_unpack(&this->losi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_unpack(&this->lofi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_unpack(&this->loami, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_unpack(&this->dgi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_unpack(&this->tiwi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_unpack(&this->dowi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_unpack(&this->sufi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_unpack(&this->sfi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_unpack(&this->sdi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_unpack(&this->dfi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_unpack(&this->loai, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_unpack(&this->loki, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_alarm_state_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 12);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_alarm_state_bounds_check(const bcmolt_gpon_onu_alarm_state *this)
+{
+    switch (this->losi)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->lofi)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->loami)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->dgi)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->tiwi)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->dowi)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->sufi)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->sfi)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->sdi)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->dfi)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->loai)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->loki)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_alarms_set_default(bcmolt_gpon_onu_alarms *this)
+{
+    this->losi = BCMOLT_STATUS_OFF;
+    this->lofi = BCMOLT_STATUS_OFF;
+    this->loami = BCMOLT_STATUS_OFF;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_alarms_pack(const bcmolt_gpon_onu_alarms *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_status_pack(this->losi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_pack(this->lofi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_pack(this->loami, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_alarms_unpack(bcmolt_gpon_onu_alarms *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_status_unpack(&this->losi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_unpack(&this->lofi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_unpack(&this->loami, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_alarms_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 3);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_alarms_bounds_check(const bcmolt_gpon_onu_alarms *this)
+{
+    switch (this->losi)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->lofi)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->loami)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_alarms_thresholds_set_default(bcmolt_gpon_onu_alarms_thresholds *this)
+{
+    this->losi = 4;
+    this->lofi = 4;
+    this->loami = 3;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_alarms_thresholds_pack(const bcmolt_gpon_onu_alarms_thresholds *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u8(buf, this->losi))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->lofi))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->loami))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_alarms_thresholds_unpack(bcmolt_gpon_onu_alarms_thresholds *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u8(buf, &this->losi))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->lofi))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->loami))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_alarms_thresholds_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 3);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_alarms_thresholds_bounds_check(const bcmolt_gpon_onu_alarms_thresholds *this)
+{
+    if (this->losi < 1)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->losi > 15)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->lofi < 1)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->lofi > 15)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->loami < 1)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->loami > 15)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_eqd_set_default(bcmolt_gpon_onu_eqd *this)
+{
+    this->onu_id = (bcmolt_gpon_onu_id) 0;
+    this->eqd = 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_eqd_pack(const bcmolt_gpon_onu_eqd *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u16(buf, (uint16_t) this->onu_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->eqd))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_eqd_unpack(bcmolt_gpon_onu_eqd *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->onu_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->eqd))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_eqd_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 6);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_eqd_bounds_check(const bcmolt_gpon_onu_eqd *this)
+{
+    if (this->onu_id > (bcmolt_gpon_onu_id) 127)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_eqd_list_u32_set_default(bcmolt_gpon_onu_eqd_list_u32 *this)
+{
+    this->len = 0;
+    this->val = NULL;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_eqd_list_u32_pack(const bcmolt_gpon_onu_eqd_list_u32 *this, bcmolt_buf *buf)
+{
+    uint32_t i0;
+    if (!bcmolt_buf_write_u32(buf, this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_gpon_onu_eqd_list_u32\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+        return BCMOS_FALSE;
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_gpon_onu_eqd_pack(&this->val[i0], buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_eqd_list_u32_get_packed_length(const bcmolt_gpon_onu_eqd_list_u32 *this)
+{
+    return 4 + (6 * this->len);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_eqd_list_u32_unpack(bcmolt_gpon_onu_eqd_list_u32 *this, bcmolt_buf *buf, void **extra_mem)
+{
+    uint32_t i0;
+    if (!bcmolt_buf_read_u32(buf, &this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        if (extra_mem == NULL)
+        {
+            bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_gpon_onu_eqd_list_u32\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+            return BCMOS_FALSE;
+        }
+        else
+        {
+            this->val = (bcmolt_gpon_onu_eqd *) *extra_mem;
+            *extra_mem = ((uint8_t *) *extra_mem) + BCMOS_ROUND_TO_WORD(this->len * sizeof(bcmolt_gpon_onu_eqd));
+        }
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_gpon_onu_eqd_unpack(&this->val[i0], buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_eqd_list_u32_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    uint32_t len;
+    if (!bcmolt_buf_read_u32(packed, &len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *extra_mem += BCMOS_ROUND_TO_WORD(sizeof(bcmolt_gpon_onu_eqd) * len);
+    if (!bcmolt_buf_skip(packed, len * 6))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_eqd_list_u32_bounds_check(const bcmolt_gpon_onu_eqd_list_u32 *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_id_list_u32_max_256_set_default(bcmolt_gpon_onu_id_list_u32_max_256 *this)
+{
+    this->len = 0;
+    this->val = NULL;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_id_list_u32_max_256_pack(const bcmolt_gpon_onu_id_list_u32_max_256 *this, bcmolt_buf *buf)
+{
+    uint32_t i0;
+    if (!bcmolt_buf_write_u32(buf, this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_gpon_onu_id_list_u32_max_256\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+        return BCMOS_FALSE;
+    }
+
+    if (this->len > 256)
+    {
+        return BCMOS_FALSE;
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->val[i0]))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_id_list_u32_max_256_get_packed_length(const bcmolt_gpon_onu_id_list_u32_max_256 *this)
+{
+    return 4 + (2 * this->len);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_id_list_u32_max_256_unpack(bcmolt_gpon_onu_id_list_u32_max_256 *this, bcmolt_buf *buf, void **extra_mem)
+{
+    uint32_t i0;
+    if (!bcmolt_buf_read_u32(buf, &this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        if (extra_mem == NULL)
+        {
+            bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_gpon_onu_id_list_u32_max_256\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+            return BCMOS_FALSE;
+        }
+        else
+        {
+            this->val = (bcmolt_gpon_onu_id *) *extra_mem;
+            *extra_mem = ((uint8_t *) *extra_mem) + BCMOS_ROUND_TO_WORD(this->len * sizeof(bcmolt_gpon_onu_id));
+        }
+    }
+
+    if (this->len > 256)
+    {
+        return BCMOS_FALSE;
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->val[i0]))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_id_list_u32_max_256_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    uint32_t len;
+    if (!bcmolt_buf_read_u32(packed, &len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *extra_mem += BCMOS_ROUND_TO_WORD(sizeof(bcmolt_gpon_onu_id) * len);
+    if (!bcmolt_buf_skip(packed, len * 2))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_id_list_u32_max_256_bounds_check(const bcmolt_gpon_onu_id_list_u32_max_256 *this)
+{
+    if (this->len > 256)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_upgrade_params_set_default(bcmolt_gpon_onu_upgrade_params *this)
+{
+    this->response_timeout_ms = 1000;
+    this->max_retry_count = 23;
+    this->omci_format = BCMOLT_OMCI_DEVICE_ID_EXTENDED;
+    this->window_size = 32;
+    this->activate_commit = BCMOS_FALSE;
+    this->delay_for_commit_ms = 40000UL;
+    this->max_activation_attempts = 23;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_upgrade_params_pack(const bcmolt_gpon_onu_upgrade_params *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u32(buf, this->response_timeout_ms))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->max_retry_count))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_omci_device_id_pack(this->omci_format, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u16(buf, this->window_size))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_bool(buf, this->activate_commit))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->delay_for_commit_ms))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->max_activation_attempts))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_upgrade_params_unpack(bcmolt_gpon_onu_upgrade_params *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u32(buf, &this->response_timeout_ms))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->max_retry_count))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_omci_device_id_unpack(&this->omci_format, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u16(buf, &this->window_size))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_bool(buf, &this->activate_commit))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->delay_for_commit_ms))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->max_activation_attempts))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_upgrade_params_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 14);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_upgrade_params_bounds_check(const bcmolt_gpon_onu_upgrade_params *this)
+{
+    if (this->response_timeout_ms < 50)
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (this->omci_format)
+    {
+        case BCMOLT_OMCI_DEVICE_ID_BASELINE:
+            break;
+        case BCMOLT_OMCI_DEVICE_ID_EXTENDED:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    if (this->window_size < 1)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->window_size > 256)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_upgrade_status_set_default(bcmolt_gpon_onu_upgrade_status *this)
+{
+    this->onu_id = (bcmolt_pon_onu_id) 0;
+    this->error_code = BCMOLT_GPON_ONU_UPGRADE_RETURN_CODE_SUCCESS;
+    this->fail_reason = BCMOLT_OMCI_RESULT_CODE_NO_ERROR;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_upgrade_status_pack(const bcmolt_gpon_onu_upgrade_status *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u16(buf, (uint16_t) this->onu_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_gpon_onu_upgrade_return_code_pack(this->error_code, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_omci_result_code_pack(this->fail_reason, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_upgrade_status_unpack(bcmolt_gpon_onu_upgrade_status *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->onu_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_gpon_onu_upgrade_return_code_unpack(&this->error_code, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_omci_result_code_unpack(&this->fail_reason, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_upgrade_status_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 4);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_upgrade_status_bounds_check(const bcmolt_gpon_onu_upgrade_status *this)
+{
+    if (this->onu_id > (bcmolt_pon_onu_id) 511)
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (this->error_code)
+    {
+        case BCMOLT_GPON_ONU_UPGRADE_RETURN_CODE_SUCCESS:
+            break;
+        case BCMOLT_GPON_ONU_UPGRADE_RETURN_CODE_ONU_RESPONSE_TIMEOUT:
+            break;
+        case BCMOLT_GPON_ONU_UPGRADE_RETURN_CODE_ONU_ERROR_RESPONSE:
+            break;
+        case BCMOLT_GPON_ONU_UPGRADE_RETURN_CODE_TCI_MISMATCH:
+            break;
+        case BCMOLT_GPON_ONU_UPGRADE_RETURN_CODE_GET_IMAGE_FAILED:
+            break;
+        case BCMOLT_GPON_ONU_UPGRADE_RETURN_CODE_ACTIVATION_FAILED:
+            break;
+        case BCMOLT_GPON_ONU_UPGRADE_RETURN_CODE_INTERNAL:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->fail_reason)
+    {
+        case BCMOLT_OMCI_RESULT_CODE_NO_ERROR:
+            break;
+        case BCMOLT_OMCI_RESULT_CODE_PROCESSING_ERROR:
+            break;
+        case BCMOLT_OMCI_RESULT_CODE_NOT_SUPPORTED:
+            break;
+        case BCMOLT_OMCI_RESULT_CODE_PARAMETER_ERROR:
+            break;
+        case BCMOLT_OMCI_RESULT_CODE_UNKNOWN_ENTITY:
+            break;
+        case BCMOLT_OMCI_RESULT_CODE_UNKNOWN_INSTANCE:
+            break;
+        case BCMOLT_OMCI_RESULT_CODE_DEVICE_BUSY:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_upgrade_status_list_u32_set_default(bcmolt_gpon_onu_upgrade_status_list_u32 *this)
+{
+    this->len = 0;
+    this->val = NULL;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_upgrade_status_list_u32_pack(const bcmolt_gpon_onu_upgrade_status_list_u32 *this, bcmolt_buf *buf)
+{
+    uint32_t i0;
+    if (!bcmolt_buf_write_u32(buf, this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_gpon_onu_upgrade_status_list_u32\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+        return BCMOS_FALSE;
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_gpon_onu_upgrade_status_pack(&this->val[i0], buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_upgrade_status_list_u32_get_packed_length(const bcmolt_gpon_onu_upgrade_status_list_u32 *this)
+{
+    return 4 + (4 * this->len);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_upgrade_status_list_u32_unpack(bcmolt_gpon_onu_upgrade_status_list_u32 *this, bcmolt_buf *buf, void **extra_mem)
+{
+    uint32_t i0;
+    if (!bcmolt_buf_read_u32(buf, &this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        if (extra_mem == NULL)
+        {
+            bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_gpon_onu_upgrade_status_list_u32\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+            return BCMOS_FALSE;
+        }
+        else
+        {
+            this->val = (bcmolt_gpon_onu_upgrade_status *) *extra_mem;
+            *extra_mem = ((uint8_t *) *extra_mem) + BCMOS_ROUND_TO_WORD(this->len * sizeof(bcmolt_gpon_onu_upgrade_status));
+        }
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_gpon_onu_upgrade_status_unpack(&this->val[i0], buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_upgrade_status_list_u32_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    uint32_t len;
+    if (!bcmolt_buf_read_u32(packed, &len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *extra_mem += BCMOS_ROUND_TO_WORD(sizeof(bcmolt_gpon_onu_upgrade_status) * len);
+    if (!bcmolt_buf_skip(packed, len * 4))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_upgrade_status_list_u32_bounds_check(const bcmolt_gpon_onu_upgrade_status_list_u32 *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_with_state_set_default(bcmolt_gpon_onu_with_state *this)
+{
+    this->onu_id = (bcmolt_gpon_onu_id) 0;
+    this->state = BCMOLT_ONU_STATE_NOT_CONFIGURED;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_with_state_pack(const bcmolt_gpon_onu_with_state *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u16(buf, (uint16_t) this->onu_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_onu_state_pack(this->state, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_with_state_unpack(bcmolt_gpon_onu_with_state *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->onu_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_onu_state_unpack(&this->state, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_with_state_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 3);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_with_state_bounds_check(const bcmolt_gpon_onu_with_state *this)
+{
+    if (this->onu_id > (bcmolt_gpon_onu_id) 127)
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (this->state)
+    {
+        case BCMOLT_ONU_STATE_NOT_CONFIGURED:
+            break;
+        case BCMOLT_ONU_STATE_INACTIVE:
+            break;
+        case BCMOLT_ONU_STATE_ACTIVE:
+            break;
+        case BCMOLT_ONU_STATE_ACTIVE_STANDBY:
+            break;
+        case BCMOLT_ONU_STATE_DISABLED:
+            break;
+        case BCMOLT_ONU_STATE_AWAKE_FREE:
+            break;
+        case BCMOLT_ONU_STATE_PROCESSING:
+            break;
+        case BCMOLT_ONU_STATE_LOW_POWER_DOZE:
+            break;
+        case BCMOLT_ONU_STATE_LOW_POWER_SLEEP:
+            break;
+        case BCMOLT_ONU_STATE_LOW_POWER_WATCH:
+            break;
+        case BCMOLT_ONU_STATE_UNAWARE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_with_state_list_u16_max_128_set_default(bcmolt_gpon_onu_with_state_list_u16_max_128 *this)
+{
+    this->len = 0;
+    this->val = NULL;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_with_state_list_u16_max_128_pack(const bcmolt_gpon_onu_with_state_list_u16_max_128 *this, bcmolt_buf *buf)
+{
+    uint16_t i0;
+    if (!bcmolt_buf_write_u16(buf, this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_gpon_onu_with_state_list_u16_max_128\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+        return BCMOS_FALSE;
+    }
+
+    if (this->len > 128)
+    {
+        return BCMOS_FALSE;
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_gpon_onu_with_state_pack(&this->val[i0], buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_with_state_list_u16_max_128_get_packed_length(const bcmolt_gpon_onu_with_state_list_u16_max_128 *this)
+{
+    return 2 + (3 * this->len);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_with_state_list_u16_max_128_unpack(bcmolt_gpon_onu_with_state_list_u16_max_128 *this, bcmolt_buf *buf, void **extra_mem)
+{
+    uint16_t i0;
+    if (!bcmolt_buf_read_u16(buf, &this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        if (extra_mem == NULL)
+        {
+            bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_gpon_onu_with_state_list_u16_max_128\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+            return BCMOS_FALSE;
+        }
+        else
+        {
+            this->val = (bcmolt_gpon_onu_with_state *) *extra_mem;
+            *extra_mem = ((uint8_t *) *extra_mem) + BCMOS_ROUND_TO_WORD(this->len * sizeof(bcmolt_gpon_onu_with_state));
+        }
+    }
+
+    if (this->len > 128)
+    {
+        return BCMOS_FALSE;
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_gpon_onu_with_state_unpack(&this->val[i0], buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_with_state_list_u16_max_128_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    uint16_t len;
+    if (!bcmolt_buf_read_u16(packed, &len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *extra_mem += BCMOS_ROUND_TO_WORD(sizeof(bcmolt_gpon_onu_with_state) * len);
+    if (!bcmolt_buf_skip(packed, len * 3))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_with_state_list_u16_max_128_bounds_check(const bcmolt_gpon_onu_with_state_list_u16_max_128 *this)
+{
+    if (this->len > 128)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_rssi_general_configuration_set_default(bcmolt_gpon_rssi_general_configuration *this)
+{
+    this->location = 20;
+    this->location_sign = BCMOLT_RSSI_LOCATION_SIGN_BEFORE;
+    this->start_pattern = 15;
+    this->middle_pattern = 15;
+    this->last_pattern = 15;
+    this->middle_repertition = 50;
+    this->minimum_burst = 55;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_rssi_general_configuration_pack(const bcmolt_gpon_rssi_general_configuration *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u8(buf, this->location))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_rssi_location_sign_pack(this->location_sign, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->start_pattern))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->middle_pattern))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->last_pattern))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->middle_repertition))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u16(buf, this->minimum_burst))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_rssi_general_configuration_unpack(bcmolt_gpon_rssi_general_configuration *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u8(buf, &this->location))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_rssi_location_sign_unpack(&this->location_sign, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->start_pattern))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->middle_pattern))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->last_pattern))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->middle_repertition))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u16(buf, &this->minimum_burst))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_rssi_general_configuration_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 8);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_rssi_general_configuration_bounds_check(const bcmolt_gpon_rssi_general_configuration *this)
+{
+    switch (this->location_sign)
+    {
+        case BCMOLT_RSSI_LOCATION_SIGN_BEFORE:
+            break;
+        case BCMOLT_RSSI_LOCATION_SIGN_AFTER:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_sn_acquisition_set_default(bcmolt_gpon_sn_acquisition *this)
+{
+    this->interval = 1000;
+    this->control = BCMOLT_CONTROL_STATE_DISABLE;
+    this->onu_post_discovery_mode = BCMOLT_ONU_POST_DISCOVERY_MODE_DISABLE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_sn_acquisition_pack(const bcmolt_gpon_sn_acquisition *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u32(buf, this->interval))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_control_state_pack(this->control, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_onu_post_discovery_mode_pack(this->onu_post_discovery_mode, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_sn_acquisition_unpack(bcmolt_gpon_sn_acquisition *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u32(buf, &this->interval))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_control_state_unpack(&this->control, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_onu_post_discovery_mode_unpack(&this->onu_post_discovery_mode, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_sn_acquisition_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 6);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_sn_acquisition_bounds_check(const bcmolt_gpon_sn_acquisition *this)
+{
+    if (this->interval < 1000)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->interval > 2147483UL)
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (this->control)
+    {
+        case BCMOLT_CONTROL_STATE_DISABLE:
+            break;
+        case BCMOLT_CONTROL_STATE_ENABLE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->onu_post_discovery_mode)
+    {
+        case BCMOLT_ONU_POST_DISCOVERY_MODE_NONE:
+            break;
+        case BCMOLT_ONU_POST_DISCOVERY_MODE_ACTIVATE:
+            break;
+        case BCMOLT_ONU_POST_DISCOVERY_MODE_DISABLE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_host_sw_version_set_default(bcmolt_host_sw_version *this)
+{
+    this->major = 0;
+    this->minor = 0;
+    this->revision = 0;
+    this->model = 0;
+    memset(this->build_time, 0, 32);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_host_sw_version_pack(const bcmolt_host_sw_version *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u8(buf, this->major))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->minor))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->revision))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->model))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write(buf, this->build_time, 32))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_host_sw_version_unpack(bcmolt_host_sw_version *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u8(buf, &this->major))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->minor))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->revision))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->model))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read(buf, this->build_time, 32))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_host_sw_version_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 39);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_host_sw_version_bounds_check(const bcmolt_host_sw_version *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_hw_pon_id_set_default(bcmolt_hw_pon_id *this)
+{
+    this->pon_id_1 = 0;
+    this->pon_id_2 = 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_hw_pon_id_pack(const bcmolt_hw_pon_id *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u32(buf, this->pon_id_1))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->pon_id_2))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_hw_pon_id_unpack(bcmolt_hw_pon_id *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u32(buf, &this->pon_id_1))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->pon_id_2))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_hw_pon_id_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 8);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_hw_pon_id_bounds_check(const bcmolt_hw_pon_id *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_ieee_8021as_port_identity_set_default(bcmolt_ieee_8021as_port_identity *this)
+{
+    memset(this->clock_identity, 0, sizeof(this->clock_identity));
+    this->port_number = 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ieee_8021as_port_identity_pack(const bcmolt_ieee_8021as_port_identity *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write(buf, this->clock_identity, 8))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u16(buf, this->port_number))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ieee_8021as_port_identity_unpack(bcmolt_ieee_8021as_port_identity *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read(buf, this->clock_identity, 8))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u16(buf, &this->port_number))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ieee_8021as_port_identity_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 10);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ieee_8021as_port_identity_bounds_check(const bcmolt_ieee_8021as_port_identity *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_ieee_8021as_timestamp_set_default(bcmolt_ieee_8021as_timestamp *this)
+{
+    this->seconds_high = 0;
+    this->seconds_low = 0;
+    this->nanoseconds = 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ieee_8021as_timestamp_pack(const bcmolt_ieee_8021as_timestamp *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u16(buf, this->seconds_high))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->seconds_low))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->nanoseconds))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ieee_8021as_timestamp_unpack(bcmolt_ieee_8021as_timestamp *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u16(buf, &this->seconds_high))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->seconds_low))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->nanoseconds))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ieee_8021as_timestamp_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 10);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ieee_8021as_timestamp_bounds_check(const bcmolt_ieee_8021as_timestamp *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_ieee_8021as_time_sync_set_default(bcmolt_ieee_8021as_time_sync *this)
+{
+    bcmos_mac_address_init(&this->destination_mac);
+    bcmos_mac_address_init(&this->source_mac);
+    this->eth_type_len = 0;
+    this->eth_subtype = 0;
+    memset(this->ieee_oui, 0, sizeof(this->ieee_oui));
+    this->msg_id = 0;
+    this->x = 0;
+    this->tod.seconds_high = 0;
+    this->tod.seconds_low = 0;
+    this->tod.nanoseconds = 0;
+    memset(this->port_identity.clock_identity, 0, sizeof(this->port_identity.clock_identity));
+    this->port_identity.port_number = 0;
+    this->log_msg_interval = 0;
+    this->rate_ratio = 0;
+    this->gm_time_base_indicator = 0;
+    memset(this->last_gm_phase_change, 0, sizeof(this->last_gm_phase_change));
+    this->last_frequency_change = 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ieee_8021as_time_sync_pack(const bcmolt_ieee_8021as_time_sync *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_mac_address(buf, this->destination_mac))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_mac_address(buf, this->source_mac))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u16(buf, this->eth_type_len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->eth_subtype))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write(buf, this->ieee_oui, 3))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u16(buf, this->msg_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->x))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_ieee_8021as_timestamp_pack(&this->tod, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_ieee_8021as_port_identity_pack(&this->port_identity, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_s8(buf, this->log_msg_interval))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_double(buf, this->rate_ratio))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u16(buf, this->gm_time_base_indicator))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write(buf, this->last_gm_phase_change, 12))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_s32(buf, this->last_frequency_change))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ieee_8021as_time_sync_unpack(bcmolt_ieee_8021as_time_sync *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_mac_address(buf, &this->destination_mac))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_mac_address(buf, &this->source_mac))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u16(buf, &this->eth_type_len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->eth_subtype))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read(buf, this->ieee_oui, 3))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u16(buf, &this->msg_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->x))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_ieee_8021as_timestamp_unpack(&this->tod, buf, extra_mem))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_ieee_8021as_port_identity_unpack(&this->port_identity, buf, extra_mem))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_s8(buf, &this->log_msg_interval))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_double(buf, &this->rate_ratio))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u16(buf, &this->gm_time_base_indicator))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read(buf, this->last_gm_phase_change, 12))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_s32(buf, &this->last_frequency_change))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ieee_8021as_time_sync_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 71);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ieee_8021as_time_sync_bounds_check(const bcmolt_ieee_8021as_time_sync *this)
+{
+    if (!bcmolt_ieee_8021as_timestamp_bounds_check(&this->tod))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_ieee_8021as_port_identity_bounds_check(&this->port_identity))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_indication_shaping_set_default(bcmolt_indication_shaping *this)
+{
+    this->enabled = BCMOS_FALSE;
+    this->max_rate = 1000;
+    this->max_burst = 100;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_indication_shaping_pack(const bcmolt_indication_shaping *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_bool(buf, this->enabled))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->max_rate))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->max_burst))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_indication_shaping_unpack(bcmolt_indication_shaping *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_bool(buf, &this->enabled))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->max_rate))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->max_burst))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_indication_shaping_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 9);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_indication_shaping_bounds_check(const bcmolt_indication_shaping *this)
+{
+    if (this->max_rate < 1)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->max_rate > 10000)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->max_burst < 1)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->max_burst > 10000)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_la_resync_pattern_configuration_set_default(bcmolt_la_resync_pattern_configuration *this)
+{
+    this->resync_control.start_pattern = 15;
+    this->resync_control.middle_pattern = 15;
+    this->resync_control.last_pattern = 15;
+    this->resync_control.middle_repetition = 0;
+    this->resync_control.location = 40;
+    this->ranging_resync_control.start_pattern = 15;
+    this->ranging_resync_control.middle_pattern = 15;
+    this->ranging_resync_control.last_pattern = 15;
+    this->ranging_resync_control.middle_repetition = 0;
+    this->ranging_resync_control.location = 1;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_la_resync_pattern_configuration_pack(const bcmolt_la_resync_pattern_configuration *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_resync_control_pack(&this->resync_control, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_resync_control_pack(&this->ranging_resync_control, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_la_resync_pattern_configuration_unpack(bcmolt_la_resync_pattern_configuration *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_resync_control_unpack(&this->resync_control, buf, extra_mem))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_resync_control_unpack(&this->ranging_resync_control, buf, extra_mem))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_la_resync_pattern_configuration_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 10);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_la_resync_pattern_configuration_bounds_check(const bcmolt_la_resync_pattern_configuration *this)
+{
+    if (!bcmolt_resync_control_bounds_check(&this->resync_control))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_resync_control_bounds_check(&this->ranging_resync_control))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_log_buffer_set_default(bcmolt_log_buffer *this)
+{
+    memset(this->buff, 0, 2048);
+    this->msg_to_read = 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_buffer_pack(const bcmolt_log_buffer *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write(buf, this->buff, 2048))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->msg_to_read))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_buffer_unpack(bcmolt_log_buffer *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read(buf, this->buff, 2048))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->msg_to_read))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_buffer_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 2052);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_buffer_bounds_check(const bcmolt_log_buffer *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_mac_table_configuration_set_default(bcmolt_mac_table_configuration *this)
+{
+    this->miss_fallback = BCMOLT_MAC_TABLE_MISS_FALLBACK_DROP;
+    this->default_flow_id = (bcmolt_flow_id) 0;
+    this->aging_time = 30;
+    this->learning_mode = BCMOLT_MAC_TABLE_LEARNING_MODE_NORMAL;
+    this->automatic_mac_learning = BCMOLT_CONTROL_STATE_DISABLE;
+    this->automatic_mac_aging = BCMOLT_CONTROL_STATE_DISABLE;
+    this->automatic_mac_move = BCMOLT_CONTROL_STATE_DISABLE;
+    this->automatic_static_mode = BCMOS_FALSE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_mac_table_configuration_pack(const bcmolt_mac_table_configuration *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_mac_table_miss_fallback_pack(this->miss_fallback, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u16(buf, (uint16_t) this->default_flow_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->aging_time))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_mac_table_learning_mode_pack(this->learning_mode, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_control_state_pack(this->automatic_mac_learning, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_control_state_pack(this->automatic_mac_aging, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_control_state_pack(this->automatic_mac_move, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_bool(buf, this->automatic_static_mode))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_mac_table_configuration_unpack(bcmolt_mac_table_configuration *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_mac_table_miss_fallback_unpack(&this->miss_fallback, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->default_flow_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->aging_time))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_mac_table_learning_mode_unpack(&this->learning_mode, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_control_state_unpack(&this->automatic_mac_learning, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_control_state_unpack(&this->automatic_mac_aging, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_control_state_unpack(&this->automatic_mac_move, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_bool(buf, &this->automatic_static_mode))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_mac_table_configuration_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 12);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_mac_table_configuration_bounds_check(const bcmolt_mac_table_configuration *this)
+{
+    switch (this->miss_fallback)
+    {
+        case BCMOLT_MAC_TABLE_MISS_FALLBACK_DROP:
+            break;
+        case BCMOLT_MAC_TABLE_MISS_FALLBACK_DEFAULT_FLOW:
+            break;
+        case BCMOLT_MAC_TABLE_MISS_FALLBACK_VID:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    if (this->default_flow_id > (bcmolt_flow_id) 4095)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->aging_time < 30)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->aging_time > 86400UL)
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (this->learning_mode)
+    {
+        case BCMOLT_MAC_TABLE_LEARNING_MODE_NORMAL:
+            break;
+        case BCMOLT_MAC_TABLE_LEARNING_MODE_MOVE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->automatic_mac_learning)
+    {
+        case BCMOLT_CONTROL_STATE_DISABLE:
+            break;
+        case BCMOLT_CONTROL_STATE_ENABLE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->automatic_mac_aging)
+    {
+        case BCMOLT_CONTROL_STATE_DISABLE:
+            break;
+        case BCMOLT_CONTROL_STATE_ENABLE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->automatic_mac_move)
+    {
+        case BCMOLT_CONTROL_STATE_DISABLE:
+            break;
+        case BCMOLT_CONTROL_STATE_ENABLE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_macaddress_list_u32_set_default(bcmolt_macaddress_list_u32 *this)
+{
+    this->len = 0;
+    this->val = NULL;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_macaddress_list_u32_pack(const bcmolt_macaddress_list_u32 *this, bcmolt_buf *buf)
+{
+    uint32_t i0;
+    if (!bcmolt_buf_write_u32(buf, this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_macaddress_list_u32\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+        return BCMOS_FALSE;
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_buf_write_mac_address(buf, this->val[i0]))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_macaddress_list_u32_get_packed_length(const bcmolt_macaddress_list_u32 *this)
+{
+    return 4 + (6 * this->len);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_macaddress_list_u32_unpack(bcmolt_macaddress_list_u32 *this, bcmolt_buf *buf, void **extra_mem)
+{
+    uint32_t i0;
+    if (!bcmolt_buf_read_u32(buf, &this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        if (extra_mem == NULL)
+        {
+            bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_macaddress_list_u32\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+            return BCMOS_FALSE;
+        }
+        else
+        {
+            this->val = (bcmos_mac_address *) *extra_mem;
+            *extra_mem = ((uint8_t *) *extra_mem) + BCMOS_ROUND_TO_WORD(this->len * sizeof(bcmos_mac_address));
+        }
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_buf_read_mac_address(buf, &this->val[i0]))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_macaddress_list_u32_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    uint32_t len;
+    if (!bcmolt_buf_read_u32(packed, &len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *extra_mem += BCMOS_ROUND_TO_WORD(sizeof(bcmos_mac_address) * len);
+    if (!bcmolt_buf_skip(packed, len * 6))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_macaddress_list_u32_bounds_check(const bcmolt_macaddress_list_u32 *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_macaddress_list_u32_max_2048_set_default(bcmolt_macaddress_list_u32_max_2048 *this)
+{
+    this->len = 0;
+    this->val = NULL;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_macaddress_list_u32_max_2048_pack(const bcmolt_macaddress_list_u32_max_2048 *this, bcmolt_buf *buf)
+{
+    uint32_t i0;
+    if (!bcmolt_buf_write_u32(buf, this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_macaddress_list_u32_max_2048\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+        return BCMOS_FALSE;
+    }
+
+    if (this->len > 2048)
+    {
+        return BCMOS_FALSE;
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_buf_write_mac_address(buf, this->val[i0]))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_macaddress_list_u32_max_2048_get_packed_length(const bcmolt_macaddress_list_u32_max_2048 *this)
+{
+    return 4 + (6 * this->len);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_macaddress_list_u32_max_2048_unpack(bcmolt_macaddress_list_u32_max_2048 *this, bcmolt_buf *buf, void **extra_mem)
+{
+    uint32_t i0;
+    if (!bcmolt_buf_read_u32(buf, &this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        if (extra_mem == NULL)
+        {
+            bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_macaddress_list_u32_max_2048\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+            return BCMOS_FALSE;
+        }
+        else
+        {
+            this->val = (bcmos_mac_address *) *extra_mem;
+            *extra_mem = ((uint8_t *) *extra_mem) + BCMOS_ROUND_TO_WORD(this->len * sizeof(bcmos_mac_address));
+        }
+    }
+
+    if (this->len > 2048)
+    {
+        return BCMOS_FALSE;
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_buf_read_mac_address(buf, &this->val[i0]))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_macaddress_list_u32_max_2048_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    uint32_t len;
+    if (!bcmolt_buf_read_u32(packed, &len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *extra_mem += BCMOS_ROUND_TO_WORD(sizeof(bcmos_mac_address) * len);
+    if (!bcmolt_buf_skip(packed, len * 6))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_macaddress_list_u32_max_2048_bounds_check(const bcmolt_macaddress_list_u32_max_2048 *this)
+{
+    if (this->len > 2048)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_nni_link_status_set_default(bcmolt_nni_link_status *this)
+{
+    this->link_status = BCMOLT_TRIVALENT_FALSE;
+    this->signal_detected = BCMOLT_TRIVALENT_FALSE;
+    this->pmd_locked = BCMOLT_TRIVALENT_FALSE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_link_status_pack(const bcmolt_nni_link_status *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_trivalent_pack(this->link_status, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_trivalent_pack(this->signal_detected, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_trivalent_pack(this->pmd_locked, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_link_status_unpack(bcmolt_nni_link_status *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_trivalent_unpack(&this->link_status, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_trivalent_unpack(&this->signal_detected, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_trivalent_unpack(&this->pmd_locked, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_link_status_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 3);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_link_status_bounds_check(const bcmolt_nni_link_status *this)
+{
+    switch (this->link_status)
+    {
+        case BCMOLT_TRIVALENT_FALSE:
+            break;
+        case BCMOLT_TRIVALENT_TRUE:
+            break;
+        case BCMOLT_TRIVALENT_NOT_APPLICABLE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->signal_detected)
+    {
+        case BCMOLT_TRIVALENT_FALSE:
+            break;
+        case BCMOLT_TRIVALENT_TRUE:
+            break;
+        case BCMOLT_TRIVALENT_NOT_APPLICABLE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->pmd_locked)
+    {
+        case BCMOLT_TRIVALENT_FALSE:
+            break;
+        case BCMOLT_TRIVALENT_TRUE:
+            break;
+        case BCMOLT_TRIVALENT_NOT_APPLICABLE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_oam_heartbeat_config_set_default(bcmolt_oam_heartbeat_config *this)
+{
+    this->send_period = 0;
+    this->transmit_frame.len = 0;
+    this->transmit_frame.val = NULL;
+    this->ignored_receive_frame_template.frame_octets.len = 0;
+    this->ignored_receive_frame_template.frame_octets.val = NULL;
+    this->ignored_receive_frame_template.mask_octets.len = 0;
+    this->ignored_receive_frame_template.mask_octets.val = NULL;
+    this->receive_timeout = 1;
+    this->maximum_receive_size = 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_oam_heartbeat_config_pack(const bcmolt_oam_heartbeat_config *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u16(buf, this->send_period))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_u8_list_u16_pack(&this->transmit_frame, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_ethernet_frame_masked_pack(&this->ignored_receive_frame_template, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u16(buf, this->receive_timeout))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u16(buf, this->maximum_receive_size))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_oam_heartbeat_config_get_packed_length(const bcmolt_oam_heartbeat_config *this)
+{
+    return 6 + bcmolt_u8_list_u16_get_packed_length(&this->transmit_frame) + bcmolt_ethernet_frame_masked_get_packed_length(&this->ignored_receive_frame_template);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_oam_heartbeat_config_unpack(bcmolt_oam_heartbeat_config *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u16(buf, &this->send_period))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_u8_list_u16_unpack(&this->transmit_frame, buf, extra_mem))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_ethernet_frame_masked_unpack(&this->ignored_receive_frame_template, buf, extra_mem))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u16(buf, &this->receive_timeout))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u16(buf, &this->maximum_receive_size))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_oam_heartbeat_config_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    if (!bcmolt_buf_skip(packed, 2))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_u8_list_u16_scan(packed, extra_mem))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_ethernet_frame_masked_scan(packed, extra_mem))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_skip(packed, 2))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_skip(packed, 2))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_oam_heartbeat_config_bounds_check(const bcmolt_oam_heartbeat_config *this)
+{
+    if (!bcmolt_u8_list_u16_bounds_check(&this->transmit_frame))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_ethernet_frame_masked_bounds_check(&this->ignored_receive_frame_template))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->receive_timeout < 1)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_onu_power_management_configuration_set_default(bcmolt_onu_power_management_configuration *this)
+{
+    this->ilowpower = 1600;
+    this->iaware = 160;
+    this->itransinit = 80;
+    this->itxinit = 40;
+    this->irxoff = 1600;
+    this->low_power_clobi = 8;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_onu_power_management_configuration_pack(const bcmolt_onu_power_management_configuration *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u32(buf, this->ilowpower))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->iaware))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u16(buf, this->itransinit))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u16(buf, this->itxinit))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->irxoff))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u16(buf, this->low_power_clobi))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_onu_power_management_configuration_unpack(bcmolt_onu_power_management_configuration *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u32(buf, &this->ilowpower))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->iaware))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u16(buf, &this->itransinit))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u16(buf, &this->itxinit))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->irxoff))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u16(buf, &this->low_power_clobi))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_onu_power_management_configuration_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 18);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_onu_power_management_configuration_bounds_check(const bcmolt_onu_power_management_configuration *this)
+{
+    if (this->ilowpower < 8)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->ilowpower > 480000UL)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->iaware < 8)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->iaware > 480000UL)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->itransinit > 8000)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->itxinit > 8000)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->irxoff < 8)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->irxoff > 480000UL)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->low_power_clobi < 1)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->low_power_clobi > 1023)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_onu_tuning_configuration_set_default(bcmolt_onu_tuning_configuration *this)
+{
+    this->tsource = 1000;
+    this->ttarget = 1000;
+    this->request_registration_required = BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_onu_tuning_configuration_pack(const bcmolt_onu_tuning_configuration *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u32(buf, this->tsource))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->ttarget))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_bool(buf, this->request_registration_required))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_onu_tuning_configuration_unpack(bcmolt_onu_tuning_configuration *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u32(buf, &this->tsource))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->ttarget))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_bool(buf, &this->request_registration_required))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_onu_tuning_configuration_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 9);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_onu_tuning_configuration_bounds_check(const bcmolt_onu_tuning_configuration *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_pon_id_set_default(bcmolt_pon_id *this)
+{
+    this->administrative_label = 0;
+    this->dwlch_id = 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_id_pack(const bcmolt_pon_id *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u32(buf, this->administrative_label))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->dwlch_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_id_unpack(bcmolt_pon_id *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u32(buf, &this->administrative_label))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->dwlch_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_id_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 5);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_id_bounds_check(const bcmolt_pon_id *this)
+{
+    if (this->administrative_label > 4294967280UL)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->dwlch_id > 7)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_operation_control_set_default(bcmolt_operation_control *this)
+{
+    this->re = 0;
+    this->odn_class = BCMOLT_ODN_CLASS_N1;
+    this->ds_fec_mode = BCMOLT_CONTROL_STATE_ENABLE;
+    this->protocol = BCMOLT_TC_PROTOCOL_TC_LAYER_PROTOCOL_G_989_P_3;
+    this->ds_link_type = BCMOLT_LINK_TYPE_UNSPECIFIED;
+    this->pon_id.administrative_label = 0;
+    this->pon_id.dwlch_id = 0;
+    this->c = 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_operation_control_pack(const bcmolt_operation_control *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u8(buf, this->re))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_odn_class_pack(this->odn_class, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_control_state_pack(this->ds_fec_mode, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_tc_protocol_pack(this->protocol, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_link_type_pack(this->ds_link_type, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_pon_id_pack(&this->pon_id, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->c))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_operation_control_unpack(bcmolt_operation_control *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u8(buf, &this->re))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_odn_class_unpack(&this->odn_class, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_control_state_unpack(&this->ds_fec_mode, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_tc_protocol_unpack(&this->protocol, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_link_type_unpack(&this->ds_link_type, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_pon_id_unpack(&this->pon_id, buf, extra_mem))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->c))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_operation_control_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 11);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_operation_control_bounds_check(const bcmolt_operation_control *this)
+{
+    if (this->re > 1)
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (this->odn_class)
+    {
+        case BCMOLT_ODN_CLASS_N1:
+            break;
+        case BCMOLT_ODN_CLASS_N2:
+            break;
+        case BCMOLT_ODN_CLASS_E1:
+            break;
+        case BCMOLT_ODN_CLASS_E2:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->ds_fec_mode)
+    {
+        case BCMOLT_CONTROL_STATE_DISABLE:
+            break;
+        case BCMOLT_CONTROL_STATE_ENABLE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->protocol)
+    {
+        case BCMOLT_TC_PROTOCOL_TC_LAYER_PROTOCOL_G_987_P_3:
+            break;
+        case BCMOLT_TC_PROTOCOL_TC_LAYER_PROTOCOL_G_989_P_3:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->ds_link_type)
+    {
+        case BCMOLT_LINK_TYPE_UNSPECIFIED:
+            break;
+        case BCMOLT_LINK_TYPE_B:
+            break;
+        case BCMOLT_LINK_TYPE_A:
+            break;
+        case BCMOLT_LINK_TYPE_A_AND_B:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_pon_id_bounds_check(&this->pon_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->c > 1)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_periodic_standby_pon_monitoring_set_default(bcmolt_periodic_standby_pon_monitoring *this)
+{
+    this->interval = 5000;
+    this->control = BCMOLT_CONTROL_STATE_DISABLE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_periodic_standby_pon_monitoring_pack(const bcmolt_periodic_standby_pon_monitoring *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u32(buf, this->interval))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_control_state_pack(this->control, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_periodic_standby_pon_monitoring_unpack(bcmolt_periodic_standby_pon_monitoring *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u32(buf, &this->interval))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_control_state_unpack(&this->control, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_periodic_standby_pon_monitoring_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 5);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_periodic_standby_pon_monitoring_bounds_check(const bcmolt_periodic_standby_pon_monitoring *this)
+{
+    if (this->interval < 1000)
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (this->control)
+    {
+        case BCMOLT_CONTROL_STATE_DISABLE:
+            break;
+        case BCMOLT_CONTROL_STATE_ENABLE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_pon_aggregate_shaper_set_default(bcmolt_pon_aggregate_shaper *this)
+{
+    this->bandwidth_kbps = 0;
+    this->mbs_kB = 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_aggregate_shaper_pack(const bcmolt_pon_aggregate_shaper *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u32(buf, this->bandwidth_kbps))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->mbs_kB))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_aggregate_shaper_unpack(bcmolt_pon_aggregate_shaper *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u32(buf, &this->bandwidth_kbps))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->mbs_kB))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_aggregate_shaper_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 8);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_aggregate_shaper_bounds_check(const bcmolt_pon_aggregate_shaper *this)
+{
+    if (this->mbs_kB > 4000)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_pon_alloc_sla_set_default(bcmolt_pon_alloc_sla *this)
+{
+    this->cbr_rt_bw = 0;
+    this->cbr_nrt_bw = 0;
+    this->guaranteed_bw = 0;
+    this->maximum_bw = 0;
+    this->additional_bw_eligibility = BCMOLT_ADDITIONAL_BW_ELIGIBILITY_NONE;
+    this->cbr_rt_compensation = BCMOS_FALSE;
+    this->cbr_rt_ap_index = 0;
+    this->cbr_nrt_ap_index = 0;
+    this->alloc_type = BCMOLT_ALLOC_TYPE_NONE;
+    this->weight = 0;
+    this->priority = 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_alloc_sla_pack(const bcmolt_pon_alloc_sla *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u32(buf, this->cbr_rt_bw))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->cbr_nrt_bw))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->guaranteed_bw))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->maximum_bw))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_additional_bw_eligibility_pack(this->additional_bw_eligibility, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_bool(buf, this->cbr_rt_compensation))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->cbr_rt_ap_index))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->cbr_nrt_ap_index))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_alloc_type_pack(this->alloc_type, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->weight))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->priority))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_alloc_sla_unpack(bcmolt_pon_alloc_sla *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u32(buf, &this->cbr_rt_bw))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->cbr_nrt_bw))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->guaranteed_bw))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->maximum_bw))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_additional_bw_eligibility_unpack(&this->additional_bw_eligibility, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_bool(buf, &this->cbr_rt_compensation))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->cbr_rt_ap_index))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->cbr_nrt_ap_index))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_alloc_type_unpack(&this->alloc_type, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->weight))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->priority))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_alloc_sla_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 23);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_alloc_sla_bounds_check(const bcmolt_pon_alloc_sla *this)
+{
+    switch (this->additional_bw_eligibility)
+    {
+        case BCMOLT_ADDITIONAL_BW_ELIGIBILITY_NONE:
+            break;
+        case BCMOLT_ADDITIONAL_BW_ELIGIBILITY_NON_ASSURED:
+            break;
+        case BCMOLT_ADDITIONAL_BW_ELIGIBILITY_BEST_EFFORT:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    if (this->cbr_rt_ap_index > 0)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->cbr_nrt_ap_index > 1)
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (this->alloc_type)
+    {
+        case BCMOLT_ALLOC_TYPE_NONE:
+            break;
+        case BCMOLT_ALLOC_TYPE_NSR:
+            break;
+        case BCMOLT_ALLOC_TYPE_SR:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    if (this->weight > 100)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->priority > 7)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_pon_available_bandwidth_set_default(bcmolt_pon_available_bandwidth *this)
+{
+    this->cbr_bw = 0;
+    this->total_bw = 0;
+    this->next_onu_total_bw = 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_available_bandwidth_pack(const bcmolt_pon_available_bandwidth *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u32(buf, this->cbr_bw))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->total_bw))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->next_onu_total_bw))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_available_bandwidth_unpack(bcmolt_pon_available_bandwidth *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u32(buf, &this->cbr_bw))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->total_bw))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->next_onu_total_bw))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_available_bandwidth_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 12);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_available_bandwidth_bounds_check(const bcmolt_pon_available_bandwidth *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_pon_dba_set_default(bcmolt_pon_dba *this)
+{
+    this->sr_reporting_block_size = 48;
+    this->dba_mode = BCMOLT_DBA_MODE_NORMAL;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_dba_pack(const bcmolt_pon_dba *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u8(buf, this->sr_reporting_block_size))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_dba_mode_pack(this->dba_mode, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_dba_unpack(bcmolt_pon_dba *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u8(buf, &this->sr_reporting_block_size))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_dba_mode_unpack(&this->dba_mode, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_dba_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 2);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_dba_bounds_check(const bcmolt_pon_dba *this)
+{
+    switch (this->dba_mode)
+    {
+        case BCMOLT_DBA_MODE_NORMAL:
+            break;
+        case BCMOLT_DBA_MODE_EXTENDED:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_pon_distance_set_default(bcmolt_pon_distance *this)
+{
+    this->max_log_distance = 20;
+    this->max_diff_reach = 20;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_distance_pack(const bcmolt_pon_distance *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u32(buf, this->max_log_distance))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->max_diff_reach))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_distance_unpack(bcmolt_pon_distance *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u32(buf, &this->max_log_distance))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->max_diff_reach))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_distance_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 8);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_distance_bounds_check(const bcmolt_pon_distance *this)
+{
+    if (this->max_log_distance < 1)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->max_log_distance > 100)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->max_diff_reach < 1)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->max_diff_reach > 60)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_pon_drift_control_set_default(bcmolt_pon_drift_control *this)
+{
+    this->drift_interval = 1000;
+    this->drift_limit = 4;
+    this->transmission_control_limit = 8;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_drift_control_pack(const bcmolt_pon_drift_control *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u32(buf, this->drift_interval))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->drift_limit))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->transmission_control_limit))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_drift_control_unpack(bcmolt_pon_drift_control *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u32(buf, &this->drift_interval))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->drift_limit))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->transmission_control_limit))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_drift_control_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 6);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_drift_control_bounds_check(const bcmolt_pon_drift_control *this)
+{
+    if (this->drift_interval > 60000UL)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->drift_limit < 1)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->drift_limit > 32)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->transmission_control_limit < 1)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->transmission_control_limit > 64)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_pon_onu_id_list_u32_set_default(bcmolt_pon_onu_id_list_u32 *this)
+{
+    this->len = 0;
+    this->val = NULL;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_onu_id_list_u32_pack(const bcmolt_pon_onu_id_list_u32 *this, bcmolt_buf *buf)
+{
+    uint32_t i0;
+    if (!bcmolt_buf_write_u32(buf, this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_pon_onu_id_list_u32\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+        return BCMOS_FALSE;
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->val[i0]))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_pon_onu_id_list_u32_get_packed_length(const bcmolt_pon_onu_id_list_u32 *this)
+{
+    return 4 + (2 * this->len);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_onu_id_list_u32_unpack(bcmolt_pon_onu_id_list_u32 *this, bcmolt_buf *buf, void **extra_mem)
+{
+    uint32_t i0;
+    if (!bcmolt_buf_read_u32(buf, &this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        if (extra_mem == NULL)
+        {
+            bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_pon_onu_id_list_u32\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+            return BCMOS_FALSE;
+        }
+        else
+        {
+            this->val = (bcmolt_pon_onu_id *) *extra_mem;
+            *extra_mem = ((uint8_t *) *extra_mem) + BCMOS_ROUND_TO_WORD(this->len * sizeof(bcmolt_pon_onu_id));
+        }
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->val[i0]))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_onu_id_list_u32_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    uint32_t len;
+    if (!bcmolt_buf_read_u32(packed, &len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *extra_mem += BCMOS_ROUND_TO_WORD(sizeof(bcmolt_pon_onu_id) * len);
+    if (!bcmolt_buf_skip(packed, len * 2))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_onu_id_list_u32_bounds_check(const bcmolt_pon_onu_id_list_u32 *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_pon_power_level_set_default(bcmolt_pon_power_level *this)
+{
+    this->pls_maximum_allocation_size = 120;
+    this->mode = 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_power_level_pack(const bcmolt_pon_power_level *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u32(buf, this->pls_maximum_allocation_size))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->mode))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_power_level_unpack(bcmolt_pon_power_level *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u32(buf, &this->pls_maximum_allocation_size))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->mode))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_power_level_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 5);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_power_level_bounds_check(const bcmolt_pon_power_level *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_pon_protection_switching_set_default(bcmolt_pon_protection_switching *this)
+{
+    this->timeout = 100;
+    this->gpio_pin = BCMOLT_GPIO_PIN_UNCONFIGURED;
+    this->options = (bcmolt_pon_protection_switching_options) 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_protection_switching_pack(const bcmolt_pon_protection_switching *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u16(buf, this->timeout))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_gpio_pin_pack(this->gpio_pin, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_pon_protection_switching_options_pack(this->options, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_protection_switching_unpack(bcmolt_pon_protection_switching *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u16(buf, &this->timeout))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_gpio_pin_unpack(&this->gpio_pin, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_pon_protection_switching_options_unpack(&this->options, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_protection_switching_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 7);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_protection_switching_bounds_check(const bcmolt_pon_protection_switching *this)
+{
+    switch (this->gpio_pin)
+    {
+        case BCMOLT_GPIO_PIN_PIN0:
+            break;
+        case BCMOLT_GPIO_PIN_PIN1:
+            break;
+        case BCMOLT_GPIO_PIN_PIN2:
+            break;
+        case BCMOLT_GPIO_PIN_PIN3:
+            break;
+        case BCMOLT_GPIO_PIN_PIN4:
+            break;
+        case BCMOLT_GPIO_PIN_PIN5:
+            break;
+        case BCMOLT_GPIO_PIN_PIN6:
+            break;
+        case BCMOLT_GPIO_PIN_PIN7:
+            break;
+        case BCMOLT_GPIO_PIN_PIN8:
+            break;
+        case BCMOLT_GPIO_PIN_PIN9:
+            break;
+        case BCMOLT_GPIO_PIN_PIN10:
+            break;
+        case BCMOLT_GPIO_PIN_PIN11:
+            break;
+        case BCMOLT_GPIO_PIN_PIN12:
+            break;
+        case BCMOLT_GPIO_PIN_PIN13:
+            break;
+        case BCMOLT_GPIO_PIN_PIN14:
+            break;
+        case BCMOLT_GPIO_PIN_PIN15:
+            break;
+        case BCMOLT_GPIO_PIN_PIN16:
+            break;
+        case BCMOLT_GPIO_PIN_PIN17:
+            break;
+        case BCMOLT_GPIO_PIN_PIN18:
+            break;
+        case BCMOLT_GPIO_PIN_PIN19:
+            break;
+        case BCMOLT_GPIO_PIN_PIN20:
+            break;
+        case BCMOLT_GPIO_PIN_PIN21:
+            break;
+        case BCMOLT_GPIO_PIN_PIN22:
+            break;
+        case BCMOLT_GPIO_PIN_PIN23:
+            break;
+        case BCMOLT_GPIO_PIN_PIN24:
+            break;
+        case BCMOLT_GPIO_PIN_PIN25:
+            break;
+        case BCMOLT_GPIO_PIN_PIN26:
+            break;
+        case BCMOLT_GPIO_PIN_PIN27:
+            break;
+        case BCMOLT_GPIO_PIN_PIN28:
+            break;
+        case BCMOLT_GPIO_PIN_PIN29:
+            break;
+        case BCMOLT_GPIO_PIN_PIN30:
+            break;
+        case BCMOLT_GPIO_PIN_PIN31:
+            break;
+        case BCMOLT_GPIO_PIN_PIN32:
+            break;
+        case BCMOLT_GPIO_PIN_PIN33:
+            break;
+        case BCMOLT_GPIO_PIN_PIN34:
+            break;
+        case BCMOLT_GPIO_PIN_PIN35:
+            break;
+        case BCMOLT_GPIO_PIN_PIN36:
+            break;
+        case BCMOLT_GPIO_PIN_PIN37:
+            break;
+        case BCMOLT_GPIO_PIN_PIN38:
+            break;
+        case BCMOLT_GPIO_PIN_PIN39:
+            break;
+        case BCMOLT_GPIO_PIN_PIN40:
+            break;
+        case BCMOLT_GPIO_PIN_PIN41:
+            break;
+        case BCMOLT_GPIO_PIN_PIN42:
+            break;
+        case BCMOLT_GPIO_PIN_PIN43:
+            break;
+        case BCMOLT_GPIO_PIN_PIN44:
+            break;
+        case BCMOLT_GPIO_PIN_PIN45:
+            break;
+        case BCMOLT_GPIO_PIN_PIN46:
+            break;
+        case BCMOLT_GPIO_PIN_PIN47:
+            break;
+        case BCMOLT_GPIO_PIN_PIN48:
+            break;
+        case BCMOLT_GPIO_PIN_PIN49:
+            break;
+        case BCMOLT_GPIO_PIN_PIN50:
+            break;
+        case BCMOLT_GPIO_PIN_PIN51:
+            break;
+        case BCMOLT_GPIO_PIN_PIN52:
+            break;
+        case BCMOLT_GPIO_PIN_PIN53:
+            break;
+        case BCMOLT_GPIO_PIN_PIN54:
+            break;
+        case BCMOLT_GPIO_PIN_PIN55:
+            break;
+        case BCMOLT_GPIO_PIN_PIN56:
+            break;
+        case BCMOLT_GPIO_PIN_PIN57:
+            break;
+        case BCMOLT_GPIO_PIN_PIN58:
+            break;
+        case BCMOLT_GPIO_PIN_PIN59:
+            break;
+        case BCMOLT_GPIO_PIN_PIN60:
+            break;
+        case BCMOLT_GPIO_PIN_PIN61:
+            break;
+        case BCMOLT_GPIO_PIN_PIN62:
+            break;
+        case BCMOLT_GPIO_PIN_PIN63:
+            break;
+        case BCMOLT_GPIO_PIN_PIN64:
+            break;
+        case BCMOLT_GPIO_PIN_PIN65:
+            break;
+        case BCMOLT_GPIO_PIN_PIN66:
+            break;
+        case BCMOLT_GPIO_PIN_PIN67:
+            break;
+        case BCMOLT_GPIO_PIN_PIN68:
+            break;
+        case BCMOLT_GPIO_PIN_PIN69:
+            break;
+        case BCMOLT_GPIO_PIN_PIN70:
+            break;
+        case BCMOLT_GPIO_PIN_PIN71:
+            break;
+        case BCMOLT_GPIO_PIN_PIN72:
+            break;
+        case BCMOLT_GPIO_PIN_PIN73:
+            break;
+        case BCMOLT_GPIO_PIN_PIN74:
+            break;
+        case BCMOLT_GPIO_PIN_PIN75:
+            break;
+        case BCMOLT_GPIO_PIN_PIN76:
+            break;
+        case BCMOLT_GPIO_PIN_PIN77:
+            break;
+        case BCMOLT_GPIO_PIN_PIN78:
+            break;
+        case BCMOLT_GPIO_PIN_PIN79:
+            break;
+        case BCMOLT_GPIO_PIN_PIN80:
+            break;
+        case BCMOLT_GPIO_PIN_PIN81:
+            break;
+        case BCMOLT_GPIO_PIN_PIN82:
+            break;
+        case BCMOLT_GPIO_PIN_PIN83:
+            break;
+        case BCMOLT_GPIO_PIN_PIN84:
+            break;
+        case BCMOLT_GPIO_PIN_PIN85:
+            break;
+        case BCMOLT_GPIO_PIN_PIN86:
+            break;
+        case BCMOLT_GPIO_PIN_PIN87:
+            break;
+        case BCMOLT_GPIO_PIN_PIN88:
+            break;
+        case BCMOLT_GPIO_PIN_PIN89:
+            break;
+        case BCMOLT_GPIO_PIN_PIN90:
+            break;
+        case BCMOLT_GPIO_PIN_PIN91:
+            break;
+        case BCMOLT_GPIO_PIN_PIN92:
+            break;
+        case BCMOLT_GPIO_PIN_PIN93:
+            break;
+        case BCMOLT_GPIO_PIN_PIN94:
+            break;
+        case BCMOLT_GPIO_PIN_PIN95:
+            break;
+        case BCMOLT_GPIO_PIN_PIN96:
+            break;
+        case BCMOLT_GPIO_PIN_PIN97:
+            break;
+        case BCMOLT_GPIO_PIN_PIN98:
+            break;
+        case BCMOLT_GPIO_PIN_PIN99:
+            break;
+        case BCMOLT_GPIO_PIN_PIN100:
+            break;
+        case BCMOLT_GPIO_PIN_PIN101:
+            break;
+        case BCMOLT_GPIO_PIN_PIN102:
+            break;
+        case BCMOLT_GPIO_PIN_PIN103:
+            break;
+        case BCMOLT_GPIO_PIN_PIN104:
+            break;
+        case BCMOLT_GPIO_PIN_PIN105:
+            break;
+        case BCMOLT_GPIO_PIN_PIN106:
+            break;
+        case BCMOLT_GPIO_PIN_UNCONFIGURED:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    if ((this->options & 0xFFFFFFFCUL) != 0)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_pon_status_set_default(bcmolt_pon_status *this)
+{
+    this->state = BCMOLT_PON_STATE_INACTIVE;
+    this->los_status = BCMOLT_STATUS_OFF;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_status_pack(const bcmolt_pon_status *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_pon_state_pack(this->state, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_pack(this->los_status, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_status_unpack(bcmolt_pon_status *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_pon_state_unpack(&this->state, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_unpack(&this->los_status, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_status_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 2);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_pon_status_bounds_check(const bcmolt_pon_status *this)
+{
+    switch (this->state)
+    {
+        case BCMOLT_PON_STATE_INACTIVE:
+            break;
+        case BCMOLT_PON_STATE_PROCESSING:
+            break;
+        case BCMOLT_PON_STATE_ACTIVE_WORKING:
+            break;
+        case BCMOLT_PON_STATE_ACTIVE_STANDBY:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->los_status)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_prbs_checker_config_set_default(bcmolt_prbs_checker_config *this)
+{
+    this->polynom = BCMOLT_PRBS_POLYNOMIAL_PRBS_7;
+    this->mode = BCMOLT_PRBS_CHECKER_MODE_SELF_SYNC;
+    this->data_invert = BCMOS_FALSE;
+    this->control = BCMOLT_CONTROL_STATE_DISABLE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_prbs_checker_config_pack(const bcmolt_prbs_checker_config *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_prbs_polynomial_pack(this->polynom, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_prbs_checker_mode_pack(this->mode, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_bool(buf, this->data_invert))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_control_state_pack(this->control, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_prbs_checker_config_unpack(bcmolt_prbs_checker_config *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_prbs_polynomial_unpack(&this->polynom, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_prbs_checker_mode_unpack(&this->mode, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_bool(buf, &this->data_invert))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_control_state_unpack(&this->control, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_prbs_checker_config_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 4);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_prbs_checker_config_bounds_check(const bcmolt_prbs_checker_config *this)
+{
+    switch (this->polynom)
+    {
+        case BCMOLT_PRBS_POLYNOMIAL_PRBS_7:
+            break;
+        case BCMOLT_PRBS_POLYNOMIAL_PRBS_9:
+            break;
+        case BCMOLT_PRBS_POLYNOMIAL_PRBS_11:
+            break;
+        case BCMOLT_PRBS_POLYNOMIAL_PRBS_15:
+            break;
+        case BCMOLT_PRBS_POLYNOMIAL_PRBS_23:
+            break;
+        case BCMOLT_PRBS_POLYNOMIAL_PRBS_31:
+            break;
+        case BCMOLT_PRBS_POLYNOMIAL_PRBS_58:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->mode)
+    {
+        case BCMOLT_PRBS_CHECKER_MODE_SELF_SYNC:
+            break;
+        case BCMOLT_PRBS_CHECKER_MODE_INITIAL_SEED_MODE:
+            break;
+        case BCMOLT_PRBS_CHECKER_MODE_INITIAL_SEED_MODE_2:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->control)
+    {
+        case BCMOLT_CONTROL_STATE_DISABLE:
+            break;
+        case BCMOLT_CONTROL_STATE_ENABLE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_prbs_generator_config_set_default(bcmolt_prbs_generator_config *this)
+{
+    this->polynom = BCMOLT_PRBS_POLYNOMIAL_PRBS_7;
+    this->error_insert = BCMOS_FALSE;
+    this->invert = BCMOS_FALSE;
+    this->control = BCMOLT_CONTROL_STATE_DISABLE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_prbs_generator_config_pack(const bcmolt_prbs_generator_config *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_prbs_polynomial_pack(this->polynom, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_bool(buf, this->error_insert))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_bool(buf, this->invert))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_control_state_pack(this->control, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_prbs_generator_config_unpack(bcmolt_prbs_generator_config *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_prbs_polynomial_unpack(&this->polynom, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_bool(buf, &this->error_insert))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_bool(buf, &this->invert))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_control_state_unpack(&this->control, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_prbs_generator_config_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 4);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_prbs_generator_config_bounds_check(const bcmolt_prbs_generator_config *this)
+{
+    switch (this->polynom)
+    {
+        case BCMOLT_PRBS_POLYNOMIAL_PRBS_7:
+            break;
+        case BCMOLT_PRBS_POLYNOMIAL_PRBS_9:
+            break;
+        case BCMOLT_PRBS_POLYNOMIAL_PRBS_11:
+            break;
+        case BCMOLT_PRBS_POLYNOMIAL_PRBS_15:
+            break;
+        case BCMOLT_PRBS_POLYNOMIAL_PRBS_23:
+            break;
+        case BCMOLT_PRBS_POLYNOMIAL_PRBS_31:
+            break;
+        case BCMOLT_PRBS_POLYNOMIAL_PRBS_58:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->control)
+    {
+        case BCMOLT_CONTROL_STATE_DISABLE:
+            break;
+        case BCMOLT_CONTROL_STATE_ENABLE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_prbs_status_set_default(bcmolt_prbs_status *this)
+{
+    this->lock_state = BCMOLT_PRBS_LOCK_STATE_UNLOCKED;
+    this->error_counts = 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_prbs_status_pack(const bcmolt_prbs_status *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_prbs_lock_state_pack(this->lock_state, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->error_counts))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_prbs_status_unpack(bcmolt_prbs_status *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_prbs_lock_state_unpack(&this->lock_state, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->error_counts))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_prbs_status_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 5);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_prbs_status_bounds_check(const bcmolt_prbs_status *this)
+{
+    switch (this->lock_state)
+    {
+        case BCMOLT_PRBS_LOCK_STATE_UNLOCKED:
+            break;
+        case BCMOLT_PRBS_LOCK_STATE_LOCKED:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_ranging_control_configuration_set_default(bcmolt_ranging_control_configuration *this)
+{
+    this->wait_state_1_window_size = 0;
+    this->wait_state_2_window_size = 0;
+    this->wait_after_resync_4 = BCMOS_FALSE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ranging_control_configuration_pack(const bcmolt_ranging_control_configuration *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u8(buf, this->wait_state_1_window_size))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->wait_state_2_window_size))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_bool(buf, this->wait_after_resync_4))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ranging_control_configuration_unpack(bcmolt_ranging_control_configuration *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u8(buf, &this->wait_state_1_window_size))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->wait_state_2_window_size))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_bool(buf, &this->wait_after_resync_4))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ranging_control_configuration_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 3);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ranging_control_configuration_bounds_check(const bcmolt_ranging_control_configuration *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_ranging_resync_conditions_set_default(bcmolt_ranging_resync_conditions *this)
+{
+    this->after_init = BCMOS_FALSE;
+    this->after_no_ed = BCMOS_FALSE;
+    this->after_ed = BCMOS_FALSE;
+    this->after_no_del = BCMOS_FALSE;
+    this->after_ranging_access = BCMOS_FALSE;
+    this->med_val = 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ranging_resync_conditions_pack(const bcmolt_ranging_resync_conditions *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_bool(buf, this->after_init))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_bool(buf, this->after_no_ed))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_bool(buf, this->after_ed))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_bool(buf, this->after_no_del))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_bool(buf, this->after_ranging_access))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u16(buf, this->med_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ranging_resync_conditions_unpack(bcmolt_ranging_resync_conditions *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_bool(buf, &this->after_init))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_bool(buf, &this->after_no_ed))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_bool(buf, &this->after_ed))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_bool(buf, &this->after_no_del))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_bool(buf, &this->after_ranging_access))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u16(buf, &this->med_val))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ranging_resync_conditions_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 7);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ranging_resync_conditions_bounds_check(const bcmolt_ranging_resync_conditions *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_ranging_rssi_control_set_default(bcmolt_ranging_rssi_control *this)
+{
+    this->after_no_ed = BCMOS_FALSE;
+    this->after_ed = BCMOS_FALSE;
+    this->after_reset_3 = BCMOS_FALSE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ranging_rssi_control_pack(const bcmolt_ranging_rssi_control *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_bool(buf, this->after_no_ed))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_bool(buf, this->after_ed))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_bool(buf, this->after_reset_3))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ranging_rssi_control_unpack(bcmolt_ranging_rssi_control *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_bool(buf, &this->after_no_ed))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_bool(buf, &this->after_ed))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_bool(buf, &this->after_reset_3))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ranging_rssi_control_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 3);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ranging_rssi_control_bounds_check(const bcmolt_ranging_rssi_control *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_request_registration_status_set_default(bcmolt_request_registration_status *this)
+{
+    this->request_registration_state = BCMOLT_CONTROL_STATE_DISABLE;
+    this->sma_flag = BCMOS_FALSE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_request_registration_status_pack(const bcmolt_request_registration_status *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_control_state_pack(this->request_registration_state, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_bool(buf, this->sma_flag))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_request_registration_status_unpack(bcmolt_request_registration_status *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_control_state_unpack(&this->request_registration_state, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_bool(buf, &this->sma_flag))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_request_registration_status_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 2);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_request_registration_status_bounds_check(const bcmolt_request_registration_status *this)
+{
+    switch (this->request_registration_state)
+    {
+        case BCMOLT_CONTROL_STATE_DISABLE:
+            break;
+        case BCMOLT_CONTROL_STATE_ENABLE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_rogue_detection_special_map_set_default(bcmolt_rogue_detection_special_map *this)
+{
+    this->plo_size = 0;
+    this->alloc_id = (bcmolt_pon_alloc_id) 0;
+    this->onu_id = (bcmolt_pon_onu_id) 0;
+    this->access_size = 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_rogue_detection_special_map_pack(const bcmolt_rogue_detection_special_map *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u32(buf, this->plo_size))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u16(buf, (uint16_t) this->alloc_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u16(buf, (uint16_t) this->onu_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->access_size))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_rogue_detection_special_map_unpack(bcmolt_rogue_detection_special_map *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u32(buf, &this->plo_size))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->alloc_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->onu_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->access_size))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_rogue_detection_special_map_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 9);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_rogue_detection_special_map_bounds_check(const bcmolt_rogue_detection_special_map *this)
+{
+    if (this->alloc_id > (bcmolt_pon_alloc_id) 16383)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->onu_id > (bcmolt_pon_onu_id) 511)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_rogue_detection_special_map_list_u32_max_8_set_default(bcmolt_rogue_detection_special_map_list_u32_max_8 *this)
+{
+    this->len = 0;
+    this->val = NULL;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_rogue_detection_special_map_list_u32_max_8_pack(const bcmolt_rogue_detection_special_map_list_u32_max_8 *this, bcmolt_buf *buf)
+{
+    uint32_t i0;
+    if (!bcmolt_buf_write_u32(buf, this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_rogue_detection_special_map_list_u32_max_8\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+        return BCMOS_FALSE;
+    }
+
+    if (this->len > 8)
+    {
+        return BCMOS_FALSE;
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_rogue_detection_special_map_pack(&this->val[i0], buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_rogue_detection_special_map_list_u32_max_8_get_packed_length(const bcmolt_rogue_detection_special_map_list_u32_max_8 *this)
+{
+    return 4 + (9 * this->len);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_rogue_detection_special_map_list_u32_max_8_unpack(bcmolt_rogue_detection_special_map_list_u32_max_8 *this, bcmolt_buf *buf, void **extra_mem)
+{
+    uint32_t i0;
+    if (!bcmolt_buf_read_u32(buf, &this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        if (extra_mem == NULL)
+        {
+            bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_rogue_detection_special_map_list_u32_max_8\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+            return BCMOS_FALSE;
+        }
+        else
+        {
+            this->val = (bcmolt_rogue_detection_special_map *) *extra_mem;
+            *extra_mem = ((uint8_t *) *extra_mem) + BCMOS_ROUND_TO_WORD(this->len * sizeof(bcmolt_rogue_detection_special_map));
+        }
+    }
+
+    if (this->len > 8)
+    {
+        return BCMOS_FALSE;
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_rogue_detection_special_map_unpack(&this->val[i0], buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_rogue_detection_special_map_list_u32_max_8_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    uint32_t len;
+    if (!bcmolt_buf_read_u32(packed, &len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *extra_mem += BCMOS_ROUND_TO_WORD(sizeof(bcmolt_rogue_detection_special_map) * len);
+    if (!bcmolt_buf_skip(packed, len * 9))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_rogue_detection_special_map_list_u32_max_8_bounds_check(const bcmolt_rogue_detection_special_map_list_u32_max_8 *this)
+{
+    if (this->len > 8)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_rogue_detection_algorithm_set_default(bcmolt_rogue_detection_algorithm *this)
+{
+    this->algorithm_type = (bcmolt_rogue_detection_algorithm_type) 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_rogue_detection_algorithm_pack(const bcmolt_rogue_detection_algorithm *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_rogue_detection_algorithm_type_pack(this->algorithm_type, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (this->algorithm_type)
+    {
+        case BCMOLT_ROGUE_DETECTION_ALGORITHM_TYPE_EARLY_ROGUE_DETECTION:
+            {
+                if (!bcmolt_rogue_detection_window_pack(this->u.early_rogue_detection.measurement_type, buf))
+                {
+                    return BCMOS_FALSE;
+                }
+
+                if (!bcmolt_buf_write_u32(buf, this->u.early_rogue_detection.interval))
+                {
+                    return BCMOS_FALSE;
+                }
+
+                if (!bcmolt_buf_write_bool(buf, this->u.early_rogue_detection.second_ranging_window))
+                {
+                    return BCMOS_FALSE;
+                }
+
+                if (!bcmolt_alloc_type_to_scan_pack(this->u.early_rogue_detection.alloc_type_to_scan, buf))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_ROGUE_DETECTION_ALGORITHM_TYPE_SPECIAL_MAP:
+            {
+                if (!bcmolt_rogue_detection_special_map_list_u32_max_8_pack(&this->u.special_map.accesses, buf))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_ROGUE_DETECTION_ALGORITHM_TYPE_EXTENDED_GUARD_TIME:
+            {
+                if (!bcmolt_buf_write_u32(buf, this->u.extended_guard_time.additional_guard_time))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_rogue_detection_algorithm_get_packed_length(const bcmolt_rogue_detection_algorithm *this)
+{
+    uint32_t count = 1;
+    switch (this->algorithm_type)
+    {
+        case BCMOLT_ROGUE_DETECTION_ALGORITHM_TYPE_EARLY_ROGUE_DETECTION:
+            {
+                count += 7;
+            }
+            break;
+        case BCMOLT_ROGUE_DETECTION_ALGORITHM_TYPE_SPECIAL_MAP:
+            {
+                count += bcmolt_rogue_detection_special_map_list_u32_max_8_get_packed_length(&this->u.special_map.accesses);
+            }
+            break;
+        case BCMOLT_ROGUE_DETECTION_ALGORITHM_TYPE_EXTENDED_GUARD_TIME:
+            {
+                count += 4;
+            }
+            break;
+        default:
+            break;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_rogue_detection_algorithm_unpack(bcmolt_rogue_detection_algorithm *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_rogue_detection_algorithm_type_unpack(&this->algorithm_type, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (this->algorithm_type)
+    {
+        case BCMOLT_ROGUE_DETECTION_ALGORITHM_TYPE_EARLY_ROGUE_DETECTION:
+            {
+                if (!bcmolt_rogue_detection_window_unpack(&this->u.early_rogue_detection.measurement_type, buf))
+                {
+                    return BCMOS_FALSE;
+                }
+
+                if (!bcmolt_buf_read_u32(buf, &this->u.early_rogue_detection.interval))
+                {
+                    return BCMOS_FALSE;
+                }
+
+                if (!bcmolt_buf_read_bool(buf, &this->u.early_rogue_detection.second_ranging_window))
+                {
+                    return BCMOS_FALSE;
+                }
+
+                if (!bcmolt_alloc_type_to_scan_unpack(&this->u.early_rogue_detection.alloc_type_to_scan, buf))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_ROGUE_DETECTION_ALGORITHM_TYPE_SPECIAL_MAP:
+            {
+                if (!bcmolt_rogue_detection_special_map_list_u32_max_8_unpack(&this->u.special_map.accesses, buf, extra_mem))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_ROGUE_DETECTION_ALGORITHM_TYPE_EXTENDED_GUARD_TIME:
+            {
+                if (!bcmolt_buf_read_u32(buf, &this->u.extended_guard_time.additional_guard_time))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_rogue_detection_algorithm_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    bcmolt_rogue_detection_algorithm_type algorithm_type;
+    if (!bcmolt_rogue_detection_algorithm_type_unpack(&algorithm_type, packed))
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (algorithm_type)
+    {
+        case BCMOLT_ROGUE_DETECTION_ALGORITHM_TYPE_EARLY_ROGUE_DETECTION:
+            {
+                if (!bcmolt_buf_skip(packed, 1))
+                {
+                    return BCMOS_FALSE;
+                }
+
+                if (!bcmolt_buf_skip(packed, 4))
+                {
+                    return BCMOS_FALSE;
+                }
+
+                if (!bcmolt_buf_skip(packed, 1))
+                {
+                    return BCMOS_FALSE;
+                }
+
+                if (!bcmolt_buf_skip(packed, 1))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_ROGUE_DETECTION_ALGORITHM_TYPE_SPECIAL_MAP:
+            {
+                if (!bcmolt_rogue_detection_special_map_list_u32_max_8_scan(packed, extra_mem))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_ROGUE_DETECTION_ALGORITHM_TYPE_EXTENDED_GUARD_TIME:
+            {
+                if (!bcmolt_buf_skip(packed, 4))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_rogue_detection_algorithm_bounds_check(const bcmolt_rogue_detection_algorithm *this)
+{
+    switch (this->algorithm_type)
+    {
+        case BCMOLT_ROGUE_DETECTION_ALGORITHM_TYPE_EARLY_ROGUE_DETECTION:
+            {
+                switch (this->u.early_rogue_detection.measurement_type)
+                {
+                    case BCMOLT_ROGUE_DETECTION_WINDOW_SILENT_WINDOW:
+                        break;
+                    case BCMOLT_ROGUE_DETECTION_WINDOW_CUT_OFF_WINDOW:
+                        break;
+                    default:
+                        return BCMOS_FALSE;
+                }
+
+                if (this->u.early_rogue_detection.interval < 1000)
+                {
+                    return BCMOS_FALSE;
+                }
+
+                if (this->u.early_rogue_detection.interval > 10000000UL)
+                {
+                    return BCMOS_FALSE;
+                }
+
+                switch (this->u.early_rogue_detection.alloc_type_to_scan)
+                {
+                    case BCMOLT_ALLOC_TYPE_TO_SCAN_UNUSED:
+                        break;
+                    case BCMOLT_ALLOC_TYPE_TO_SCAN_PREVIOUSLY_USED:
+                        break;
+                    case BCMOLT_ALLOC_TYPE_TO_SCAN_ALL:
+                        break;
+                    default:
+                        return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_ROGUE_DETECTION_ALGORITHM_TYPE_SPECIAL_MAP:
+            {
+                if (this->u.special_map.accesses.len > 8)
+                {
+                    return BCMOS_FALSE;
+                }
+
+                if (!bcmolt_rogue_detection_special_map_list_u32_max_8_bounds_check(&this->u.special_map.accesses))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_ROGUE_DETECTION_ALGORITHM_TYPE_EXTENDED_GUARD_TIME:
+            {
+                if (this->u.extended_guard_time.additional_guard_time > 500)
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_rogue_onu_detection_process_set_default(bcmolt_rogue_onu_detection_process *this)
+{
+    this->control = BCMOLT_CONTROL_STATE_DISABLE;
+    this->detection_algorithm.algorithm_type = BCMOLT_ROGUE_DETECTION_ALGORITHM_TYPE_EARLY_ROGUE_DETECTION;
+    this->detection_algorithm.u.early_rogue_detection.measurement_type = BCMOLT_ROGUE_DETECTION_WINDOW_SILENT_WINDOW;
+    this->detection_algorithm.u.early_rogue_detection.interval = 10000;
+    this->detection_algorithm.u.early_rogue_detection.second_ranging_window = BCMOS_FALSE;
+    this->detection_algorithm.u.early_rogue_detection.alloc_type_to_scan = BCMOLT_ALLOC_TYPE_TO_SCAN_ALL;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_rogue_onu_detection_process_pack(const bcmolt_rogue_onu_detection_process *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_control_state_pack(this->control, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_rogue_detection_algorithm_pack(&this->detection_algorithm, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_rogue_onu_detection_process_get_packed_length(const bcmolt_rogue_onu_detection_process *this)
+{
+    return 1 + bcmolt_rogue_detection_algorithm_get_packed_length(&this->detection_algorithm);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_rogue_onu_detection_process_unpack(bcmolt_rogue_onu_detection_process *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_control_state_unpack(&this->control, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_rogue_detection_algorithm_unpack(&this->detection_algorithm, buf, extra_mem))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_rogue_onu_detection_process_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    if (!bcmolt_buf_skip(packed, 1))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_rogue_detection_algorithm_scan(packed, extra_mem))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_rogue_onu_detection_process_bounds_check(const bcmolt_rogue_onu_detection_process *this)
+{
+    switch (this->control)
+    {
+        case BCMOLT_CONTROL_STATE_DISABLE:
+            break;
+        case BCMOLT_CONTROL_STATE_ENABLE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_rogue_detection_algorithm_bounds_check(&this->detection_algorithm))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_serdes_configuration_set_default(bcmolt_serdes_configuration *this)
+{
+    this->ranging_mode = BCMOLT_SERDES_RANGING_MODE_BCDR_RESET_MODE;
+    this->multi_ed_mode = BCMOS_FALSE;
+    this->burst_enable_start_offset = 0;
+    this->burst_enable_end_offset = 0;
+    this->ed_invertion = BCMOS_FALSE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_serdes_configuration_pack(const bcmolt_serdes_configuration *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_serdes_ranging_mode_pack(this->ranging_mode, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_bool(buf, this->multi_ed_mode))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u16(buf, this->burst_enable_start_offset))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u16(buf, this->burst_enable_end_offset))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_bool(buf, this->ed_invertion))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_serdes_configuration_unpack(bcmolt_serdes_configuration *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_serdes_ranging_mode_unpack(&this->ranging_mode, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_bool(buf, &this->multi_ed_mode))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u16(buf, &this->burst_enable_start_offset))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u16(buf, &this->burst_enable_end_offset))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_bool(buf, &this->ed_invertion))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_serdes_configuration_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 7);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_serdes_configuration_bounds_check(const bcmolt_serdes_configuration *this)
+{
+    switch (this->ranging_mode)
+    {
+        case BCMOLT_SERDES_RANGING_MODE_ED_MODE:
+            break;
+        case BCMOLT_SERDES_RANGING_MODE_BCDR_RESET_MODE:
+            break;
+        case BCMOLT_SERDES_RANGING_MODE_FAST_MODE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_serial_number_set_default(bcmolt_serial_number *this)
+{
+    memset(this->vendor_id, 0, sizeof(this->vendor_id));
+    memset(this->vendor_specific, 0, sizeof(this->vendor_specific));
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_serial_number_pack(const bcmolt_serial_number *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write(buf, this->vendor_id, 4))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write(buf, this->vendor_specific, 4))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_serial_number_unpack(bcmolt_serial_number *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read(buf, this->vendor_id, 4))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read(buf, this->vendor_specific, 4))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_serial_number_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 8);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_serial_number_bounds_check(const bcmolt_serial_number *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_solicited_scheduler_set_default(bcmolt_solicited_scheduler *this)
+{
+    this->bandwidth_Kbps = (bcmolt_bandwidth_Kbps) 0;
+    this->max_burst_size_tq = (bcmolt_time_quanta) 0;
+    this->priority = 0;
+    this->weight_tq = (bcmolt_time_quanta) 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_solicited_scheduler_pack(const bcmolt_solicited_scheduler *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u32(buf, (uint32_t) this->bandwidth_Kbps))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, (uint32_t) this->max_burst_size_tq))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->priority))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, (uint32_t) this->weight_tq))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_solicited_scheduler_unpack(bcmolt_solicited_scheduler *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u32(buf, (uint32_t *) &this->bandwidth_Kbps))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, (uint32_t *) &this->max_burst_size_tq))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->priority))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, (uint32_t *) &this->weight_tq))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_solicited_scheduler_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 13);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_solicited_scheduler_bounds_check(const bcmolt_solicited_scheduler *this)
+{
+    if (this->priority > 7)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->weight_tq > (bcmolt_time_quanta) 262106UL)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_stat_alarm_trigger_config_set_default(bcmolt_stat_alarm_trigger_config *this)
+{
+    this->type = (bcmolt_stat_condition_type) 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_stat_alarm_trigger_config_pack(const bcmolt_stat_alarm_trigger_config *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_stat_condition_type_pack(this->type, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (this->type)
+    {
+        case BCMOLT_STAT_CONDITION_TYPE_RATE_THRESHOLD:
+            {
+                if (!bcmolt_buf_write_u64(buf, this->u.rate_threshold.rising))
+                {
+                    return BCMOS_FALSE;
+                }
+
+                if (!bcmolt_buf_write_u64(buf, this->u.rate_threshold.falling))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_STAT_CONDITION_TYPE_RATE_RANGE:
+            {
+                if (!bcmolt_buf_write_u64(buf, this->u.rate_range.upper))
+                {
+                    return BCMOS_FALSE;
+                }
+
+                if (!bcmolt_buf_write_u64(buf, this->u.rate_range.lower))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_STAT_CONDITION_TYPE_VALUE_THRESHOLD:
+            {
+                if (!bcmolt_buf_write_u64(buf, this->u.value_threshold.limit))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_STAT_CONDITION_TYPE_NONE:
+            {
+            }
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_stat_alarm_trigger_config_get_packed_length(const bcmolt_stat_alarm_trigger_config *this)
+{
+    uint32_t count = 1;
+    switch (this->type)
+    {
+        case BCMOLT_STAT_CONDITION_TYPE_RATE_THRESHOLD:
+            {
+                count += 16;
+            }
+            break;
+        case BCMOLT_STAT_CONDITION_TYPE_RATE_RANGE:
+            {
+                count += 16;
+            }
+            break;
+        case BCMOLT_STAT_CONDITION_TYPE_VALUE_THRESHOLD:
+            {
+                count += 8;
+            }
+            break;
+        case BCMOLT_STAT_CONDITION_TYPE_NONE:
+            {
+            }
+            break;
+        default:
+            break;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_stat_alarm_trigger_config_unpack(bcmolt_stat_alarm_trigger_config *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_stat_condition_type_unpack(&this->type, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (this->type)
+    {
+        case BCMOLT_STAT_CONDITION_TYPE_RATE_THRESHOLD:
+            {
+                if (!bcmolt_buf_read_u64(buf, &this->u.rate_threshold.rising))
+                {
+                    return BCMOS_FALSE;
+                }
+
+                if (!bcmolt_buf_read_u64(buf, &this->u.rate_threshold.falling))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_STAT_CONDITION_TYPE_RATE_RANGE:
+            {
+                if (!bcmolt_buf_read_u64(buf, &this->u.rate_range.upper))
+                {
+                    return BCMOS_FALSE;
+                }
+
+                if (!bcmolt_buf_read_u64(buf, &this->u.rate_range.lower))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_STAT_CONDITION_TYPE_VALUE_THRESHOLD:
+            {
+                if (!bcmolt_buf_read_u64(buf, &this->u.value_threshold.limit))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_STAT_CONDITION_TYPE_NONE:
+            {
+            }
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_stat_alarm_trigger_config_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    bcmolt_stat_condition_type type;
+    if (!bcmolt_stat_condition_type_unpack(&type, packed))
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (type)
+    {
+        case BCMOLT_STAT_CONDITION_TYPE_RATE_THRESHOLD:
+            {
+                if (!bcmolt_buf_skip(packed, 8))
+                {
+                    return BCMOS_FALSE;
+                }
+
+                if (!bcmolt_buf_skip(packed, 8))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_STAT_CONDITION_TYPE_RATE_RANGE:
+            {
+                if (!bcmolt_buf_skip(packed, 8))
+                {
+                    return BCMOS_FALSE;
+                }
+
+                if (!bcmolt_buf_skip(packed, 8))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_STAT_CONDITION_TYPE_VALUE_THRESHOLD:
+            {
+                if (!bcmolt_buf_skip(packed, 8))
+                {
+                    return BCMOS_FALSE;
+                }
+            }
+            break;
+        case BCMOLT_STAT_CONDITION_TYPE_NONE:
+            {
+            }
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_stat_alarm_trigger_config_bounds_check(const bcmolt_stat_alarm_trigger_config *this)
+{
+    switch (this->type)
+    {
+        case BCMOLT_STAT_CONDITION_TYPE_RATE_THRESHOLD:
+            {
+            }
+            break;
+        case BCMOLT_STAT_CONDITION_TYPE_RATE_RANGE:
+            {
+            }
+            break;
+        case BCMOLT_STAT_CONDITION_TYPE_VALUE_THRESHOLD:
+            {
+            }
+            break;
+        case BCMOLT_STAT_CONDITION_TYPE_NONE:
+            {
+            }
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_stat_alarm_soak_config_set_default(bcmolt_stat_alarm_soak_config *this)
+{
+    this->active_soak_time = 0;
+    this->clear_soak_time = 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_stat_alarm_soak_config_pack(const bcmolt_stat_alarm_soak_config *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u32(buf, this->active_soak_time))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->clear_soak_time))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_stat_alarm_soak_config_unpack(bcmolt_stat_alarm_soak_config *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u32(buf, &this->active_soak_time))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->clear_soak_time))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_stat_alarm_soak_config_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 8);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_stat_alarm_soak_config_bounds_check(const bcmolt_stat_alarm_soak_config *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_stat_alarm_config_set_default(bcmolt_stat_alarm_config *this)
+{
+    this->trigger.type = BCMOLT_STAT_CONDITION_TYPE_NONE;
+    this->soak.active_soak_time = 0;
+    this->soak.clear_soak_time = 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_stat_alarm_config_pack(const bcmolt_stat_alarm_config *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_stat_alarm_trigger_config_pack(&this->trigger, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_stat_alarm_soak_config_pack(&this->soak, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_stat_alarm_config_get_packed_length(const bcmolt_stat_alarm_config *this)
+{
+    return 8 + bcmolt_stat_alarm_trigger_config_get_packed_length(&this->trigger);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_stat_alarm_config_unpack(bcmolt_stat_alarm_config *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_stat_alarm_trigger_config_unpack(&this->trigger, buf, extra_mem))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_stat_alarm_soak_config_unpack(&this->soak, buf, extra_mem))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_stat_alarm_config_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    if (!bcmolt_stat_alarm_trigger_config_scan(packed, extra_mem))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_skip(packed, 8))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_stat_alarm_config_bounds_check(const bcmolt_stat_alarm_config *this)
+{
+    if (!bcmolt_stat_alarm_trigger_config_bounds_check(&this->trigger))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_stat_alarm_soak_config_bounds_check(&this->soak))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_str_100_set_default(bcmolt_str_100 *this)
+{
+    memset(this->str, 0, 100);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_str_100_pack(const bcmolt_str_100 *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write(buf, this->str, 100))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_str_100_unpack(bcmolt_str_100 *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read(buf, this->str, 100))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_str_100_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 100);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_str_100_bounds_check(const bcmolt_str_100 *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_str_1000_set_default(bcmolt_str_1000 *this)
+{
+    memset(this->str, 0, 1000);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_str_1000_pack(const bcmolt_str_1000 *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write(buf, this->str, 1000))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_str_1000_unpack(bcmolt_str_1000 *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read(buf, this->str, 1000))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_str_1000_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 1000);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_str_1000_bounds_check(const bcmolt_str_1000 *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_str_2000_set_default(bcmolt_str_2000 *this)
+{
+    memset(this->str, 0, 2000);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_str_2000_pack(const bcmolt_str_2000 *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write(buf, this->str, 2000))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_str_2000_unpack(bcmolt_str_2000 *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read(buf, this->str, 2000))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_str_2000_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 2000);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_str_2000_bounds_check(const bcmolt_str_2000 *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_str_256_set_default(bcmolt_str_256 *this)
+{
+    memset(this->str, 0, 256);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_str_256_pack(const bcmolt_str_256 *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write(buf, this->str, 256))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_str_256_unpack(bcmolt_str_256 *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read(buf, this->str, 256))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_str_256_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 256);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_str_256_bounds_check(const bcmolt_str_256 *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_str_64_set_default(bcmolt_str_64 *this)
+{
+    memset(this->str, 0, 64);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_str_64_pack(const bcmolt_str_64 *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write(buf, this->str, 64))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_str_64_unpack(bcmolt_str_64 *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read(buf, this->str, 64))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_str_64_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 64);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_str_64_bounds_check(const bcmolt_str_64 *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_sw_error_set_default(bcmolt_sw_error *this)
+{
+    this->first_error_time_us = 0;
+    this->last_error_time_us = 0;
+    this->line_number = 0;
+    this->error_counter = 0;
+    this->instance = 0;
+    memset(this->filename, 0, 64);
+    memset(this->task_name, 0, 64);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_sw_error_pack(const bcmolt_sw_error *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u64(buf, this->first_error_time_us))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u64(buf, this->last_error_time_us))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->line_number))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->error_counter))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->instance))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write(buf, this->filename, 64))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write(buf, this->task_name, 64))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_sw_error_unpack(bcmolt_sw_error *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u64(buf, &this->first_error_time_us))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u64(buf, &this->last_error_time_us))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->line_number))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->error_counter))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->instance))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read(buf, this->filename, 64))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read(buf, this->task_name, 64))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_sw_error_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 156);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_sw_error_bounds_check(const bcmolt_sw_error *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_system_profile_set_default(bcmolt_system_profile *this)
+{
+    this->ng_2_sys_id = 0;
+    this->version = 0;
+    this->channel_spacing = 0;
+    this->us_operating_wavelength_bands = BCMOLT_US_OPERATING_WAVELENGTH_BANDS_EXPANDED_SPECTRUM_WIDE_BAND;
+    this->us_mse = 0;
+    this->loose_calibration_bound = BCMOLT_CALIBRATION_RECORD_UNSPECIFIED;
+    this->fsr = 0;
+    this->twdm_channel_count = 8;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_system_profile_pack(const bcmolt_system_profile *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u32(buf, this->ng_2_sys_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->version))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->channel_spacing))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_us_operating_wavelength_bands_pack(this->us_operating_wavelength_bands, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->us_mse))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_calibration_record_pack(this->loose_calibration_bound, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u16(buf, this->fsr))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->twdm_channel_count))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_system_profile_unpack(bcmolt_system_profile *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u32(buf, &this->ng_2_sys_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->version))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->channel_spacing))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_us_operating_wavelength_bands_unpack(&this->us_operating_wavelength_bands, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->us_mse))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_calibration_record_unpack(&this->loose_calibration_bound, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u16(buf, &this->fsr))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->twdm_channel_count))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_system_profile_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 12);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_system_profile_bounds_check(const bcmolt_system_profile *this)
+{
+    if (this->ng_2_sys_id > 1048575UL)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->version > 15)
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (this->us_operating_wavelength_bands)
+    {
+        case BCMOLT_US_OPERATING_WAVELENGTH_BANDS_EXPANDED_SPECTRUM_WIDE_BAND:
+            break;
+        case BCMOLT_US_OPERATING_WAVELENGTH_BANDS_EXPANDED_SPECTRUM_REDUCED_BAND:
+            break;
+        case BCMOLT_US_OPERATING_WAVELENGTH_BANDS_EXPANDED_SPECTRUM_NARROW_BAND:
+            break;
+        case BCMOLT_US_OPERATING_WAVELENGTH_BANDS_SHARED_SPECTRUM_WIDE_BAND:
+            break;
+        case BCMOLT_US_OPERATING_WAVELENGTH_BANDS_SHARED_SPECTRUM_REDUCED_BAND:
+            break;
+        case BCMOLT_US_OPERATING_WAVELENGTH_BANDS_SHARED_SPECTRUM_NARROW_BAND:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->loose_calibration_bound)
+    {
+        case BCMOLT_CALIBRATION_RECORD_UNSPECIFIED:
+            break;
+        case BCMOLT_CALIBRATION_RECORD_UNCALIBRATED:
+            break;
+        case BCMOLT_CALIBRATION_RECORD_LOOSE:
+            break;
+        case BCMOLT_CALIBRATION_RECORD_SUFFICIENT:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    if (this->twdm_channel_count > 15)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_trx_delimiter_set_default(bcmolt_trx_delimiter *this)
+{
+    this->pattern[0] = 171;
+    this->pattern[1] = 89;
+    this->pattern[2] = 131;
+    this->size = 3;
+    this->window_size = 124;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_delimiter_pack(const bcmolt_trx_delimiter *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write(buf, this->pattern, 3))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->size))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->window_size))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_delimiter_unpack(bcmolt_trx_delimiter *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read(buf, this->pattern, 3))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->size))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->window_size))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_delimiter_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 5);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_delimiter_bounds_check(const bcmolt_trx_delimiter *this)
+{
+    if (this->window_size < 2)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_trx_energy_detect_set_default(bcmolt_trx_energy_detect *this)
+{
+    this->ranging_ed_source = BCMOLT_ENERGY_DETECT_SOURCE_TRX;
+    this->delimiter_ed_source = BCMOLT_ENERGY_DETECT_SOURCE_TRX;
+    this->minimum_threshold = 0;
+    this->maximum_threshold = 41;
+    this->ed_pattern = 170;
+    this->ed_pattern_size = 0;
+    this->window_size = 124;
+    this->inversion = BCMOS_FALSE;
+    this->no_ed_threshold = 127;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_energy_detect_pack(const bcmolt_trx_energy_detect *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_energy_detect_source_pack(this->ranging_ed_source, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_energy_detect_source_pack(this->delimiter_ed_source, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->minimum_threshold))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->maximum_threshold))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->ed_pattern))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->ed_pattern_size))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->window_size))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_bool(buf, this->inversion))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->no_ed_threshold))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_energy_detect_unpack(bcmolt_trx_energy_detect *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_energy_detect_source_unpack(&this->ranging_ed_source, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_energy_detect_source_unpack(&this->delimiter_ed_source, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->minimum_threshold))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->maximum_threshold))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->ed_pattern))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->ed_pattern_size))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->window_size))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_bool(buf, &this->inversion))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->no_ed_threshold))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_energy_detect_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 9);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_energy_detect_bounds_check(const bcmolt_trx_energy_detect *this)
+{
+    switch (this->ranging_ed_source)
+    {
+        case BCMOLT_ENERGY_DETECT_SOURCE_INTERNAL:
+            break;
+        case BCMOLT_ENERGY_DETECT_SOURCE_TRX:
+            break;
+        case BCMOLT_ENERGY_DETECT_SOURCE_BCDR:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->delimiter_ed_source)
+    {
+        case BCMOLT_ENERGY_DETECT_SOURCE_INTERNAL:
+            break;
+        case BCMOLT_ENERGY_DETECT_SOURCE_TRX:
+            break;
+        case BCMOLT_ENERGY_DETECT_SOURCE_BCDR:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    if (this->window_size < 2)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_trx_preamble_set_default(bcmolt_trx_preamble *this)
+{
+    this->type_1_size = 0;
+    this->type_2_size = 0;
+    this->type_3_pre_ranging_size = 50;
+    this->type_3_post_ranging_size = 15;
+    this->type_3_pattern = 170;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_preamble_pack(const bcmolt_trx_preamble *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u8(buf, this->type_1_size))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->type_2_size))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->type_3_pre_ranging_size))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->type_3_post_ranging_size))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->type_3_pattern))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_preamble_unpack(bcmolt_trx_preamble *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u8(buf, &this->type_1_size))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->type_2_size))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->type_3_pre_ranging_size))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->type_3_post_ranging_size))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->type_3_pattern))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_preamble_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 5);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_preamble_bounds_check(const bcmolt_trx_preamble *this)
+{
+    if (this->type_3_post_ranging_size < 5)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->type_3_post_ranging_size > 120)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_trx_rx_configuration_set_default(bcmolt_trx_rx_configuration *this)
+{
+    this->wait_window_size = 0;
+    this->ranging_access_window_size = 15;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_rx_configuration_pack(const bcmolt_trx_rx_configuration *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u8(buf, this->wait_window_size))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->ranging_access_window_size))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_rx_configuration_unpack(bcmolt_trx_rx_configuration *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u8(buf, &this->wait_window_size))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->ranging_access_window_size))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_rx_configuration_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 2);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_rx_configuration_bounds_check(const bcmolt_trx_rx_configuration *this)
+{
+    if (this->ranging_access_window_size < 7)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_u32_list_u32_max_500_hex_set_default(bcmolt_u32_list_u32_max_500_hex *this)
+{
+    this->len = 0;
+    this->val = NULL;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_u32_list_u32_max_500_hex_pack(const bcmolt_u32_list_u32_max_500_hex *this, bcmolt_buf *buf)
+{
+    uint32_t i0;
+    if (!bcmolt_buf_write_u32(buf, this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_u32_list_u32_max_500_hex\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+        return BCMOS_FALSE;
+    }
+
+    if (this->len > 500)
+    {
+        return BCMOS_FALSE;
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->val[i0]))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_u32_list_u32_max_500_hex_get_packed_length(const bcmolt_u32_list_u32_max_500_hex *this)
+{
+    return 4 + (4 * this->len);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_u32_list_u32_max_500_hex_unpack(bcmolt_u32_list_u32_max_500_hex *this, bcmolt_buf *buf, void **extra_mem)
+{
+    uint32_t i0;
+    if (!bcmolt_buf_read_u32(buf, &this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        if (extra_mem == NULL)
+        {
+            bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_u32_list_u32_max_500_hex\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+            return BCMOS_FALSE;
+        }
+        else
+        {
+            this->val = (uint32_t *) *extra_mem;
+            *extra_mem = ((uint8_t *) *extra_mem) + BCMOS_ROUND_TO_WORD(this->len * sizeof(uint32_t));
+        }
+    }
+
+    if (this->len > 500)
+    {
+        return BCMOS_FALSE;
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->val[i0]))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_u32_list_u32_max_500_hex_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    uint32_t len;
+    if (!bcmolt_buf_read_u32(packed, &len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *extra_mem += BCMOS_ROUND_TO_WORD(sizeof(uint32_t) * len);
+    if (!bcmolt_buf_skip(packed, len * 4))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_u32_list_u32_max_500_hex_bounds_check(const bcmolt_u32_list_u32_max_500_hex *this)
+{
+    if (this->len > 500)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_u8_list_u16_hex_set_default(bcmolt_u8_list_u16_hex *this)
+{
+    this->len = 0;
+    this->val = NULL;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_u8_list_u16_hex_pack(const bcmolt_u8_list_u16_hex *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u16(buf, this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_u8_list_u16_hex\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write(buf, this->val, this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_u8_list_u16_hex_get_packed_length(const bcmolt_u8_list_u16_hex *this)
+{
+    return 2 + this->len;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_u8_list_u16_hex_unpack(bcmolt_u8_list_u16_hex *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u16(buf, &this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        if (extra_mem == NULL)
+        {
+            bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_u8_list_u16_hex\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+            return BCMOS_FALSE;
+        }
+        else
+        {
+            this->val = (uint8_t *) *extra_mem;
+            *extra_mem = ((uint8_t *) *extra_mem) + BCMOS_ROUND_TO_WORD(this->len * sizeof(uint8_t));
+        }
+    }
+
+    if (!bcmolt_buf_read(buf, this->val, this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_u8_list_u16_hex_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    uint16_t len;
+    if (!bcmolt_buf_read_u16(packed, &len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *extra_mem += BCMOS_ROUND_TO_WORD(sizeof(uint8_t) * len);
+    if (!bcmolt_buf_skip(packed, len * 1))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_u8_list_u16_hex_bounds_check(const bcmolt_u8_list_u16_hex *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_u8_list_u32_set_default(bcmolt_u8_list_u32 *this)
+{
+    this->len = 0;
+    this->val = NULL;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_u8_list_u32_pack(const bcmolt_u8_list_u32 *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u32(buf, this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_u8_list_u32\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write(buf, this->val, this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_u8_list_u32_get_packed_length(const bcmolt_u8_list_u32 *this)
+{
+    return 4 + this->len;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_u8_list_u32_unpack(bcmolt_u8_list_u32 *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u32(buf, &this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        if (extra_mem == NULL)
+        {
+            bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_u8_list_u32\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+            return BCMOS_FALSE;
+        }
+        else
+        {
+            this->val = (uint8_t *) *extra_mem;
+            *extra_mem = ((uint8_t *) *extra_mem) + BCMOS_ROUND_TO_WORD(this->len * sizeof(uint8_t));
+        }
+    }
+
+    if (!bcmolt_buf_read(buf, this->val, this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_u8_list_u32_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    uint32_t len;
+    if (!bcmolt_buf_read_u32(packed, &len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *extra_mem += BCMOS_ROUND_TO_WORD(sizeof(uint8_t) * len);
+    if (!bcmolt_buf_skip(packed, len * 1))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_u8_list_u32_bounds_check(const bcmolt_u8_list_u32 *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_u8_list_u32_max_2048_set_default(bcmolt_u8_list_u32_max_2048 *this)
+{
+    this->len = 0;
+    this->val = NULL;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_u8_list_u32_max_2048_pack(const bcmolt_u8_list_u32_max_2048 *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u32(buf, this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_u8_list_u32_max_2048\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+        return BCMOS_FALSE;
+    }
+
+    if (this->len > 2048)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write(buf, this->val, this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_u8_list_u32_max_2048_get_packed_length(const bcmolt_u8_list_u32_max_2048 *this)
+{
+    return 4 + this->len;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_u8_list_u32_max_2048_unpack(bcmolt_u8_list_u32_max_2048 *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u32(buf, &this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        if (extra_mem == NULL)
+        {
+            bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_u8_list_u32_max_2048\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+            return BCMOS_FALSE;
+        }
+        else
+        {
+            this->val = (uint8_t *) *extra_mem;
+            *extra_mem = ((uint8_t *) *extra_mem) + BCMOS_ROUND_TO_WORD(this->len * sizeof(uint8_t));
+        }
+    }
+
+    if (this->len > 2048)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read(buf, this->val, this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_u8_list_u32_max_2048_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    uint32_t len;
+    if (!bcmolt_buf_read_u32(packed, &len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *extra_mem += BCMOS_ROUND_TO_WORD(sizeof(uint8_t) * len);
+    if (!bcmolt_buf_skip(packed, len * 1))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_u8_list_u32_max_2048_bounds_check(const bcmolt_u8_list_u32_max_2048 *this)
+{
+    if (this->len > 2048)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_ubd_info_set_default(bcmolt_ubd_info *this)
+{
+    this->actual_polling_interval = 0;
+    this->actual_grant_threshold_tq = (bcmolt_time_quanta) 0;
+    this->actual_min_schedulershaper.actual_mbs_tq = (bcmolt_time_quanta) 0;
+    this->actual_min_schedulershaper.actual_weight_tq = (bcmolt_time_quanta) 0;
+    this->actual_max_schedulershaper.actual_mbs_tq = (bcmolt_time_quanta) 0;
+    this->actual_max_schedulershaper.actual_weight_tq = (bcmolt_time_quanta) 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ubd_info_pack(const bcmolt_ubd_info *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u16(buf, this->actual_polling_interval))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, (uint32_t) this->actual_grant_threshold_tq))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_actual_schedulershaper_pack(&this->actual_min_schedulershaper, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_actual_schedulershaper_pack(&this->actual_max_schedulershaper, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ubd_info_unpack(bcmolt_ubd_info *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u16(buf, &this->actual_polling_interval))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, (uint32_t *) &this->actual_grant_threshold_tq))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_actual_schedulershaper_unpack(&this->actual_min_schedulershaper, buf, extra_mem))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_actual_schedulershaper_unpack(&this->actual_max_schedulershaper, buf, extra_mem))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ubd_info_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 22);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ubd_info_bounds_check(const bcmolt_ubd_info *this)
+{
+    if (!bcmolt_actual_schedulershaper_bounds_check(&this->actual_min_schedulershaper))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_actual_schedulershaper_bounds_check(&this->actual_max_schedulershaper))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_upstream_bandwidth_distribution_set_default(bcmolt_upstream_bandwidth_distribution *this)
+{
+    this->polling_interval_us = BCMOLT_POLLING_INTERVAL_AUTOMATIC;
+    this->grant_threshold_tq = (bcmolt_time_quanta) 0;
+    this->min_schedulershaper.bandwidth_Kbps = (bcmolt_bandwidth_Kbps) 0;
+    this->min_schedulershaper.max_burst_size_tq = (bcmolt_time_quanta) 0;
+    this->min_schedulershaper.priority = 0;
+    this->min_schedulershaper.weight_tq = (bcmolt_time_quanta) 0;
+    this->max_schedulershaper.bandwidth_Kbps = (bcmolt_bandwidth_Kbps) 0;
+    this->max_schedulershaper.max_burst_size_tq = (bcmolt_time_quanta) 0;
+    this->max_schedulershaper.priority = 0;
+    this->max_schedulershaper.weight_tq = (bcmolt_time_quanta) 0;
+    this->tdm_grant_size_tq = (bcmolt_time_quanta) 0;
+    this->tdm_grant_interval_us = 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_upstream_bandwidth_distribution_pack(const bcmolt_upstream_bandwidth_distribution *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_polling_interval_pack(this->polling_interval_us, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, (uint32_t) this->grant_threshold_tq))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_solicited_scheduler_pack(&this->min_schedulershaper, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_solicited_scheduler_pack(&this->max_schedulershaper, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, (uint32_t) this->tdm_grant_size_tq))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->tdm_grant_interval_us))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_upstream_bandwidth_distribution_unpack(bcmolt_upstream_bandwidth_distribution *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_polling_interval_unpack(&this->polling_interval_us, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, (uint32_t *) &this->grant_threshold_tq))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_solicited_scheduler_unpack(&this->min_schedulershaper, buf, extra_mem))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_solicited_scheduler_unpack(&this->max_schedulershaper, buf, extra_mem))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, (uint32_t *) &this->tdm_grant_size_tq))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->tdm_grant_interval_us))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_upstream_bandwidth_distribution_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 42);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_upstream_bandwidth_distribution_bounds_check(const bcmolt_upstream_bandwidth_distribution *this)
+{
+    switch (this->polling_interval_us)
+    {
+        case BCMOLT_POLLING_INTERVAL_POLLING_DISABLED:
+            break;
+        case BCMOLT_POLLING_INTERVAL_US_500:
+            break;
+        case BCMOLT_POLLING_INTERVAL_MS_1:
+            break;
+        case BCMOLT_POLLING_INTERVAL_MS_2:
+            break;
+        case BCMOLT_POLLING_INTERVAL_MS_4:
+            break;
+        case BCMOLT_POLLING_INTERVAL_MS_8:
+            break;
+        case BCMOLT_POLLING_INTERVAL_MS_16:
+            break;
+        case BCMOLT_POLLING_INTERVAL_AUTOMATIC:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    if (this->grant_threshold_tq > (bcmolt_time_quanta) 65408UL)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_solicited_scheduler_bounds_check(&this->min_schedulershaper))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_solicited_scheduler_bounds_check(&this->max_schedulershaper))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->tdm_grant_size_tq > (bcmolt_time_quanta) 65408UL)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->tdm_grant_interval_us > 50000UL)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_vlan_tag_set_default(bcmolt_vlan_tag *this)
+{
+    this->vlan_id = (bcmolt_vlan_id) 0;
+    this->pbit = 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_vlan_tag_pack(const bcmolt_vlan_tag *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u16(buf, (uint16_t) this->vlan_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->pbit))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_vlan_tag_unpack(bcmolt_vlan_tag *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->vlan_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->pbit))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_vlan_tag_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 3);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_vlan_tag_bounds_check(const bcmolt_vlan_tag *this)
+{
+    if (this->vlan_id > (bcmolt_vlan_id) 4095)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->pbit > 7)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_alloc_with_state_set_default(bcmolt_xgpon_alloc_with_state *this)
+{
+    this->alloc_id = (bcmolt_xgpon_alloc_id) 0;
+    this->state = BCMOLT_ALLOC_STATE_NOT_CONFIGURED;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_with_state_pack(const bcmolt_xgpon_alloc_with_state *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u16(buf, (uint16_t) this->alloc_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_alloc_state_pack(this->state, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_with_state_unpack(bcmolt_xgpon_alloc_with_state *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->alloc_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_alloc_state_unpack(&this->state, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_with_state_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 3);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_with_state_bounds_check(const bcmolt_xgpon_alloc_with_state *this)
+{
+    if (this->alloc_id > (bcmolt_xgpon_alloc_id) 16383)
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (this->state)
+    {
+        case BCMOLT_ALLOC_STATE_NOT_CONFIGURED:
+            break;
+        case BCMOLT_ALLOC_STATE_INACTIVE:
+            break;
+        case BCMOLT_ALLOC_STATE_PROCESSING:
+            break;
+        case BCMOLT_ALLOC_STATE_ACTIVE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_alloc_with_state_list_u16_max_32_set_default(bcmolt_xgpon_alloc_with_state_list_u16_max_32 *this)
+{
+    this->len = 0;
+    this->val = NULL;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_with_state_list_u16_max_32_pack(const bcmolt_xgpon_alloc_with_state_list_u16_max_32 *this, bcmolt_buf *buf)
+{
+    uint16_t i0;
+    if (!bcmolt_buf_write_u16(buf, this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_xgpon_alloc_with_state_list_u16_max_32\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+        return BCMOS_FALSE;
+    }
+
+    if (this->len > 32)
+    {
+        return BCMOS_FALSE;
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_xgpon_alloc_with_state_pack(&this->val[i0], buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_alloc_with_state_list_u16_max_32_get_packed_length(const bcmolt_xgpon_alloc_with_state_list_u16_max_32 *this)
+{
+    return 2 + (3 * this->len);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_with_state_list_u16_max_32_unpack(bcmolt_xgpon_alloc_with_state_list_u16_max_32 *this, bcmolt_buf *buf, void **extra_mem)
+{
+    uint16_t i0;
+    if (!bcmolt_buf_read_u16(buf, &this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        if (extra_mem == NULL)
+        {
+            bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_xgpon_alloc_with_state_list_u16_max_32\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+            return BCMOS_FALSE;
+        }
+        else
+        {
+            this->val = (bcmolt_xgpon_alloc_with_state *) *extra_mem;
+            *extra_mem = ((uint8_t *) *extra_mem) + BCMOS_ROUND_TO_WORD(this->len * sizeof(bcmolt_xgpon_alloc_with_state));
+        }
+    }
+
+    if (this->len > 32)
+    {
+        return BCMOS_FALSE;
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_xgpon_alloc_with_state_unpack(&this->val[i0], buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_with_state_list_u16_max_32_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    uint16_t len;
+    if (!bcmolt_buf_read_u16(packed, &len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *extra_mem += BCMOS_ROUND_TO_WORD(sizeof(bcmolt_xgpon_alloc_with_state) * len);
+    if (!bcmolt_buf_skip(packed, len * 3))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_with_state_list_u16_max_32_bounds_check(const bcmolt_xgpon_alloc_with_state_list_u16_max_32 *this)
+{
+    if (this->len > 32)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_ed_state_set_default(bcmolt_xgpon_ed_state *this)
+{
+    this->reset_on_ed_fail = BCMOS_FALSE;
+    this->reset_on_ed_success = BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ed_state_pack(const bcmolt_xgpon_ed_state *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_bool(buf, this->reset_on_ed_fail))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_bool(buf, this->reset_on_ed_success))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ed_state_unpack(bcmolt_xgpon_ed_state *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_bool(buf, &this->reset_on_ed_fail))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_bool(buf, &this->reset_on_ed_success))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ed_state_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 2);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ed_state_bounds_check(const bcmolt_xgpon_ed_state *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_gem_id_list_u8_max_16_set_default(bcmolt_xgpon_gem_id_list_u8_max_16 *this)
+{
+    this->len = 0;
+    this->val = NULL;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_id_list_u8_max_16_pack(const bcmolt_xgpon_gem_id_list_u8_max_16 *this, bcmolt_buf *buf)
+{
+    uint8_t i0;
+    if (!bcmolt_buf_write_u8(buf, this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_xgpon_gem_id_list_u8_max_16\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+        return BCMOS_FALSE;
+    }
+
+    if (this->len > 16)
+    {
+        return BCMOS_FALSE;
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->val[i0]))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_gem_id_list_u8_max_16_get_packed_length(const bcmolt_xgpon_gem_id_list_u8_max_16 *this)
+{
+    return 1 + (2 * this->len);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_id_list_u8_max_16_unpack(bcmolt_xgpon_gem_id_list_u8_max_16 *this, bcmolt_buf *buf, void **extra_mem)
+{
+    uint8_t i0;
+    if (!bcmolt_buf_read_u8(buf, &this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        if (extra_mem == NULL)
+        {
+            bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_xgpon_gem_id_list_u8_max_16\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+            return BCMOS_FALSE;
+        }
+        else
+        {
+            this->val = (bcmolt_xgpon_gem_id *) *extra_mem;
+            *extra_mem = ((uint8_t *) *extra_mem) + BCMOS_ROUND_TO_WORD(this->len * sizeof(bcmolt_xgpon_gem_id));
+        }
+    }
+
+    if (this->len > 16)
+    {
+        return BCMOS_FALSE;
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->val[i0]))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_id_list_u8_max_16_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    uint8_t len;
+    if (!bcmolt_buf_read_u8(packed, &len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *extra_mem += BCMOS_ROUND_TO_WORD(sizeof(bcmolt_xgpon_gem_id) * len);
+    if (!bcmolt_buf_skip(packed, len * 2))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_id_list_u8_max_16_bounds_check(const bcmolt_xgpon_gem_id_list_u8_max_16 *this)
+{
+    if (this->len > 16)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_gem_port_with_state_set_default(bcmolt_xgpon_gem_port_with_state *this)
+{
+    this->gem_id = (bcmolt_xgpon_gem_id) 0;
+    this->state = BCMOLT_XGPON_GEM_PORT_STATE_NOT_CONFIGURED;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_with_state_pack(const bcmolt_xgpon_gem_port_with_state *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u16(buf, (uint16_t) this->gem_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_xgpon_gem_port_state_pack(this->state, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_with_state_unpack(bcmolt_xgpon_gem_port_with_state *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->gem_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_xgpon_gem_port_state_unpack(&this->state, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_with_state_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 3);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_with_state_bounds_check(const bcmolt_xgpon_gem_port_with_state *this)
+{
+    if (this->gem_id > (bcmolt_xgpon_gem_id) 65533U)
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (this->state)
+    {
+        case BCMOLT_XGPON_GEM_PORT_STATE_NOT_CONFIGURED:
+            break;
+        case BCMOLT_XGPON_GEM_PORT_STATE_INACTIVE:
+            break;
+        case BCMOLT_XGPON_GEM_PORT_STATE_ACTIVE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_gem_port_with_state_list_u16_max_128_set_default(bcmolt_xgpon_gem_port_with_state_list_u16_max_128 *this)
+{
+    this->len = 0;
+    this->val = NULL;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_with_state_list_u16_max_128_pack(const bcmolt_xgpon_gem_port_with_state_list_u16_max_128 *this, bcmolt_buf *buf)
+{
+    uint16_t i0;
+    if (!bcmolt_buf_write_u16(buf, this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_xgpon_gem_port_with_state_list_u16_max_128\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+        return BCMOS_FALSE;
+    }
+
+    if (this->len > 128)
+    {
+        return BCMOS_FALSE;
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_xgpon_gem_port_with_state_pack(&this->val[i0], buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_gem_port_with_state_list_u16_max_128_get_packed_length(const bcmolt_xgpon_gem_port_with_state_list_u16_max_128 *this)
+{
+    return 2 + (3 * this->len);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_with_state_list_u16_max_128_unpack(bcmolt_xgpon_gem_port_with_state_list_u16_max_128 *this, bcmolt_buf *buf, void **extra_mem)
+{
+    uint16_t i0;
+    if (!bcmolt_buf_read_u16(buf, &this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        if (extra_mem == NULL)
+        {
+            bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_xgpon_gem_port_with_state_list_u16_max_128\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+            return BCMOS_FALSE;
+        }
+        else
+        {
+            this->val = (bcmolt_xgpon_gem_port_with_state *) *extra_mem;
+            *extra_mem = ((uint8_t *) *extra_mem) + BCMOS_ROUND_TO_WORD(this->len * sizeof(bcmolt_xgpon_gem_port_with_state));
+        }
+    }
+
+    if (this->len > 128)
+    {
+        return BCMOS_FALSE;
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_xgpon_gem_port_with_state_unpack(&this->val[i0], buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_with_state_list_u16_max_128_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    uint16_t len;
+    if (!bcmolt_buf_read_u16(packed, &len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *extra_mem += BCMOS_ROUND_TO_WORD(sizeof(bcmolt_xgpon_gem_port_with_state) * len);
+    if (!bcmolt_buf_skip(packed, len * 3))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_with_state_list_u16_max_128_bounds_check(const bcmolt_xgpon_gem_port_with_state_list_u16_max_128 *this)
+{
+    if (this->len > 128)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_gem_port_with_state_list_u16_max_256_set_default(bcmolt_xgpon_gem_port_with_state_list_u16_max_256 *this)
+{
+    this->len = 0;
+    this->val = NULL;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_with_state_list_u16_max_256_pack(const bcmolt_xgpon_gem_port_with_state_list_u16_max_256 *this, bcmolt_buf *buf)
+{
+    uint16_t i0;
+    if (!bcmolt_buf_write_u16(buf, this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_xgpon_gem_port_with_state_list_u16_max_256\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+        return BCMOS_FALSE;
+    }
+
+    if (this->len > 256)
+    {
+        return BCMOS_FALSE;
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_xgpon_gem_port_with_state_pack(&this->val[i0], buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_gem_port_with_state_list_u16_max_256_get_packed_length(const bcmolt_xgpon_gem_port_with_state_list_u16_max_256 *this)
+{
+    return 2 + (3 * this->len);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_with_state_list_u16_max_256_unpack(bcmolt_xgpon_gem_port_with_state_list_u16_max_256 *this, bcmolt_buf *buf, void **extra_mem)
+{
+    uint16_t i0;
+    if (!bcmolt_buf_read_u16(buf, &this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        if (extra_mem == NULL)
+        {
+            bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_xgpon_gem_port_with_state_list_u16_max_256\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+            return BCMOS_FALSE;
+        }
+        else
+        {
+            this->val = (bcmolt_xgpon_gem_port_with_state *) *extra_mem;
+            *extra_mem = ((uint8_t *) *extra_mem) + BCMOS_ROUND_TO_WORD(this->len * sizeof(bcmolt_xgpon_gem_port_with_state));
+        }
+    }
+
+    if (this->len > 256)
+    {
+        return BCMOS_FALSE;
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_xgpon_gem_port_with_state_unpack(&this->val[i0], buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_with_state_list_u16_max_256_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    uint16_t len;
+    if (!bcmolt_buf_read_u16(packed, &len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *extra_mem += BCMOS_ROUND_TO_WORD(sizeof(bcmolt_xgpon_gem_port_with_state) * len);
+    if (!bcmolt_buf_skip(packed, len * 3))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_with_state_list_u16_max_256_bounds_check(const bcmolt_xgpon_gem_port_with_state_list_u16_max_256 *this)
+{
+    if (this->len > 256)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_key_exchange_set_default(bcmolt_xgpon_key_exchange *this)
+{
+    this->interval = 10000;
+    this->control = BCMOLT_CONTROL_STATE_DISABLE;
+    this->encrypted_ports_only = BCMOLT_CONTROL_STATE_DISABLE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_key_exchange_pack(const bcmolt_xgpon_key_exchange *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u32(buf, this->interval))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_control_state_pack(this->control, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_control_state_pack(this->encrypted_ports_only, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_key_exchange_unpack(bcmolt_xgpon_key_exchange *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u32(buf, &this->interval))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_control_state_unpack(&this->control, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_control_state_unpack(&this->encrypted_ports_only, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_key_exchange_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 6);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_key_exchange_bounds_check(const bcmolt_xgpon_key_exchange *this)
+{
+    if (this->interval < 10000)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->interval > 3600000UL)
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (this->control)
+    {
+        case BCMOLT_CONTROL_STATE_DISABLE:
+            break;
+        case BCMOLT_CONTROL_STATE_ENABLE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->encrypted_ports_only)
+    {
+        case BCMOLT_CONTROL_STATE_DISABLE:
+            break;
+        case BCMOLT_CONTROL_STATE_ENABLE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_multicast_key_set_default(bcmolt_xgpon_multicast_key *this)
+{
+    memset(this->key.bytes, 0, sizeof(this->key.bytes));
+    this->key_control = BCMOS_FALSE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_multicast_key_pack(const bcmolt_xgpon_multicast_key *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_aes_key_pack(&this->key, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_bool(buf, this->key_control))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_multicast_key_unpack(bcmolt_xgpon_multicast_key *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_aes_key_unpack(&this->key, buf, extra_mem))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_bool(buf, &this->key_control))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_multicast_key_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 17);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_multicast_key_bounds_check(const bcmolt_xgpon_multicast_key *this)
+{
+    if (!bcmolt_aes_key_bounds_check(&this->key))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_ni_debug_set_default(bcmolt_xgpon_ni_debug *this)
+{
+    this->increase_available_cbr_bw = BCMOS_FALSE;
+    this->inter_burst_gap_in_bytes = 512;
+    this->number_of_gem_ports_per_onu = 64;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_debug_pack(const bcmolt_xgpon_ni_debug *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_bool(buf, this->increase_available_cbr_bw))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u16(buf, this->inter_burst_gap_in_bytes))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u16(buf, this->number_of_gem_ports_per_onu))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_debug_unpack(bcmolt_xgpon_ni_debug *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_bool(buf, &this->increase_available_cbr_bw))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u16(buf, &this->inter_burst_gap_in_bytes))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u16(buf, &this->number_of_gem_ports_per_onu))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_debug_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 5);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_debug_bounds_check(const bcmolt_xgpon_ni_debug *this)
+{
+    if (this->number_of_gem_ports_per_onu < 8)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->number_of_gem_ports_per_onu > 256)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_activation_set_default(bcmolt_xgpon_onu_activation *this)
+{
+    this->key_exchange = BCMOLT_CONTROL_STATE_DISABLE;
+    this->fail_due_to_regis_auto_fail = BCMOLT_CONTROL_STATE_ENABLE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_activation_pack(const bcmolt_xgpon_onu_activation *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_control_state_pack(this->key_exchange, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_control_state_pack(this->fail_due_to_regis_auto_fail, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_activation_unpack(bcmolt_xgpon_onu_activation *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_control_state_unpack(&this->key_exchange, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_control_state_unpack(&this->fail_due_to_regis_auto_fail, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_activation_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 2);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_activation_bounds_check(const bcmolt_xgpon_onu_activation *this)
+{
+    switch (this->key_exchange)
+    {
+        case BCMOLT_CONTROL_STATE_DISABLE:
+            break;
+        case BCMOLT_CONTROL_STATE_ENABLE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->fail_due_to_regis_auto_fail)
+    {
+        case BCMOLT_CONTROL_STATE_DISABLE:
+            break;
+        case BCMOLT_CONTROL_STATE_ENABLE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_aes_key_set_default(bcmolt_xgpon_onu_aes_key *this)
+{
+    memset(this->encryption_key.bytes, 0, sizeof(this->encryption_key.bytes));
+    this->key_index = 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_aes_key_pack(const bcmolt_xgpon_onu_aes_key *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_aes_key_pack(&this->encryption_key, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->key_index))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_aes_key_unpack(bcmolt_xgpon_onu_aes_key *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_aes_key_unpack(&this->encryption_key, buf, extra_mem))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->key_index))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_aes_key_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 17);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_aes_key_bounds_check(const bcmolt_xgpon_onu_aes_key *this)
+{
+    if (!bcmolt_aes_key_bounds_check(&this->encryption_key))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_alarm_state_set_default(bcmolt_xgpon_onu_alarm_state *this)
+{
+    this->losi = BCMOLT_STATUS_OFF;
+    this->lobi = BCMOLT_STATUS_OFF;
+    this->lopci = BCMOLT_STATUS_OFF;
+    this->lopci_mic_error = BCMOLT_STATUS_OFF;
+    this->looci = BCMOLT_STATUS_OFF;
+    this->tiwi = BCMOLT_STATUS_OFF;
+    this->dowi = BCMOLT_STATUS_OFF;
+    this->sufi = BCMOLT_STATUS_OFF;
+    this->sfi = BCMOLT_STATUS_OFF;
+    this->sdi = BCMOLT_STATUS_OFF;
+    this->dfi = BCMOLT_STATUS_OFF;
+    this->dgi = BCMOLT_STATUS_OFF;
+    this->pqsi = BCMOLT_STATUS_OFF;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_alarm_state_pack(const bcmolt_xgpon_onu_alarm_state *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_status_pack(this->losi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_pack(this->lobi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_pack(this->lopci, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_pack(this->lopci_mic_error, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_pack(this->looci, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_pack(this->tiwi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_pack(this->dowi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_pack(this->sufi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_pack(this->sfi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_pack(this->sdi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_pack(this->dfi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_pack(this->dgi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_pack(this->pqsi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_alarm_state_unpack(bcmolt_xgpon_onu_alarm_state *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_status_unpack(&this->losi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_unpack(&this->lobi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_unpack(&this->lopci, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_unpack(&this->lopci_mic_error, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_unpack(&this->looci, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_unpack(&this->tiwi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_unpack(&this->dowi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_unpack(&this->sufi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_unpack(&this->sfi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_unpack(&this->sdi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_unpack(&this->dfi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_unpack(&this->dgi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_unpack(&this->pqsi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_alarm_state_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 13);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_alarm_state_bounds_check(const bcmolt_xgpon_onu_alarm_state *this)
+{
+    switch (this->losi)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->lobi)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->lopci)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->lopci_mic_error)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->looci)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->tiwi)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->dowi)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->sufi)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->sfi)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->sdi)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->dfi)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->dgi)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->pqsi)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_alarms_set_default(bcmolt_xgpon_onu_alarms *this)
+{
+    this->losi = BCMOLT_STATUS_OFF;
+    this->lobi = BCMOLT_STATUS_OFF;
+    this->lopci_miss = BCMOLT_STATUS_OFF;
+    this->lopci_mic_error = BCMOLT_STATUS_OFF;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_alarms_pack(const bcmolt_xgpon_onu_alarms *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_status_pack(this->losi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_pack(this->lobi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_pack(this->lopci_miss, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_pack(this->lopci_mic_error, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_alarms_unpack(bcmolt_xgpon_onu_alarms *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_status_unpack(&this->losi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_unpack(&this->lobi, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_unpack(&this->lopci_miss, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_status_unpack(&this->lopci_mic_error, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_alarms_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 4);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_alarms_bounds_check(const bcmolt_xgpon_onu_alarms *this)
+{
+    switch (this->losi)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->lobi)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->lopci_miss)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->lopci_mic_error)
+    {
+        case BCMOLT_STATUS_OFF:
+            break;
+        case BCMOLT_STATUS_ON:
+            break;
+        case BCMOLT_STATUS_NO_CHANGE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_alarms_thresholds_set_default(bcmolt_xgpon_onu_alarms_thresholds *this)
+{
+    this->losi = 4;
+    this->lobi = 4;
+    this->looci = 3;
+    this->lopci = 3;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_alarms_thresholds_pack(const bcmolt_xgpon_onu_alarms_thresholds *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u8(buf, this->losi))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->lobi))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->looci))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->lopci))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_alarms_thresholds_unpack(bcmolt_xgpon_onu_alarms_thresholds *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u8(buf, &this->losi))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->lobi))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->looci))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->lopci))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_alarms_thresholds_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 4);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_alarms_thresholds_bounds_check(const bcmolt_xgpon_onu_alarms_thresholds *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_eqd_set_default(bcmolt_xgpon_onu_eqd *this)
+{
+    this->onu_id = (bcmolt_xgpon_onu_id) 0;
+    this->eqd = 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_eqd_pack(const bcmolt_xgpon_onu_eqd *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u16(buf, (uint16_t) this->onu_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->eqd))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_eqd_unpack(bcmolt_xgpon_onu_eqd *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->onu_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->eqd))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_eqd_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 6);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_eqd_bounds_check(const bcmolt_xgpon_onu_eqd *this)
+{
+    if (this->onu_id > (bcmolt_xgpon_onu_id) 511)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_eqd_list_u32_set_default(bcmolt_xgpon_onu_eqd_list_u32 *this)
+{
+    this->len = 0;
+    this->val = NULL;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_eqd_list_u32_pack(const bcmolt_xgpon_onu_eqd_list_u32 *this, bcmolt_buf *buf)
+{
+    uint32_t i0;
+    if (!bcmolt_buf_write_u32(buf, this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_xgpon_onu_eqd_list_u32\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+        return BCMOS_FALSE;
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_xgpon_onu_eqd_pack(&this->val[i0], buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_eqd_list_u32_get_packed_length(const bcmolt_xgpon_onu_eqd_list_u32 *this)
+{
+    return 4 + (6 * this->len);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_eqd_list_u32_unpack(bcmolt_xgpon_onu_eqd_list_u32 *this, bcmolt_buf *buf, void **extra_mem)
+{
+    uint32_t i0;
+    if (!bcmolt_buf_read_u32(buf, &this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        if (extra_mem == NULL)
+        {
+            bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_xgpon_onu_eqd_list_u32\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+            return BCMOS_FALSE;
+        }
+        else
+        {
+            this->val = (bcmolt_xgpon_onu_eqd *) *extra_mem;
+            *extra_mem = ((uint8_t *) *extra_mem) + BCMOS_ROUND_TO_WORD(this->len * sizeof(bcmolt_xgpon_onu_eqd));
+        }
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_xgpon_onu_eqd_unpack(&this->val[i0], buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_eqd_list_u32_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    uint32_t len;
+    if (!bcmolt_buf_read_u32(packed, &len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *extra_mem += BCMOS_ROUND_TO_WORD(sizeof(bcmolt_xgpon_onu_eqd) * len);
+    if (!bcmolt_buf_skip(packed, len * 6))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_eqd_list_u32_bounds_check(const bcmolt_xgpon_onu_eqd_list_u32 *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_registration_keys_set_default(bcmolt_xgpon_onu_registration_keys *this)
+{
+    memset(this->ploam_ik.bytes, 0, sizeof(this->ploam_ik.bytes));
+    memset(this->omci_ik.bytes, 0, sizeof(this->omci_ik.bytes));
+    memset(this->omci_k1.bytes, 0, sizeof(this->omci_k1.bytes));
+    memset(this->omci_k2.bytes, 0, sizeof(this->omci_k2.bytes));
+    memset(this->kek.bytes, 0, sizeof(this->kek.bytes));
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_registration_keys_pack(const bcmolt_xgpon_onu_registration_keys *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_aes_key_pack(&this->ploam_ik, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_aes_key_pack(&this->omci_ik, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_aes_key_pack(&this->omci_k1, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_aes_key_pack(&this->omci_k2, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_aes_key_pack(&this->kek, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_registration_keys_unpack(bcmolt_xgpon_onu_registration_keys *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_aes_key_unpack(&this->ploam_ik, buf, extra_mem))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_aes_key_unpack(&this->omci_ik, buf, extra_mem))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_aes_key_unpack(&this->omci_k1, buf, extra_mem))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_aes_key_unpack(&this->omci_k2, buf, extra_mem))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_aes_key_unpack(&this->kek, buf, extra_mem))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_registration_keys_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 80);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_registration_keys_bounds_check(const bcmolt_xgpon_onu_registration_keys *this)
+{
+    if (!bcmolt_aes_key_bounds_check(&this->ploam_ik))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_aes_key_bounds_check(&this->omci_ik))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_aes_key_bounds_check(&this->omci_k1))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_aes_key_bounds_check(&this->omci_k2))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_aes_key_bounds_check(&this->kek))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_with_state_set_default(bcmolt_xgpon_onu_with_state *this)
+{
+    this->onu_id = (bcmolt_xgpon_onu_id) 0;
+    this->state = BCMOLT_ONU_STATE_NOT_CONFIGURED;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_with_state_pack(const bcmolt_xgpon_onu_with_state *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u16(buf, (uint16_t) this->onu_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_onu_state_pack(this->state, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_with_state_unpack(bcmolt_xgpon_onu_with_state *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->onu_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_onu_state_unpack(&this->state, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_with_state_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 3);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_with_state_bounds_check(const bcmolt_xgpon_onu_with_state *this)
+{
+    if (this->onu_id > (bcmolt_xgpon_onu_id) 511)
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (this->state)
+    {
+        case BCMOLT_ONU_STATE_NOT_CONFIGURED:
+            break;
+        case BCMOLT_ONU_STATE_INACTIVE:
+            break;
+        case BCMOLT_ONU_STATE_ACTIVE:
+            break;
+        case BCMOLT_ONU_STATE_ACTIVE_STANDBY:
+            break;
+        case BCMOLT_ONU_STATE_DISABLED:
+            break;
+        case BCMOLT_ONU_STATE_AWAKE_FREE:
+            break;
+        case BCMOLT_ONU_STATE_PROCESSING:
+            break;
+        case BCMOLT_ONU_STATE_LOW_POWER_DOZE:
+            break;
+        case BCMOLT_ONU_STATE_LOW_POWER_SLEEP:
+            break;
+        case BCMOLT_ONU_STATE_LOW_POWER_WATCH:
+            break;
+        case BCMOLT_ONU_STATE_UNAWARE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_with_state_list_u16_max_510_set_default(bcmolt_xgpon_onu_with_state_list_u16_max_510 *this)
+{
+    this->len = 0;
+    this->val = NULL;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_with_state_list_u16_max_510_pack(const bcmolt_xgpon_onu_with_state_list_u16_max_510 *this, bcmolt_buf *buf)
+{
+    uint16_t i0;
+    if (!bcmolt_buf_write_u16(buf, this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_xgpon_onu_with_state_list_u16_max_510\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+        return BCMOS_FALSE;
+    }
+
+    if (this->len > 510)
+    {
+        return BCMOS_FALSE;
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_xgpon_onu_with_state_pack(&this->val[i0], buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_with_state_list_u16_max_510_get_packed_length(const bcmolt_xgpon_onu_with_state_list_u16_max_510 *this)
+{
+    return 2 + (3 * this->len);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_with_state_list_u16_max_510_unpack(bcmolt_xgpon_onu_with_state_list_u16_max_510 *this, bcmolt_buf *buf, void **extra_mem)
+{
+    uint16_t i0;
+    if (!bcmolt_buf_read_u16(buf, &this->len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if ((this->len > 0) && (this->val == NULL))
+    {
+        if (extra_mem == NULL)
+        {
+            bcmos_trace(BCMOS_TRACE_LEVEL_ERROR, "Error: list field \"val\" of struct \"bcmolt_xgpon_onu_with_state_list_u16_max_510\" is uninitialized (NULL).  You must allocate memory for this pointer before sending/receiving the message.\n");
+            return BCMOS_FALSE;
+        }
+        else
+        {
+            this->val = (bcmolt_xgpon_onu_with_state *) *extra_mem;
+            *extra_mem = ((uint8_t *) *extra_mem) + BCMOS_ROUND_TO_WORD(this->len * sizeof(bcmolt_xgpon_onu_with_state));
+        }
+    }
+
+    if (this->len > 510)
+    {
+        return BCMOS_FALSE;
+    }
+
+    for (i0 = 0; i0 < this->len; i0++)
+    {
+        if (!bcmolt_xgpon_onu_with_state_unpack(&this->val[i0], buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_with_state_list_u16_max_510_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    uint16_t len;
+    if (!bcmolt_buf_read_u16(packed, &len))
+    {
+        return BCMOS_FALSE;
+    }
+
+    *extra_mem += BCMOS_ROUND_TO_WORD(sizeof(bcmolt_xgpon_onu_with_state) * len);
+    if (!bcmolt_buf_skip(packed, len * 3))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_with_state_list_u16_max_510_bounds_check(const bcmolt_xgpon_onu_with_state_list_u16_max_510 *this)
+{
+    if (this->len > 510)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_ploam_handling_set_default(bcmolt_xgpon_ploam_handling *this)
+{
+    this->ack_timeout = 2000;
+    this->retrans_ranging_time = 0;
+    this->retrans_assign_alloc_id = 0;
+    this->retrans_key_control = 0;
+    this->retrans_request_registration = 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ploam_handling_pack(const bcmolt_xgpon_ploam_handling *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u32(buf, this->ack_timeout))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->retrans_ranging_time))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->retrans_assign_alloc_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->retrans_key_control))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->retrans_request_registration))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ploam_handling_unpack(bcmolt_xgpon_ploam_handling *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u32(buf, &this->ack_timeout))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->retrans_ranging_time))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->retrans_assign_alloc_id))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->retrans_key_control))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->retrans_request_registration))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ploam_handling_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 8);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ploam_handling_bounds_check(const bcmolt_xgpon_ploam_handling *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_protection_switching_set_default(bcmolt_xgpon_protection_switching *this)
+{
+    this->timeout = 100;
+    this->gpio_pin = BCMOLT_GPIO_PIN_UNCONFIGURED;
+    this->fast_ranging = BCMOS_FALSE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_protection_switching_pack(const bcmolt_xgpon_protection_switching *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u16(buf, this->timeout))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_gpio_pin_pack(this->gpio_pin, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_bool(buf, this->fast_ranging))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_protection_switching_unpack(bcmolt_xgpon_protection_switching *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u16(buf, &this->timeout))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_gpio_pin_unpack(&this->gpio_pin, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_bool(buf, &this->fast_ranging))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_protection_switching_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 4);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_protection_switching_bounds_check(const bcmolt_xgpon_protection_switching *this)
+{
+    switch (this->gpio_pin)
+    {
+        case BCMOLT_GPIO_PIN_PIN0:
+            break;
+        case BCMOLT_GPIO_PIN_PIN1:
+            break;
+        case BCMOLT_GPIO_PIN_PIN2:
+            break;
+        case BCMOLT_GPIO_PIN_PIN3:
+            break;
+        case BCMOLT_GPIO_PIN_PIN4:
+            break;
+        case BCMOLT_GPIO_PIN_PIN5:
+            break;
+        case BCMOLT_GPIO_PIN_PIN6:
+            break;
+        case BCMOLT_GPIO_PIN_PIN7:
+            break;
+        case BCMOLT_GPIO_PIN_PIN8:
+            break;
+        case BCMOLT_GPIO_PIN_PIN9:
+            break;
+        case BCMOLT_GPIO_PIN_PIN10:
+            break;
+        case BCMOLT_GPIO_PIN_PIN11:
+            break;
+        case BCMOLT_GPIO_PIN_PIN12:
+            break;
+        case BCMOLT_GPIO_PIN_PIN13:
+            break;
+        case BCMOLT_GPIO_PIN_PIN14:
+            break;
+        case BCMOLT_GPIO_PIN_PIN15:
+            break;
+        case BCMOLT_GPIO_PIN_PIN16:
+            break;
+        case BCMOLT_GPIO_PIN_PIN17:
+            break;
+        case BCMOLT_GPIO_PIN_PIN18:
+            break;
+        case BCMOLT_GPIO_PIN_PIN19:
+            break;
+        case BCMOLT_GPIO_PIN_PIN20:
+            break;
+        case BCMOLT_GPIO_PIN_PIN21:
+            break;
+        case BCMOLT_GPIO_PIN_PIN22:
+            break;
+        case BCMOLT_GPIO_PIN_PIN23:
+            break;
+        case BCMOLT_GPIO_PIN_PIN24:
+            break;
+        case BCMOLT_GPIO_PIN_PIN25:
+            break;
+        case BCMOLT_GPIO_PIN_PIN26:
+            break;
+        case BCMOLT_GPIO_PIN_PIN27:
+            break;
+        case BCMOLT_GPIO_PIN_PIN28:
+            break;
+        case BCMOLT_GPIO_PIN_PIN29:
+            break;
+        case BCMOLT_GPIO_PIN_PIN30:
+            break;
+        case BCMOLT_GPIO_PIN_PIN31:
+            break;
+        case BCMOLT_GPIO_PIN_PIN32:
+            break;
+        case BCMOLT_GPIO_PIN_PIN33:
+            break;
+        case BCMOLT_GPIO_PIN_PIN34:
+            break;
+        case BCMOLT_GPIO_PIN_PIN35:
+            break;
+        case BCMOLT_GPIO_PIN_PIN36:
+            break;
+        case BCMOLT_GPIO_PIN_PIN37:
+            break;
+        case BCMOLT_GPIO_PIN_PIN38:
+            break;
+        case BCMOLT_GPIO_PIN_PIN39:
+            break;
+        case BCMOLT_GPIO_PIN_PIN40:
+            break;
+        case BCMOLT_GPIO_PIN_PIN41:
+            break;
+        case BCMOLT_GPIO_PIN_PIN42:
+            break;
+        case BCMOLT_GPIO_PIN_PIN43:
+            break;
+        case BCMOLT_GPIO_PIN_PIN44:
+            break;
+        case BCMOLT_GPIO_PIN_PIN45:
+            break;
+        case BCMOLT_GPIO_PIN_PIN46:
+            break;
+        case BCMOLT_GPIO_PIN_PIN47:
+            break;
+        case BCMOLT_GPIO_PIN_PIN48:
+            break;
+        case BCMOLT_GPIO_PIN_PIN49:
+            break;
+        case BCMOLT_GPIO_PIN_PIN50:
+            break;
+        case BCMOLT_GPIO_PIN_PIN51:
+            break;
+        case BCMOLT_GPIO_PIN_PIN52:
+            break;
+        case BCMOLT_GPIO_PIN_PIN53:
+            break;
+        case BCMOLT_GPIO_PIN_PIN54:
+            break;
+        case BCMOLT_GPIO_PIN_PIN55:
+            break;
+        case BCMOLT_GPIO_PIN_PIN56:
+            break;
+        case BCMOLT_GPIO_PIN_PIN57:
+            break;
+        case BCMOLT_GPIO_PIN_PIN58:
+            break;
+        case BCMOLT_GPIO_PIN_PIN59:
+            break;
+        case BCMOLT_GPIO_PIN_PIN60:
+            break;
+        case BCMOLT_GPIO_PIN_PIN61:
+            break;
+        case BCMOLT_GPIO_PIN_PIN62:
+            break;
+        case BCMOLT_GPIO_PIN_PIN63:
+            break;
+        case BCMOLT_GPIO_PIN_PIN64:
+            break;
+        case BCMOLT_GPIO_PIN_PIN65:
+            break;
+        case BCMOLT_GPIO_PIN_PIN66:
+            break;
+        case BCMOLT_GPIO_PIN_PIN67:
+            break;
+        case BCMOLT_GPIO_PIN_PIN68:
+            break;
+        case BCMOLT_GPIO_PIN_PIN69:
+            break;
+        case BCMOLT_GPIO_PIN_PIN70:
+            break;
+        case BCMOLT_GPIO_PIN_PIN71:
+            break;
+        case BCMOLT_GPIO_PIN_PIN72:
+            break;
+        case BCMOLT_GPIO_PIN_PIN73:
+            break;
+        case BCMOLT_GPIO_PIN_PIN74:
+            break;
+        case BCMOLT_GPIO_PIN_PIN75:
+            break;
+        case BCMOLT_GPIO_PIN_PIN76:
+            break;
+        case BCMOLT_GPIO_PIN_PIN77:
+            break;
+        case BCMOLT_GPIO_PIN_PIN78:
+            break;
+        case BCMOLT_GPIO_PIN_PIN79:
+            break;
+        case BCMOLT_GPIO_PIN_PIN80:
+            break;
+        case BCMOLT_GPIO_PIN_PIN81:
+            break;
+        case BCMOLT_GPIO_PIN_PIN82:
+            break;
+        case BCMOLT_GPIO_PIN_PIN83:
+            break;
+        case BCMOLT_GPIO_PIN_PIN84:
+            break;
+        case BCMOLT_GPIO_PIN_PIN85:
+            break;
+        case BCMOLT_GPIO_PIN_PIN86:
+            break;
+        case BCMOLT_GPIO_PIN_PIN87:
+            break;
+        case BCMOLT_GPIO_PIN_PIN88:
+            break;
+        case BCMOLT_GPIO_PIN_PIN89:
+            break;
+        case BCMOLT_GPIO_PIN_PIN90:
+            break;
+        case BCMOLT_GPIO_PIN_PIN91:
+            break;
+        case BCMOLT_GPIO_PIN_PIN92:
+            break;
+        case BCMOLT_GPIO_PIN_PIN93:
+            break;
+        case BCMOLT_GPIO_PIN_PIN94:
+            break;
+        case BCMOLT_GPIO_PIN_PIN95:
+            break;
+        case BCMOLT_GPIO_PIN_PIN96:
+            break;
+        case BCMOLT_GPIO_PIN_PIN97:
+            break;
+        case BCMOLT_GPIO_PIN_PIN98:
+            break;
+        case BCMOLT_GPIO_PIN_PIN99:
+            break;
+        case BCMOLT_GPIO_PIN_PIN100:
+            break;
+        case BCMOLT_GPIO_PIN_PIN101:
+            break;
+        case BCMOLT_GPIO_PIN_PIN102:
+            break;
+        case BCMOLT_GPIO_PIN_PIN103:
+            break;
+        case BCMOLT_GPIO_PIN_PIN104:
+            break;
+        case BCMOLT_GPIO_PIN_PIN105:
+            break;
+        case BCMOLT_GPIO_PIN_PIN106:
+            break;
+        case BCMOLT_GPIO_PIN_UNCONFIGURED:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_protection_switching_debug_set_default(bcmolt_xgpon_protection_switching_debug *this)
+{
+    this->data_map_delay_ms = 0;
+    this->rerange_send_ranging_time = BCMOS_FALSE;
+    this->rerange_send_ranging_time_delay = 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_protection_switching_debug_pack(const bcmolt_xgpon_protection_switching_debug *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u16(buf, this->data_map_delay_ms))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_bool(buf, this->rerange_send_ranging_time))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u16(buf, this->rerange_send_ranging_time_delay))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_protection_switching_debug_unpack(bcmolt_xgpon_protection_switching_debug *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u16(buf, &this->data_map_delay_ms))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_bool(buf, &this->rerange_send_ranging_time))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u16(buf, &this->rerange_send_ranging_time_delay))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_protection_switching_debug_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 5);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_protection_switching_debug_bounds_check(const bcmolt_xgpon_protection_switching_debug *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_rssi_normal_config_set_default(bcmolt_xgpon_rssi_normal_config *this)
+{
+    this->polarity = BCMOLT_POLARITY_LOW;
+    this->location = 35;
+    this->location_sign = BCMOLT_SIGN_POSITIVE;
+    this->pulse_width = 80;
+    this->minimum_burst = 200;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_rssi_normal_config_pack(const bcmolt_xgpon_rssi_normal_config *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_polarity_pack(this->polarity, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->location))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_sign_pack(this->location_sign, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u16(buf, this->pulse_width))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u16(buf, this->minimum_burst))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_rssi_normal_config_unpack(bcmolt_xgpon_rssi_normal_config *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_polarity_unpack(&this->polarity, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->location))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_sign_unpack(&this->location_sign, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u16(buf, &this->pulse_width))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u16(buf, &this->minimum_burst))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_rssi_normal_config_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 7);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_rssi_normal_config_bounds_check(const bcmolt_xgpon_rssi_normal_config *this)
+{
+    switch (this->polarity)
+    {
+        case BCMOLT_POLARITY_LOW:
+            break;
+        case BCMOLT_POLARITY_HIGH:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->location_sign)
+    {
+        case BCMOLT_SIGN_POSITIVE:
+            break;
+        case BCMOLT_SIGN_NEGATIVE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_rssi_ranging_config_set_default(bcmolt_xgpon_rssi_ranging_config *this)
+{
+    this->start_on_ed = BCMOS_TRUE;
+    this->frame_delay = 0;
+    this->word_delay = 20;
+    this->frame_delay_after_ed = 0;
+    this->word_delay_after_ed = 1;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_rssi_ranging_config_pack(const bcmolt_xgpon_rssi_ranging_config *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_bool(buf, this->start_on_ed))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->frame_delay))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u16(buf, this->word_delay))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->frame_delay_after_ed))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u16(buf, this->word_delay_after_ed))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_rssi_ranging_config_unpack(bcmolt_xgpon_rssi_ranging_config *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_bool(buf, &this->start_on_ed))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->frame_delay))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u16(buf, &this->word_delay))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->frame_delay_after_ed))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u16(buf, &this->word_delay_after_ed))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_rssi_ranging_config_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 7);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_rssi_ranging_config_bounds_check(const bcmolt_xgpon_rssi_ranging_config *this)
+{
+    if (this->frame_delay > 31)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->word_delay > 16383)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->frame_delay_after_ed > 31)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->word_delay_after_ed > 16383)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_rx_ranging_sm_pattern_set_default(bcmolt_xgpon_rx_ranging_sm_pattern *this)
+{
+    this->trx_reset_pattern_first = 0;
+    this->trx_reset_pattern_middle = 0;
+    this->trx_reset_pattern_last = 0;
+    this->trx_reset_middle_repeats = 0;
+    this->trx_reset_location = 0;
+    this->bcdr_reset_pattern_first = 0;
+    this->bcdr_reset_pattern_middle = 0;
+    this->bcdr_reset_pattern_last = 0;
+    this->bcdr_reset_middle_repeats = 0;
+    this->bcdr_reset_location = 0;
+    this->bcdr_reset_polarity = BCMOS_FALSE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_rx_ranging_sm_pattern_pack(const bcmolt_xgpon_rx_ranging_sm_pattern *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u32(buf, this->trx_reset_pattern_first))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->trx_reset_pattern_middle))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->trx_reset_pattern_last))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->trx_reset_middle_repeats))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->trx_reset_location))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->bcdr_reset_pattern_first))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->bcdr_reset_pattern_middle))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u32(buf, this->bcdr_reset_pattern_last))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->bcdr_reset_middle_repeats))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, this->bcdr_reset_location))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_bool(buf, this->bcdr_reset_polarity))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_rx_ranging_sm_pattern_unpack(bcmolt_xgpon_rx_ranging_sm_pattern *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u32(buf, &this->trx_reset_pattern_first))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->trx_reset_pattern_middle))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->trx_reset_pattern_last))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->trx_reset_middle_repeats))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->trx_reset_location))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->bcdr_reset_pattern_first))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->bcdr_reset_pattern_middle))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u32(buf, &this->bcdr_reset_pattern_last))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->bcdr_reset_middle_repeats))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, &this->bcdr_reset_location))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_bool(buf, &this->bcdr_reset_polarity))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_rx_ranging_sm_pattern_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 29);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_rx_ranging_sm_pattern_bounds_check(const bcmolt_xgpon_rx_ranging_sm_pattern *this)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_serdes_configuration_set_default(bcmolt_xgpon_serdes_configuration *this)
+{
+    this->multi_ed_mode = BCMOS_FALSE;
+    this->ranging_mode = BCMOLT_XGPON_SERDES_RANGING_MODE_BCDR;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_serdes_configuration_pack(const bcmolt_xgpon_serdes_configuration *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_bool(buf, this->multi_ed_mode))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_xgpon_serdes_ranging_mode_pack(this->ranging_mode, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_serdes_configuration_unpack(bcmolt_xgpon_serdes_configuration *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_bool(buf, &this->multi_ed_mode))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_xgpon_serdes_ranging_mode_unpack(&this->ranging_mode, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_serdes_configuration_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 2);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_serdes_configuration_bounds_check(const bcmolt_xgpon_serdes_configuration *this)
+{
+    switch (this->ranging_mode)
+    {
+        case BCMOLT_XGPON_SERDES_RANGING_MODE_ED:
+            break;
+        case BCMOLT_XGPON_SERDES_RANGING_MODE_BCDR:
+            break;
+        case BCMOLT_XGPON_SERDES_RANGING_MODE_FAST_RANGING1:
+            break;
+        case BCMOLT_XGPON_SERDES_RANGING_MODE_FAST_RANGING2:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_sn_acquisition_set_default(bcmolt_xgpon_sn_acquisition *this)
+{
+    this->interval = 1000;
+    this->control = BCMOLT_CONTROL_STATE_DISABLE;
+    this->onu_post_discovery_mode = BCMOLT_ONU_POST_DISCOVERY_MODE_NONE;
+    this->burst_profile = (bcmolt_burst_profile_index) 0;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_sn_acquisition_pack(const bcmolt_xgpon_sn_acquisition *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_buf_write_u32(buf, this->interval))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_control_state_pack(this->control, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_onu_post_discovery_mode_pack(this->onu_post_discovery_mode, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_write_u8(buf, (uint8_t) this->burst_profile))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_sn_acquisition_unpack(bcmolt_xgpon_sn_acquisition *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_buf_read_u32(buf, &this->interval))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_control_state_unpack(&this->control, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_onu_post_discovery_mode_unpack(&this->onu_post_discovery_mode, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_buf_read_u8(buf, (uint8_t *) &this->burst_profile))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_sn_acquisition_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 7);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_sn_acquisition_bounds_check(const bcmolt_xgpon_sn_acquisition *this)
+{
+    if (this->interval < 1000)
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (this->interval > 2147483UL)
+    {
+        return BCMOS_FALSE;
+    }
+
+    switch (this->control)
+    {
+        case BCMOLT_CONTROL_STATE_DISABLE:
+            break;
+        case BCMOLT_CONTROL_STATE_ENABLE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->onu_post_discovery_mode)
+    {
+        case BCMOLT_ONU_POST_DISCOVERY_MODE_NONE:
+            break;
+        case BCMOLT_ONU_POST_DISCOVERY_MODE_ACTIVATE:
+            break;
+        case BCMOLT_ONU_POST_DISCOVERY_MODE_DISABLE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    if (this->burst_profile > (bcmolt_burst_profile_index) 3)
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_trx_debug_set_default(bcmolt_xgpon_trx_debug *this)
+{
+    this->rx_reversed_polarity = BCMOLT_CONTROL_STATE_DISABLE;
+    this->neg_out_bit = BCMOLT_CONTROL_STATE_DISABLE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_trx_debug_pack(const bcmolt_xgpon_trx_debug *this, bcmolt_buf *buf)
+{
+    if (!bcmolt_control_state_pack(this->rx_reversed_polarity, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_control_state_pack(this->neg_out_bit, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_trx_debug_unpack(bcmolt_xgpon_trx_debug *this, bcmolt_buf *buf, void **extra_mem)
+{
+    if (!bcmolt_control_state_unpack(&this->rx_reversed_polarity, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    if (!bcmolt_control_state_unpack(&this->neg_out_bit, buf))
+    {
+        return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_trx_debug_scan(bcmolt_buf *packed, uint32_t *extra_mem)
+{
+    (void)extra_mem;
+    return bcmolt_buf_skip(packed, 2);
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_trx_debug_bounds_check(const bcmolt_xgpon_trx_debug *this)
+{
+    switch (this->rx_reversed_polarity)
+    {
+        case BCMOLT_CONTROL_STATE_DISABLE:
+            break;
+        case BCMOLT_CONTROL_STATE_ENABLE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    switch (this->neg_out_bit)
+    {
+        case BCMOLT_CONTROL_STATE_DISABLE:
+            break;
+        case BCMOLT_CONTROL_STATE_ENABLE:
+            break;
+        default:
+            return BCMOS_FALSE;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_ae_ni_key_set_default(bcmolt_ae_ni_key *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_KEY_ID_AE_NI)) != 0)
+    {
+        this->ae_ni = (bcmolt_ae_ni) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_ni_key_pack(const bcmolt_ae_ni_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_KEY_ID_AE_NI)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->ae_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_ae_ni_key_get_packed_length(const bcmolt_ae_ni_key *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_KEY_ID_AE_NI)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_ni_key_unpack(bcmolt_ae_ni_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_KEY_ID_AE_NI)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->ae_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_ni_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_KEY_ID_AE_NI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_ni_key_bounds_check(const bcmolt_ae_ni_key *this, bcmolt_presence_mask fields_present, bcmolt_ae_ni_key_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_ae_ni_cfg_data_set_default(bcmolt_ae_ni_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_CFG_ID_MAC_ADDRESS)) != 0)
+    {
+        this->mac_address.u8[0] = 0x0000;
+        this->mac_address.u8[1] = 0x000D;
+        this->mac_address.u8[2] = 0x00B6;
+        this->mac_address.u8[3] = 0x0000;
+        this->mac_address.u8[4] = 0x0000;
+        this->mac_address.u8[5] = 0x0000;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_CFG_ID_AE_NI_EN)) != 0)
+    {
+        this->ae_ni_en = BCMOLT_AE_NI_EN_STATE_DISABLED;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_CFG_ID_MTU_10G)) != 0)
+    {
+        this->mtu_10g = 1536;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_CFG_ID_PRBS_GENERATOR)) != 0)
+    {
+        this->prbs_generator.polynom = BCMOLT_PRBS_POLYNOMIAL_PRBS_7;
+        this->prbs_generator.error_insert = BCMOS_FALSE;
+        this->prbs_generator.invert = BCMOS_FALSE;
+        this->prbs_generator.control = BCMOLT_CONTROL_STATE_DISABLE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_CFG_ID_PRBS_CHECKER)) != 0)
+    {
+        this->prbs_checker.polynom = BCMOLT_PRBS_POLYNOMIAL_PRBS_7;
+        this->prbs_checker.mode = BCMOLT_PRBS_CHECKER_MODE_SELF_SYNC;
+        this->prbs_checker.data_invert = BCMOS_FALSE;
+        this->prbs_checker.control = BCMOLT_CONTROL_STATE_DISABLE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_CFG_ID_PRBS_STATUS)) != 0)
+    {
+        this->prbs_status.lock_state = BCMOLT_PRBS_LOCK_STATE_UNLOCKED;
+        this->prbs_status.error_counts = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_ni_cfg_data_pack(const bcmolt_ae_ni_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_CFG_ID_MAC_ADDRESS)) != 0)
+    {
+        if (!bcmolt_buf_write_mac_address(buf, this->mac_address))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_CFG_ID_AE_NI_EN)) != 0)
+    {
+        if (!bcmolt_ae_ni_en_state_pack(this->ae_ni_en, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_CFG_ID_MTU_10G)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, this->mtu_10g))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_CFG_ID_PRBS_GENERATOR)) != 0)
+    {
+        if (!bcmolt_prbs_generator_config_pack(&this->prbs_generator, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_CFG_ID_PRBS_CHECKER)) != 0)
+    {
+        if (!bcmolt_prbs_checker_config_pack(&this->prbs_checker, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_CFG_ID_PRBS_STATUS)) != 0)
+    {
+        if (!bcmolt_prbs_status_pack(&this->prbs_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_ae_ni_cfg_data_get_packed_length(const bcmolt_ae_ni_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_CFG_ID_MAC_ADDRESS)) != 0)
+    {
+        count += 6;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_CFG_ID_AE_NI_EN)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_CFG_ID_MTU_10G)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_CFG_ID_PRBS_GENERATOR)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_CFG_ID_PRBS_CHECKER)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_CFG_ID_PRBS_STATUS)) != 0)
+    {
+        count += 5;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_ni_cfg_data_unpack(bcmolt_ae_ni_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_CFG_ID_MAC_ADDRESS)) != 0)
+    {
+        if (!bcmolt_buf_read_mac_address(buf, &this->mac_address))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_CFG_ID_AE_NI_EN)) != 0)
+    {
+        if (!bcmolt_ae_ni_en_state_unpack(&this->ae_ni_en, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_CFG_ID_MTU_10G)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, &this->mtu_10g))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_CFG_ID_PRBS_GENERATOR)) != 0)
+    {
+        if (!bcmolt_prbs_generator_config_unpack(&this->prbs_generator, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_CFG_ID_PRBS_CHECKER)) != 0)
+    {
+        if (!bcmolt_prbs_checker_config_unpack(&this->prbs_checker, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_CFG_ID_PRBS_STATUS)) != 0)
+    {
+        if (!bcmolt_prbs_status_unpack(&this->prbs_status, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_ni_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_CFG_ID_MAC_ADDRESS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 6))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_CFG_ID_AE_NI_EN)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_CFG_ID_MTU_10G)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_CFG_ID_PRBS_GENERATOR)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_CFG_ID_PRBS_CHECKER)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_CFG_ID_PRBS_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 5))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_ni_cfg_data_bounds_check(const bcmolt_ae_ni_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_ae_ni_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_CFG_ID_AE_NI_EN)) != 0)
+    {
+        switch (this->ae_ni_en)
+        {
+            case BCMOLT_AE_NI_EN_STATE_DISABLED:
+                break;
+            case BCMOLT_AE_NI_EN_STATE_ENABLED:
+                break;
+            default:
+                *failed_prop = BCMOLT_AE_NI_CFG_ID_AE_NI_EN;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_CFG_ID_MTU_10G)) != 0)
+    {
+        if (this->mtu_10g < 64)
+        {
+            *failed_prop = BCMOLT_AE_NI_CFG_ID_MTU_10G;
+            return BCMOS_FALSE;
+        }
+
+        if (this->mtu_10g > 10000)
+        {
+            *failed_prop = BCMOLT_AE_NI_CFG_ID_MTU_10G;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_CFG_ID_PRBS_GENERATOR)) != 0)
+    {
+        if (!bcmolt_prbs_generator_config_bounds_check(&this->prbs_generator))
+        {
+            *failed_prop = BCMOLT_AE_NI_CFG_ID_PRBS_GENERATOR;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_CFG_ID_PRBS_CHECKER)) != 0)
+    {
+        if (!bcmolt_prbs_checker_config_bounds_check(&this->prbs_checker))
+        {
+            *failed_prop = BCMOLT_AE_NI_CFG_ID_PRBS_CHECKER;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_CFG_ID_PRBS_STATUS)) != 0)
+    {
+        if (!bcmolt_prbs_status_bounds_check(&this->prbs_status))
+        {
+            *failed_prop = BCMOLT_AE_NI_CFG_ID_PRBS_STATUS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_ae_ni_set_ae_ni_en_state_data_set_default(bcmolt_ae_ni_set_ae_ni_en_state_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_SET_AE_NI_EN_STATE_ID_NEW_STATE)) != 0)
+    {
+        this->new_state = BCMOLT_AE_NI_EN_STATE_DISABLED;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_ni_set_ae_ni_en_state_data_pack(const bcmolt_ae_ni_set_ae_ni_en_state_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_SET_AE_NI_EN_STATE_ID_NEW_STATE)) != 0)
+    {
+        if (!bcmolt_ae_ni_en_state_pack(this->new_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_ae_ni_set_ae_ni_en_state_data_get_packed_length(const bcmolt_ae_ni_set_ae_ni_en_state_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_SET_AE_NI_EN_STATE_ID_NEW_STATE)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_ni_set_ae_ni_en_state_data_unpack(bcmolt_ae_ni_set_ae_ni_en_state_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_SET_AE_NI_EN_STATE_ID_NEW_STATE)) != 0)
+    {
+        if (!bcmolt_ae_ni_en_state_unpack(&this->new_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_ni_set_ae_ni_en_state_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_SET_AE_NI_EN_STATE_ID_NEW_STATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_ni_set_ae_ni_en_state_data_bounds_check(const bcmolt_ae_ni_set_ae_ni_en_state_data *this, bcmolt_presence_mask fields_present, bcmolt_ae_ni_set_ae_ni_en_state_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_NI_SET_AE_NI_EN_STATE_ID_NEW_STATE)) != 0)
+    {
+        switch (this->new_state)
+        {
+            case BCMOLT_AE_NI_EN_STATE_DISABLED:
+                break;
+            case BCMOLT_AE_NI_EN_STATE_ENABLED:
+                break;
+            default:
+                *failed_prop = BCMOLT_AE_NI_SET_AE_NI_EN_STATE_ID_NEW_STATE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_ae_path_ds_key_set_default(bcmolt_ae_path_ds_key *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_KEY_ID_AE_NI)) != 0)
+    {
+        this->ae_ni = (bcmolt_ae_ni) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_ds_key_pack(const bcmolt_ae_path_ds_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_KEY_ID_AE_NI)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->ae_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_ae_path_ds_key_get_packed_length(const bcmolt_ae_path_ds_key *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_KEY_ID_AE_NI)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_ds_key_unpack(bcmolt_ae_path_ds_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_KEY_ID_AE_NI)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->ae_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_ds_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_KEY_ID_AE_NI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_ds_key_bounds_check(const bcmolt_ae_path_ds_key *this, bcmolt_presence_mask fields_present, bcmolt_ae_path_ds_key_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_ae_path_ds_stat_data_set_default(bcmolt_ae_path_ds_stat_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_BYTES)) != 0)
+    {
+        this->bytes = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES)) != 0)
+    {
+        this->frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_64)) != 0)
+    {
+        this->frames_64 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_65_127)) != 0)
+    {
+        this->frames_65_127 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_128_255)) != 0)
+    {
+        this->frames_128_255 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_256_511)) != 0)
+    {
+        this->frames_256_511 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_512_1023)) != 0)
+    {
+        this->frames_512_1023 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_1024_1518)) != 0)
+    {
+        this->frames_1024_1518 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_1519_2047)) != 0)
+    {
+        this->frames_1519_2047 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_2048_4095)) != 0)
+    {
+        this->frames_2048_4095 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_4096_9216)) != 0)
+    {
+        this->frames_4096_9216 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_9217_16383)) != 0)
+    {
+        this->frames_9217_16383 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_BROADCAST_FRAMES)) != 0)
+    {
+        this->broadcast_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_DATA_BYTES)) != 0)
+    {
+        this->data_bytes = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_MULTICAST_FRAMES)) != 0)
+    {
+        this->multicast_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_UNICAST_FRAMES)) != 0)
+    {
+        this->unicast_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_ABORT_FRAMES)) != 0)
+    {
+        this->abort_frames = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_ds_stat_data_pack(const bcmolt_ae_path_ds_stat_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_64)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_64))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_65_127)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_65_127))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_128_255)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_128_255))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_256_511)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_256_511))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_512_1023)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_512_1023))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_1024_1518)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_1024_1518))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_1519_2047)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_1519_2047))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_2048_4095)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_2048_4095))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_4096_9216)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_4096_9216))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_9217_16383)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_9217_16383))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_BROADCAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->broadcast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_DATA_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->data_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_MULTICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->multicast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_UNICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->unicast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_ABORT_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->abort_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_ae_path_ds_stat_data_get_packed_length(const bcmolt_ae_path_ds_stat_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_BYTES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_64)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_65_127)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_128_255)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_256_511)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_512_1023)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_1024_1518)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_1519_2047)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_2048_4095)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_4096_9216)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_9217_16383)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_BROADCAST_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_DATA_BYTES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_MULTICAST_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_UNICAST_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_ABORT_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_ds_stat_data_unpack(bcmolt_ae_path_ds_stat_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_64)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_64))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_65_127)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_65_127))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_128_255)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_128_255))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_256_511)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_256_511))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_512_1023)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_512_1023))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_1024_1518)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_1024_1518))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_1519_2047)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_1519_2047))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_2048_4095)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_2048_4095))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_4096_9216)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_4096_9216))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_9217_16383)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_9217_16383))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_BROADCAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->broadcast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_DATA_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->data_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_MULTICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->multicast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_UNICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->unicast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_ABORT_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->abort_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_ds_stat_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_64)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_65_127)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_128_255)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_256_511)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_512_1023)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_1024_1518)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_1519_2047)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_2048_4095)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_4096_9216)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_9217_16383)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_BROADCAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_DATA_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_MULTICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_UNICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ID_ABORT_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_ds_stat_data_bounds_check(const bcmolt_ae_path_ds_stat_data *this, bcmolt_presence_mask fields_present, bcmolt_ae_path_ds_stat_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_ae_path_ds_stat_cfg_data_set_default(bcmolt_ae_path_ds_stat_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_CFG_ID_CFG)) != 0)
+    {
+        this->cfg.trigger.type = BCMOLT_STAT_CONDITION_TYPE_NONE;
+        this->cfg.soak.active_soak_time = 0;
+        this->cfg.soak.clear_soak_time = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_ds_stat_cfg_data_pack(const bcmolt_ae_path_ds_stat_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_pack(&this->cfg, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_ae_path_ds_stat_cfg_data_get_packed_length(const bcmolt_ae_path_ds_stat_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_CFG_ID_CFG)) != 0)
+    {
+        count += bcmolt_stat_alarm_config_get_packed_length(&this->cfg);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_ds_stat_cfg_data_unpack(bcmolt_ae_path_ds_stat_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_unpack(&this->cfg, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_ds_stat_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_ds_stat_cfg_data_bounds_check(const bcmolt_ae_path_ds_stat_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_ae_path_ds_stat_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_bounds_check(&this->cfg))
+        {
+            *failed_prop = BCMOLT_AE_PATH_DS_STAT_CFG_ID_CFG;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_ae_path_ds_stat_alarm_cleared_data_set_default(bcmolt_ae_path_ds_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        this->stat = BCMOLT_AE_PATH_DS_STAT_ID_BYTES;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_ds_stat_alarm_cleared_data_pack(const bcmolt_ae_path_ds_stat_alarm_cleared_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_ae_path_ds_stat_id_pack(this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_ae_path_ds_stat_alarm_cleared_data_get_packed_length(const bcmolt_ae_path_ds_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_ds_stat_alarm_cleared_data_unpack(bcmolt_ae_path_ds_stat_alarm_cleared_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_ae_path_ds_stat_id_unpack(&this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_ds_stat_alarm_cleared_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_ds_stat_alarm_cleared_data_bounds_check(const bcmolt_ae_path_ds_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present, bcmolt_ae_path_ds_stat_alarm_cleared_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        switch (this->stat)
+        {
+            case BCMOLT_AE_PATH_DS_STAT_ID_BYTES:
+                break;
+            case BCMOLT_AE_PATH_DS_STAT_ID_FRAMES:
+                break;
+            case BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_64:
+                break;
+            case BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_65_127:
+                break;
+            case BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_128_255:
+                break;
+            case BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_256_511:
+                break;
+            case BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_512_1023:
+                break;
+            case BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_1024_1518:
+                break;
+            case BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_1519_2047:
+                break;
+            case BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_2048_4095:
+                break;
+            case BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_4096_9216:
+                break;
+            case BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_9217_16383:
+                break;
+            case BCMOLT_AE_PATH_DS_STAT_ID_BROADCAST_FRAMES:
+                break;
+            case BCMOLT_AE_PATH_DS_STAT_ID_DATA_BYTES:
+                break;
+            case BCMOLT_AE_PATH_DS_STAT_ID_MULTICAST_FRAMES:
+                break;
+            case BCMOLT_AE_PATH_DS_STAT_ID_UNICAST_FRAMES:
+                break;
+            case BCMOLT_AE_PATH_DS_STAT_ID_ABORT_FRAMES:
+                break;
+            default:
+                *failed_prop = BCMOLT_AE_PATH_DS_STAT_ALARM_CLEARED_ID_STAT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_ae_path_ds_stat_alarm_raised_data_set_default(bcmolt_ae_path_ds_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        this->stat = BCMOLT_AE_PATH_DS_STAT_ID_BYTES;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_ds_stat_alarm_raised_data_pack(const bcmolt_ae_path_ds_stat_alarm_raised_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_ae_path_ds_stat_id_pack(this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_ae_path_ds_stat_alarm_raised_data_get_packed_length(const bcmolt_ae_path_ds_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_ds_stat_alarm_raised_data_unpack(bcmolt_ae_path_ds_stat_alarm_raised_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_ae_path_ds_stat_id_unpack(&this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_ds_stat_alarm_raised_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_ds_stat_alarm_raised_data_bounds_check(const bcmolt_ae_path_ds_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present, bcmolt_ae_path_ds_stat_alarm_raised_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        switch (this->stat)
+        {
+            case BCMOLT_AE_PATH_DS_STAT_ID_BYTES:
+                break;
+            case BCMOLT_AE_PATH_DS_STAT_ID_FRAMES:
+                break;
+            case BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_64:
+                break;
+            case BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_65_127:
+                break;
+            case BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_128_255:
+                break;
+            case BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_256_511:
+                break;
+            case BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_512_1023:
+                break;
+            case BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_1024_1518:
+                break;
+            case BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_1519_2047:
+                break;
+            case BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_2048_4095:
+                break;
+            case BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_4096_9216:
+                break;
+            case BCMOLT_AE_PATH_DS_STAT_ID_FRAMES_9217_16383:
+                break;
+            case BCMOLT_AE_PATH_DS_STAT_ID_BROADCAST_FRAMES:
+                break;
+            case BCMOLT_AE_PATH_DS_STAT_ID_DATA_BYTES:
+                break;
+            case BCMOLT_AE_PATH_DS_STAT_ID_MULTICAST_FRAMES:
+                break;
+            case BCMOLT_AE_PATH_DS_STAT_ID_UNICAST_FRAMES:
+                break;
+            case BCMOLT_AE_PATH_DS_STAT_ID_ABORT_FRAMES:
+                break;
+            default:
+                *failed_prop = BCMOLT_AE_PATH_DS_STAT_ALARM_RAISED_ID_STAT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_ae_path_ds_auto_cfg_data_set_default(bcmolt_ae_path_ds_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        this->stat_alarm_cleared = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        this->stat_alarm_raised = BCMOS_FALSE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_ds_auto_cfg_data_pack(const bcmolt_ae_path_ds_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->stat_alarm_cleared))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->stat_alarm_raised))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_ae_path_ds_auto_cfg_data_get_packed_length(const bcmolt_ae_path_ds_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_ds_auto_cfg_data_unpack(bcmolt_ae_path_ds_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->stat_alarm_cleared))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->stat_alarm_raised))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_ds_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_DS_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_ds_auto_cfg_data_bounds_check(const bcmolt_ae_path_ds_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_ae_path_ds_auto_cfg_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_ae_path_us_key_set_default(bcmolt_ae_path_us_key *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_KEY_ID_AE_NI)) != 0)
+    {
+        this->ae_ni = (bcmolt_ae_ni) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_us_key_pack(const bcmolt_ae_path_us_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_KEY_ID_AE_NI)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->ae_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_ae_path_us_key_get_packed_length(const bcmolt_ae_path_us_key *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_KEY_ID_AE_NI)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_us_key_unpack(bcmolt_ae_path_us_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_KEY_ID_AE_NI)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->ae_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_us_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_KEY_ID_AE_NI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_us_key_bounds_check(const bcmolt_ae_path_us_key *this, bcmolt_presence_mask fields_present, bcmolt_ae_path_us_key_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_ae_path_us_stat_data_set_default(bcmolt_ae_path_us_stat_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_BYTES)) != 0)
+    {
+        this->bytes = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES)) != 0)
+    {
+        this->frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_64)) != 0)
+    {
+        this->frames_64 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_65_127)) != 0)
+    {
+        this->frames_65_127 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_128_255)) != 0)
+    {
+        this->frames_128_255 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_256_511)) != 0)
+    {
+        this->frames_256_511 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_512_1023)) != 0)
+    {
+        this->frames_512_1023 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_1024_1518)) != 0)
+    {
+        this->frames_1024_1518 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_1519_2047)) != 0)
+    {
+        this->frames_1519_2047 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_2048_4095)) != 0)
+    {
+        this->frames_2048_4095 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_4096_9216)) != 0)
+    {
+        this->frames_4096_9216 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_9217_16383)) != 0)
+    {
+        this->frames_9217_16383 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_BROADCAST_FRAMES)) != 0)
+    {
+        this->broadcast_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_DATA_BYTES)) != 0)
+    {
+        this->data_bytes = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_MULTICAST_FRAMES)) != 0)
+    {
+        this->multicast_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_UNICAST_FRAMES)) != 0)
+    {
+        this->unicast_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_ABORT_FRAMES)) != 0)
+    {
+        this->abort_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FCS_ERROR)) != 0)
+    {
+        this->fcs_error = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_OVERSIZE_ERROR)) != 0)
+    {
+        this->oversize_error = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_RUNT_ERROR)) != 0)
+    {
+        this->runt_error = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_us_stat_data_pack(const bcmolt_ae_path_us_stat_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_64)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_64))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_65_127)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_65_127))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_128_255)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_128_255))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_256_511)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_256_511))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_512_1023)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_512_1023))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_1024_1518)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_1024_1518))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_1519_2047)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_1519_2047))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_2048_4095)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_2048_4095))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_4096_9216)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_4096_9216))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_9217_16383)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_9217_16383))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_BROADCAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->broadcast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_DATA_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->data_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_MULTICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->multicast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_UNICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->unicast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_ABORT_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->abort_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FCS_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->fcs_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_OVERSIZE_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->oversize_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_RUNT_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->runt_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_ae_path_us_stat_data_get_packed_length(const bcmolt_ae_path_us_stat_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_BYTES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_64)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_65_127)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_128_255)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_256_511)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_512_1023)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_1024_1518)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_1519_2047)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_2048_4095)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_4096_9216)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_9217_16383)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_BROADCAST_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_DATA_BYTES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_MULTICAST_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_UNICAST_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_ABORT_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FCS_ERROR)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_OVERSIZE_ERROR)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_RUNT_ERROR)) != 0)
+    {
+        count += 8;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_us_stat_data_unpack(bcmolt_ae_path_us_stat_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_64)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_64))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_65_127)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_65_127))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_128_255)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_128_255))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_256_511)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_256_511))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_512_1023)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_512_1023))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_1024_1518)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_1024_1518))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_1519_2047)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_1519_2047))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_2048_4095)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_2048_4095))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_4096_9216)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_4096_9216))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_9217_16383)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_9217_16383))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_BROADCAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->broadcast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_DATA_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->data_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_MULTICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->multicast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_UNICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->unicast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_ABORT_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->abort_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FCS_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->fcs_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_OVERSIZE_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->oversize_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_RUNT_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->runt_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_us_stat_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_64)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_65_127)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_128_255)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_256_511)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_512_1023)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_1024_1518)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_1519_2047)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_2048_4095)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_4096_9216)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FRAMES_9217_16383)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_BROADCAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_DATA_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_MULTICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_UNICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_ABORT_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_FCS_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_OVERSIZE_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ID_RUNT_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_us_stat_data_bounds_check(const bcmolt_ae_path_us_stat_data *this, bcmolt_presence_mask fields_present, bcmolt_ae_path_us_stat_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_ae_path_us_stat_cfg_data_set_default(bcmolt_ae_path_us_stat_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_CFG_ID_CFG)) != 0)
+    {
+        this->cfg.trigger.type = BCMOLT_STAT_CONDITION_TYPE_NONE;
+        this->cfg.soak.active_soak_time = 0;
+        this->cfg.soak.clear_soak_time = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_us_stat_cfg_data_pack(const bcmolt_ae_path_us_stat_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_pack(&this->cfg, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_ae_path_us_stat_cfg_data_get_packed_length(const bcmolt_ae_path_us_stat_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_CFG_ID_CFG)) != 0)
+    {
+        count += bcmolt_stat_alarm_config_get_packed_length(&this->cfg);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_us_stat_cfg_data_unpack(bcmolt_ae_path_us_stat_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_unpack(&this->cfg, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_us_stat_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_us_stat_cfg_data_bounds_check(const bcmolt_ae_path_us_stat_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_ae_path_us_stat_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_bounds_check(&this->cfg))
+        {
+            *failed_prop = BCMOLT_AE_PATH_US_STAT_CFG_ID_CFG;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_ae_path_us_stat_alarm_cleared_data_set_default(bcmolt_ae_path_us_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        this->stat = BCMOLT_AE_PATH_US_STAT_ID_BYTES;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_us_stat_alarm_cleared_data_pack(const bcmolt_ae_path_us_stat_alarm_cleared_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_ae_path_us_stat_id_pack(this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_ae_path_us_stat_alarm_cleared_data_get_packed_length(const bcmolt_ae_path_us_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_us_stat_alarm_cleared_data_unpack(bcmolt_ae_path_us_stat_alarm_cleared_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_ae_path_us_stat_id_unpack(&this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_us_stat_alarm_cleared_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_us_stat_alarm_cleared_data_bounds_check(const bcmolt_ae_path_us_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present, bcmolt_ae_path_us_stat_alarm_cleared_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        switch (this->stat)
+        {
+            case BCMOLT_AE_PATH_US_STAT_ID_BYTES:
+                break;
+            case BCMOLT_AE_PATH_US_STAT_ID_FRAMES:
+                break;
+            case BCMOLT_AE_PATH_US_STAT_ID_FRAMES_64:
+                break;
+            case BCMOLT_AE_PATH_US_STAT_ID_FRAMES_65_127:
+                break;
+            case BCMOLT_AE_PATH_US_STAT_ID_FRAMES_128_255:
+                break;
+            case BCMOLT_AE_PATH_US_STAT_ID_FRAMES_256_511:
+                break;
+            case BCMOLT_AE_PATH_US_STAT_ID_FRAMES_512_1023:
+                break;
+            case BCMOLT_AE_PATH_US_STAT_ID_FRAMES_1024_1518:
+                break;
+            case BCMOLT_AE_PATH_US_STAT_ID_FRAMES_1519_2047:
+                break;
+            case BCMOLT_AE_PATH_US_STAT_ID_FRAMES_2048_4095:
+                break;
+            case BCMOLT_AE_PATH_US_STAT_ID_FRAMES_4096_9216:
+                break;
+            case BCMOLT_AE_PATH_US_STAT_ID_FRAMES_9217_16383:
+                break;
+            case BCMOLT_AE_PATH_US_STAT_ID_BROADCAST_FRAMES:
+                break;
+            case BCMOLT_AE_PATH_US_STAT_ID_DATA_BYTES:
+                break;
+            case BCMOLT_AE_PATH_US_STAT_ID_MULTICAST_FRAMES:
+                break;
+            case BCMOLT_AE_PATH_US_STAT_ID_UNICAST_FRAMES:
+                break;
+            case BCMOLT_AE_PATH_US_STAT_ID_ABORT_FRAMES:
+                break;
+            case BCMOLT_AE_PATH_US_STAT_ID_FCS_ERROR:
+                break;
+            case BCMOLT_AE_PATH_US_STAT_ID_OVERSIZE_ERROR:
+                break;
+            case BCMOLT_AE_PATH_US_STAT_ID_RUNT_ERROR:
+                break;
+            default:
+                *failed_prop = BCMOLT_AE_PATH_US_STAT_ALARM_CLEARED_ID_STAT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_ae_path_us_stat_alarm_raised_data_set_default(bcmolt_ae_path_us_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        this->stat = BCMOLT_AE_PATH_US_STAT_ID_BYTES;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_us_stat_alarm_raised_data_pack(const bcmolt_ae_path_us_stat_alarm_raised_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_ae_path_us_stat_id_pack(this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_ae_path_us_stat_alarm_raised_data_get_packed_length(const bcmolt_ae_path_us_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_us_stat_alarm_raised_data_unpack(bcmolt_ae_path_us_stat_alarm_raised_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_ae_path_us_stat_id_unpack(&this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_us_stat_alarm_raised_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_us_stat_alarm_raised_data_bounds_check(const bcmolt_ae_path_us_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present, bcmolt_ae_path_us_stat_alarm_raised_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        switch (this->stat)
+        {
+            case BCMOLT_AE_PATH_US_STAT_ID_BYTES:
+                break;
+            case BCMOLT_AE_PATH_US_STAT_ID_FRAMES:
+                break;
+            case BCMOLT_AE_PATH_US_STAT_ID_FRAMES_64:
+                break;
+            case BCMOLT_AE_PATH_US_STAT_ID_FRAMES_65_127:
+                break;
+            case BCMOLT_AE_PATH_US_STAT_ID_FRAMES_128_255:
+                break;
+            case BCMOLT_AE_PATH_US_STAT_ID_FRAMES_256_511:
+                break;
+            case BCMOLT_AE_PATH_US_STAT_ID_FRAMES_512_1023:
+                break;
+            case BCMOLT_AE_PATH_US_STAT_ID_FRAMES_1024_1518:
+                break;
+            case BCMOLT_AE_PATH_US_STAT_ID_FRAMES_1519_2047:
+                break;
+            case BCMOLT_AE_PATH_US_STAT_ID_FRAMES_2048_4095:
+                break;
+            case BCMOLT_AE_PATH_US_STAT_ID_FRAMES_4096_9216:
+                break;
+            case BCMOLT_AE_PATH_US_STAT_ID_FRAMES_9217_16383:
+                break;
+            case BCMOLT_AE_PATH_US_STAT_ID_BROADCAST_FRAMES:
+                break;
+            case BCMOLT_AE_PATH_US_STAT_ID_DATA_BYTES:
+                break;
+            case BCMOLT_AE_PATH_US_STAT_ID_MULTICAST_FRAMES:
+                break;
+            case BCMOLT_AE_PATH_US_STAT_ID_UNICAST_FRAMES:
+                break;
+            case BCMOLT_AE_PATH_US_STAT_ID_ABORT_FRAMES:
+                break;
+            case BCMOLT_AE_PATH_US_STAT_ID_FCS_ERROR:
+                break;
+            case BCMOLT_AE_PATH_US_STAT_ID_OVERSIZE_ERROR:
+                break;
+            case BCMOLT_AE_PATH_US_STAT_ID_RUNT_ERROR:
+                break;
+            default:
+                *failed_prop = BCMOLT_AE_PATH_US_STAT_ALARM_RAISED_ID_STAT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_ae_path_us_auto_cfg_data_set_default(bcmolt_ae_path_us_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        this->stat_alarm_cleared = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        this->stat_alarm_raised = BCMOS_FALSE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_us_auto_cfg_data_pack(const bcmolt_ae_path_us_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->stat_alarm_cleared))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->stat_alarm_raised))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_ae_path_us_auto_cfg_data_get_packed_length(const bcmolt_ae_path_us_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_us_auto_cfg_data_unpack(bcmolt_ae_path_us_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->stat_alarm_cleared))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->stat_alarm_raised))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_us_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_AE_PATH_US_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_ae_path_us_auto_cfg_data_bounds_check(const bcmolt_ae_path_us_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_ae_path_us_auto_cfg_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_channel_key_set_default(bcmolt_channel_key *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_CHANNEL_KEY_ID_PON_NI)) != 0)
+    {
+        this->pon_ni = (bcmolt_pon_ni) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_channel_key_pack(const bcmolt_channel_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_CHANNEL_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, (uint8_t) this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_channel_key_get_packed_length(const bcmolt_channel_key *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_CHANNEL_KEY_ID_PON_NI)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_channel_key_unpack(bcmolt_channel_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_CHANNEL_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, (uint8_t *) &this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_channel_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_CHANNEL_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_channel_key_bounds_check(const bcmolt_channel_key *this, bcmolt_presence_mask fields_present, bcmolt_channel_key_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_CHANNEL_KEY_ID_PON_NI)) != 0)
+    {
+        if (this->pon_ni > (bcmolt_pon_ni) 15)
+        {
+            *failed_prop = BCMOLT_CHANNEL_KEY_ID_PON_NI;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_channel_cfg_data_set_default(bcmolt_channel_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_CHANNEL_CFG_ID_OPERATION_CONTROL)) != 0)
+    {
+        this->operation_control.re = 0;
+        this->operation_control.odn_class = BCMOLT_ODN_CLASS_N1;
+        this->operation_control.ds_fec_mode = BCMOLT_CONTROL_STATE_ENABLE;
+        this->operation_control.protocol = BCMOLT_TC_PROTOCOL_TC_LAYER_PROTOCOL_G_989_P_3;
+        this->operation_control.ds_link_type = BCMOLT_LINK_TYPE_UNSPECIFIED;
+        this->operation_control.pon_id.administrative_label = 0;
+        this->operation_control.pon_id.dwlch_id = 0;
+        this->operation_control.c = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_CHANNEL_CFG_ID_TOL)) != 0)
+    {
+        this->tol = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_CHANNEL_CFG_ID_SYSTEM_PROFILE)) != 0)
+    {
+        this->system_profile.ng_2_sys_id = 0;
+        this->system_profile.version = 0;
+        this->system_profile.channel_spacing = 0;
+        this->system_profile.us_operating_wavelength_bands = BCMOLT_US_OPERATING_WAVELENGTH_BANDS_EXPANDED_SPECTRUM_WIDE_BAND;
+        this->system_profile.us_mse = 0;
+        this->system_profile.loose_calibration_bound = BCMOLT_CALIBRATION_RECORD_UNSPECIFIED;
+        this->system_profile.fsr = 0;
+        this->system_profile.twdm_channel_count = 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_CHANNEL_CFG_ID_CHANNEL_PROFILE)) != 0)
+    {
+        memset(this->channel_profile.arr, 0, sizeof(this->channel_profile.arr));
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_channel_cfg_data_pack(const bcmolt_channel_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_CHANNEL_CFG_ID_OPERATION_CONTROL)) != 0)
+    {
+        if (!bcmolt_operation_control_pack(&this->operation_control, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_CHANNEL_CFG_ID_TOL)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, this->tol))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_CHANNEL_CFG_ID_SYSTEM_PROFILE)) != 0)
+    {
+        if (!bcmolt_system_profile_pack(&this->system_profile, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_CHANNEL_CFG_ID_CHANNEL_PROFILE)) != 0)
+    {
+        if (!bcmolt_arr_channel_profile_8_pack(&this->channel_profile, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_channel_cfg_data_get_packed_length(const bcmolt_channel_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_CHANNEL_CFG_ID_OPERATION_CONTROL)) != 0)
+    {
+        count += 11;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_CHANNEL_CFG_ID_TOL)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_CHANNEL_CFG_ID_SYSTEM_PROFILE)) != 0)
+    {
+        count += 12;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_CHANNEL_CFG_ID_CHANNEL_PROFILE)) != 0)
+    {
+        count += 120;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_channel_cfg_data_unpack(bcmolt_channel_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_CHANNEL_CFG_ID_OPERATION_CONTROL)) != 0)
+    {
+        if (!bcmolt_operation_control_unpack(&this->operation_control, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_CHANNEL_CFG_ID_TOL)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, &this->tol))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_CHANNEL_CFG_ID_SYSTEM_PROFILE)) != 0)
+    {
+        if (!bcmolt_system_profile_unpack(&this->system_profile, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_CHANNEL_CFG_ID_CHANNEL_PROFILE)) != 0)
+    {
+        if (!bcmolt_arr_channel_profile_8_unpack(&this->channel_profile, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_channel_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_CHANNEL_CFG_ID_OPERATION_CONTROL)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 11))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_CHANNEL_CFG_ID_TOL)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_CHANNEL_CFG_ID_SYSTEM_PROFILE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 12))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_CHANNEL_CFG_ID_CHANNEL_PROFILE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 120))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_channel_cfg_data_bounds_check(const bcmolt_channel_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_channel_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_CHANNEL_CFG_ID_OPERATION_CONTROL)) != 0)
+    {
+        if (!bcmolt_operation_control_bounds_check(&this->operation_control))
+        {
+            *failed_prop = BCMOLT_CHANNEL_CFG_ID_OPERATION_CONTROL;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_CHANNEL_CFG_ID_TOL)) != 0)
+    {
+        if (this->tol > 511)
+        {
+            *failed_prop = BCMOLT_CHANNEL_CFG_ID_TOL;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_CHANNEL_CFG_ID_SYSTEM_PROFILE)) != 0)
+    {
+        if (!bcmolt_system_profile_bounds_check(&this->system_profile))
+        {
+            *failed_prop = BCMOLT_CHANNEL_CFG_ID_SYSTEM_PROFILE;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_CHANNEL_CFG_ID_CHANNEL_PROFILE)) != 0)
+    {
+        if (!bcmolt_arr_channel_profile_8_bounds_check(&this->channel_profile))
+        {
+            *failed_prop = BCMOLT_CHANNEL_CFG_ID_CHANNEL_PROFILE;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_debug_key_set_default(bcmolt_debug_key *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_KEY_ID_RESERVED)) != 0)
+    {
+        this->reserved = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_debug_key_pack(const bcmolt_debug_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_KEY_ID_RESERVED)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->reserved))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_debug_key_get_packed_length(const bcmolt_debug_key *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_KEY_ID_RESERVED)) != 0)
+    {
+        count += 4;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_debug_key_unpack(bcmolt_debug_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_KEY_ID_RESERVED)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->reserved))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_debug_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_KEY_ID_RESERVED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_debug_key_bounds_check(const bcmolt_debug_key *this, bcmolt_presence_mask fields_present, bcmolt_debug_key_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_debug_cfg_data_set_default(bcmolt_debug_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CFG_ID_CONSOLE_REDIRECTION)) != 0)
+    {
+        this->console_redirection = BCMOLT_CONSOLE_REDIRECTION_NONE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CFG_ID_INDICATIONS_DROPPED)) != 0)
+    {
+        this->indications_dropped = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CFG_ID_FILE_USED_PERCENT)) != 0)
+    {
+        this->file_used_percent = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CFG_ID_API_CAPTURE_CFG)) != 0)
+    {
+        this->api_capture_cfg.location = BCMOLT_API_CAPTURE_LOCATION_DEVICE;
+        this->api_capture_cfg.buffer_size_bytes = 16384;
+        this->api_capture_cfg.buffer_mode = BCMOLT_API_CAPTURE_BUFFER_MODE_WRAP;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CFG_ID_API_CAPTURE_STATS)) != 0)
+    {
+        this->api_capture_stats.buffer_used_bytes = 0;
+        this->api_capture_stats.buffer_wrap_count = 0;
+        this->api_capture_stats.events_recorded = 0;
+        this->api_capture_stats.events_dropped = 0;
+        this->api_capture_stats.readable_bytes = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CFG_ID_API_CAPTURE_BUFFER_READ)) != 0)
+    {
+        this->api_capture_buffer_read.offset = 0;
+        this->api_capture_buffer_read.size = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CFG_ID_API_CAPTURE_BUFFER)) != 0)
+    {
+        this->api_capture_buffer.len = 0;
+        this->api_capture_buffer.val = NULL;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_debug_cfg_data_pack(const bcmolt_debug_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CFG_ID_CONSOLE_REDIRECTION)) != 0)
+    {
+        if (!bcmolt_console_redirection_pack(this->console_redirection, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CFG_ID_INDICATIONS_DROPPED)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->indications_dropped))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CFG_ID_FILE_USED_PERCENT)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->file_used_percent))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CFG_ID_API_CAPTURE_CFG)) != 0)
+    {
+        if (!bcmolt_api_capture_config_pack(&this->api_capture_cfg, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CFG_ID_API_CAPTURE_STATS)) != 0)
+    {
+        if (!bcmolt_api_capture_stats_pack(&this->api_capture_stats, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CFG_ID_API_CAPTURE_BUFFER_READ)) != 0)
+    {
+        if (!bcmolt_api_capture_buffer_reader_pack(&this->api_capture_buffer_read, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CFG_ID_API_CAPTURE_BUFFER)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_pack(&this->api_capture_buffer, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_debug_cfg_data_get_packed_length(const bcmolt_debug_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CFG_ID_CONSOLE_REDIRECTION)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CFG_ID_INDICATIONS_DROPPED)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CFG_ID_FILE_USED_PERCENT)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CFG_ID_API_CAPTURE_CFG)) != 0)
+    {
+        count += 6;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CFG_ID_API_CAPTURE_STATS)) != 0)
+    {
+        count += 20;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CFG_ID_API_CAPTURE_BUFFER_READ)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CFG_ID_API_CAPTURE_BUFFER)) != 0)
+    {
+        count += bcmolt_u8_list_u32_get_packed_length(&this->api_capture_buffer);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_debug_cfg_data_unpack(bcmolt_debug_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CFG_ID_CONSOLE_REDIRECTION)) != 0)
+    {
+        if (!bcmolt_console_redirection_unpack(&this->console_redirection, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CFG_ID_INDICATIONS_DROPPED)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->indications_dropped))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CFG_ID_FILE_USED_PERCENT)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->file_used_percent))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CFG_ID_API_CAPTURE_CFG)) != 0)
+    {
+        if (!bcmolt_api_capture_config_unpack(&this->api_capture_cfg, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CFG_ID_API_CAPTURE_STATS)) != 0)
+    {
+        if (!bcmolt_api_capture_stats_unpack(&this->api_capture_stats, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CFG_ID_API_CAPTURE_BUFFER_READ)) != 0)
+    {
+        if (!bcmolt_api_capture_buffer_reader_unpack(&this->api_capture_buffer_read, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CFG_ID_API_CAPTURE_BUFFER)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_unpack(&this->api_capture_buffer, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_debug_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CFG_ID_CONSOLE_REDIRECTION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CFG_ID_INDICATIONS_DROPPED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CFG_ID_FILE_USED_PERCENT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CFG_ID_API_CAPTURE_CFG)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 6))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CFG_ID_API_CAPTURE_STATS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 20))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CFG_ID_API_CAPTURE_BUFFER_READ)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CFG_ID_API_CAPTURE_BUFFER)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_debug_cfg_data_bounds_check(const bcmolt_debug_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_debug_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CFG_ID_CONSOLE_REDIRECTION)) != 0)
+    {
+        switch (this->console_redirection)
+        {
+            case BCMOLT_CONSOLE_REDIRECTION_NONE:
+                break;
+            case BCMOLT_CONSOLE_REDIRECTION_REDIRECT:
+                break;
+            case BCMOLT_CONSOLE_REDIRECTION_CLONE:
+                break;
+            default:
+                *failed_prop = BCMOLT_DEBUG_CFG_ID_CONSOLE_REDIRECTION;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CFG_ID_API_CAPTURE_CFG)) != 0)
+    {
+        if (!bcmolt_api_capture_config_bounds_check(&this->api_capture_cfg))
+        {
+            *failed_prop = BCMOLT_DEBUG_CFG_ID_API_CAPTURE_CFG;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CFG_ID_API_CAPTURE_STATS)) != 0)
+    {
+        if (!bcmolt_api_capture_stats_bounds_check(&this->api_capture_stats))
+        {
+            *failed_prop = BCMOLT_DEBUG_CFG_ID_API_CAPTURE_STATS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CFG_ID_API_CAPTURE_BUFFER_READ)) != 0)
+    {
+        if (!bcmolt_api_capture_buffer_reader_bounds_check(&this->api_capture_buffer_read))
+        {
+            *failed_prop = BCMOLT_DEBUG_CFG_ID_API_CAPTURE_BUFFER_READ;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CFG_ID_API_CAPTURE_BUFFER)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_bounds_check(&this->api_capture_buffer))
+        {
+            *failed_prop = BCMOLT_DEBUG_CFG_ID_API_CAPTURE_BUFFER;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_debug_cli_output_data_set_default(bcmolt_debug_cli_output_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CLI_OUTPUT_ID_DATA)) != 0)
+    {
+        this->data.len = 0;
+        this->data.val = NULL;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_debug_cli_output_data_pack(const bcmolt_debug_cli_output_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CLI_OUTPUT_ID_DATA)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_pack(&this->data, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_debug_cli_output_data_get_packed_length(const bcmolt_debug_cli_output_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CLI_OUTPUT_ID_DATA)) != 0)
+    {
+        count += bcmolt_u8_list_u32_get_packed_length(&this->data);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_debug_cli_output_data_unpack(bcmolt_debug_cli_output_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CLI_OUTPUT_ID_DATA)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_unpack(&this->data, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_debug_cli_output_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CLI_OUTPUT_ID_DATA)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_debug_cli_output_data_bounds_check(const bcmolt_debug_cli_output_data *this, bcmolt_presence_mask fields_present, bcmolt_debug_cli_output_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CLI_OUTPUT_ID_DATA)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_bounds_check(&this->data))
+        {
+            *failed_prop = BCMOLT_DEBUG_CLI_OUTPUT_ID_DATA;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_debug_auto_cfg_data_set_default(bcmolt_debug_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_AUTO_CFG_ID_CLI_OUTPUT)) != 0)
+    {
+        this->cli_output = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_AUTO_CFG_ID_FILE_ALMOST_FULL)) != 0)
+    {
+        this->file_almost_full = BCMOS_FALSE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_debug_auto_cfg_data_pack(const bcmolt_debug_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_AUTO_CFG_ID_CLI_OUTPUT)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->cli_output))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_AUTO_CFG_ID_FILE_ALMOST_FULL)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->file_almost_full))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_debug_auto_cfg_data_get_packed_length(const bcmolt_debug_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_AUTO_CFG_ID_CLI_OUTPUT)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_AUTO_CFG_ID_FILE_ALMOST_FULL)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_debug_auto_cfg_data_unpack(bcmolt_debug_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_AUTO_CFG_ID_CLI_OUTPUT)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->cli_output))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_AUTO_CFG_ID_FILE_ALMOST_FULL)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->file_almost_full))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_debug_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_AUTO_CFG_ID_CLI_OUTPUT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_AUTO_CFG_ID_FILE_ALMOST_FULL)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_debug_auto_cfg_data_bounds_check(const bcmolt_debug_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_debug_auto_cfg_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_debug_cli_input_data_set_default(bcmolt_debug_cli_input_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CLI_INPUT_ID_DATA)) != 0)
+    {
+        this->data.len = 0;
+        this->data.val = NULL;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_debug_cli_input_data_pack(const bcmolt_debug_cli_input_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CLI_INPUT_ID_DATA)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_pack(&this->data, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_debug_cli_input_data_get_packed_length(const bcmolt_debug_cli_input_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CLI_INPUT_ID_DATA)) != 0)
+    {
+        count += bcmolt_u8_list_u32_get_packed_length(&this->data);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_debug_cli_input_data_unpack(bcmolt_debug_cli_input_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CLI_INPUT_ID_DATA)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_unpack(&this->data, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_debug_cli_input_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CLI_INPUT_ID_DATA)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_debug_cli_input_data_bounds_check(const bcmolt_debug_cli_input_data *this, bcmolt_presence_mask fields_present, bcmolt_debug_cli_input_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEBUG_CLI_INPUT_ID_DATA)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_bounds_check(&this->data))
+        {
+            *failed_prop = BCMOLT_DEBUG_CLI_INPUT_ID_DATA;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_device_key_set_default(bcmolt_device_key *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_KEY_ID_RESERVED)) != 0)
+    {
+        this->reserved = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_key_pack(const bcmolt_device_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_KEY_ID_RESERVED)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->reserved))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_device_key_get_packed_length(const bcmolt_device_key *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_KEY_ID_RESERVED)) != 0)
+    {
+        count += 4;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_key_unpack(bcmolt_device_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_KEY_ID_RESERVED)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->reserved))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_KEY_ID_RESERVED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_key_bounds_check(const bcmolt_device_key *this, bcmolt_presence_mask fields_present, bcmolt_device_key_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_device_cfg_data_set_default(bcmolt_device_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_SYSTEM_MODE)) != 0)
+    {
+        this->system_mode = BCMOLT_SYSTEM_MODE_GPON__16_X;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_KEEPALIVE_INTERVAL)) != 0)
+    {
+        this->keepalive_interval = 5;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_KEEPALIVE_TOLERANCE)) != 0)
+    {
+        this->keepalive_tolerance = 3;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_FIRMWARE_SW_VERSION)) != 0)
+    {
+        this->firmware_sw_version.major = 0;
+        this->firmware_sw_version.minor = 0;
+        this->firmware_sw_version.revision = 0;
+        this->firmware_sw_version.model = 0;
+        memset(this->firmware_sw_version.build_time, 0, 32);
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_HOST_SW_VERSION)) != 0)
+    {
+        this->host_sw_version.major = 0;
+        this->host_sw_version.minor = 0;
+        this->host_sw_version.revision = 0;
+        this->host_sw_version.model = 0;
+        memset(this->host_sw_version.build_time, 0, 32);
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_CHIP_REVISION)) != 0)
+    {
+        this->chip_revision = (bcmolt_device_chip_revision) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_STATE)) != 0)
+    {
+        this->state = BCMOLT_DEVICE_STATE_DISCONNECTED;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_DEBUG)) != 0)
+    {
+        this->debug.host_dma_rx_queue_size = 128;
+        this->debug.host_dma_tx_queue_size = 128;
+        this->debug.avs_control = BCMOS_FALSE;
+        this->debug.use_prev_pon_serdes_firmware = BCMOS_FALSE;
+        this->debug.use_prev_nni_serdes_firmware = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_NNI_SPEED)) != 0)
+    {
+        this->nni_speed.first_half = BCMOLT_NNI_SPEED_GBPS_1;
+        this->nni_speed.second_half = BCMOLT_NNI_SPEED_GBPS_1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_PROTECTION_SWITCHING_EXT_IRQ)) != 0)
+    {
+        this->protection_switching_ext_irq = BCMOLT_EXT_IRQ_UNCONFIGURED;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_EPON_CLOCK_TRANSPORT_SAMPLE_DELAY)) != 0)
+    {
+        this->epon_clock_transport_sample_delay = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_INDICATION_SHAPING)) != 0)
+    {
+        this->indication_shaping.enabled = BCMOS_FALSE;
+        this->indication_shaping.max_rate = 1000;
+        this->indication_shaping.max_burst = 100;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_CHIP_TEMPERATURE)) != 0)
+    {
+        this->chip_temperature = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_GPON_XGPON_TOD_ENABLE)) != 0)
+    {
+        this->gpon_xgpon_tod_enable = BCMOLT_CONTROL_STATE_DISABLE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_GPON_XGPON_TOD_GPIO_PIN)) != 0)
+    {
+        this->gpon_xgpon_tod_gpio_pin = BCMOLT_GPIO_PIN_UNCONFIGURED;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_GPON_XGPON_TOD_CONNECTED_INTERNALLY)) != 0)
+    {
+        this->gpon_xgpon_tod_connected_internally = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_EPON_8021_AS_TOD_FORMAT)) != 0)
+    {
+        memset(this->epon_8021_as_tod_format.str, 0, 256);
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_EPON_SHAPER_MODE)) != 0)
+    {
+        this->epon_shaper_mode = BCMOLT_SHAPER_MODE_LAYER_1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_EMBEDDED_IMAGE_LIST)) != 0)
+    {
+        this->embedded_image_list.len = 0;
+        this->embedded_image_list.val = NULL;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_CHIP_VOLTAGE)) != 0)
+    {
+        this->chip_voltage = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_EPON_TOD_STRING)) != 0)
+    {
+        memset(this->epon_tod_string.str, 0, 256);
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_XGPON_NUM_OF_ONUS)) != 0)
+    {
+        this->xgpon_num_of_onus = BCMOLT_XGPON_NUM_OF_ONUS_XGPON_SUPPORT_256_ONUS;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_DEVICE_IP_ADDRESS)) != 0)
+    {
+        bcmos_ipv4_address_init(&this->device_ip_address);
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_DEVICE_UDP_PORT)) != 0)
+    {
+        this->device_udp_port = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_TOD_UART_BAUDRATE)) != 0)
+    {
+        this->tod_uart_baudrate = BCMOLT_UART_BAUDRATE_UART_RATE_9600;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_GPON_XGPON_TOD_STRING_LENGTH)) != 0)
+    {
+        this->gpon_xgpon_tod_string_length = 16;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_cfg_data_pack(const bcmolt_device_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_SYSTEM_MODE)) != 0)
+    {
+        if (!bcmolt_system_mode_pack(this->system_mode, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_KEEPALIVE_INTERVAL)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->keepalive_interval))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_KEEPALIVE_TOLERANCE)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->keepalive_tolerance))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_FIRMWARE_SW_VERSION)) != 0)
+    {
+        if (!bcmolt_firmware_sw_version_pack(&this->firmware_sw_version, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_HOST_SW_VERSION)) != 0)
+    {
+        if (!bcmolt_host_sw_version_pack(&this->host_sw_version, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_CHIP_REVISION)) != 0)
+    {
+        if (!bcmolt_device_chip_revision_pack(this->chip_revision, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_STATE)) != 0)
+    {
+        if (!bcmolt_device_state_pack(this->state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_DEBUG)) != 0)
+    {
+        if (!bcmolt_debug_device_cfg_pack(&this->debug, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_NNI_SPEED)) != 0)
+    {
+        if (!bcmolt_device_nni_speed_pack(&this->nni_speed, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_PROTECTION_SWITCHING_EXT_IRQ)) != 0)
+    {
+        if (!bcmolt_ext_irq_pack(this->protection_switching_ext_irq, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_EPON_CLOCK_TRANSPORT_SAMPLE_DELAY)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->epon_clock_transport_sample_delay))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_INDICATION_SHAPING)) != 0)
+    {
+        if (!bcmolt_indication_shaping_pack(&this->indication_shaping, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_CHIP_TEMPERATURE)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->chip_temperature))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_GPON_XGPON_TOD_ENABLE)) != 0)
+    {
+        if (!bcmolt_control_state_pack(this->gpon_xgpon_tod_enable, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_GPON_XGPON_TOD_GPIO_PIN)) != 0)
+    {
+        if (!bcmolt_gpio_pin_pack(this->gpon_xgpon_tod_gpio_pin, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_GPON_XGPON_TOD_CONNECTED_INTERNALLY)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->gpon_xgpon_tod_connected_internally))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_EPON_8021_AS_TOD_FORMAT)) != 0)
+    {
+        if (!bcmolt_str_256_pack(&this->epon_8021_as_tod_format, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_EPON_SHAPER_MODE)) != 0)
+    {
+        if (!bcmolt_shaper_mode_pack(this->epon_shaper_mode, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_EMBEDDED_IMAGE_LIST)) != 0)
+    {
+        if (!bcmolt_embedded_image_entry_list_u8_pack(&this->embedded_image_list, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_CHIP_VOLTAGE)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->chip_voltage))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_EPON_TOD_STRING)) != 0)
+    {
+        if (!bcmolt_str_256_pack(&this->epon_tod_string, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_XGPON_NUM_OF_ONUS)) != 0)
+    {
+        if (!bcmolt_xgpon_num_of_onus_pack(this->xgpon_num_of_onus, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_DEVICE_IP_ADDRESS)) != 0)
+    {
+        if (!bcmolt_buf_write_ipv4_address(buf, this->device_ip_address))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_DEVICE_UDP_PORT)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, this->device_udp_port))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_TOD_UART_BAUDRATE)) != 0)
+    {
+        if (!bcmolt_uart_baudrate_pack(this->tod_uart_baudrate, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_GPON_XGPON_TOD_STRING_LENGTH)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->gpon_xgpon_tod_string_length))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_device_cfg_data_get_packed_length(const bcmolt_device_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_SYSTEM_MODE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_KEEPALIVE_INTERVAL)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_KEEPALIVE_TOLERANCE)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_FIRMWARE_SW_VERSION)) != 0)
+    {
+        count += 39;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_HOST_SW_VERSION)) != 0)
+    {
+        count += 39;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_CHIP_REVISION)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_STATE)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_DEBUG)) != 0)
+    {
+        count += 7;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_NNI_SPEED)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_PROTECTION_SWITCHING_EXT_IRQ)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_EPON_CLOCK_TRANSPORT_SAMPLE_DELAY)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_INDICATION_SHAPING)) != 0)
+    {
+        count += 9;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_CHIP_TEMPERATURE)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_GPON_XGPON_TOD_ENABLE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_GPON_XGPON_TOD_GPIO_PIN)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_GPON_XGPON_TOD_CONNECTED_INTERNALLY)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_EPON_8021_AS_TOD_FORMAT)) != 0)
+    {
+        count += 256;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_EPON_SHAPER_MODE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_EMBEDDED_IMAGE_LIST)) != 0)
+    {
+        count += bcmolt_embedded_image_entry_list_u8_get_packed_length(&this->embedded_image_list);
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_CHIP_VOLTAGE)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_EPON_TOD_STRING)) != 0)
+    {
+        count += 256;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_XGPON_NUM_OF_ONUS)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_DEVICE_IP_ADDRESS)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_DEVICE_UDP_PORT)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_TOD_UART_BAUDRATE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_GPON_XGPON_TOD_STRING_LENGTH)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_cfg_data_unpack(bcmolt_device_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_SYSTEM_MODE)) != 0)
+    {
+        if (!bcmolt_system_mode_unpack(&this->system_mode, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_KEEPALIVE_INTERVAL)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->keepalive_interval))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_KEEPALIVE_TOLERANCE)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->keepalive_tolerance))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_FIRMWARE_SW_VERSION)) != 0)
+    {
+        if (!bcmolt_firmware_sw_version_unpack(&this->firmware_sw_version, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_HOST_SW_VERSION)) != 0)
+    {
+        if (!bcmolt_host_sw_version_unpack(&this->host_sw_version, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_CHIP_REVISION)) != 0)
+    {
+        if (!bcmolt_device_chip_revision_unpack(&this->chip_revision, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_STATE)) != 0)
+    {
+        if (!bcmolt_device_state_unpack(&this->state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_DEBUG)) != 0)
+    {
+        if (!bcmolt_debug_device_cfg_unpack(&this->debug, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_NNI_SPEED)) != 0)
+    {
+        if (!bcmolt_device_nni_speed_unpack(&this->nni_speed, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_PROTECTION_SWITCHING_EXT_IRQ)) != 0)
+    {
+        if (!bcmolt_ext_irq_unpack(&this->protection_switching_ext_irq, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_EPON_CLOCK_TRANSPORT_SAMPLE_DELAY)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->epon_clock_transport_sample_delay))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_INDICATION_SHAPING)) != 0)
+    {
+        if (!bcmolt_indication_shaping_unpack(&this->indication_shaping, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_CHIP_TEMPERATURE)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->chip_temperature))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_GPON_XGPON_TOD_ENABLE)) != 0)
+    {
+        if (!bcmolt_control_state_unpack(&this->gpon_xgpon_tod_enable, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_GPON_XGPON_TOD_GPIO_PIN)) != 0)
+    {
+        if (!bcmolt_gpio_pin_unpack(&this->gpon_xgpon_tod_gpio_pin, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_GPON_XGPON_TOD_CONNECTED_INTERNALLY)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->gpon_xgpon_tod_connected_internally))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_EPON_8021_AS_TOD_FORMAT)) != 0)
+    {
+        if (!bcmolt_str_256_unpack(&this->epon_8021_as_tod_format, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_EPON_SHAPER_MODE)) != 0)
+    {
+        if (!bcmolt_shaper_mode_unpack(&this->epon_shaper_mode, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_EMBEDDED_IMAGE_LIST)) != 0)
+    {
+        if (!bcmolt_embedded_image_entry_list_u8_unpack(&this->embedded_image_list, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_CHIP_VOLTAGE)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->chip_voltage))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_EPON_TOD_STRING)) != 0)
+    {
+        if (!bcmolt_str_256_unpack(&this->epon_tod_string, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_XGPON_NUM_OF_ONUS)) != 0)
+    {
+        if (!bcmolt_xgpon_num_of_onus_unpack(&this->xgpon_num_of_onus, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_DEVICE_IP_ADDRESS)) != 0)
+    {
+        if (!bcmolt_buf_read_ipv4_address(buf, &this->device_ip_address))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_DEVICE_UDP_PORT)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, &this->device_udp_port))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_TOD_UART_BAUDRATE)) != 0)
+    {
+        if (!bcmolt_uart_baudrate_unpack(&this->tod_uart_baudrate, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_GPON_XGPON_TOD_STRING_LENGTH)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->gpon_xgpon_tod_string_length))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_SYSTEM_MODE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_KEEPALIVE_INTERVAL)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_KEEPALIVE_TOLERANCE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_FIRMWARE_SW_VERSION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 39))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_HOST_SW_VERSION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 39))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_CHIP_REVISION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_STATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_DEBUG)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 7))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_NNI_SPEED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_PROTECTION_SWITCHING_EXT_IRQ)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_EPON_CLOCK_TRANSPORT_SAMPLE_DELAY)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_INDICATION_SHAPING)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 9))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_CHIP_TEMPERATURE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_GPON_XGPON_TOD_ENABLE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_GPON_XGPON_TOD_GPIO_PIN)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_GPON_XGPON_TOD_CONNECTED_INTERNALLY)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_EPON_8021_AS_TOD_FORMAT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 256))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_EPON_SHAPER_MODE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_EMBEDDED_IMAGE_LIST)) != 0)
+    {
+        if (!bcmolt_embedded_image_entry_list_u8_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_CHIP_VOLTAGE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_EPON_TOD_STRING)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 256))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_XGPON_NUM_OF_ONUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_DEVICE_IP_ADDRESS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_DEVICE_UDP_PORT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_TOD_UART_BAUDRATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_GPON_XGPON_TOD_STRING_LENGTH)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_cfg_data_bounds_check(const bcmolt_device_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_device_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_SYSTEM_MODE)) != 0)
+    {
+        switch (this->system_mode)
+        {
+            case BCMOLT_SYSTEM_MODE_GPON__16_X:
+                break;
+            case BCMOLT_SYSTEM_MODE_GPON__8_X:
+                break;
+            case BCMOLT_SYSTEM_MODE_GPON__4_X:
+                break;
+            case BCMOLT_SYSTEM_MODE_EPON__16_X:
+                break;
+            case BCMOLT_SYSTEM_MODE_XGPON_1__8_X:
+                break;
+            case BCMOLT_SYSTEM_MODE_EPON__8_X_COEXISTENCE_TDMA:
+                break;
+            case BCMOLT_SYSTEM_MODE_AE_8_X:
+                break;
+            case BCMOLT_SYSTEM_MODE_EPON__8_X_10_G:
+                break;
+            case BCMOLT_SYSTEM_MODE_GPON_8_XGPON_4_X_COEXISTENCE:
+                break;
+            case BCMOLT_SYSTEM_MODE_EPON__8_X:
+                break;
+            case BCMOLT_SYSTEM_MODE_EPON__4_X:
+                break;
+            case BCMOLT_SYSTEM_MODE_EPON__4_X_COEXISTENCE_TDMA:
+                break;
+            case BCMOLT_SYSTEM_MODE_EPON__4_X_10_G:
+                break;
+            case BCMOLT_SYSTEM_MODE_XGS__2_X_10_G:
+                break;
+            case BCMOLT_SYSTEM_MODE_NGPON2__2_X_10_G:
+                break;
+            case BCMOLT_SYSTEM_MODE_NGPON2__8_X_2_P_5_G:
+                break;
+            case BCMOLT_SYSTEM_MODE_XGPON_1__4_X:
+                break;
+            case BCMOLT_SYSTEM_MODE_EPON__2_X_10_G:
+                break;
+            default:
+                *failed_prop = BCMOLT_DEVICE_CFG_ID_SYSTEM_MODE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_KEEPALIVE_INTERVAL)) != 0)
+    {
+        if (this->keepalive_interval > 15)
+        {
+            *failed_prop = BCMOLT_DEVICE_CFG_ID_KEEPALIVE_INTERVAL;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_KEEPALIVE_TOLERANCE)) != 0)
+    {
+        if (this->keepalive_tolerance > 5)
+        {
+            *failed_prop = BCMOLT_DEVICE_CFG_ID_KEEPALIVE_TOLERANCE;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_FIRMWARE_SW_VERSION)) != 0)
+    {
+        if (!bcmolt_firmware_sw_version_bounds_check(&this->firmware_sw_version))
+        {
+            *failed_prop = BCMOLT_DEVICE_CFG_ID_FIRMWARE_SW_VERSION;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_HOST_SW_VERSION)) != 0)
+    {
+        if (!bcmolt_host_sw_version_bounds_check(&this->host_sw_version))
+        {
+            *failed_prop = BCMOLT_DEVICE_CFG_ID_HOST_SW_VERSION;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_CHIP_REVISION)) != 0)
+    {
+        switch (this->chip_revision)
+        {
+            case BCMOLT_DEVICE_CHIP_REVISION_A0:
+                break;
+            case BCMOLT_DEVICE_CHIP_REVISION_B0:
+                break;
+            default:
+                *failed_prop = BCMOLT_DEVICE_CFG_ID_CHIP_REVISION;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_STATE)) != 0)
+    {
+        switch (this->state)
+        {
+            case BCMOLT_DEVICE_STATE_DISCONNECTED:
+                break;
+            case BCMOLT_DEVICE_STATE_CONNECTING:
+                break;
+            case BCMOLT_DEVICE_STATE_READY:
+                break;
+            case BCMOLT_DEVICE_STATE_WAITING_FOR_DEVICE:
+                break;
+            case BCMOLT_DEVICE_STATE_TESTING_DDR:
+                break;
+            default:
+                *failed_prop = BCMOLT_DEVICE_CFG_ID_STATE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_DEBUG)) != 0)
+    {
+        if (!bcmolt_debug_device_cfg_bounds_check(&this->debug))
+        {
+            *failed_prop = BCMOLT_DEVICE_CFG_ID_DEBUG;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_NNI_SPEED)) != 0)
+    {
+        if (!bcmolt_device_nni_speed_bounds_check(&this->nni_speed))
+        {
+            *failed_prop = BCMOLT_DEVICE_CFG_ID_NNI_SPEED;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_PROTECTION_SWITCHING_EXT_IRQ)) != 0)
+    {
+        switch (this->protection_switching_ext_irq)
+        {
+            case BCMOLT_EXT_IRQ_EXT_IRQ0:
+                break;
+            case BCMOLT_EXT_IRQ_EXT_IRQ1:
+                break;
+            case BCMOLT_EXT_IRQ_EXT_IRQ2:
+                break;
+            case BCMOLT_EXT_IRQ_EXT_IRQ3:
+                break;
+            case BCMOLT_EXT_IRQ_EXT_IRQ4:
+                break;
+            case BCMOLT_EXT_IRQ_EXT_IRQ5:
+                break;
+            case BCMOLT_EXT_IRQ_UNCONFIGURED:
+                break;
+            default:
+                *failed_prop = BCMOLT_DEVICE_CFG_ID_PROTECTION_SWITCHING_EXT_IRQ;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_INDICATION_SHAPING)) != 0)
+    {
+        if (!bcmolt_indication_shaping_bounds_check(&this->indication_shaping))
+        {
+            *failed_prop = BCMOLT_DEVICE_CFG_ID_INDICATION_SHAPING;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_GPON_XGPON_TOD_ENABLE)) != 0)
+    {
+        switch (this->gpon_xgpon_tod_enable)
+        {
+            case BCMOLT_CONTROL_STATE_DISABLE:
+                break;
+            case BCMOLT_CONTROL_STATE_ENABLE:
+                break;
+            default:
+                *failed_prop = BCMOLT_DEVICE_CFG_ID_GPON_XGPON_TOD_ENABLE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_GPON_XGPON_TOD_GPIO_PIN)) != 0)
+    {
+        switch (this->gpon_xgpon_tod_gpio_pin)
+        {
+            case BCMOLT_GPIO_PIN_PIN0:
+                break;
+            case BCMOLT_GPIO_PIN_PIN1:
+                break;
+            case BCMOLT_GPIO_PIN_PIN2:
+                break;
+            case BCMOLT_GPIO_PIN_PIN3:
+                break;
+            case BCMOLT_GPIO_PIN_PIN4:
+                break;
+            case BCMOLT_GPIO_PIN_PIN5:
+                break;
+            case BCMOLT_GPIO_PIN_PIN6:
+                break;
+            case BCMOLT_GPIO_PIN_PIN7:
+                break;
+            case BCMOLT_GPIO_PIN_PIN8:
+                break;
+            case BCMOLT_GPIO_PIN_PIN9:
+                break;
+            case BCMOLT_GPIO_PIN_PIN10:
+                break;
+            case BCMOLT_GPIO_PIN_PIN11:
+                break;
+            case BCMOLT_GPIO_PIN_PIN12:
+                break;
+            case BCMOLT_GPIO_PIN_PIN13:
+                break;
+            case BCMOLT_GPIO_PIN_PIN14:
+                break;
+            case BCMOLT_GPIO_PIN_PIN15:
+                break;
+            case BCMOLT_GPIO_PIN_PIN16:
+                break;
+            case BCMOLT_GPIO_PIN_PIN17:
+                break;
+            case BCMOLT_GPIO_PIN_PIN18:
+                break;
+            case BCMOLT_GPIO_PIN_PIN19:
+                break;
+            case BCMOLT_GPIO_PIN_PIN20:
+                break;
+            case BCMOLT_GPIO_PIN_PIN21:
+                break;
+            case BCMOLT_GPIO_PIN_PIN22:
+                break;
+            case BCMOLT_GPIO_PIN_PIN23:
+                break;
+            case BCMOLT_GPIO_PIN_PIN24:
+                break;
+            case BCMOLT_GPIO_PIN_PIN25:
+                break;
+            case BCMOLT_GPIO_PIN_PIN26:
+                break;
+            case BCMOLT_GPIO_PIN_PIN27:
+                break;
+            case BCMOLT_GPIO_PIN_PIN28:
+                break;
+            case BCMOLT_GPIO_PIN_PIN29:
+                break;
+            case BCMOLT_GPIO_PIN_PIN30:
+                break;
+            case BCMOLT_GPIO_PIN_PIN31:
+                break;
+            case BCMOLT_GPIO_PIN_PIN32:
+                break;
+            case BCMOLT_GPIO_PIN_PIN33:
+                break;
+            case BCMOLT_GPIO_PIN_PIN34:
+                break;
+            case BCMOLT_GPIO_PIN_PIN35:
+                break;
+            case BCMOLT_GPIO_PIN_PIN36:
+                break;
+            case BCMOLT_GPIO_PIN_PIN37:
+                break;
+            case BCMOLT_GPIO_PIN_PIN38:
+                break;
+            case BCMOLT_GPIO_PIN_PIN39:
+                break;
+            case BCMOLT_GPIO_PIN_PIN40:
+                break;
+            case BCMOLT_GPIO_PIN_PIN41:
+                break;
+            case BCMOLT_GPIO_PIN_PIN42:
+                break;
+            case BCMOLT_GPIO_PIN_PIN43:
+                break;
+            case BCMOLT_GPIO_PIN_PIN44:
+                break;
+            case BCMOLT_GPIO_PIN_PIN45:
+                break;
+            case BCMOLT_GPIO_PIN_PIN46:
+                break;
+            case BCMOLT_GPIO_PIN_PIN47:
+                break;
+            case BCMOLT_GPIO_PIN_PIN48:
+                break;
+            case BCMOLT_GPIO_PIN_PIN49:
+                break;
+            case BCMOLT_GPIO_PIN_PIN50:
+                break;
+            case BCMOLT_GPIO_PIN_PIN51:
+                break;
+            case BCMOLT_GPIO_PIN_PIN52:
+                break;
+            case BCMOLT_GPIO_PIN_PIN53:
+                break;
+            case BCMOLT_GPIO_PIN_PIN54:
+                break;
+            case BCMOLT_GPIO_PIN_PIN55:
+                break;
+            case BCMOLT_GPIO_PIN_PIN56:
+                break;
+            case BCMOLT_GPIO_PIN_PIN57:
+                break;
+            case BCMOLT_GPIO_PIN_PIN58:
+                break;
+            case BCMOLT_GPIO_PIN_PIN59:
+                break;
+            case BCMOLT_GPIO_PIN_PIN60:
+                break;
+            case BCMOLT_GPIO_PIN_PIN61:
+                break;
+            case BCMOLT_GPIO_PIN_PIN62:
+                break;
+            case BCMOLT_GPIO_PIN_PIN63:
+                break;
+            case BCMOLT_GPIO_PIN_PIN64:
+                break;
+            case BCMOLT_GPIO_PIN_PIN65:
+                break;
+            case BCMOLT_GPIO_PIN_PIN66:
+                break;
+            case BCMOLT_GPIO_PIN_PIN67:
+                break;
+            case BCMOLT_GPIO_PIN_PIN68:
+                break;
+            case BCMOLT_GPIO_PIN_PIN69:
+                break;
+            case BCMOLT_GPIO_PIN_PIN70:
+                break;
+            case BCMOLT_GPIO_PIN_PIN71:
+                break;
+            case BCMOLT_GPIO_PIN_PIN72:
+                break;
+            case BCMOLT_GPIO_PIN_PIN73:
+                break;
+            case BCMOLT_GPIO_PIN_PIN74:
+                break;
+            case BCMOLT_GPIO_PIN_PIN75:
+                break;
+            case BCMOLT_GPIO_PIN_PIN76:
+                break;
+            case BCMOLT_GPIO_PIN_PIN77:
+                break;
+            case BCMOLT_GPIO_PIN_PIN78:
+                break;
+            case BCMOLT_GPIO_PIN_PIN79:
+                break;
+            case BCMOLT_GPIO_PIN_PIN80:
+                break;
+            case BCMOLT_GPIO_PIN_PIN81:
+                break;
+            case BCMOLT_GPIO_PIN_PIN82:
+                break;
+            case BCMOLT_GPIO_PIN_PIN83:
+                break;
+            case BCMOLT_GPIO_PIN_PIN84:
+                break;
+            case BCMOLT_GPIO_PIN_PIN85:
+                break;
+            case BCMOLT_GPIO_PIN_PIN86:
+                break;
+            case BCMOLT_GPIO_PIN_PIN87:
+                break;
+            case BCMOLT_GPIO_PIN_PIN88:
+                break;
+            case BCMOLT_GPIO_PIN_PIN89:
+                break;
+            case BCMOLT_GPIO_PIN_PIN90:
+                break;
+            case BCMOLT_GPIO_PIN_PIN91:
+                break;
+            case BCMOLT_GPIO_PIN_PIN92:
+                break;
+            case BCMOLT_GPIO_PIN_PIN93:
+                break;
+            case BCMOLT_GPIO_PIN_PIN94:
+                break;
+            case BCMOLT_GPIO_PIN_PIN95:
+                break;
+            case BCMOLT_GPIO_PIN_PIN96:
+                break;
+            case BCMOLT_GPIO_PIN_PIN97:
+                break;
+            case BCMOLT_GPIO_PIN_PIN98:
+                break;
+            case BCMOLT_GPIO_PIN_PIN99:
+                break;
+            case BCMOLT_GPIO_PIN_PIN100:
+                break;
+            case BCMOLT_GPIO_PIN_PIN101:
+                break;
+            case BCMOLT_GPIO_PIN_PIN102:
+                break;
+            case BCMOLT_GPIO_PIN_PIN103:
+                break;
+            case BCMOLT_GPIO_PIN_PIN104:
+                break;
+            case BCMOLT_GPIO_PIN_PIN105:
+                break;
+            case BCMOLT_GPIO_PIN_PIN106:
+                break;
+            case BCMOLT_GPIO_PIN_UNCONFIGURED:
+                break;
+            default:
+                *failed_prop = BCMOLT_DEVICE_CFG_ID_GPON_XGPON_TOD_GPIO_PIN;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_EPON_8021_AS_TOD_FORMAT)) != 0)
+    {
+        if (!bcmolt_str_256_bounds_check(&this->epon_8021_as_tod_format))
+        {
+            *failed_prop = BCMOLT_DEVICE_CFG_ID_EPON_8021_AS_TOD_FORMAT;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_EPON_SHAPER_MODE)) != 0)
+    {
+        switch (this->epon_shaper_mode)
+        {
+            case BCMOLT_SHAPER_MODE_LAYER_1:
+                break;
+            case BCMOLT_SHAPER_MODE_LAYER_2:
+                break;
+            default:
+                *failed_prop = BCMOLT_DEVICE_CFG_ID_EPON_SHAPER_MODE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_EMBEDDED_IMAGE_LIST)) != 0)
+    {
+        if (!bcmolt_embedded_image_entry_list_u8_bounds_check(&this->embedded_image_list))
+        {
+            *failed_prop = BCMOLT_DEVICE_CFG_ID_EMBEDDED_IMAGE_LIST;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_EPON_TOD_STRING)) != 0)
+    {
+        if (!bcmolt_str_256_bounds_check(&this->epon_tod_string))
+        {
+            *failed_prop = BCMOLT_DEVICE_CFG_ID_EPON_TOD_STRING;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_XGPON_NUM_OF_ONUS)) != 0)
+    {
+        switch (this->xgpon_num_of_onus)
+        {
+            case BCMOLT_XGPON_NUM_OF_ONUS_XGPON_SUPPORT_256_ONUS:
+                break;
+            case BCMOLT_XGPON_NUM_OF_ONUS_XGPON_SUPPORT_510_ONUS:
+                break;
+            default:
+                *failed_prop = BCMOLT_DEVICE_CFG_ID_XGPON_NUM_OF_ONUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_TOD_UART_BAUDRATE)) != 0)
+    {
+        switch (this->tod_uart_baudrate)
+        {
+            case BCMOLT_UART_BAUDRATE_UART_RATE_4800:
+                break;
+            case BCMOLT_UART_BAUDRATE_UART_RATE_9600:
+                break;
+            case BCMOLT_UART_BAUDRATE_UART_RATE_14400:
+                break;
+            case BCMOLT_UART_BAUDRATE_UART_RATE_19200:
+                break;
+            case BCMOLT_UART_BAUDRATE_UART_RATE_38400:
+                break;
+            case BCMOLT_UART_BAUDRATE_UART_RATE_57600:
+                break;
+            case BCMOLT_UART_BAUDRATE_UART_RATE_115200:
+                break;
+            case BCMOLT_UART_BAUDRATE_UART_RATE_230400:
+                break;
+            case BCMOLT_UART_BAUDRATE_UART_RATE_380400:
+                break;
+            case BCMOLT_UART_BAUDRATE_UART_RATE_460800:
+                break;
+            case BCMOLT_UART_BAUDRATE_UART_RATE_921600:
+                break;
+            default:
+                *failed_prop = BCMOLT_DEVICE_CFG_ID_TOD_UART_BAUDRATE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CFG_ID_GPON_XGPON_TOD_STRING_LENGTH)) != 0)
+    {
+        if (this->gpon_xgpon_tod_string_length > 64)
+        {
+            *failed_prop = BCMOLT_DEVICE_CFG_ID_GPON_XGPON_TOD_STRING_LENGTH;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_device_connection_complete_data_set_default(bcmolt_device_connection_complete_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CONNECTION_COMPLETE_ID_STANDALONE)) != 0)
+    {
+        this->standalone = BCMOS_FALSE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_connection_complete_data_pack(const bcmolt_device_connection_complete_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CONNECTION_COMPLETE_ID_STANDALONE)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->standalone))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_device_connection_complete_data_get_packed_length(const bcmolt_device_connection_complete_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CONNECTION_COMPLETE_ID_STANDALONE)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_connection_complete_data_unpack(bcmolt_device_connection_complete_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CONNECTION_COMPLETE_ID_STANDALONE)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->standalone))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_connection_complete_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CONNECTION_COMPLETE_ID_STANDALONE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_connection_complete_data_bounds_check(const bcmolt_device_connection_complete_data *this, bcmolt_presence_mask fields_present, bcmolt_device_connection_complete_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_device_connection_failure_data_set_default(bcmolt_device_connection_failure_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CONNECTION_FAILURE_ID_REASON)) != 0)
+    {
+        this->reason = BCMOLT_HOST_CONNECTION_FAIL_REASON_TIMEOUT;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_connection_failure_data_pack(const bcmolt_device_connection_failure_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CONNECTION_FAILURE_ID_REASON)) != 0)
+    {
+        if (!bcmolt_host_connection_fail_reason_pack(this->reason, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_device_connection_failure_data_get_packed_length(const bcmolt_device_connection_failure_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CONNECTION_FAILURE_ID_REASON)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_connection_failure_data_unpack(bcmolt_device_connection_failure_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CONNECTION_FAILURE_ID_REASON)) != 0)
+    {
+        if (!bcmolt_host_connection_fail_reason_unpack(&this->reason, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_connection_failure_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CONNECTION_FAILURE_ID_REASON)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_connection_failure_data_bounds_check(const bcmolt_device_connection_failure_data *this, bcmolt_presence_mask fields_present, bcmolt_device_connection_failure_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_CONNECTION_FAILURE_ID_REASON)) != 0)
+    {
+        switch (this->reason)
+        {
+            case BCMOLT_HOST_CONNECTION_FAIL_REASON_TIMEOUT:
+                break;
+            case BCMOLT_HOST_CONNECTION_FAIL_REASON_KEEPALIVE:
+                break;
+            case BCMOLT_HOST_CONNECTION_FAIL_REASON_USER_CALLBACK_ERROR:
+                break;
+            case BCMOLT_HOST_CONNECTION_FAIL_REASON_SOFTWARE_VERSION_MISMATCH:
+                break;
+            case BCMOLT_HOST_CONNECTION_FAIL_REASON_SYSTEM_MODE_MISMATCH:
+                break;
+            case BCMOLT_HOST_CONNECTION_FAIL_REASON_NNI_SPEED_MISMATCH:
+                break;
+            case BCMOLT_HOST_CONNECTION_FAIL_REASON_RECONNECT_TIMEOUT:
+                break;
+            case BCMOLT_HOST_CONNECTION_FAIL_REASON_INTERNAL_ERROR:
+                break;
+            case BCMOLT_HOST_CONNECTION_FAIL_REASON_SYSTEM_MODE_NOT_SUPPORTED:
+                break;
+            case BCMOLT_HOST_CONNECTION_FAIL_REASON_PARAMETER:
+                break;
+            default:
+                *failed_prop = BCMOLT_DEVICE_CONNECTION_FAILURE_ID_REASON;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_device_ddr_test_complete_data_set_default(bcmolt_device_ddr_test_complete_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DDR_TEST_COMPLETE_ID_DDR_TEST)) != 0)
+    {
+        this->ddr_test.status = BCMOLT_DDR_TEST_STATUS_COMPLETED;
+        this->ddr_test.u.completed.cpu_result = BCMOLT_DDR_TEST_RESULT_SUCCESS;
+        this->ddr_test.u.completed.ras_0_result = BCMOLT_DDR_TEST_RESULT_SUCCESS;
+        this->ddr_test.u.completed.ras_1_result = BCMOLT_DDR_TEST_RESULT_SUCCESS;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_ddr_test_complete_data_pack(const bcmolt_device_ddr_test_complete_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DDR_TEST_COMPLETE_ID_DDR_TEST)) != 0)
+    {
+        if (!bcmolt_ddr_test_completed_pack(&this->ddr_test, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_device_ddr_test_complete_data_get_packed_length(const bcmolt_device_ddr_test_complete_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DDR_TEST_COMPLETE_ID_DDR_TEST)) != 0)
+    {
+        count += bcmolt_ddr_test_completed_get_packed_length(&this->ddr_test);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_ddr_test_complete_data_unpack(bcmolt_device_ddr_test_complete_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DDR_TEST_COMPLETE_ID_DDR_TEST)) != 0)
+    {
+        if (!bcmolt_ddr_test_completed_unpack(&this->ddr_test, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_ddr_test_complete_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DDR_TEST_COMPLETE_ID_DDR_TEST)) != 0)
+    {
+        if (!bcmolt_ddr_test_completed_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_ddr_test_complete_data_bounds_check(const bcmolt_device_ddr_test_complete_data *this, bcmolt_presence_mask fields_present, bcmolt_device_ddr_test_complete_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DDR_TEST_COMPLETE_ID_DDR_TEST)) != 0)
+    {
+        if (!bcmolt_ddr_test_completed_bounds_check(&this->ddr_test))
+        {
+            *failed_prop = BCMOLT_DEVICE_DDR_TEST_COMPLETE_ID_DDR_TEST;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_device_device_keep_alive_data_set_default(bcmolt_device_device_keep_alive_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_KEEP_ALIVE_ID_SEQUENCE_NUMBER)) != 0)
+    {
+        this->sequence_number = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_KEEP_ALIVE_ID_TIME_STAMP)) != 0)
+    {
+        this->time_stamp = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_device_keep_alive_data_pack(const bcmolt_device_device_keep_alive_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_KEEP_ALIVE_ID_SEQUENCE_NUMBER)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->sequence_number))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_KEEP_ALIVE_ID_TIME_STAMP)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->time_stamp))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_device_device_keep_alive_data_get_packed_length(const bcmolt_device_device_keep_alive_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_KEEP_ALIVE_ID_SEQUENCE_NUMBER)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_KEEP_ALIVE_ID_TIME_STAMP)) != 0)
+    {
+        count += 4;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_device_keep_alive_data_unpack(bcmolt_device_device_keep_alive_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_KEEP_ALIVE_ID_SEQUENCE_NUMBER)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->sequence_number))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_KEEP_ALIVE_ID_TIME_STAMP)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->time_stamp))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_device_keep_alive_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_KEEP_ALIVE_ID_SEQUENCE_NUMBER)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_KEEP_ALIVE_ID_TIME_STAMP)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_device_keep_alive_data_bounds_check(const bcmolt_device_device_keep_alive_data *this, bcmolt_presence_mask fields_present, bcmolt_device_device_keep_alive_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_device_device_ready_data_set_default(bcmolt_device_device_ready_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_READY_ID_FIRMWARE_SW_VERSION)) != 0)
+    {
+        this->firmware_sw_version.major = 0;
+        this->firmware_sw_version.minor = 0;
+        this->firmware_sw_version.revision = 0;
+        this->firmware_sw_version.model = 0;
+        memset(this->firmware_sw_version.build_time, 0, 32);
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_READY_ID_SYSTEM_MODE)) != 0)
+    {
+        this->system_mode = BCMOLT_SYSTEM_MODE_GPON__16_X;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_READY_ID_NNI_SPEED)) != 0)
+    {
+        this->nni_speed.first_half = BCMOLT_NNI_SPEED_GBPS_1;
+        this->nni_speed.second_half = BCMOLT_NNI_SPEED_GBPS_1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_READY_ID_CHIP_REVISION)) != 0)
+    {
+        this->chip_revision = (bcmolt_device_chip_revision) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_READY_ID_TOD_ENABLE)) != 0)
+    {
+        this->tod_enable = BCMOLT_CONTROL_STATE_DISABLE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_READY_ID_TOD_GPIO_PIN)) != 0)
+    {
+        this->tod_gpio_pin = BCMOLT_GPIO_PIN_PIN0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_device_ready_data_pack(const bcmolt_device_device_ready_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_READY_ID_FIRMWARE_SW_VERSION)) != 0)
+    {
+        if (!bcmolt_firmware_sw_version_pack(&this->firmware_sw_version, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_READY_ID_SYSTEM_MODE)) != 0)
+    {
+        if (!bcmolt_system_mode_pack(this->system_mode, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_READY_ID_NNI_SPEED)) != 0)
+    {
+        if (!bcmolt_device_nni_speed_pack(&this->nni_speed, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_READY_ID_CHIP_REVISION)) != 0)
+    {
+        if (!bcmolt_device_chip_revision_pack(this->chip_revision, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_READY_ID_TOD_ENABLE)) != 0)
+    {
+        if (!bcmolt_control_state_pack(this->tod_enable, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_READY_ID_TOD_GPIO_PIN)) != 0)
+    {
+        if (!bcmolt_gpio_pin_pack(this->tod_gpio_pin, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_device_device_ready_data_get_packed_length(const bcmolt_device_device_ready_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_READY_ID_FIRMWARE_SW_VERSION)) != 0)
+    {
+        count += 39;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_READY_ID_SYSTEM_MODE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_READY_ID_NNI_SPEED)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_READY_ID_CHIP_REVISION)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_READY_ID_TOD_ENABLE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_READY_ID_TOD_GPIO_PIN)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_device_ready_data_unpack(bcmolt_device_device_ready_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_READY_ID_FIRMWARE_SW_VERSION)) != 0)
+    {
+        if (!bcmolt_firmware_sw_version_unpack(&this->firmware_sw_version, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_READY_ID_SYSTEM_MODE)) != 0)
+    {
+        if (!bcmolt_system_mode_unpack(&this->system_mode, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_READY_ID_NNI_SPEED)) != 0)
+    {
+        if (!bcmolt_device_nni_speed_unpack(&this->nni_speed, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_READY_ID_CHIP_REVISION)) != 0)
+    {
+        if (!bcmolt_device_chip_revision_unpack(&this->chip_revision, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_READY_ID_TOD_ENABLE)) != 0)
+    {
+        if (!bcmolt_control_state_unpack(&this->tod_enable, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_READY_ID_TOD_GPIO_PIN)) != 0)
+    {
+        if (!bcmolt_gpio_pin_unpack(&this->tod_gpio_pin, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_device_ready_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_READY_ID_FIRMWARE_SW_VERSION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 39))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_READY_ID_SYSTEM_MODE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_READY_ID_NNI_SPEED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_READY_ID_CHIP_REVISION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_READY_ID_TOD_ENABLE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_READY_ID_TOD_GPIO_PIN)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_device_ready_data_bounds_check(const bcmolt_device_device_ready_data *this, bcmolt_presence_mask fields_present, bcmolt_device_device_ready_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_READY_ID_FIRMWARE_SW_VERSION)) != 0)
+    {
+        if (!bcmolt_firmware_sw_version_bounds_check(&this->firmware_sw_version))
+        {
+            *failed_prop = BCMOLT_DEVICE_DEVICE_READY_ID_FIRMWARE_SW_VERSION;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_READY_ID_SYSTEM_MODE)) != 0)
+    {
+        switch (this->system_mode)
+        {
+            case BCMOLT_SYSTEM_MODE_GPON__16_X:
+                break;
+            case BCMOLT_SYSTEM_MODE_GPON__8_X:
+                break;
+            case BCMOLT_SYSTEM_MODE_GPON__4_X:
+                break;
+            case BCMOLT_SYSTEM_MODE_EPON__16_X:
+                break;
+            case BCMOLT_SYSTEM_MODE_XGPON_1__8_X:
+                break;
+            case BCMOLT_SYSTEM_MODE_EPON__8_X_COEXISTENCE_TDMA:
+                break;
+            case BCMOLT_SYSTEM_MODE_AE_8_X:
+                break;
+            case BCMOLT_SYSTEM_MODE_EPON__8_X_10_G:
+                break;
+            case BCMOLT_SYSTEM_MODE_GPON_8_XGPON_4_X_COEXISTENCE:
+                break;
+            case BCMOLT_SYSTEM_MODE_EPON__8_X:
+                break;
+            case BCMOLT_SYSTEM_MODE_EPON__4_X:
+                break;
+            case BCMOLT_SYSTEM_MODE_EPON__4_X_COEXISTENCE_TDMA:
+                break;
+            case BCMOLT_SYSTEM_MODE_EPON__4_X_10_G:
+                break;
+            case BCMOLT_SYSTEM_MODE_XGS__2_X_10_G:
+                break;
+            case BCMOLT_SYSTEM_MODE_NGPON2__2_X_10_G:
+                break;
+            case BCMOLT_SYSTEM_MODE_NGPON2__8_X_2_P_5_G:
+                break;
+            case BCMOLT_SYSTEM_MODE_XGPON_1__4_X:
+                break;
+            case BCMOLT_SYSTEM_MODE_EPON__2_X_10_G:
+                break;
+            default:
+                *failed_prop = BCMOLT_DEVICE_DEVICE_READY_ID_SYSTEM_MODE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_READY_ID_NNI_SPEED)) != 0)
+    {
+        if (!bcmolt_device_nni_speed_bounds_check(&this->nni_speed))
+        {
+            *failed_prop = BCMOLT_DEVICE_DEVICE_READY_ID_NNI_SPEED;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_READY_ID_CHIP_REVISION)) != 0)
+    {
+        switch (this->chip_revision)
+        {
+            case BCMOLT_DEVICE_CHIP_REVISION_A0:
+                break;
+            case BCMOLT_DEVICE_CHIP_REVISION_B0:
+                break;
+            default:
+                *failed_prop = BCMOLT_DEVICE_DEVICE_READY_ID_CHIP_REVISION;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_READY_ID_TOD_ENABLE)) != 0)
+    {
+        switch (this->tod_enable)
+        {
+            case BCMOLT_CONTROL_STATE_DISABLE:
+                break;
+            case BCMOLT_CONTROL_STATE_ENABLE:
+                break;
+            default:
+                *failed_prop = BCMOLT_DEVICE_DEVICE_READY_ID_TOD_ENABLE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_DEVICE_READY_ID_TOD_GPIO_PIN)) != 0)
+    {
+        switch (this->tod_gpio_pin)
+        {
+            case BCMOLT_GPIO_PIN_PIN0:
+                break;
+            case BCMOLT_GPIO_PIN_PIN1:
+                break;
+            case BCMOLT_GPIO_PIN_PIN2:
+                break;
+            case BCMOLT_GPIO_PIN_PIN3:
+                break;
+            case BCMOLT_GPIO_PIN_PIN4:
+                break;
+            case BCMOLT_GPIO_PIN_PIN5:
+                break;
+            case BCMOLT_GPIO_PIN_PIN6:
+                break;
+            case BCMOLT_GPIO_PIN_PIN7:
+                break;
+            case BCMOLT_GPIO_PIN_PIN8:
+                break;
+            case BCMOLT_GPIO_PIN_PIN9:
+                break;
+            case BCMOLT_GPIO_PIN_PIN10:
+                break;
+            case BCMOLT_GPIO_PIN_PIN11:
+                break;
+            case BCMOLT_GPIO_PIN_PIN12:
+                break;
+            case BCMOLT_GPIO_PIN_PIN13:
+                break;
+            case BCMOLT_GPIO_PIN_PIN14:
+                break;
+            case BCMOLT_GPIO_PIN_PIN15:
+                break;
+            case BCMOLT_GPIO_PIN_PIN16:
+                break;
+            case BCMOLT_GPIO_PIN_PIN17:
+                break;
+            case BCMOLT_GPIO_PIN_PIN18:
+                break;
+            case BCMOLT_GPIO_PIN_PIN19:
+                break;
+            case BCMOLT_GPIO_PIN_PIN20:
+                break;
+            case BCMOLT_GPIO_PIN_PIN21:
+                break;
+            case BCMOLT_GPIO_PIN_PIN22:
+                break;
+            case BCMOLT_GPIO_PIN_PIN23:
+                break;
+            case BCMOLT_GPIO_PIN_PIN24:
+                break;
+            case BCMOLT_GPIO_PIN_PIN25:
+                break;
+            case BCMOLT_GPIO_PIN_PIN26:
+                break;
+            case BCMOLT_GPIO_PIN_PIN27:
+                break;
+            case BCMOLT_GPIO_PIN_PIN28:
+                break;
+            case BCMOLT_GPIO_PIN_PIN29:
+                break;
+            case BCMOLT_GPIO_PIN_PIN30:
+                break;
+            case BCMOLT_GPIO_PIN_PIN31:
+                break;
+            case BCMOLT_GPIO_PIN_PIN32:
+                break;
+            case BCMOLT_GPIO_PIN_PIN33:
+                break;
+            case BCMOLT_GPIO_PIN_PIN34:
+                break;
+            case BCMOLT_GPIO_PIN_PIN35:
+                break;
+            case BCMOLT_GPIO_PIN_PIN36:
+                break;
+            case BCMOLT_GPIO_PIN_PIN37:
+                break;
+            case BCMOLT_GPIO_PIN_PIN38:
+                break;
+            case BCMOLT_GPIO_PIN_PIN39:
+                break;
+            case BCMOLT_GPIO_PIN_PIN40:
+                break;
+            case BCMOLT_GPIO_PIN_PIN41:
+                break;
+            case BCMOLT_GPIO_PIN_PIN42:
+                break;
+            case BCMOLT_GPIO_PIN_PIN43:
+                break;
+            case BCMOLT_GPIO_PIN_PIN44:
+                break;
+            case BCMOLT_GPIO_PIN_PIN45:
+                break;
+            case BCMOLT_GPIO_PIN_PIN46:
+                break;
+            case BCMOLT_GPIO_PIN_PIN47:
+                break;
+            case BCMOLT_GPIO_PIN_PIN48:
+                break;
+            case BCMOLT_GPIO_PIN_PIN49:
+                break;
+            case BCMOLT_GPIO_PIN_PIN50:
+                break;
+            case BCMOLT_GPIO_PIN_PIN51:
+                break;
+            case BCMOLT_GPIO_PIN_PIN52:
+                break;
+            case BCMOLT_GPIO_PIN_PIN53:
+                break;
+            case BCMOLT_GPIO_PIN_PIN54:
+                break;
+            case BCMOLT_GPIO_PIN_PIN55:
+                break;
+            case BCMOLT_GPIO_PIN_PIN56:
+                break;
+            case BCMOLT_GPIO_PIN_PIN57:
+                break;
+            case BCMOLT_GPIO_PIN_PIN58:
+                break;
+            case BCMOLT_GPIO_PIN_PIN59:
+                break;
+            case BCMOLT_GPIO_PIN_PIN60:
+                break;
+            case BCMOLT_GPIO_PIN_PIN61:
+                break;
+            case BCMOLT_GPIO_PIN_PIN62:
+                break;
+            case BCMOLT_GPIO_PIN_PIN63:
+                break;
+            case BCMOLT_GPIO_PIN_PIN64:
+                break;
+            case BCMOLT_GPIO_PIN_PIN65:
+                break;
+            case BCMOLT_GPIO_PIN_PIN66:
+                break;
+            case BCMOLT_GPIO_PIN_PIN67:
+                break;
+            case BCMOLT_GPIO_PIN_PIN68:
+                break;
+            case BCMOLT_GPIO_PIN_PIN69:
+                break;
+            case BCMOLT_GPIO_PIN_PIN70:
+                break;
+            case BCMOLT_GPIO_PIN_PIN71:
+                break;
+            case BCMOLT_GPIO_PIN_PIN72:
+                break;
+            case BCMOLT_GPIO_PIN_PIN73:
+                break;
+            case BCMOLT_GPIO_PIN_PIN74:
+                break;
+            case BCMOLT_GPIO_PIN_PIN75:
+                break;
+            case BCMOLT_GPIO_PIN_PIN76:
+                break;
+            case BCMOLT_GPIO_PIN_PIN77:
+                break;
+            case BCMOLT_GPIO_PIN_PIN78:
+                break;
+            case BCMOLT_GPIO_PIN_PIN79:
+                break;
+            case BCMOLT_GPIO_PIN_PIN80:
+                break;
+            case BCMOLT_GPIO_PIN_PIN81:
+                break;
+            case BCMOLT_GPIO_PIN_PIN82:
+                break;
+            case BCMOLT_GPIO_PIN_PIN83:
+                break;
+            case BCMOLT_GPIO_PIN_PIN84:
+                break;
+            case BCMOLT_GPIO_PIN_PIN85:
+                break;
+            case BCMOLT_GPIO_PIN_PIN86:
+                break;
+            case BCMOLT_GPIO_PIN_PIN87:
+                break;
+            case BCMOLT_GPIO_PIN_PIN88:
+                break;
+            case BCMOLT_GPIO_PIN_PIN89:
+                break;
+            case BCMOLT_GPIO_PIN_PIN90:
+                break;
+            case BCMOLT_GPIO_PIN_PIN91:
+                break;
+            case BCMOLT_GPIO_PIN_PIN92:
+                break;
+            case BCMOLT_GPIO_PIN_PIN93:
+                break;
+            case BCMOLT_GPIO_PIN_PIN94:
+                break;
+            case BCMOLT_GPIO_PIN_PIN95:
+                break;
+            case BCMOLT_GPIO_PIN_PIN96:
+                break;
+            case BCMOLT_GPIO_PIN_PIN97:
+                break;
+            case BCMOLT_GPIO_PIN_PIN98:
+                break;
+            case BCMOLT_GPIO_PIN_PIN99:
+                break;
+            case BCMOLT_GPIO_PIN_PIN100:
+                break;
+            case BCMOLT_GPIO_PIN_PIN101:
+                break;
+            case BCMOLT_GPIO_PIN_PIN102:
+                break;
+            case BCMOLT_GPIO_PIN_PIN103:
+                break;
+            case BCMOLT_GPIO_PIN_PIN104:
+                break;
+            case BCMOLT_GPIO_PIN_PIN105:
+                break;
+            case BCMOLT_GPIO_PIN_PIN106:
+                break;
+            case BCMOLT_GPIO_PIN_UNCONFIGURED:
+                break;
+            default:
+                *failed_prop = BCMOLT_DEVICE_DEVICE_READY_ID_TOD_GPIO_PIN;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_device_image_transfer_complete_data_set_default(bcmolt_device_image_transfer_complete_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_COMPLETE_ID_IMAGE_TYPE)) != 0)
+    {
+        this->image_type = BCMOLT_DEVICE_IMAGE_TYPE_BOOTLOADER;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_COMPLETE_ID_BLOCK_NUMBER)) != 0)
+    {
+        this->block_number = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_COMPLETE_ID_STATUS)) != 0)
+    {
+        this->status = BCMOLT_IMAGE_TRANSFER_STATUS_SUCCESS;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_image_transfer_complete_data_pack(const bcmolt_device_image_transfer_complete_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_COMPLETE_ID_IMAGE_TYPE)) != 0)
+    {
+        if (!bcmolt_device_image_type_pack(this->image_type, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_COMPLETE_ID_BLOCK_NUMBER)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->block_number))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_COMPLETE_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_image_transfer_status_pack(this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_device_image_transfer_complete_data_get_packed_length(const bcmolt_device_image_transfer_complete_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_COMPLETE_ID_IMAGE_TYPE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_COMPLETE_ID_BLOCK_NUMBER)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_COMPLETE_ID_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_image_transfer_complete_data_unpack(bcmolt_device_image_transfer_complete_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_COMPLETE_ID_IMAGE_TYPE)) != 0)
+    {
+        if (!bcmolt_device_image_type_unpack(&this->image_type, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_COMPLETE_ID_BLOCK_NUMBER)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->block_number))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_COMPLETE_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_image_transfer_status_unpack(&this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_image_transfer_complete_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_COMPLETE_ID_IMAGE_TYPE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_COMPLETE_ID_BLOCK_NUMBER)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_COMPLETE_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_image_transfer_complete_data_bounds_check(const bcmolt_device_image_transfer_complete_data *this, bcmolt_presence_mask fields_present, bcmolt_device_image_transfer_complete_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_COMPLETE_ID_IMAGE_TYPE)) != 0)
+    {
+        switch (this->image_type)
+        {
+            case BCMOLT_DEVICE_IMAGE_TYPE_BOOTLOADER:
+                break;
+            case BCMOLT_DEVICE_IMAGE_TYPE_APPLICATION:
+                break;
+            case BCMOLT_DEVICE_IMAGE_TYPE_ITU_PON_ONU_FIRMWARE:
+                break;
+            case BCMOLT_DEVICE_IMAGE_TYPE_EPON_ONU_FIRMWARE:
+                break;
+            default:
+                *failed_prop = BCMOLT_DEVICE_IMAGE_TRANSFER_COMPLETE_ID_IMAGE_TYPE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_COMPLETE_ID_STATUS)) != 0)
+    {
+        switch (this->status)
+        {
+            case BCMOLT_IMAGE_TRANSFER_STATUS_SUCCESS:
+                break;
+            case BCMOLT_IMAGE_TRANSFER_STATUS_MEMORY_ALLOCATION_FAILURE:
+                break;
+            case BCMOLT_IMAGE_TRANSFER_STATUS_UNSUPPORTED_FILE_TYPE:
+                break;
+            case BCMOLT_IMAGE_TRANSFER_STATUS_CRC_ERROR:
+                break;
+            case BCMOLT_IMAGE_TRANSFER_STATUS_BLOCK_OUT_OF_SYNC:
+                break;
+            case BCMOLT_IMAGE_TRANSFER_STATUS_INTERNAL_ERROR:
+                break;
+            case BCMOLT_IMAGE_TRANSFER_STATUS_INVALID_STATE:
+                break;
+            case BCMOLT_IMAGE_TRANSFER_STATUS_PREMATURE_TERMINATION:
+                break;
+            case BCMOLT_IMAGE_TRANSFER_STATUS_ACK_TIMEOUT:
+                break;
+            default:
+                *failed_prop = BCMOLT_DEVICE_IMAGE_TRANSFER_COMPLETE_ID_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_device_indications_dropped_data_set_default(bcmolt_device_indications_dropped_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_INDICATIONS_DROPPED_ID_TOTAL_COUNT)) != 0)
+    {
+        this->total_count = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_indications_dropped_data_pack(const bcmolt_device_indications_dropped_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_INDICATIONS_DROPPED_ID_TOTAL_COUNT)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->total_count))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_device_indications_dropped_data_get_packed_length(const bcmolt_device_indications_dropped_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_INDICATIONS_DROPPED_ID_TOTAL_COUNT)) != 0)
+    {
+        count += 4;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_indications_dropped_data_unpack(bcmolt_device_indications_dropped_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_INDICATIONS_DROPPED_ID_TOTAL_COUNT)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->total_count))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_indications_dropped_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_INDICATIONS_DROPPED_ID_TOTAL_COUNT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_indications_dropped_data_bounds_check(const bcmolt_device_indications_dropped_data *this, bcmolt_presence_mask fields_present, bcmolt_device_indications_dropped_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_device_sw_error_data_set_default(bcmolt_device_sw_error_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_SW_ERROR_ID_TASK_NAME)) != 0)
+    {
+        memset(this->task_name.str, 0, 100);
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_SW_ERROR_ID_FILE_NAME)) != 0)
+    {
+        memset(this->file_name.str, 0, 100);
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_SW_ERROR_ID_LINE_NUMBER)) != 0)
+    {
+        this->line_number = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_SW_ERROR_ID_PON_NI)) != 0)
+    {
+        this->pon_ni = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_sw_error_data_pack(const bcmolt_device_sw_error_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_SW_ERROR_ID_TASK_NAME)) != 0)
+    {
+        if (!bcmolt_str_100_pack(&this->task_name, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_SW_ERROR_ID_FILE_NAME)) != 0)
+    {
+        if (!bcmolt_str_100_pack(&this->file_name, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_SW_ERROR_ID_LINE_NUMBER)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->line_number))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_SW_ERROR_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_device_sw_error_data_get_packed_length(const bcmolt_device_sw_error_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_SW_ERROR_ID_TASK_NAME)) != 0)
+    {
+        count += 100;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_SW_ERROR_ID_FILE_NAME)) != 0)
+    {
+        count += 100;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_SW_ERROR_ID_LINE_NUMBER)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_SW_ERROR_ID_PON_NI)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_sw_error_data_unpack(bcmolt_device_sw_error_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_SW_ERROR_ID_TASK_NAME)) != 0)
+    {
+        if (!bcmolt_str_100_unpack(&this->task_name, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_SW_ERROR_ID_FILE_NAME)) != 0)
+    {
+        if (!bcmolt_str_100_unpack(&this->file_name, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_SW_ERROR_ID_LINE_NUMBER)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->line_number))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_SW_ERROR_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_sw_error_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_SW_ERROR_ID_TASK_NAME)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 100))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_SW_ERROR_ID_FILE_NAME)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 100))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_SW_ERROR_ID_LINE_NUMBER)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_SW_ERROR_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_sw_error_data_bounds_check(const bcmolt_device_sw_error_data *this, bcmolt_presence_mask fields_present, bcmolt_device_sw_error_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_SW_ERROR_ID_TASK_NAME)) != 0)
+    {
+        if (!bcmolt_str_100_bounds_check(&this->task_name))
+        {
+            *failed_prop = BCMOLT_DEVICE_SW_ERROR_ID_TASK_NAME;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_SW_ERROR_ID_FILE_NAME)) != 0)
+    {
+        if (!bcmolt_str_100_bounds_check(&this->file_name))
+        {
+            *failed_prop = BCMOLT_DEVICE_SW_ERROR_ID_FILE_NAME;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_device_sw_exception_data_set_default(bcmolt_device_sw_exception_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_SW_EXCEPTION_ID_CPU_ID)) != 0)
+    {
+        this->cpu_id = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_SW_EXCEPTION_ID_TEXT)) != 0)
+    {
+        memset(this->text.str, 0, 2000);
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_sw_exception_data_pack(const bcmolt_device_sw_exception_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_SW_EXCEPTION_ID_CPU_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->cpu_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_SW_EXCEPTION_ID_TEXT)) != 0)
+    {
+        if (!bcmolt_str_2000_pack(&this->text, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_device_sw_exception_data_get_packed_length(const bcmolt_device_sw_exception_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_SW_EXCEPTION_ID_CPU_ID)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_SW_EXCEPTION_ID_TEXT)) != 0)
+    {
+        count += 2000;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_sw_exception_data_unpack(bcmolt_device_sw_exception_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_SW_EXCEPTION_ID_CPU_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->cpu_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_SW_EXCEPTION_ID_TEXT)) != 0)
+    {
+        if (!bcmolt_str_2000_unpack(&this->text, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_sw_exception_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_SW_EXCEPTION_ID_CPU_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_SW_EXCEPTION_ID_TEXT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2000))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_sw_exception_data_bounds_check(const bcmolt_device_sw_exception_data *this, bcmolt_presence_mask fields_present, bcmolt_device_sw_exception_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_SW_EXCEPTION_ID_TEXT)) != 0)
+    {
+        if (!bcmolt_str_2000_bounds_check(&this->text))
+        {
+            *failed_prop = BCMOLT_DEVICE_SW_EXCEPTION_ID_TEXT;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_device_auto_cfg_data_set_default(bcmolt_device_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_CONNECTION_COMPLETE)) != 0)
+    {
+        this->connection_complete = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_CONNECTION_ESTABLISHED)) != 0)
+    {
+        this->connection_established = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_CONNECTION_FAILURE)) != 0)
+    {
+        this->connection_failure = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_DDR_TEST_COMPLETE)) != 0)
+    {
+        this->ddr_test_complete = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_DEVICE_KEEP_ALIVE)) != 0)
+    {
+        this->device_keep_alive = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_DEVICE_READY)) != 0)
+    {
+        this->device_ready = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_DISCONNECTION_COMPLETE)) != 0)
+    {
+        this->disconnection_complete = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_IMAGE_TRANSFER_COMPLETE)) != 0)
+    {
+        this->image_transfer_complete = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_INDICATIONS_DROPPED)) != 0)
+    {
+        this->indications_dropped = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_SW_ERROR)) != 0)
+    {
+        this->sw_error = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_SW_EXCEPTION)) != 0)
+    {
+        this->sw_exception = BCMOS_FALSE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_auto_cfg_data_pack(const bcmolt_device_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_CONNECTION_COMPLETE)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->connection_complete))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_CONNECTION_ESTABLISHED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->connection_established))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_CONNECTION_FAILURE)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->connection_failure))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_DDR_TEST_COMPLETE)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->ddr_test_complete))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_DEVICE_KEEP_ALIVE)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->device_keep_alive))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_DEVICE_READY)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->device_ready))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_DISCONNECTION_COMPLETE)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->disconnection_complete))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_IMAGE_TRANSFER_COMPLETE)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->image_transfer_complete))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_INDICATIONS_DROPPED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->indications_dropped))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_SW_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->sw_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_SW_EXCEPTION)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->sw_exception))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_device_auto_cfg_data_get_packed_length(const bcmolt_device_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_CONNECTION_COMPLETE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_CONNECTION_ESTABLISHED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_CONNECTION_FAILURE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_DDR_TEST_COMPLETE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_DEVICE_KEEP_ALIVE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_DEVICE_READY)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_DISCONNECTION_COMPLETE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_IMAGE_TRANSFER_COMPLETE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_INDICATIONS_DROPPED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_SW_ERROR)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_SW_EXCEPTION)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_auto_cfg_data_unpack(bcmolt_device_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_CONNECTION_COMPLETE)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->connection_complete))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_CONNECTION_ESTABLISHED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->connection_established))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_CONNECTION_FAILURE)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->connection_failure))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_DDR_TEST_COMPLETE)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->ddr_test_complete))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_DEVICE_KEEP_ALIVE)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->device_keep_alive))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_DEVICE_READY)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->device_ready))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_DISCONNECTION_COMPLETE)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->disconnection_complete))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_IMAGE_TRANSFER_COMPLETE)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->image_transfer_complete))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_INDICATIONS_DROPPED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->indications_dropped))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_SW_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->sw_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_SW_EXCEPTION)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->sw_exception))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_CONNECTION_COMPLETE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_CONNECTION_ESTABLISHED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_CONNECTION_FAILURE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_DDR_TEST_COMPLETE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_DEVICE_KEEP_ALIVE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_DEVICE_READY)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_DISCONNECTION_COMPLETE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_IMAGE_TRANSFER_COMPLETE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_INDICATIONS_DROPPED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_SW_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_AUTO_CFG_ID_SW_EXCEPTION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_auto_cfg_data_bounds_check(const bcmolt_device_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_device_auto_cfg_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_device_host_keep_alive_data_set_default(bcmolt_device_host_keep_alive_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_HOST_KEEP_ALIVE_ID_SEQUENCE_NUMBER)) != 0)
+    {
+        this->sequence_number = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_HOST_KEEP_ALIVE_ID_TIME_STAMP)) != 0)
+    {
+        this->time_stamp = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_host_keep_alive_data_pack(const bcmolt_device_host_keep_alive_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_HOST_KEEP_ALIVE_ID_SEQUENCE_NUMBER)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->sequence_number))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_HOST_KEEP_ALIVE_ID_TIME_STAMP)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->time_stamp))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_device_host_keep_alive_data_get_packed_length(const bcmolt_device_host_keep_alive_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_HOST_KEEP_ALIVE_ID_SEQUENCE_NUMBER)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_HOST_KEEP_ALIVE_ID_TIME_STAMP)) != 0)
+    {
+        count += 4;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_host_keep_alive_data_unpack(bcmolt_device_host_keep_alive_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_HOST_KEEP_ALIVE_ID_SEQUENCE_NUMBER)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->sequence_number))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_HOST_KEEP_ALIVE_ID_TIME_STAMP)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->time_stamp))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_host_keep_alive_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_HOST_KEEP_ALIVE_ID_SEQUENCE_NUMBER)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_HOST_KEEP_ALIVE_ID_TIME_STAMP)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_host_keep_alive_data_bounds_check(const bcmolt_device_host_keep_alive_data *this, bcmolt_presence_mask fields_present, bcmolt_device_host_keep_alive_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_device_image_transfer_data_data_set_default(bcmolt_device_image_transfer_data_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_DATA_ID_BLOCK_NUMBER)) != 0)
+    {
+        this->block_number = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_DATA_ID_MORE_DATA)) != 0)
+    {
+        this->more_data = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_DATA_ID_DATA)) != 0)
+    {
+        this->data.len = 0;
+        this->data.val = NULL;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_image_transfer_data_data_pack(const bcmolt_device_image_transfer_data_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_DATA_ID_BLOCK_NUMBER)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->block_number))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_DATA_ID_MORE_DATA)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->more_data))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_DATA_ID_DATA)) != 0)
+    {
+        if (!bcmolt_u8_list_u16_hex_pack(&this->data, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_device_image_transfer_data_data_get_packed_length(const bcmolt_device_image_transfer_data_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_DATA_ID_BLOCK_NUMBER)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_DATA_ID_MORE_DATA)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_DATA_ID_DATA)) != 0)
+    {
+        count += bcmolt_u8_list_u16_hex_get_packed_length(&this->data);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_image_transfer_data_data_unpack(bcmolt_device_image_transfer_data_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_DATA_ID_BLOCK_NUMBER)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->block_number))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_DATA_ID_MORE_DATA)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->more_data))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_DATA_ID_DATA)) != 0)
+    {
+        if (!bcmolt_u8_list_u16_hex_unpack(&this->data, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_image_transfer_data_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_DATA_ID_BLOCK_NUMBER)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_DATA_ID_MORE_DATA)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_DATA_ID_DATA)) != 0)
+    {
+        if (!bcmolt_u8_list_u16_hex_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_image_transfer_data_data_bounds_check(const bcmolt_device_image_transfer_data_data *this, bcmolt_presence_mask fields_present, bcmolt_device_image_transfer_data_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_DATA_ID_DATA)) != 0)
+    {
+        if (!bcmolt_u8_list_u16_hex_bounds_check(&this->data))
+        {
+            *failed_prop = BCMOLT_DEVICE_IMAGE_TRANSFER_DATA_ID_DATA;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_device_image_transfer_start_data_set_default(bcmolt_device_image_transfer_start_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_START_ID_IMAGE_TYPE)) != 0)
+    {
+        this->image_type = BCMOLT_DEVICE_IMAGE_TYPE_BOOTLOADER;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_START_ID_IMAGE_SIZE)) != 0)
+    {
+        this->image_size = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_START_ID_CRC32)) != 0)
+    {
+        this->crc32 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_START_ID_IMAGE_NAME)) != 0)
+    {
+        memset(this->image_name.str, 0, 64);
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_image_transfer_start_data_pack(const bcmolt_device_image_transfer_start_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_START_ID_IMAGE_TYPE)) != 0)
+    {
+        if (!bcmolt_device_image_type_pack(this->image_type, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_START_ID_IMAGE_SIZE)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->image_size))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_START_ID_CRC32)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->crc32))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_START_ID_IMAGE_NAME)) != 0)
+    {
+        if (!bcmolt_str_64_pack(&this->image_name, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_device_image_transfer_start_data_get_packed_length(const bcmolt_device_image_transfer_start_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_START_ID_IMAGE_TYPE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_START_ID_IMAGE_SIZE)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_START_ID_CRC32)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_START_ID_IMAGE_NAME)) != 0)
+    {
+        count += 64;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_image_transfer_start_data_unpack(bcmolt_device_image_transfer_start_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_START_ID_IMAGE_TYPE)) != 0)
+    {
+        if (!bcmolt_device_image_type_unpack(&this->image_type, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_START_ID_IMAGE_SIZE)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->image_size))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_START_ID_CRC32)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->crc32))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_START_ID_IMAGE_NAME)) != 0)
+    {
+        if (!bcmolt_str_64_unpack(&this->image_name, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_image_transfer_start_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_START_ID_IMAGE_TYPE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_START_ID_IMAGE_SIZE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_START_ID_CRC32)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_START_ID_IMAGE_NAME)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 64))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_image_transfer_start_data_bounds_check(const bcmolt_device_image_transfer_start_data *this, bcmolt_presence_mask fields_present, bcmolt_device_image_transfer_start_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_START_ID_IMAGE_TYPE)) != 0)
+    {
+        switch (this->image_type)
+        {
+            case BCMOLT_DEVICE_IMAGE_TYPE_BOOTLOADER:
+                break;
+            case BCMOLT_DEVICE_IMAGE_TYPE_APPLICATION:
+                break;
+            case BCMOLT_DEVICE_IMAGE_TYPE_ITU_PON_ONU_FIRMWARE:
+                break;
+            case BCMOLT_DEVICE_IMAGE_TYPE_EPON_ONU_FIRMWARE:
+                break;
+            default:
+                *failed_prop = BCMOLT_DEVICE_IMAGE_TRANSFER_START_ID_IMAGE_TYPE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_IMAGE_TRANSFER_START_ID_IMAGE_NAME)) != 0)
+    {
+        if (!bcmolt_str_64_bounds_check(&this->image_name))
+        {
+            *failed_prop = BCMOLT_DEVICE_IMAGE_TRANSFER_START_ID_IMAGE_NAME;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_device_reset_data_set_default(bcmolt_device_reset_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_RESET_ID_MODE)) != 0)
+    {
+        this->mode = (bcmolt_device_reset_mode) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_reset_data_pack(const bcmolt_device_reset_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_RESET_ID_MODE)) != 0)
+    {
+        if (!bcmolt_device_reset_mode_pack(this->mode, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_device_reset_data_get_packed_length(const bcmolt_device_reset_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_RESET_ID_MODE)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_reset_data_unpack(bcmolt_device_reset_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_RESET_ID_MODE)) != 0)
+    {
+        if (!bcmolt_device_reset_mode_unpack(&this->mode, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_reset_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_RESET_ID_MODE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_reset_data_bounds_check(const bcmolt_device_reset_data *this, bcmolt_presence_mask fields_present, bcmolt_device_reset_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_RESET_ID_MODE)) != 0)
+    {
+        switch (this->mode)
+        {
+            case BCMOLT_DEVICE_RESET_MODE_DEVICE:
+                break;
+            case BCMOLT_DEVICE_RESET_MODE_HOST:
+                break;
+            case BCMOLT_DEVICE_RESET_MODE_ALL:
+                break;
+            default:
+                *failed_prop = BCMOLT_DEVICE_RESET_ID_MODE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_device_run_ddr_test_data_set_default(bcmolt_device_run_ddr_test_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_RUN_DDR_TEST_ID_CPU)) != 0)
+    {
+        this->cpu = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_RUN_DDR_TEST_ID_RAS_0)) != 0)
+    {
+        this->ras_0 = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_RUN_DDR_TEST_ID_RAS_1)) != 0)
+    {
+        this->ras_1 = BCMOS_FALSE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_run_ddr_test_data_pack(const bcmolt_device_run_ddr_test_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_RUN_DDR_TEST_ID_CPU)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->cpu))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_RUN_DDR_TEST_ID_RAS_0)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->ras_0))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_RUN_DDR_TEST_ID_RAS_1)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->ras_1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_device_run_ddr_test_data_get_packed_length(const bcmolt_device_run_ddr_test_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_RUN_DDR_TEST_ID_CPU)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_RUN_DDR_TEST_ID_RAS_0)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_RUN_DDR_TEST_ID_RAS_1)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_run_ddr_test_data_unpack(bcmolt_device_run_ddr_test_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_RUN_DDR_TEST_ID_CPU)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->cpu))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_RUN_DDR_TEST_ID_RAS_0)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->ras_0))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_RUN_DDR_TEST_ID_RAS_1)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->ras_1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_run_ddr_test_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_RUN_DDR_TEST_ID_CPU)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_RUN_DDR_TEST_ID_RAS_0)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_DEVICE_RUN_DDR_TEST_ID_RAS_1)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_device_run_ddr_test_data_bounds_check(const bcmolt_device_run_ddr_test_data *this, bcmolt_presence_mask fields_present, bcmolt_device_run_ddr_test_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_denied_link_key_set_default(bcmolt_epon_denied_link_key *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_KEY_ID_EPON_NI)) != 0)
+    {
+        this->epon_ni = (bcmolt_epon_ni) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_KEY_ID_MAC_ADDRESS)) != 0)
+    {
+        bcmos_mac_address_init(&this->mac_address);
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_key_pack(const bcmolt_epon_denied_link_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_KEY_ID_EPON_NI)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->epon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_KEY_ID_MAC_ADDRESS)) != 0)
+    {
+        if (!bcmolt_buf_write_mac_address(buf, this->mac_address))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_denied_link_key_get_packed_length(const bcmolt_epon_denied_link_key *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_KEY_ID_EPON_NI)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_KEY_ID_MAC_ADDRESS)) != 0)
+    {
+        count += 6;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_key_unpack(bcmolt_epon_denied_link_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_KEY_ID_EPON_NI)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->epon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_KEY_ID_MAC_ADDRESS)) != 0)
+    {
+        if (!bcmolt_buf_read_mac_address(buf, &this->mac_address))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_KEY_ID_EPON_NI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_KEY_ID_MAC_ADDRESS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 6))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_key_bounds_check(const bcmolt_epon_denied_link_key *this, bcmolt_presence_mask fields_present, bcmolt_epon_denied_link_key_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_denied_link_cfg_data_set_default(bcmolt_epon_denied_link_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_CFG_ID_ALARM_STATE)) != 0)
+    {
+        this->alarm_state.unknown_link_violation.link_rate = BCMOLT_EPON_LINK_RATE_TEN_TEN;
+        this->alarm_state.unknown_link_violation.alarm_status = BCMOLT_STATUS_OFF;
+        this->alarm_state.overhead_profile_violation = BCMOLT_STATUS_OFF;
+        this->alarm_state.max_link_violation = BCMOLT_STATUS_OFF;
+        this->alarm_state.llid_pool_empty_violation = BCMOLT_STATUS_OFF;
+        this->alarm_state.laser_on_off_violation.laser_on_time = (bcmolt_time_quanta) 0;
+        this->alarm_state.laser_on_off_violation.laser_off_time = (bcmolt_time_quanta) 0;
+        this->alarm_state.laser_on_off_violation.alarm_status = BCMOLT_STATUS_OFF;
+        this->alarm_state.system_resource_violation = BCMOLT_STATUS_OFF;
+        this->alarm_state.range_violation.range = (bcmolt_time_quanta) 0;
+        this->alarm_state.range_violation.alarm_status = BCMOLT_STATUS_OFF;
+        this->alarm_state.tdm_channels_exhausted = BCMOLT_STATUS_OFF;
+        this->alarm_state.rogue_violation.denied_llid = (bcmolt_epon_llid) 0;
+        this->alarm_state.rogue_violation.denied_range = (bcmolt_time_quanta) 0;
+        this->alarm_state.rogue_violation.alarm_status = BCMOLT_STATUS_OFF;
+        this->alarm_state.upstream_bandwidth_violation = BCMOLT_STATUS_OFF;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_cfg_data_pack(const bcmolt_epon_denied_link_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_CFG_ID_ALARM_STATE)) != 0)
+    {
+        if (!bcmolt_epon_denied_link_alarm_state_pack(&this->alarm_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_denied_link_cfg_data_get_packed_length(const bcmolt_epon_denied_link_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_CFG_ID_ALARM_STATE)) != 0)
+    {
+        count += 30;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_cfg_data_unpack(bcmolt_epon_denied_link_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_CFG_ID_ALARM_STATE)) != 0)
+    {
+        if (!bcmolt_epon_denied_link_alarm_state_unpack(&this->alarm_state, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_CFG_ID_ALARM_STATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 30))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_cfg_data_bounds_check(const bcmolt_epon_denied_link_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_denied_link_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_CFG_ID_ALARM_STATE)) != 0)
+    {
+        if (!bcmolt_epon_denied_link_alarm_state_bounds_check(&this->alarm_state))
+        {
+            *failed_prop = BCMOLT_EPON_DENIED_LINK_CFG_ID_ALARM_STATE;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_denied_link_laser_on_off_violation_data_set_default(bcmolt_epon_denied_link_laser_on_off_violation_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_LASER_ON_OFF_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        this->alarm_status.laser_on_time = (bcmolt_time_quanta) 0;
+        this->alarm_status.laser_off_time = (bcmolt_time_quanta) 0;
+        this->alarm_status.alarm_status = BCMOLT_STATUS_OFF;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_laser_on_off_violation_data_pack(const bcmolt_epon_denied_link_laser_on_off_violation_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_LASER_ON_OFF_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_laser_on_off_status_pack(&this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_denied_link_laser_on_off_violation_data_get_packed_length(const bcmolt_epon_denied_link_laser_on_off_violation_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_LASER_ON_OFF_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        count += 9;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_laser_on_off_violation_data_unpack(bcmolt_epon_denied_link_laser_on_off_violation_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_LASER_ON_OFF_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_laser_on_off_status_unpack(&this->alarm_status, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_laser_on_off_violation_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_LASER_ON_OFF_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 9))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_laser_on_off_violation_data_bounds_check(const bcmolt_epon_denied_link_laser_on_off_violation_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_denied_link_laser_on_off_violation_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_LASER_ON_OFF_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_laser_on_off_status_bounds_check(&this->alarm_status))
+        {
+            *failed_prop = BCMOLT_EPON_DENIED_LINK_LASER_ON_OFF_VIOLATION_ID_ALARM_STATUS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_denied_link_llid_pool_empty_violation_data_set_default(bcmolt_epon_denied_link_llid_pool_empty_violation_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_LLID_POOL_EMPTY_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        this->alarm_status = BCMOLT_STATUS_OFF;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_llid_pool_empty_violation_data_pack(const bcmolt_epon_denied_link_llid_pool_empty_violation_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_LLID_POOL_EMPTY_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_pack(this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_denied_link_llid_pool_empty_violation_data_get_packed_length(const bcmolt_epon_denied_link_llid_pool_empty_violation_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_LLID_POOL_EMPTY_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_llid_pool_empty_violation_data_unpack(bcmolt_epon_denied_link_llid_pool_empty_violation_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_LLID_POOL_EMPTY_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_unpack(&this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_llid_pool_empty_violation_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_LLID_POOL_EMPTY_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_llid_pool_empty_violation_data_bounds_check(const bcmolt_epon_denied_link_llid_pool_empty_violation_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_denied_link_llid_pool_empty_violation_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_LLID_POOL_EMPTY_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        switch (this->alarm_status)
+        {
+            case BCMOLT_STATUS_OFF:
+                break;
+            case BCMOLT_STATUS_ON:
+                break;
+            case BCMOLT_STATUS_NO_CHANGE:
+                break;
+            default:
+                *failed_prop = BCMOLT_EPON_DENIED_LINK_LLID_POOL_EMPTY_VIOLATION_ID_ALARM_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_denied_link_max_link_violation_data_set_default(bcmolt_epon_denied_link_max_link_violation_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_MAX_LINK_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        this->alarm_status = BCMOLT_STATUS_OFF;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_max_link_violation_data_pack(const bcmolt_epon_denied_link_max_link_violation_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_MAX_LINK_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_pack(this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_denied_link_max_link_violation_data_get_packed_length(const bcmolt_epon_denied_link_max_link_violation_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_MAX_LINK_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_max_link_violation_data_unpack(bcmolt_epon_denied_link_max_link_violation_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_MAX_LINK_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_unpack(&this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_max_link_violation_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_MAX_LINK_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_max_link_violation_data_bounds_check(const bcmolt_epon_denied_link_max_link_violation_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_denied_link_max_link_violation_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_MAX_LINK_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        switch (this->alarm_status)
+        {
+            case BCMOLT_STATUS_OFF:
+                break;
+            case BCMOLT_STATUS_ON:
+                break;
+            case BCMOLT_STATUS_NO_CHANGE:
+                break;
+            default:
+                *failed_prop = BCMOLT_EPON_DENIED_LINK_MAX_LINK_VIOLATION_ID_ALARM_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_denied_link_overhead_profile_violation_data_set_default(bcmolt_epon_denied_link_overhead_profile_violation_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_OVERHEAD_PROFILE_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        this->alarm_status = BCMOLT_STATUS_OFF;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_overhead_profile_violation_data_pack(const bcmolt_epon_denied_link_overhead_profile_violation_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_OVERHEAD_PROFILE_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_pack(this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_denied_link_overhead_profile_violation_data_get_packed_length(const bcmolt_epon_denied_link_overhead_profile_violation_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_OVERHEAD_PROFILE_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_overhead_profile_violation_data_unpack(bcmolt_epon_denied_link_overhead_profile_violation_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_OVERHEAD_PROFILE_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_unpack(&this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_overhead_profile_violation_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_OVERHEAD_PROFILE_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_overhead_profile_violation_data_bounds_check(const bcmolt_epon_denied_link_overhead_profile_violation_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_denied_link_overhead_profile_violation_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_OVERHEAD_PROFILE_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        switch (this->alarm_status)
+        {
+            case BCMOLT_STATUS_OFF:
+                break;
+            case BCMOLT_STATUS_ON:
+                break;
+            case BCMOLT_STATUS_NO_CHANGE:
+                break;
+            default:
+                *failed_prop = BCMOLT_EPON_DENIED_LINK_OVERHEAD_PROFILE_VIOLATION_ID_ALARM_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_denied_link_range_violation_data_set_default(bcmolt_epon_denied_link_range_violation_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_RANGE_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        this->alarm_status.range = (bcmolt_time_quanta) 0;
+        this->alarm_status.alarm_status = BCMOLT_STATUS_OFF;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_range_violation_data_pack(const bcmolt_epon_denied_link_range_violation_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_RANGE_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_range_status_pack(&this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_denied_link_range_violation_data_get_packed_length(const bcmolt_epon_denied_link_range_violation_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_RANGE_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        count += 5;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_range_violation_data_unpack(bcmolt_epon_denied_link_range_violation_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_RANGE_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_range_status_unpack(&this->alarm_status, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_range_violation_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_RANGE_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 5))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_range_violation_data_bounds_check(const bcmolt_epon_denied_link_range_violation_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_denied_link_range_violation_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_RANGE_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_range_status_bounds_check(&this->alarm_status))
+        {
+            *failed_prop = BCMOLT_EPON_DENIED_LINK_RANGE_VIOLATION_ID_ALARM_STATUS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_denied_link_rogue_violation_data_set_default(bcmolt_epon_denied_link_rogue_violation_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_ROGUE_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        this->alarm_status.denied_llid = (bcmolt_epon_llid) 0;
+        this->alarm_status.denied_range = (bcmolt_time_quanta) 0;
+        this->alarm_status.alarm_status = BCMOLT_STATUS_OFF;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_rogue_violation_data_pack(const bcmolt_epon_denied_link_rogue_violation_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_ROGUE_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_rogue_status_pack(&this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_denied_link_rogue_violation_data_get_packed_length(const bcmolt_epon_denied_link_rogue_violation_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_ROGUE_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        count += 7;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_rogue_violation_data_unpack(bcmolt_epon_denied_link_rogue_violation_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_ROGUE_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_rogue_status_unpack(&this->alarm_status, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_rogue_violation_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_ROGUE_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 7))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_rogue_violation_data_bounds_check(const bcmolt_epon_denied_link_rogue_violation_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_denied_link_rogue_violation_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_ROGUE_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_rogue_status_bounds_check(&this->alarm_status))
+        {
+            *failed_prop = BCMOLT_EPON_DENIED_LINK_ROGUE_VIOLATION_ID_ALARM_STATUS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_denied_link_system_resource_violation_data_set_default(bcmolt_epon_denied_link_system_resource_violation_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_SYSTEM_RESOURCE_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        this->alarm_status = BCMOLT_STATUS_OFF;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_system_resource_violation_data_pack(const bcmolt_epon_denied_link_system_resource_violation_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_SYSTEM_RESOURCE_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_pack(this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_denied_link_system_resource_violation_data_get_packed_length(const bcmolt_epon_denied_link_system_resource_violation_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_SYSTEM_RESOURCE_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_system_resource_violation_data_unpack(bcmolt_epon_denied_link_system_resource_violation_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_SYSTEM_RESOURCE_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_unpack(&this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_system_resource_violation_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_SYSTEM_RESOURCE_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_system_resource_violation_data_bounds_check(const bcmolt_epon_denied_link_system_resource_violation_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_denied_link_system_resource_violation_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_SYSTEM_RESOURCE_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        switch (this->alarm_status)
+        {
+            case BCMOLT_STATUS_OFF:
+                break;
+            case BCMOLT_STATUS_ON:
+                break;
+            case BCMOLT_STATUS_NO_CHANGE:
+                break;
+            default:
+                *failed_prop = BCMOLT_EPON_DENIED_LINK_SYSTEM_RESOURCE_VIOLATION_ID_ALARM_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_denied_link_tdm_channels_exhausted_data_set_default(bcmolt_epon_denied_link_tdm_channels_exhausted_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_TDM_CHANNELS_EXHAUSTED_ID_ALARM_STATUS)) != 0)
+    {
+        this->alarm_status = BCMOLT_STATUS_OFF;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_tdm_channels_exhausted_data_pack(const bcmolt_epon_denied_link_tdm_channels_exhausted_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_TDM_CHANNELS_EXHAUSTED_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_pack(this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_denied_link_tdm_channels_exhausted_data_get_packed_length(const bcmolt_epon_denied_link_tdm_channels_exhausted_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_TDM_CHANNELS_EXHAUSTED_ID_ALARM_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_tdm_channels_exhausted_data_unpack(bcmolt_epon_denied_link_tdm_channels_exhausted_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_TDM_CHANNELS_EXHAUSTED_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_unpack(&this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_tdm_channels_exhausted_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_TDM_CHANNELS_EXHAUSTED_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_tdm_channels_exhausted_data_bounds_check(const bcmolt_epon_denied_link_tdm_channels_exhausted_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_denied_link_tdm_channels_exhausted_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_TDM_CHANNELS_EXHAUSTED_ID_ALARM_STATUS)) != 0)
+    {
+        switch (this->alarm_status)
+        {
+            case BCMOLT_STATUS_OFF:
+                break;
+            case BCMOLT_STATUS_ON:
+                break;
+            case BCMOLT_STATUS_NO_CHANGE:
+                break;
+            default:
+                *failed_prop = BCMOLT_EPON_DENIED_LINK_TDM_CHANNELS_EXHAUSTED_ID_ALARM_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_denied_link_unknown_link_violation_data_set_default(bcmolt_epon_denied_link_unknown_link_violation_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_UNKNOWN_LINK_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        this->alarm_status.link_rate = BCMOLT_EPON_LINK_RATE_TEN_TEN;
+        this->alarm_status.alarm_status = BCMOLT_STATUS_OFF;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_unknown_link_violation_data_pack(const bcmolt_epon_denied_link_unknown_link_violation_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_UNKNOWN_LINK_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_unknown_link_status_pack(&this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_denied_link_unknown_link_violation_data_get_packed_length(const bcmolt_epon_denied_link_unknown_link_violation_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_UNKNOWN_LINK_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        count += 3;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_unknown_link_violation_data_unpack(bcmolt_epon_denied_link_unknown_link_violation_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_UNKNOWN_LINK_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_unknown_link_status_unpack(&this->alarm_status, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_unknown_link_violation_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_UNKNOWN_LINK_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 3))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_unknown_link_violation_data_bounds_check(const bcmolt_epon_denied_link_unknown_link_violation_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_denied_link_unknown_link_violation_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_UNKNOWN_LINK_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_unknown_link_status_bounds_check(&this->alarm_status))
+        {
+            *failed_prop = BCMOLT_EPON_DENIED_LINK_UNKNOWN_LINK_VIOLATION_ID_ALARM_STATUS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_denied_link_upstream_bandwidth_violation_data_set_default(bcmolt_epon_denied_link_upstream_bandwidth_violation_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_UPSTREAM_BANDWIDTH_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        this->alarm_status = BCMOLT_STATUS_OFF;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_upstream_bandwidth_violation_data_pack(const bcmolt_epon_denied_link_upstream_bandwidth_violation_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_UPSTREAM_BANDWIDTH_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_pack(this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_denied_link_upstream_bandwidth_violation_data_get_packed_length(const bcmolt_epon_denied_link_upstream_bandwidth_violation_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_UPSTREAM_BANDWIDTH_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_upstream_bandwidth_violation_data_unpack(bcmolt_epon_denied_link_upstream_bandwidth_violation_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_UPSTREAM_BANDWIDTH_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_unpack(&this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_upstream_bandwidth_violation_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_UPSTREAM_BANDWIDTH_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_upstream_bandwidth_violation_data_bounds_check(const bcmolt_epon_denied_link_upstream_bandwidth_violation_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_denied_link_upstream_bandwidth_violation_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_UPSTREAM_BANDWIDTH_VIOLATION_ID_ALARM_STATUS)) != 0)
+    {
+        switch (this->alarm_status)
+        {
+            case BCMOLT_STATUS_OFF:
+                break;
+            case BCMOLT_STATUS_ON:
+                break;
+            case BCMOLT_STATUS_NO_CHANGE:
+                break;
+            default:
+                *failed_prop = BCMOLT_EPON_DENIED_LINK_UPSTREAM_BANDWIDTH_VIOLATION_ID_ALARM_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_denied_link_auto_cfg_data_set_default(bcmolt_epon_denied_link_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_LASER_ON_OFF_VIOLATION)) != 0)
+    {
+        this->laser_on_off_violation = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_LLID_POOL_EMPTY_VIOLATION)) != 0)
+    {
+        this->llid_pool_empty_violation = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_MAX_LINK_VIOLATION)) != 0)
+    {
+        this->max_link_violation = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_OVERHEAD_PROFILE_VIOLATION)) != 0)
+    {
+        this->overhead_profile_violation = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_RANGE_VIOLATION)) != 0)
+    {
+        this->range_violation = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_ROGUE_VIOLATION)) != 0)
+    {
+        this->rogue_violation = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_SYSTEM_RESOURCE_VIOLATION)) != 0)
+    {
+        this->system_resource_violation = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_TDM_CHANNELS_EXHAUSTED)) != 0)
+    {
+        this->tdm_channels_exhausted = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_UNKNOWN_LINK_VIOLATION)) != 0)
+    {
+        this->unknown_link_violation = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_UPSTREAM_BANDWIDTH_VIOLATION)) != 0)
+    {
+        this->upstream_bandwidth_violation = BCMOS_FALSE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_auto_cfg_data_pack(const bcmolt_epon_denied_link_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_LASER_ON_OFF_VIOLATION)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->laser_on_off_violation))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_LLID_POOL_EMPTY_VIOLATION)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->llid_pool_empty_violation))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_MAX_LINK_VIOLATION)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->max_link_violation))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_OVERHEAD_PROFILE_VIOLATION)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->overhead_profile_violation))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_RANGE_VIOLATION)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->range_violation))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_ROGUE_VIOLATION)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->rogue_violation))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_SYSTEM_RESOURCE_VIOLATION)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->system_resource_violation))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_TDM_CHANNELS_EXHAUSTED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->tdm_channels_exhausted))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_UNKNOWN_LINK_VIOLATION)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->unknown_link_violation))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_UPSTREAM_BANDWIDTH_VIOLATION)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->upstream_bandwidth_violation))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_denied_link_auto_cfg_data_get_packed_length(const bcmolt_epon_denied_link_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_LASER_ON_OFF_VIOLATION)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_LLID_POOL_EMPTY_VIOLATION)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_MAX_LINK_VIOLATION)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_OVERHEAD_PROFILE_VIOLATION)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_RANGE_VIOLATION)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_ROGUE_VIOLATION)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_SYSTEM_RESOURCE_VIOLATION)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_TDM_CHANNELS_EXHAUSTED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_UNKNOWN_LINK_VIOLATION)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_UPSTREAM_BANDWIDTH_VIOLATION)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_auto_cfg_data_unpack(bcmolt_epon_denied_link_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_LASER_ON_OFF_VIOLATION)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->laser_on_off_violation))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_LLID_POOL_EMPTY_VIOLATION)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->llid_pool_empty_violation))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_MAX_LINK_VIOLATION)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->max_link_violation))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_OVERHEAD_PROFILE_VIOLATION)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->overhead_profile_violation))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_RANGE_VIOLATION)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->range_violation))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_ROGUE_VIOLATION)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->rogue_violation))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_SYSTEM_RESOURCE_VIOLATION)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->system_resource_violation))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_TDM_CHANNELS_EXHAUSTED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->tdm_channels_exhausted))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_UNKNOWN_LINK_VIOLATION)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->unknown_link_violation))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_UPSTREAM_BANDWIDTH_VIOLATION)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->upstream_bandwidth_violation))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_LASER_ON_OFF_VIOLATION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_LLID_POOL_EMPTY_VIOLATION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_MAX_LINK_VIOLATION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_OVERHEAD_PROFILE_VIOLATION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_RANGE_VIOLATION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_ROGUE_VIOLATION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_SYSTEM_RESOURCE_VIOLATION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_TDM_CHANNELS_EXHAUSTED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_UNKNOWN_LINK_VIOLATION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_DENIED_LINK_AUTO_CFG_ID_UPSTREAM_BANDWIDTH_VIOLATION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_denied_link_auto_cfg_data_bounds_check(const bcmolt_epon_denied_link_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_denied_link_auto_cfg_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_link_key_set_default(bcmolt_epon_link_key *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_KEY_ID_EPON_NI)) != 0)
+    {
+        this->epon_ni = (bcmolt_epon_ni) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_KEY_ID_MAC_ADDRESS)) != 0)
+    {
+        bcmos_mac_address_init(&this->mac_address);
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_key_pack(const bcmolt_epon_link_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_KEY_ID_EPON_NI)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->epon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_KEY_ID_MAC_ADDRESS)) != 0)
+    {
+        if (!bcmolt_buf_write_mac_address(buf, this->mac_address))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_link_key_get_packed_length(const bcmolt_epon_link_key *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_KEY_ID_EPON_NI)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_KEY_ID_MAC_ADDRESS)) != 0)
+    {
+        count += 6;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_key_unpack(bcmolt_epon_link_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_KEY_ID_EPON_NI)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->epon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_KEY_ID_MAC_ADDRESS)) != 0)
+    {
+        if (!bcmolt_buf_read_mac_address(buf, &this->mac_address))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_KEY_ID_EPON_NI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_KEY_ID_MAC_ADDRESS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 6))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_key_bounds_check(const bcmolt_epon_link_key *this, bcmolt_presence_mask fields_present, bcmolt_epon_link_key_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_link_cfg_data_set_default(bcmolt_epon_link_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_LINK_RATE)) != 0)
+    {
+        this->link_rate = BCMOLT_EPON_LINK_RATE_TEN_TEN;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_STATE_FLAGS)) != 0)
+    {
+        this->state_flags = (bcmolt_epon_link_state_flags) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_LLID)) != 0)
+    {
+        this->llid = (bcmolt_epon_llid) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_LASER_ON_TIME_TQ)) != 0)
+    {
+        this->laser_on_time_tq = (bcmolt_time_quanta) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_LASER_OFF_TIME_TQ)) != 0)
+    {
+        this->laser_off_time_tq = (bcmolt_time_quanta) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_RANGE_VALUE_TQ)) != 0)
+    {
+        this->range_value_tq = (bcmolt_time_quanta) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_DISTANCE)) != 0)
+    {
+        this->distance = (bcmolt_meters) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_ALARM_STATE)) != 0)
+    {
+        this->alarm_state.key_exchange_failure = BCMOLT_STATUS_OFF;
+        this->alarm_state.invalid_mpcp_report_received = BCMOLT_STATUS_OFF;
+        this->alarm_state.mpcp_report_timeout = BCMOLT_STATUS_OFF;
+        this->alarm_state.oam_keepalive_timeout = BCMOLT_STATUS_OFF;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_TUNNEL_ID)) != 0)
+    {
+        this->tunnel_id = (bcmolt_epon_tunnel_id) 2164260864UL;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_ONU_ID)) != 0)
+    {
+        this->onu_id = (bcmolt_epon_onu_id) 255;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_MIN_LASER_OVERHEAD)) != 0)
+    {
+        this->min_laser_overhead.laser_on_time = (bcmolt_time_quanta) 32;
+        this->min_laser_overhead.laser_off_time = (bcmolt_time_quanta) 32;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_KEY_EXCHANGE_CONFIG)) != 0)
+    {
+        this->key_exchange_config.oam_type = BCMOLT_EPON_OAM_TYPE_BROADCOM;
+        this->key_exchange_config.period = 0;
+        this->key_exchange_config.direction = BCMOLT_EPON_ENCRYPTION_DIRECTION_DOWNSTREAM_ONLY;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_EPON_ENCRYPTION)) != 0)
+    {
+        this->epon_encryption.downstream_mode = BCMOLT_EPON_ENCRYPTION_MODE_NO_ENCRYPTION;
+        this->epon_encryption.downstream_key_choice = BCMOLT_EPON_KEY_CHOICE_KEY_0;
+        this->epon_encryption.downstream_encryption_information.format = BCMOLT_EPON_ENCRYPTION_INFORMATION_FORMAT_CFB;
+        memset(this->epon_encryption.downstream_encryption_information.u.cfb.key, 0, sizeof(this->epon_encryption.downstream_encryption_information.u.cfb.key));
+        this->epon_encryption.upstream_mode = BCMOLT_EPON_ENCRYPTION_MODE_NO_ENCRYPTION;
+        this->epon_encryption.upstream_key_choice = BCMOLT_EPON_KEY_CHOICE_KEY_0;
+        this->epon_encryption.upstream_encryption_information.format = BCMOLT_EPON_ENCRYPTION_INFORMATION_FORMAT_CFB;
+        memset(this->epon_encryption.upstream_encryption_information.u.cfb.key, 0, sizeof(this->epon_encryption.upstream_encryption_information.u.cfb.key));
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_FEC_ENABLE)) != 0)
+    {
+        this->fec_enable.upstream = BCMOLT_EPON_LINK_FEC_STATE_USE_DEFAULT;
+        this->fec_enable.downstream = BCMOLT_EPON_LINK_FEC_STATE_USE_DEFAULT;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_OAM_HEARTBEAT_CONFIG)) != 0)
+    {
+        this->oam_heartbeat_config.send_period = 0;
+        this->oam_heartbeat_config.transmit_frame.len = 0;
+        this->oam_heartbeat_config.transmit_frame.val = NULL;
+        this->oam_heartbeat_config.ignored_receive_frame_template.frame_octets.len = 0;
+        this->oam_heartbeat_config.ignored_receive_frame_template.frame_octets.val = NULL;
+        this->oam_heartbeat_config.ignored_receive_frame_template.mask_octets.len = 0;
+        this->oam_heartbeat_config.ignored_receive_frame_template.mask_octets.val = NULL;
+        this->oam_heartbeat_config.receive_timeout = 1;
+        this->oam_heartbeat_config.maximum_receive_size = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_UPSTREAM_BANDWIDTH)) != 0)
+    {
+        this->upstream_bandwidth.polling_interval_us = BCMOLT_POLLING_INTERVAL_AUTOMATIC;
+        this->upstream_bandwidth.grant_threshold_tq = (bcmolt_time_quanta) 0;
+        this->upstream_bandwidth.min_schedulershaper.bandwidth_Kbps = (bcmolt_bandwidth_Kbps) 0;
+        this->upstream_bandwidth.min_schedulershaper.max_burst_size_tq = (bcmolt_time_quanta) 0;
+        this->upstream_bandwidth.min_schedulershaper.priority = 0;
+        this->upstream_bandwidth.min_schedulershaper.weight_tq = (bcmolt_time_quanta) 0;
+        this->upstream_bandwidth.max_schedulershaper.bandwidth_Kbps = (bcmolt_bandwidth_Kbps) 0;
+        this->upstream_bandwidth.max_schedulershaper.max_burst_size_tq = (bcmolt_time_quanta) 0;
+        this->upstream_bandwidth.max_schedulershaper.priority = 0;
+        this->upstream_bandwidth.max_schedulershaper.weight_tq = (bcmolt_time_quanta) 0;
+        this->upstream_bandwidth.tdm_grant_size_tq = (bcmolt_time_quanta) 0;
+        this->upstream_bandwidth.tdm_grant_interval_us = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_UBD_INFO)) != 0)
+    {
+        this->ubd_info.actual_polling_interval = 0;
+        this->ubd_info.actual_grant_threshold_tq = (bcmolt_time_quanta) 0;
+        this->ubd_info.actual_min_schedulershaper.actual_mbs_tq = (bcmolt_time_quanta) 0;
+        this->ubd_info.actual_min_schedulershaper.actual_weight_tq = (bcmolt_time_quanta) 0;
+        this->ubd_info.actual_max_schedulershaper.actual_mbs_tq = (bcmolt_time_quanta) 0;
+        this->ubd_info.actual_max_schedulershaper.actual_weight_tq = (bcmolt_time_quanta) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_CLOCK_TRANSPORT_ENABLE)) != 0)
+    {
+        this->clock_transport_enable = BCMOS_TRUE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_PENDING_GRANTS)) != 0)
+    {
+        this->pending_grants = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_LINK_TYPE)) != 0)
+    {
+        this->link_type = BCMOLT_EPON_LINK_TYPE_SYSTEM;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_cfg_data_pack(const bcmolt_epon_link_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_LINK_RATE)) != 0)
+    {
+        if (!bcmolt_epon_link_rate_pack(this->link_rate, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_STATE_FLAGS)) != 0)
+    {
+        if (!bcmolt_epon_link_state_flags_pack(this->state_flags, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_LLID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->llid))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_LASER_ON_TIME_TQ)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, (uint32_t) this->laser_on_time_tq))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_LASER_OFF_TIME_TQ)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, (uint32_t) this->laser_off_time_tq))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_RANGE_VALUE_TQ)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, (uint32_t) this->range_value_tq))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_DISTANCE)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, (uint32_t) this->distance))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_ALARM_STATE)) != 0)
+    {
+        if (!bcmolt_epon_link_alarm_state_pack(&this->alarm_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_TUNNEL_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, (uint32_t) this->tunnel_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, (uint8_t) this->onu_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_MIN_LASER_OVERHEAD)) != 0)
+    {
+        if (!bcmolt_epon_laser_overhead_parameters_pack(&this->min_laser_overhead, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_KEY_EXCHANGE_CONFIG)) != 0)
+    {
+        if (!bcmolt_epon_key_exchange_config_pack(&this->key_exchange_config, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_EPON_ENCRYPTION)) != 0)
+    {
+        if (!bcmolt_epon_encryption_config_pack(&this->epon_encryption, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_FEC_ENABLE)) != 0)
+    {
+        if (!bcmolt_epon_link_fec_en_pack(&this->fec_enable, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_OAM_HEARTBEAT_CONFIG)) != 0)
+    {
+        if (!bcmolt_oam_heartbeat_config_pack(&this->oam_heartbeat_config, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_UPSTREAM_BANDWIDTH)) != 0)
+    {
+        if (!bcmolt_upstream_bandwidth_distribution_pack(&this->upstream_bandwidth, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_UBD_INFO)) != 0)
+    {
+        if (!bcmolt_ubd_info_pack(&this->ubd_info, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_CLOCK_TRANSPORT_ENABLE)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->clock_transport_enable))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_PENDING_GRANTS)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->pending_grants))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_LINK_TYPE)) != 0)
+    {
+        if (!bcmolt_epon_link_type_pack(this->link_type, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_link_cfg_data_get_packed_length(const bcmolt_epon_link_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_LINK_RATE)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_STATE_FLAGS)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_LLID)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_LASER_ON_TIME_TQ)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_LASER_OFF_TIME_TQ)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_RANGE_VALUE_TQ)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_DISTANCE)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_ALARM_STATE)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_TUNNEL_ID)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_ONU_ID)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_MIN_LASER_OVERHEAD)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_KEY_EXCHANGE_CONFIG)) != 0)
+    {
+        count += 5;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_EPON_ENCRYPTION)) != 0)
+    {
+        count += bcmolt_epon_encryption_config_get_packed_length(&this->epon_encryption);
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_FEC_ENABLE)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_OAM_HEARTBEAT_CONFIG)) != 0)
+    {
+        count += bcmolt_oam_heartbeat_config_get_packed_length(&this->oam_heartbeat_config);
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_UPSTREAM_BANDWIDTH)) != 0)
+    {
+        count += 42;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_UBD_INFO)) != 0)
+    {
+        count += 22;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_CLOCK_TRANSPORT_ENABLE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_PENDING_GRANTS)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_LINK_TYPE)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_cfg_data_unpack(bcmolt_epon_link_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_LINK_RATE)) != 0)
+    {
+        if (!bcmolt_epon_link_rate_unpack(&this->link_rate, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_STATE_FLAGS)) != 0)
+    {
+        if (!bcmolt_epon_link_state_flags_unpack(&this->state_flags, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_LLID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->llid))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_LASER_ON_TIME_TQ)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, (uint32_t *) &this->laser_on_time_tq))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_LASER_OFF_TIME_TQ)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, (uint32_t *) &this->laser_off_time_tq))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_RANGE_VALUE_TQ)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, (uint32_t *) &this->range_value_tq))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_DISTANCE)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, (uint32_t *) &this->distance))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_ALARM_STATE)) != 0)
+    {
+        if (!bcmolt_epon_link_alarm_state_unpack(&this->alarm_state, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_TUNNEL_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, (uint32_t *) &this->tunnel_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, (uint8_t *) &this->onu_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_MIN_LASER_OVERHEAD)) != 0)
+    {
+        if (!bcmolt_epon_laser_overhead_parameters_unpack(&this->min_laser_overhead, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_KEY_EXCHANGE_CONFIG)) != 0)
+    {
+        if (!bcmolt_epon_key_exchange_config_unpack(&this->key_exchange_config, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_EPON_ENCRYPTION)) != 0)
+    {
+        if (!bcmolt_epon_encryption_config_unpack(&this->epon_encryption, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_FEC_ENABLE)) != 0)
+    {
+        if (!bcmolt_epon_link_fec_en_unpack(&this->fec_enable, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_OAM_HEARTBEAT_CONFIG)) != 0)
+    {
+        if (!bcmolt_oam_heartbeat_config_unpack(&this->oam_heartbeat_config, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_UPSTREAM_BANDWIDTH)) != 0)
+    {
+        if (!bcmolt_upstream_bandwidth_distribution_unpack(&this->upstream_bandwidth, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_UBD_INFO)) != 0)
+    {
+        if (!bcmolt_ubd_info_unpack(&this->ubd_info, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_CLOCK_TRANSPORT_ENABLE)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->clock_transport_enable))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_PENDING_GRANTS)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->pending_grants))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_LINK_TYPE)) != 0)
+    {
+        if (!bcmolt_epon_link_type_unpack(&this->link_type, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_LINK_RATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_STATE_FLAGS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_LLID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_LASER_ON_TIME_TQ)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_LASER_OFF_TIME_TQ)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_RANGE_VALUE_TQ)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_DISTANCE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_ALARM_STATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_TUNNEL_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_MIN_LASER_OVERHEAD)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_KEY_EXCHANGE_CONFIG)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 5))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_EPON_ENCRYPTION)) != 0)
+    {
+        if (!bcmolt_epon_encryption_config_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_FEC_ENABLE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_OAM_HEARTBEAT_CONFIG)) != 0)
+    {
+        if (!bcmolt_oam_heartbeat_config_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_UPSTREAM_BANDWIDTH)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 42))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_UBD_INFO)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 22))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_CLOCK_TRANSPORT_ENABLE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_PENDING_GRANTS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_LINK_TYPE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_cfg_data_bounds_check(const bcmolt_epon_link_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_link_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_LINK_RATE)) != 0)
+    {
+        switch (this->link_rate)
+        {
+            case BCMOLT_EPON_LINK_RATE_TEN_TEN:
+                break;
+            case BCMOLT_EPON_LINK_RATE_TEN_ONE:
+                break;
+            case BCMOLT_EPON_LINK_RATE_ONE_ONE:
+                break;
+            default:
+                *failed_prop = BCMOLT_EPON_LINK_CFG_ID_LINK_RATE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_STATE_FLAGS)) != 0)
+    {
+        if ((this->state_flags & 0x00FE) != 0)
+        {
+            *failed_prop = BCMOLT_EPON_LINK_CFG_ID_STATE_FLAGS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_ALARM_STATE)) != 0)
+    {
+        if (!bcmolt_epon_link_alarm_state_bounds_check(&this->alarm_state))
+        {
+            *failed_prop = BCMOLT_EPON_LINK_CFG_ID_ALARM_STATE;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_TUNNEL_ID)) != 0)
+    {
+        if (this->tunnel_id < (bcmolt_epon_tunnel_id) 2164260864UL)
+        {
+            *failed_prop = BCMOLT_EPON_LINK_CFG_ID_TUNNEL_ID;
+            return BCMOS_FALSE;
+        }
+
+        if (this->tunnel_id > (bcmolt_epon_tunnel_id) 2164264959UL)
+        {
+            *failed_prop = BCMOLT_EPON_LINK_CFG_ID_TUNNEL_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_ONU_ID)) != 0)
+    {
+        if (this->onu_id > (bcmolt_epon_onu_id) 127)
+        {
+            *failed_prop = BCMOLT_EPON_LINK_CFG_ID_ONU_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_MIN_LASER_OVERHEAD)) != 0)
+    {
+        if (!bcmolt_epon_laser_overhead_parameters_bounds_check(&this->min_laser_overhead))
+        {
+            *failed_prop = BCMOLT_EPON_LINK_CFG_ID_MIN_LASER_OVERHEAD;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_KEY_EXCHANGE_CONFIG)) != 0)
+    {
+        if (!bcmolt_epon_key_exchange_config_bounds_check(&this->key_exchange_config))
+        {
+            *failed_prop = BCMOLT_EPON_LINK_CFG_ID_KEY_EXCHANGE_CONFIG;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_EPON_ENCRYPTION)) != 0)
+    {
+        if (!bcmolt_epon_encryption_config_bounds_check(&this->epon_encryption))
+        {
+            *failed_prop = BCMOLT_EPON_LINK_CFG_ID_EPON_ENCRYPTION;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_FEC_ENABLE)) != 0)
+    {
+        if (!bcmolt_epon_link_fec_en_bounds_check(&this->fec_enable))
+        {
+            *failed_prop = BCMOLT_EPON_LINK_CFG_ID_FEC_ENABLE;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_OAM_HEARTBEAT_CONFIG)) != 0)
+    {
+        if (!bcmolt_oam_heartbeat_config_bounds_check(&this->oam_heartbeat_config))
+        {
+            *failed_prop = BCMOLT_EPON_LINK_CFG_ID_OAM_HEARTBEAT_CONFIG;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_UPSTREAM_BANDWIDTH)) != 0)
+    {
+        if (!bcmolt_upstream_bandwidth_distribution_bounds_check(&this->upstream_bandwidth))
+        {
+            *failed_prop = BCMOLT_EPON_LINK_CFG_ID_UPSTREAM_BANDWIDTH;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_UBD_INFO)) != 0)
+    {
+        if (!bcmolt_ubd_info_bounds_check(&this->ubd_info))
+        {
+            *failed_prop = BCMOLT_EPON_LINK_CFG_ID_UBD_INFO;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_CFG_ID_LINK_TYPE)) != 0)
+    {
+        switch (this->link_type)
+        {
+            case BCMOLT_EPON_LINK_TYPE_SYSTEM:
+                break;
+            case BCMOLT_EPON_LINK_TYPE_DOWNSTREAM_ONLY:
+                break;
+            case BCMOLT_EPON_LINK_TYPE_BIDIRECTIONAL:
+                break;
+            default:
+                *failed_prop = BCMOLT_EPON_LINK_CFG_ID_LINK_TYPE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_link_stat_data_set_default(bcmolt_epon_link_stat_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_DATA_BYTES)) != 0)
+    {
+        this->rx_data_bytes = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_DATA_FRAMES)) != 0)
+    {
+        this->rx_data_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_64)) != 0)
+    {
+        this->rx_frames_64 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_65_127)) != 0)
+    {
+        this->rx_frames_65_127 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_128_255)) != 0)
+    {
+        this->rx_frames_128_255 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_256_511)) != 0)
+    {
+        this->rx_frames_256_511 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_512_1023)) != 0)
+    {
+        this->rx_frames_512_1023 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_1024_1518)) != 0)
+    {
+        this->rx_frames_1024_1518 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_1519_2047)) != 0)
+    {
+        this->rx_frames_1519_2047 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_2048_4095)) != 0)
+    {
+        this->rx_frames_2048_4095 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_4096_9216)) != 0)
+    {
+        this->rx_frames_4096_9216 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_9217_16383)) != 0)
+    {
+        this->rx_frames_9217_16383 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_OAM_BYTES)) != 0)
+    {
+        this->rx_oam_bytes = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_OAM_FRAMES)) != 0)
+    {
+        this->rx_oam_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_MPCP_FRAMES)) != 0)
+    {
+        this->rx_mpcp_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_BROADCAST_FRAMES)) != 0)
+    {
+        this->rx_broadcast_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_UNICAST_FRAMES)) != 0)
+    {
+        this->rx_unicast_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_MULTICAST_FRAMES)) != 0)
+    {
+        this->rx_multicast_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_REPORT_FRAMES)) != 0)
+    {
+        this->rx_report_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FCS_ERROR)) != 0)
+    {
+        this->rx_fcs_error = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_OVERSIZE_ERROR)) != 0)
+    {
+        this->rx_oversize_error = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_RUNT_ERROR)) != 0)
+    {
+        this->rx_runt_error = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_LINE_CODE_ERROR)) != 0)
+    {
+        this->rx_line_code_error = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_LINE_CODE_ERROR_MAX)) != 0)
+    {
+        this->rx_line_code_error_max = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_DATA_BYTES)) != 0)
+    {
+        this->tx_data_bytes = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_DATA_FRAMES)) != 0)
+    {
+        this->tx_data_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_64)) != 0)
+    {
+        this->tx_frames_64 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_65_127)) != 0)
+    {
+        this->tx_frames_65_127 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_128_255)) != 0)
+    {
+        this->tx_frames_128_255 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_256_511)) != 0)
+    {
+        this->tx_frames_256_511 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_512_1023)) != 0)
+    {
+        this->tx_frames_512_1023 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_1024_1518)) != 0)
+    {
+        this->tx_frames_1024_1518 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_1519_2047)) != 0)
+    {
+        this->tx_frames_1519_2047 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_2048_4095)) != 0)
+    {
+        this->tx_frames_2048_4095 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_4096_9216)) != 0)
+    {
+        this->tx_frames_4096_9216 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_9217_16383)) != 0)
+    {
+        this->tx_frames_9217_16383 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_OAM_BYTES)) != 0)
+    {
+        this->tx_oam_bytes = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_OAM_FRAMES)) != 0)
+    {
+        this->tx_oam_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_MPCP_FRAMES)) != 0)
+    {
+        this->tx_mpcp_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_BROADCAST_FRAMES)) != 0)
+    {
+        this->tx_broadcast_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_UNICAST_FRAMES)) != 0)
+    {
+        this->tx_unicast_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_MULTICAST_FRAMES)) != 0)
+    {
+        this->tx_multicast_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_GATES)) != 0)
+    {
+        this->tx_gates = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_stat_data_pack(const bcmolt_epon_link_stat_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_DATA_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_data_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_DATA_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_data_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_64)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_frames_64))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_65_127)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_frames_65_127))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_128_255)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_frames_128_255))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_256_511)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_frames_256_511))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_512_1023)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_frames_512_1023))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_1024_1518)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_frames_1024_1518))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_1519_2047)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_frames_1519_2047))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_2048_4095)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_frames_2048_4095))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_4096_9216)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_frames_4096_9216))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_9217_16383)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_frames_9217_16383))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_OAM_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_oam_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_OAM_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_oam_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_MPCP_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_mpcp_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_BROADCAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_broadcast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_UNICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_unicast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_MULTICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_multicast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_REPORT_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_report_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FCS_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_fcs_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_OVERSIZE_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_oversize_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_RUNT_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_runt_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_LINE_CODE_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_line_code_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_LINE_CODE_ERROR_MAX)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_line_code_error_max))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_DATA_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_data_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_DATA_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_data_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_64)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_frames_64))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_65_127)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_frames_65_127))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_128_255)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_frames_128_255))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_256_511)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_frames_256_511))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_512_1023)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_frames_512_1023))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_1024_1518)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_frames_1024_1518))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_1519_2047)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_frames_1519_2047))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_2048_4095)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_frames_2048_4095))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_4096_9216)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_frames_4096_9216))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_9217_16383)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_frames_9217_16383))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_OAM_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_oam_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_OAM_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_oam_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_MPCP_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_mpcp_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_BROADCAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_broadcast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_UNICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_unicast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_MULTICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_multicast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_GATES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_gates))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_link_stat_data_get_packed_length(const bcmolt_epon_link_stat_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_DATA_BYTES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_DATA_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_64)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_65_127)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_128_255)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_256_511)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_512_1023)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_1024_1518)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_1519_2047)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_2048_4095)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_4096_9216)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_9217_16383)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_OAM_BYTES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_OAM_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_MPCP_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_BROADCAST_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_UNICAST_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_MULTICAST_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_REPORT_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FCS_ERROR)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_OVERSIZE_ERROR)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_RUNT_ERROR)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_LINE_CODE_ERROR)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_LINE_CODE_ERROR_MAX)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_DATA_BYTES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_DATA_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_64)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_65_127)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_128_255)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_256_511)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_512_1023)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_1024_1518)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_1519_2047)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_2048_4095)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_4096_9216)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_9217_16383)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_OAM_BYTES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_OAM_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_MPCP_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_BROADCAST_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_UNICAST_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_MULTICAST_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_GATES)) != 0)
+    {
+        count += 8;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_stat_data_unpack(bcmolt_epon_link_stat_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_DATA_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_data_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_DATA_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_data_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_64)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_frames_64))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_65_127)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_frames_65_127))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_128_255)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_frames_128_255))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_256_511)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_frames_256_511))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_512_1023)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_frames_512_1023))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_1024_1518)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_frames_1024_1518))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_1519_2047)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_frames_1519_2047))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_2048_4095)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_frames_2048_4095))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_4096_9216)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_frames_4096_9216))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_9217_16383)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_frames_9217_16383))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_OAM_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_oam_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_OAM_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_oam_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_MPCP_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_mpcp_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_BROADCAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_broadcast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_UNICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_unicast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_MULTICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_multicast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_REPORT_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_report_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FCS_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_fcs_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_OVERSIZE_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_oversize_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_RUNT_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_runt_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_LINE_CODE_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_line_code_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_LINE_CODE_ERROR_MAX)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_line_code_error_max))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_DATA_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_data_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_DATA_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_data_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_64)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_frames_64))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_65_127)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_frames_65_127))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_128_255)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_frames_128_255))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_256_511)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_frames_256_511))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_512_1023)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_frames_512_1023))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_1024_1518)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_frames_1024_1518))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_1519_2047)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_frames_1519_2047))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_2048_4095)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_frames_2048_4095))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_4096_9216)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_frames_4096_9216))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_9217_16383)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_frames_9217_16383))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_OAM_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_oam_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_OAM_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_oam_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_MPCP_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_mpcp_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_BROADCAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_broadcast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_UNICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_unicast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_MULTICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_multicast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_GATES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_gates))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_stat_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_DATA_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_DATA_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_64)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_65_127)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_128_255)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_256_511)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_512_1023)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_1024_1518)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_1519_2047)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_2048_4095)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_4096_9216)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_9217_16383)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_OAM_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_OAM_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_MPCP_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_BROADCAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_UNICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_MULTICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_REPORT_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_FCS_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_OVERSIZE_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_RUNT_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_LINE_CODE_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_RX_LINE_CODE_ERROR_MAX)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_DATA_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_DATA_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_64)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_65_127)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_128_255)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_256_511)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_512_1023)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_1024_1518)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_1519_2047)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_2048_4095)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_4096_9216)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_9217_16383)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_OAM_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_OAM_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_MPCP_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_BROADCAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_UNICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_MULTICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ID_TX_GATES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_stat_data_bounds_check(const bcmolt_epon_link_stat_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_link_stat_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_link_stat_cfg_data_set_default(bcmolt_epon_link_stat_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_CFG_ID_CFG)) != 0)
+    {
+        this->cfg.trigger.type = BCMOLT_STAT_CONDITION_TYPE_NONE;
+        this->cfg.soak.active_soak_time = 0;
+        this->cfg.soak.clear_soak_time = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_stat_cfg_data_pack(const bcmolt_epon_link_stat_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_pack(&this->cfg, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_link_stat_cfg_data_get_packed_length(const bcmolt_epon_link_stat_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_CFG_ID_CFG)) != 0)
+    {
+        count += bcmolt_stat_alarm_config_get_packed_length(&this->cfg);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_stat_cfg_data_unpack(bcmolt_epon_link_stat_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_unpack(&this->cfg, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_stat_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_stat_cfg_data_bounds_check(const bcmolt_epon_link_stat_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_link_stat_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_bounds_check(&this->cfg))
+        {
+            *failed_prop = BCMOLT_EPON_LINK_STAT_CFG_ID_CFG;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_link_duplicate_mpcp_registration_request_data_set_default(bcmolt_epon_link_duplicate_mpcp_registration_request_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_DUPLICATE_MPCP_REGISTRATION_REQUEST_ID_INITIAL_RANGE_TQ)) != 0)
+    {
+        this->initial_range_tq = (bcmolt_time_quanta) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_DUPLICATE_MPCP_REGISTRATION_REQUEST_ID_CURRENT_RANGE_TQ)) != 0)
+    {
+        this->current_range_tq = (bcmolt_time_quanta) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_duplicate_mpcp_registration_request_data_pack(const bcmolt_epon_link_duplicate_mpcp_registration_request_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_DUPLICATE_MPCP_REGISTRATION_REQUEST_ID_INITIAL_RANGE_TQ)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, (uint32_t) this->initial_range_tq))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_DUPLICATE_MPCP_REGISTRATION_REQUEST_ID_CURRENT_RANGE_TQ)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, (uint32_t) this->current_range_tq))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_link_duplicate_mpcp_registration_request_data_get_packed_length(const bcmolt_epon_link_duplicate_mpcp_registration_request_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_DUPLICATE_MPCP_REGISTRATION_REQUEST_ID_INITIAL_RANGE_TQ)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_DUPLICATE_MPCP_REGISTRATION_REQUEST_ID_CURRENT_RANGE_TQ)) != 0)
+    {
+        count += 4;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_duplicate_mpcp_registration_request_data_unpack(bcmolt_epon_link_duplicate_mpcp_registration_request_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_DUPLICATE_MPCP_REGISTRATION_REQUEST_ID_INITIAL_RANGE_TQ)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, (uint32_t *) &this->initial_range_tq))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_DUPLICATE_MPCP_REGISTRATION_REQUEST_ID_CURRENT_RANGE_TQ)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, (uint32_t *) &this->current_range_tq))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_duplicate_mpcp_registration_request_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_DUPLICATE_MPCP_REGISTRATION_REQUEST_ID_INITIAL_RANGE_TQ)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_DUPLICATE_MPCP_REGISTRATION_REQUEST_ID_CURRENT_RANGE_TQ)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_duplicate_mpcp_registration_request_data_bounds_check(const bcmolt_epon_link_duplicate_mpcp_registration_request_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_link_duplicate_mpcp_registration_request_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_link_key_exchange_failure_data_set_default(bcmolt_epon_link_key_exchange_failure_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_KEY_EXCHANGE_FAILURE_ID_ALARM_STATUS)) != 0)
+    {
+        this->alarm_status = BCMOLT_STATUS_OFF;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_key_exchange_failure_data_pack(const bcmolt_epon_link_key_exchange_failure_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_KEY_EXCHANGE_FAILURE_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_pack(this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_link_key_exchange_failure_data_get_packed_length(const bcmolt_epon_link_key_exchange_failure_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_KEY_EXCHANGE_FAILURE_ID_ALARM_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_key_exchange_failure_data_unpack(bcmolt_epon_link_key_exchange_failure_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_KEY_EXCHANGE_FAILURE_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_unpack(&this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_key_exchange_failure_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_KEY_EXCHANGE_FAILURE_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_key_exchange_failure_data_bounds_check(const bcmolt_epon_link_key_exchange_failure_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_link_key_exchange_failure_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_KEY_EXCHANGE_FAILURE_ID_ALARM_STATUS)) != 0)
+    {
+        switch (this->alarm_status)
+        {
+            case BCMOLT_STATUS_OFF:
+                break;
+            case BCMOLT_STATUS_ON:
+                break;
+            case BCMOLT_STATUS_NO_CHANGE:
+                break;
+            default:
+                *failed_prop = BCMOLT_EPON_LINK_KEY_EXCHANGE_FAILURE_ID_ALARM_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_link_link_speed_mismatch_data_set_default(bcmolt_epon_link_link_speed_mismatch_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_LINK_SPEED_MISMATCH_ID_PREVIOUS_RATE)) != 0)
+    {
+        this->previous_rate = BCMOLT_EPON_LINK_RATE_TEN_TEN;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_LINK_SPEED_MISMATCH_ID_CURRENT_RATE)) != 0)
+    {
+        this->current_rate = BCMOLT_EPON_LINK_RATE_TEN_TEN;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_link_speed_mismatch_data_pack(const bcmolt_epon_link_link_speed_mismatch_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_LINK_SPEED_MISMATCH_ID_PREVIOUS_RATE)) != 0)
+    {
+        if (!bcmolt_epon_link_rate_pack(this->previous_rate, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_LINK_SPEED_MISMATCH_ID_CURRENT_RATE)) != 0)
+    {
+        if (!bcmolt_epon_link_rate_pack(this->current_rate, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_link_link_speed_mismatch_data_get_packed_length(const bcmolt_epon_link_link_speed_mismatch_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_LINK_SPEED_MISMATCH_ID_PREVIOUS_RATE)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_LINK_SPEED_MISMATCH_ID_CURRENT_RATE)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_link_speed_mismatch_data_unpack(bcmolt_epon_link_link_speed_mismatch_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_LINK_SPEED_MISMATCH_ID_PREVIOUS_RATE)) != 0)
+    {
+        if (!bcmolt_epon_link_rate_unpack(&this->previous_rate, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_LINK_SPEED_MISMATCH_ID_CURRENT_RATE)) != 0)
+    {
+        if (!bcmolt_epon_link_rate_unpack(&this->current_rate, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_link_speed_mismatch_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_LINK_SPEED_MISMATCH_ID_PREVIOUS_RATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_LINK_SPEED_MISMATCH_ID_CURRENT_RATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_link_speed_mismatch_data_bounds_check(const bcmolt_epon_link_link_speed_mismatch_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_link_link_speed_mismatch_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_LINK_SPEED_MISMATCH_ID_PREVIOUS_RATE)) != 0)
+    {
+        switch (this->previous_rate)
+        {
+            case BCMOLT_EPON_LINK_RATE_TEN_TEN:
+                break;
+            case BCMOLT_EPON_LINK_RATE_TEN_ONE:
+                break;
+            case BCMOLT_EPON_LINK_RATE_ONE_ONE:
+                break;
+            default:
+                *failed_prop = BCMOLT_EPON_LINK_LINK_SPEED_MISMATCH_ID_PREVIOUS_RATE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_LINK_SPEED_MISMATCH_ID_CURRENT_RATE)) != 0)
+    {
+        switch (this->current_rate)
+        {
+            case BCMOLT_EPON_LINK_RATE_TEN_TEN:
+                break;
+            case BCMOLT_EPON_LINK_RATE_TEN_ONE:
+                break;
+            case BCMOLT_EPON_LINK_RATE_ONE_ONE:
+                break;
+            default:
+                *failed_prop = BCMOLT_EPON_LINK_LINK_SPEED_MISMATCH_ID_CURRENT_RATE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_link_mpcp_discovered_data_set_default(bcmolt_epon_link_mpcp_discovered_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_MPCP_DISCOVERED_ID_LINK_INFO)) != 0)
+    {
+        this->link_info.link_status = (bcmolt_epon_link_status) 0;
+        this->link_info.rate = BCMOLT_EPON_LINK_RATE_TEN_TEN;
+        this->link_info.llid = (bcmolt_epon_llid) 0;
+        this->link_info.mpcp_discovery_info = (bcmolt_mpcp_discovery_info) 0;
+        this->link_info.onu_laser_on_time_tq = (bcmolt_time_quanta) 0;
+        this->link_info.onu_laser_off_time_tq = (bcmolt_time_quanta) 0;
+        this->link_info.pending_grants = 0;
+        this->link_info.range_value_tq = (bcmolt_time_quanta) 0;
+        this->link_info.tunnel_id = (bcmolt_epon_tunnel_id) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_mpcp_discovered_data_pack(const bcmolt_epon_link_mpcp_discovered_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_MPCP_DISCOVERED_ID_LINK_INFO)) != 0)
+    {
+        if (!bcmolt_epon_link_info_pack(&this->link_info, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_link_mpcp_discovered_data_get_packed_length(const bcmolt_epon_link_mpcp_discovered_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_MPCP_DISCOVERED_ID_LINK_INFO)) != 0)
+    {
+        count += 24;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_mpcp_discovered_data_unpack(bcmolt_epon_link_mpcp_discovered_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_MPCP_DISCOVERED_ID_LINK_INFO)) != 0)
+    {
+        if (!bcmolt_epon_link_info_unpack(&this->link_info, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_mpcp_discovered_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_MPCP_DISCOVERED_ID_LINK_INFO)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 24))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_mpcp_discovered_data_bounds_check(const bcmolt_epon_link_mpcp_discovered_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_link_mpcp_discovered_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_MPCP_DISCOVERED_ID_LINK_INFO)) != 0)
+    {
+        if (!bcmolt_epon_link_info_bounds_check(&this->link_info))
+        {
+            *failed_prop = BCMOLT_EPON_LINK_MPCP_DISCOVERED_ID_LINK_INFO;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_link_mpcp_report_timeout_data_set_default(bcmolt_epon_link_mpcp_report_timeout_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_MPCP_REPORT_TIMEOUT_ID_ALARM_STATUS)) != 0)
+    {
+        this->alarm_status = BCMOLT_STATUS_OFF;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_mpcp_report_timeout_data_pack(const bcmolt_epon_link_mpcp_report_timeout_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_MPCP_REPORT_TIMEOUT_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_pack(this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_link_mpcp_report_timeout_data_get_packed_length(const bcmolt_epon_link_mpcp_report_timeout_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_MPCP_REPORT_TIMEOUT_ID_ALARM_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_mpcp_report_timeout_data_unpack(bcmolt_epon_link_mpcp_report_timeout_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_MPCP_REPORT_TIMEOUT_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_unpack(&this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_mpcp_report_timeout_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_MPCP_REPORT_TIMEOUT_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_mpcp_report_timeout_data_bounds_check(const bcmolt_epon_link_mpcp_report_timeout_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_link_mpcp_report_timeout_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_MPCP_REPORT_TIMEOUT_ID_ALARM_STATUS)) != 0)
+    {
+        switch (this->alarm_status)
+        {
+            case BCMOLT_STATUS_OFF:
+                break;
+            case BCMOLT_STATUS_ON:
+                break;
+            case BCMOLT_STATUS_NO_CHANGE:
+                break;
+            default:
+                *failed_prop = BCMOLT_EPON_LINK_MPCP_REPORT_TIMEOUT_ID_ALARM_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_link_oam_keepalive_timeout_data_set_default(bcmolt_epon_link_oam_keepalive_timeout_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_OAM_KEEPALIVE_TIMEOUT_ID_ALARM_STATUS)) != 0)
+    {
+        this->alarm_status = BCMOLT_STATUS_OFF;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_oam_keepalive_timeout_data_pack(const bcmolt_epon_link_oam_keepalive_timeout_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_OAM_KEEPALIVE_TIMEOUT_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_pack(this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_link_oam_keepalive_timeout_data_get_packed_length(const bcmolt_epon_link_oam_keepalive_timeout_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_OAM_KEEPALIVE_TIMEOUT_ID_ALARM_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_oam_keepalive_timeout_data_unpack(bcmolt_epon_link_oam_keepalive_timeout_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_OAM_KEEPALIVE_TIMEOUT_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_unpack(&this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_oam_keepalive_timeout_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_OAM_KEEPALIVE_TIMEOUT_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_oam_keepalive_timeout_data_bounds_check(const bcmolt_epon_link_oam_keepalive_timeout_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_link_oam_keepalive_timeout_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_OAM_KEEPALIVE_TIMEOUT_ID_ALARM_STATUS)) != 0)
+    {
+        switch (this->alarm_status)
+        {
+            case BCMOLT_STATUS_OFF:
+                break;
+            case BCMOLT_STATUS_ON:
+                break;
+            case BCMOLT_STATUS_NO_CHANGE:
+                break;
+            default:
+                *failed_prop = BCMOLT_EPON_LINK_OAM_KEEPALIVE_TIMEOUT_ID_ALARM_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_link_preprovisioned_link_created_data_set_default(bcmolt_epon_link_preprovisioned_link_created_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_PREPROVISIONED_LINK_CREATED_ID_LINK_INFO)) != 0)
+    {
+        this->link_info.link_status = (bcmolt_epon_link_status) 0;
+        this->link_info.rate = BCMOLT_EPON_LINK_RATE_TEN_TEN;
+        this->link_info.llid = (bcmolt_epon_llid) 0;
+        this->link_info.mpcp_discovery_info = (bcmolt_mpcp_discovery_info) 0;
+        this->link_info.onu_laser_on_time_tq = (bcmolt_time_quanta) 0;
+        this->link_info.onu_laser_off_time_tq = (bcmolt_time_quanta) 0;
+        this->link_info.pending_grants = 0;
+        this->link_info.range_value_tq = (bcmolt_time_quanta) 0;
+        this->link_info.tunnel_id = (bcmolt_epon_tunnel_id) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_preprovisioned_link_created_data_pack(const bcmolt_epon_link_preprovisioned_link_created_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_PREPROVISIONED_LINK_CREATED_ID_LINK_INFO)) != 0)
+    {
+        if (!bcmolt_epon_link_info_pack(&this->link_info, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_link_preprovisioned_link_created_data_get_packed_length(const bcmolt_epon_link_preprovisioned_link_created_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_PREPROVISIONED_LINK_CREATED_ID_LINK_INFO)) != 0)
+    {
+        count += 24;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_preprovisioned_link_created_data_unpack(bcmolt_epon_link_preprovisioned_link_created_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_PREPROVISIONED_LINK_CREATED_ID_LINK_INFO)) != 0)
+    {
+        if (!bcmolt_epon_link_info_unpack(&this->link_info, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_preprovisioned_link_created_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_PREPROVISIONED_LINK_CREATED_ID_LINK_INFO)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 24))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_preprovisioned_link_created_data_bounds_check(const bcmolt_epon_link_preprovisioned_link_created_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_link_preprovisioned_link_created_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_PREPROVISIONED_LINK_CREATED_ID_LINK_INFO)) != 0)
+    {
+        if (!bcmolt_epon_link_info_bounds_check(&this->link_info))
+        {
+            *failed_prop = BCMOLT_EPON_LINK_PREPROVISIONED_LINK_CREATED_ID_LINK_INFO;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_link_protection_switch_occurred_data_set_default(bcmolt_epon_link_protection_switch_occurred_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_PROTECTION_SWITCH_OCCURRED_ID_PROTECTION_STATUS)) != 0)
+    {
+        this->protection_status = BCMOLT_EPON_PROTECTION_STATE_UNPROTECTED;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_PROTECTION_SWITCH_OCCURRED_ID_RANGE_VALUE_TQ)) != 0)
+    {
+        this->range_value_tq = (bcmolt_time_quanta) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_protection_switch_occurred_data_pack(const bcmolt_epon_link_protection_switch_occurred_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_PROTECTION_SWITCH_OCCURRED_ID_PROTECTION_STATUS)) != 0)
+    {
+        if (!bcmolt_epon_protection_state_pack(this->protection_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_PROTECTION_SWITCH_OCCURRED_ID_RANGE_VALUE_TQ)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, (uint32_t) this->range_value_tq))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_link_protection_switch_occurred_data_get_packed_length(const bcmolt_epon_link_protection_switch_occurred_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_PROTECTION_SWITCH_OCCURRED_ID_PROTECTION_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_PROTECTION_SWITCH_OCCURRED_ID_RANGE_VALUE_TQ)) != 0)
+    {
+        count += 4;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_protection_switch_occurred_data_unpack(bcmolt_epon_link_protection_switch_occurred_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_PROTECTION_SWITCH_OCCURRED_ID_PROTECTION_STATUS)) != 0)
+    {
+        if (!bcmolt_epon_protection_state_unpack(&this->protection_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_PROTECTION_SWITCH_OCCURRED_ID_RANGE_VALUE_TQ)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, (uint32_t *) &this->range_value_tq))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_protection_switch_occurred_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_PROTECTION_SWITCH_OCCURRED_ID_PROTECTION_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_PROTECTION_SWITCH_OCCURRED_ID_RANGE_VALUE_TQ)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_protection_switch_occurred_data_bounds_check(const bcmolt_epon_link_protection_switch_occurred_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_link_protection_switch_occurred_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_PROTECTION_SWITCH_OCCURRED_ID_PROTECTION_STATUS)) != 0)
+    {
+        switch (this->protection_status)
+        {
+            case BCMOLT_EPON_PROTECTION_STATE_UNPROTECTED:
+                break;
+            case BCMOLT_EPON_PROTECTION_STATE_PROTECTED_STANDBY:
+                break;
+            case BCMOLT_EPON_PROTECTION_STATE_PROTECTED_WORKING:
+                break;
+            default:
+                *failed_prop = BCMOLT_EPON_LINK_PROTECTION_SWITCH_OCCURRED_ID_PROTECTION_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_link_range_value_changed_data_set_default(bcmolt_epon_link_range_value_changed_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_RANGE_VALUE_CHANGED_ID_RANGE_VALUE_TQ)) != 0)
+    {
+        this->range_value_tq = (bcmolt_time_quanta) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_range_value_changed_data_pack(const bcmolt_epon_link_range_value_changed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_RANGE_VALUE_CHANGED_ID_RANGE_VALUE_TQ)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, (uint32_t) this->range_value_tq))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_link_range_value_changed_data_get_packed_length(const bcmolt_epon_link_range_value_changed_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_RANGE_VALUE_CHANGED_ID_RANGE_VALUE_TQ)) != 0)
+    {
+        count += 4;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_range_value_changed_data_unpack(bcmolt_epon_link_range_value_changed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_RANGE_VALUE_CHANGED_ID_RANGE_VALUE_TQ)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, (uint32_t *) &this->range_value_tq))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_range_value_changed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_RANGE_VALUE_CHANGED_ID_RANGE_VALUE_TQ)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_range_value_changed_data_bounds_check(const bcmolt_epon_link_range_value_changed_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_link_range_value_changed_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_link_stat_alarm_cleared_data_set_default(bcmolt_epon_link_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        this->stat = BCMOLT_EPON_LINK_STAT_ID_RX_DATA_BYTES;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_stat_alarm_cleared_data_pack(const bcmolt_epon_link_stat_alarm_cleared_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_epon_link_stat_id_pack(this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_link_stat_alarm_cleared_data_get_packed_length(const bcmolt_epon_link_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_stat_alarm_cleared_data_unpack(bcmolt_epon_link_stat_alarm_cleared_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_epon_link_stat_id_unpack(&this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_stat_alarm_cleared_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_stat_alarm_cleared_data_bounds_check(const bcmolt_epon_link_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_link_stat_alarm_cleared_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        switch (this->stat)
+        {
+            case BCMOLT_EPON_LINK_STAT_ID_RX_DATA_BYTES:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_DATA_FRAMES:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_64:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_65_127:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_128_255:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_256_511:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_512_1023:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_1024_1518:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_1519_2047:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_2048_4095:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_4096_9216:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_9217_16383:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_OAM_BYTES:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_OAM_FRAMES:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_MPCP_FRAMES:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_BROADCAST_FRAMES:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_UNICAST_FRAMES:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_MULTICAST_FRAMES:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_REPORT_FRAMES:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_FCS_ERROR:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_OVERSIZE_ERROR:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_RUNT_ERROR:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_LINE_CODE_ERROR:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_LINE_CODE_ERROR_MAX:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_TX_DATA_BYTES:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_TX_DATA_FRAMES:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_64:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_65_127:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_128_255:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_256_511:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_512_1023:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_1024_1518:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_1519_2047:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_2048_4095:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_4096_9216:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_9217_16383:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_TX_OAM_BYTES:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_TX_OAM_FRAMES:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_TX_MPCP_FRAMES:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_TX_BROADCAST_FRAMES:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_TX_UNICAST_FRAMES:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_TX_MULTICAST_FRAMES:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_TX_GATES:
+                break;
+            default:
+                *failed_prop = BCMOLT_EPON_LINK_STAT_ALARM_CLEARED_ID_STAT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_link_stat_alarm_raised_data_set_default(bcmolt_epon_link_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        this->stat = BCMOLT_EPON_LINK_STAT_ID_RX_DATA_BYTES;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_stat_alarm_raised_data_pack(const bcmolt_epon_link_stat_alarm_raised_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_epon_link_stat_id_pack(this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_link_stat_alarm_raised_data_get_packed_length(const bcmolt_epon_link_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_stat_alarm_raised_data_unpack(bcmolt_epon_link_stat_alarm_raised_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_epon_link_stat_id_unpack(&this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_stat_alarm_raised_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_stat_alarm_raised_data_bounds_check(const bcmolt_epon_link_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_link_stat_alarm_raised_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        switch (this->stat)
+        {
+            case BCMOLT_EPON_LINK_STAT_ID_RX_DATA_BYTES:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_DATA_FRAMES:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_64:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_65_127:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_128_255:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_256_511:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_512_1023:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_1024_1518:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_1519_2047:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_2048_4095:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_4096_9216:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_FRAMES_9217_16383:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_OAM_BYTES:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_OAM_FRAMES:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_MPCP_FRAMES:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_BROADCAST_FRAMES:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_UNICAST_FRAMES:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_MULTICAST_FRAMES:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_REPORT_FRAMES:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_FCS_ERROR:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_OVERSIZE_ERROR:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_RUNT_ERROR:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_LINE_CODE_ERROR:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_RX_LINE_CODE_ERROR_MAX:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_TX_DATA_BYTES:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_TX_DATA_FRAMES:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_64:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_65_127:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_128_255:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_256_511:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_512_1023:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_1024_1518:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_1519_2047:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_2048_4095:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_4096_9216:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_TX_FRAMES_9217_16383:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_TX_OAM_BYTES:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_TX_OAM_FRAMES:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_TX_MPCP_FRAMES:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_TX_BROADCAST_FRAMES:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_TX_UNICAST_FRAMES:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_TX_MULTICAST_FRAMES:
+                break;
+            case BCMOLT_EPON_LINK_STAT_ID_TX_GATES:
+                break;
+            default:
+                *failed_prop = BCMOLT_EPON_LINK_STAT_ALARM_RAISED_ID_STAT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_link_auto_cfg_data_set_default(bcmolt_epon_link_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_DUPLICATE_MPCP_REGISTRATION_REQUEST)) != 0)
+    {
+        this->duplicate_mpcp_registration_request = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_ENCRYPTION_ENABLED)) != 0)
+    {
+        this->encryption_enabled = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_KEY_EXCHANGE_FAILURE)) != 0)
+    {
+        this->key_exchange_failure = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_KEY_EXCHANGE_STARTED)) != 0)
+    {
+        this->key_exchange_started = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_KEY_EXCHANGE_STOPPED)) != 0)
+    {
+        this->key_exchange_stopped = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_LINK_DELETED)) != 0)
+    {
+        this->link_deleted = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_LINK_SPEED_MISMATCH)) != 0)
+    {
+        this->link_speed_mismatch = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_MPCP_DEREGISTERED)) != 0)
+    {
+        this->mpcp_deregistered = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_MPCP_DISCOVERED)) != 0)
+    {
+        this->mpcp_discovered = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_MPCP_REG_ACK_TIMEOUT)) != 0)
+    {
+        this->mpcp_reg_ack_timeout = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_MPCP_REPORT_TIMEOUT)) != 0)
+    {
+        this->mpcp_report_timeout = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_OAM_KEEPALIVE_TIMEOUT)) != 0)
+    {
+        this->oam_keepalive_timeout = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_OAM_KEEPALIVE_TIMER_STARTED)) != 0)
+    {
+        this->oam_keepalive_timer_started = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_OAM_KEEPALIVE_TIMER_STOPPED)) != 0)
+    {
+        this->oam_keepalive_timer_stopped = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_PREPROVISIONED_LINK_CREATED)) != 0)
+    {
+        this->preprovisioned_link_created = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_PROTECTION_SWITCH_OCCURRED)) != 0)
+    {
+        this->protection_switch_occurred = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_RANGE_VALUE_CHANGED)) != 0)
+    {
+        this->range_value_changed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_RERANGE_FAILURE)) != 0)
+    {
+        this->rerange_failure = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        this->stat_alarm_cleared = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        this->stat_alarm_raised = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_STATIC_REGISTRATION_DONE)) != 0)
+    {
+        this->static_registration_done = BCMOS_FALSE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_auto_cfg_data_pack(const bcmolt_epon_link_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_DUPLICATE_MPCP_REGISTRATION_REQUEST)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->duplicate_mpcp_registration_request))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_ENCRYPTION_ENABLED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->encryption_enabled))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_KEY_EXCHANGE_FAILURE)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->key_exchange_failure))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_KEY_EXCHANGE_STARTED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->key_exchange_started))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_KEY_EXCHANGE_STOPPED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->key_exchange_stopped))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_LINK_DELETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->link_deleted))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_LINK_SPEED_MISMATCH)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->link_speed_mismatch))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_MPCP_DEREGISTERED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->mpcp_deregistered))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_MPCP_DISCOVERED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->mpcp_discovered))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_MPCP_REG_ACK_TIMEOUT)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->mpcp_reg_ack_timeout))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_MPCP_REPORT_TIMEOUT)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->mpcp_report_timeout))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_OAM_KEEPALIVE_TIMEOUT)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->oam_keepalive_timeout))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_OAM_KEEPALIVE_TIMER_STARTED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->oam_keepalive_timer_started))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_OAM_KEEPALIVE_TIMER_STOPPED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->oam_keepalive_timer_stopped))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_PREPROVISIONED_LINK_CREATED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->preprovisioned_link_created))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_PROTECTION_SWITCH_OCCURRED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->protection_switch_occurred))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_RANGE_VALUE_CHANGED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->range_value_changed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_RERANGE_FAILURE)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->rerange_failure))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->stat_alarm_cleared))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->stat_alarm_raised))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_STATIC_REGISTRATION_DONE)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->static_registration_done))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_link_auto_cfg_data_get_packed_length(const bcmolt_epon_link_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_DUPLICATE_MPCP_REGISTRATION_REQUEST)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_ENCRYPTION_ENABLED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_KEY_EXCHANGE_FAILURE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_KEY_EXCHANGE_STARTED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_KEY_EXCHANGE_STOPPED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_LINK_DELETED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_LINK_SPEED_MISMATCH)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_MPCP_DEREGISTERED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_MPCP_DISCOVERED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_MPCP_REG_ACK_TIMEOUT)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_MPCP_REPORT_TIMEOUT)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_OAM_KEEPALIVE_TIMEOUT)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_OAM_KEEPALIVE_TIMER_STARTED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_OAM_KEEPALIVE_TIMER_STOPPED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_PREPROVISIONED_LINK_CREATED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_PROTECTION_SWITCH_OCCURRED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_RANGE_VALUE_CHANGED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_RERANGE_FAILURE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_STATIC_REGISTRATION_DONE)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_auto_cfg_data_unpack(bcmolt_epon_link_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_DUPLICATE_MPCP_REGISTRATION_REQUEST)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->duplicate_mpcp_registration_request))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_ENCRYPTION_ENABLED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->encryption_enabled))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_KEY_EXCHANGE_FAILURE)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->key_exchange_failure))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_KEY_EXCHANGE_STARTED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->key_exchange_started))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_KEY_EXCHANGE_STOPPED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->key_exchange_stopped))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_LINK_DELETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->link_deleted))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_LINK_SPEED_MISMATCH)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->link_speed_mismatch))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_MPCP_DEREGISTERED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->mpcp_deregistered))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_MPCP_DISCOVERED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->mpcp_discovered))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_MPCP_REG_ACK_TIMEOUT)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->mpcp_reg_ack_timeout))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_MPCP_REPORT_TIMEOUT)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->mpcp_report_timeout))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_OAM_KEEPALIVE_TIMEOUT)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->oam_keepalive_timeout))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_OAM_KEEPALIVE_TIMER_STARTED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->oam_keepalive_timer_started))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_OAM_KEEPALIVE_TIMER_STOPPED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->oam_keepalive_timer_stopped))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_PREPROVISIONED_LINK_CREATED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->preprovisioned_link_created))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_PROTECTION_SWITCH_OCCURRED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->protection_switch_occurred))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_RANGE_VALUE_CHANGED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->range_value_changed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_RERANGE_FAILURE)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->rerange_failure))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->stat_alarm_cleared))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->stat_alarm_raised))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_STATIC_REGISTRATION_DONE)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->static_registration_done))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_DUPLICATE_MPCP_REGISTRATION_REQUEST)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_ENCRYPTION_ENABLED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_KEY_EXCHANGE_FAILURE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_KEY_EXCHANGE_STARTED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_KEY_EXCHANGE_STOPPED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_LINK_DELETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_LINK_SPEED_MISMATCH)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_MPCP_DEREGISTERED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_MPCP_DISCOVERED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_MPCP_REG_ACK_TIMEOUT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_MPCP_REPORT_TIMEOUT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_OAM_KEEPALIVE_TIMEOUT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_OAM_KEEPALIVE_TIMER_STARTED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_OAM_KEEPALIVE_TIMER_STOPPED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_PREPROVISIONED_LINK_CREATED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_PROTECTION_SWITCH_OCCURRED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_RANGE_VALUE_CHANGED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_RERANGE_FAILURE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_AUTO_CFG_ID_STATIC_REGISTRATION_DONE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_auto_cfg_data_bounds_check(const bcmolt_epon_link_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_link_auto_cfg_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_link_key_exchange_start_data_set_default(bcmolt_epon_link_key_exchange_start_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_KEY_EXCHANGE_START_ID_PERIOD)) != 0)
+    {
+        this->period = 1;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_key_exchange_start_data_pack(const bcmolt_epon_link_key_exchange_start_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_KEY_EXCHANGE_START_ID_PERIOD)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, this->period))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_link_key_exchange_start_data_get_packed_length(const bcmolt_epon_link_key_exchange_start_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_KEY_EXCHANGE_START_ID_PERIOD)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_key_exchange_start_data_unpack(bcmolt_epon_link_key_exchange_start_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_KEY_EXCHANGE_START_ID_PERIOD)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, &this->period))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_key_exchange_start_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_KEY_EXCHANGE_START_ID_PERIOD)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_key_exchange_start_data_bounds_check(const bcmolt_epon_link_key_exchange_start_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_link_key_exchange_start_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_KEY_EXCHANGE_START_ID_PERIOD)) != 0)
+    {
+        if (this->period < 1)
+        {
+            *failed_prop = BCMOLT_EPON_LINK_KEY_EXCHANGE_START_ID_PERIOD;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_link_oam_keepalive_timer_start_data_set_default(bcmolt_epon_link_oam_keepalive_timer_start_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_OAM_KEEPALIVE_TIMER_START_ID_SEND_PERIOD)) != 0)
+    {
+        this->send_period = 1;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_oam_keepalive_timer_start_data_pack(const bcmolt_epon_link_oam_keepalive_timer_start_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_OAM_KEEPALIVE_TIMER_START_ID_SEND_PERIOD)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, this->send_period))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_link_oam_keepalive_timer_start_data_get_packed_length(const bcmolt_epon_link_oam_keepalive_timer_start_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_OAM_KEEPALIVE_TIMER_START_ID_SEND_PERIOD)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_oam_keepalive_timer_start_data_unpack(bcmolt_epon_link_oam_keepalive_timer_start_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_OAM_KEEPALIVE_TIMER_START_ID_SEND_PERIOD)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, &this->send_period))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_oam_keepalive_timer_start_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_OAM_KEEPALIVE_TIMER_START_ID_SEND_PERIOD)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_oam_keepalive_timer_start_data_bounds_check(const bcmolt_epon_link_oam_keepalive_timer_start_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_link_oam_keepalive_timer_start_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_OAM_KEEPALIVE_TIMER_START_ID_SEND_PERIOD)) != 0)
+    {
+        if (this->send_period < 1)
+        {
+            *failed_prop = BCMOLT_EPON_LINK_OAM_KEEPALIVE_TIMER_START_ID_SEND_PERIOD;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_link_static_registration_data_set_default(bcmolt_epon_link_static_registration_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STATIC_REGISTRATION_ID_LASERON_TIME_TQ)) != 0)
+    {
+        this->laseron_time_tq = (bcmolt_time_quanta) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STATIC_REGISTRATION_ID_LASEROFF_TIME_TQ)) != 0)
+    {
+        this->laseroff_time_tq = (bcmolt_time_quanta) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STATIC_REGISTRATION_ID_RANGE_VALUE_TQ)) != 0)
+    {
+        this->range_value_tq = (bcmolt_time_quanta) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STATIC_REGISTRATION_ID_PENDING_GRANTS)) != 0)
+    {
+        this->pending_grants = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_static_registration_data_pack(const bcmolt_epon_link_static_registration_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STATIC_REGISTRATION_ID_LASERON_TIME_TQ)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, (uint32_t) this->laseron_time_tq))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STATIC_REGISTRATION_ID_LASEROFF_TIME_TQ)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, (uint32_t) this->laseroff_time_tq))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STATIC_REGISTRATION_ID_RANGE_VALUE_TQ)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, (uint32_t) this->range_value_tq))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STATIC_REGISTRATION_ID_PENDING_GRANTS)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->pending_grants))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_link_static_registration_data_get_packed_length(const bcmolt_epon_link_static_registration_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STATIC_REGISTRATION_ID_LASERON_TIME_TQ)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STATIC_REGISTRATION_ID_LASEROFF_TIME_TQ)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STATIC_REGISTRATION_ID_RANGE_VALUE_TQ)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STATIC_REGISTRATION_ID_PENDING_GRANTS)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_static_registration_data_unpack(bcmolt_epon_link_static_registration_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STATIC_REGISTRATION_ID_LASERON_TIME_TQ)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, (uint32_t *) &this->laseron_time_tq))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STATIC_REGISTRATION_ID_LASEROFF_TIME_TQ)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, (uint32_t *) &this->laseroff_time_tq))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STATIC_REGISTRATION_ID_RANGE_VALUE_TQ)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, (uint32_t *) &this->range_value_tq))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STATIC_REGISTRATION_ID_PENDING_GRANTS)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->pending_grants))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_static_registration_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STATIC_REGISTRATION_ID_LASERON_TIME_TQ)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STATIC_REGISTRATION_ID_LASEROFF_TIME_TQ)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STATIC_REGISTRATION_ID_RANGE_VALUE_TQ)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_STATIC_REGISTRATION_ID_PENDING_GRANTS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_static_registration_data_bounds_check(const bcmolt_epon_link_static_registration_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_link_static_registration_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_link_inject_frame_data_set_default(bcmolt_epon_link_inject_frame_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_INJECT_FRAME_ID_FRAME)) != 0)
+    {
+        this->frame.frame_octets.len = 0;
+        this->frame.frame_octets.val = NULL;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_inject_frame_data_pack(const bcmolt_epon_link_inject_frame_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_INJECT_FRAME_ID_FRAME)) != 0)
+    {
+        if (!bcmolt_ethernet_frame_unmasked_pack(&this->frame, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_link_inject_frame_data_get_packed_length(const bcmolt_epon_link_inject_frame_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_INJECT_FRAME_ID_FRAME)) != 0)
+    {
+        count += bcmolt_ethernet_frame_unmasked_get_packed_length(&this->frame);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_inject_frame_data_unpack(bcmolt_epon_link_inject_frame_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_INJECT_FRAME_ID_FRAME)) != 0)
+    {
+        if (!bcmolt_ethernet_frame_unmasked_unpack(&this->frame, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_inject_frame_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_INJECT_FRAME_ID_FRAME)) != 0)
+    {
+        if (!bcmolt_ethernet_frame_unmasked_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_inject_frame_data_bounds_check(const bcmolt_epon_link_inject_frame_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_link_inject_frame_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_INJECT_FRAME_ID_FRAME)) != 0)
+    {
+        if (!bcmolt_ethernet_frame_unmasked_bounds_check(&this->frame))
+        {
+            *failed_prop = BCMOLT_EPON_LINK_INJECT_FRAME_ID_FRAME;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_link_frame_captured_data_set_default(bcmolt_epon_link_frame_captured_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_FRAME_CAPTURED_ID_FRAME)) != 0)
+    {
+        this->frame.len = 0;
+        this->frame.val = NULL;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_frame_captured_data_pack(const bcmolt_epon_link_frame_captured_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_FRAME_CAPTURED_ID_FRAME)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_pack(&this->frame, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_link_frame_captured_data_get_packed_length(const bcmolt_epon_link_frame_captured_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_FRAME_CAPTURED_ID_FRAME)) != 0)
+    {
+        count += bcmolt_u8_list_u32_get_packed_length(&this->frame);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_frame_captured_data_unpack(bcmolt_epon_link_frame_captured_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_FRAME_CAPTURED_ID_FRAME)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_unpack(&this->frame, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_frame_captured_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_FRAME_CAPTURED_ID_FRAME)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_link_frame_captured_data_bounds_check(const bcmolt_epon_link_frame_captured_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_link_frame_captured_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_LINK_FRAME_CAPTURED_ID_FRAME)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_bounds_check(&this->frame))
+        {
+            *failed_prop = BCMOLT_EPON_LINK_FRAME_CAPTURED_ID_FRAME;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_ni_key_set_default(bcmolt_epon_ni_key *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_KEY_ID_EPON_NI)) != 0)
+    {
+        this->epon_ni = (bcmolt_epon_ni) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_key_pack(const bcmolt_epon_ni_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_KEY_ID_EPON_NI)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->epon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_ni_key_get_packed_length(const bcmolt_epon_ni_key *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_KEY_ID_EPON_NI)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_key_unpack(bcmolt_epon_ni_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_KEY_ID_EPON_NI)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->epon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_KEY_ID_EPON_NI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_key_bounds_check(const bcmolt_epon_ni_key *this, bcmolt_presence_mask fields_present, bcmolt_epon_ni_key_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_ni_cfg_data_set_default(bcmolt_epon_ni_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_MAC_ADDRESS)) != 0)
+    {
+        this->mac_address.u8[0] = 0x0000;
+        this->mac_address.u8[1] = 0x000D;
+        this->mac_address.u8[2] = 0x00B6;
+        this->mac_address.u8[3] = 0x0000;
+        this->mac_address.u8[4] = 0x0000;
+        this->mac_address.u8[5] = 0x0000;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_EPON_NI_EN)) != 0)
+    {
+        this->epon_ni_en = BCMOLT_EPON_NI_EN_STATE_DISABLED;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_REGISTRATION_BEHAVIOR)) != 0)
+    {
+        this->registration_behavior = BCMOLT_REGISTRATION_BEHAVIOR_AUTOMATIC;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_MTU_1G)) != 0)
+    {
+        this->mtu_1g = 1536;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_MTU_10G)) != 0)
+    {
+        this->mtu_10g = 1536;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_MINIMUM_FIBER_LENGTH)) != 0)
+    {
+        this->minimum_fiber_length = (bcmolt_meters) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_MAXIMUM_FIBER_LENGTH)) != 0)
+    {
+        this->maximum_fiber_length = (bcmolt_meters) 20000;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_GRANT_SPACING_TQ)) != 0)
+    {
+        this->grant_spacing_tq = (bcmolt_time_quanta) 32;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_EPON_LOGICAL_LINK_OPTIONS)) != 0)
+    {
+        this->epon_logical_link_options.registration_gate_mode.registration_gate_mode = BCMOLT_MPCP_GATE_MODE_TEKNOVUS;
+        this->epon_logical_link_options.registration_gate_mode.u.teknovus.reg_ack_timeout_ms = 100;
+        this->epon_logical_link_options.reporting_mode = BCMOLT_EPON_DBA_REPORTING_MODE_SIEPON_A;
+        this->epon_logical_link_options.max_links = 512;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_MPCP_DISCOVERY_PERIOD_MS)) != 0)
+    {
+        this->mpcp_discovery_period_ms = 1000;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_ALARM_STATE)) != 0)
+    {
+        this->alarm_state.no_reports = BCMOLT_STATUS_OFF;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_ALL_LINKS)) != 0)
+    {
+        this->all_links.len = 0;
+        this->all_links.val = NULL;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_ENCRYPTION_CFG)) != 0)
+    {
+        this->encryption_cfg.downstream_encryption_mode = BCMOLT_EPON_ENCRYPTION_MODE_NO_ENCRYPTION;
+        this->encryption_cfg.upstream_encryption_mode = BCMOLT_EPON_ENCRYPTION_MODE_NO_ENCRYPTION;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_PROTECTION_SWITCHING_CFG)) != 0)
+    {
+        this->protection_switching_cfg.protection_type = BCMOLT_EPON_PROTECTION_SWITCHING_TYPE_NO_PROTECTION_SWTICHING;
+        this->protection_switching_cfg.protection_switching_options = (bcmolt_protection_switching_detection_options) 0;
+        this->protection_switching_cfg.rerange_options = BCMOLT_EPON_PROTECTION_SWITCHING_RERANGING_OPTIONS_RERANGE_NONE;
+        this->protection_switching_cfg.rerange_attempts = 0;
+        this->protection_switching_cfg.rerange_interval = 0;
+        this->protection_switching_cfg.sync_gate_duration = 0;
+        this->protection_switching_cfg.gpio_input = BCMOLT_GPIO_PIN_UNCONFIGURED;
+        this->protection_switching_cfg.gpio_input_polarity = BCMOLT_GPIO_POLARITY_ACTIVE_HIGH;
+        this->protection_switching_cfg.gpio_output = BCMOLT_GPIO_PIN_UNCONFIGURED;
+        this->protection_switching_cfg.gpio_output_polarity = BCMOLT_GPIO_POLARITY_ACTIVE_HIGH;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_CLOCK_TRANSPORT_CFG)) != 0)
+    {
+        this->clock_transport_cfg.epon_clock_transport_mode = BCMOLT_EPON_CLOCK_TRANSPORT_MODE_HOST_DRIVEN;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_DROPDOWN_WEIGHTS)) != 0)
+    {
+        memset(this->dropdown_weights.arr, 0, sizeof(this->dropdown_weights.arr));
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_APPROXIMATE_SOLICITED_USAGE)) != 0)
+    {
+        memset(this->approximate_solicited_usage.arr, 0, sizeof(this->approximate_solicited_usage.arr));
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_APPROXIMATE_TDM_USAGE)) != 0)
+    {
+        this->approximate_tdm_usage = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_NO_REPORTS_SOAK_TIME)) != 0)
+    {
+        this->no_reports_soak_time = 25;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_PON_AGGREGATE_SHAPER)) != 0)
+    {
+        this->pon_aggregate_shaper.bandwidth_kbps = 0;
+        this->pon_aggregate_shaper.mbs_kB = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_ESTIMATED_PON_LATENCY_TQ)) != 0)
+    {
+        memset(this->estimated_pon_latency_tq.arr, 0, sizeof(this->estimated_pon_latency_tq.arr));
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_ONU_UPGRADE_PARAMS)) != 0)
+    {
+        this->onu_upgrade_params.oam_extension_type = BCMOLT_EPON_OAM_EXTENSION_TYPE_DPOE;
+        this->onu_upgrade_params.u.dpoe.response_timeout_ms = 1000;
+        this->onu_upgrade_params.u.dpoe.block_size = 60;
+        this->onu_upgrade_params.u.dpoe.final_ack_response_timeout = 15;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_AUTO_ROGUE_DETECT_10G_EN)) != 0)
+    {
+        this->auto_rogue_detect_10g_en = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_AUTO_ROGUE_DETECT_1G_EN)) != 0)
+    {
+        this->auto_rogue_detect_1g_en = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_AUTO_ROGUE_DETECT_10G_THRESHOLD)) != 0)
+    {
+        this->auto_rogue_detect_10g_threshold = 128;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_cfg_data_pack(const bcmolt_epon_ni_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_MAC_ADDRESS)) != 0)
+    {
+        if (!bcmolt_buf_write_mac_address(buf, this->mac_address))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_EPON_NI_EN)) != 0)
+    {
+        if (!bcmolt_epon_ni_en_state_pack(this->epon_ni_en, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_REGISTRATION_BEHAVIOR)) != 0)
+    {
+        if (!bcmolt_registration_behavior_pack(this->registration_behavior, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_MTU_1G)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, this->mtu_1g))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_MTU_10G)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, this->mtu_10g))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_MINIMUM_FIBER_LENGTH)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, (uint32_t) this->minimum_fiber_length))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_MAXIMUM_FIBER_LENGTH)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, (uint32_t) this->maximum_fiber_length))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_GRANT_SPACING_TQ)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, (uint32_t) this->grant_spacing_tq))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_EPON_LOGICAL_LINK_OPTIONS)) != 0)
+    {
+        if (!bcmolt_epon_logical_link_options_pack(&this->epon_logical_link_options, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_MPCP_DISCOVERY_PERIOD_MS)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->mpcp_discovery_period_ms))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_ALARM_STATE)) != 0)
+    {
+        if (!bcmolt_epon_ni_alarm_state_pack(&this->alarm_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_ALL_LINKS)) != 0)
+    {
+        if (!bcmolt_macaddress_list_u32_max_2048_pack(&this->all_links, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_ENCRYPTION_CFG)) != 0)
+    {
+        if (!bcmolt_epon_ni_encryption_cfg_pack(&this->encryption_cfg, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_PROTECTION_SWITCHING_CFG)) != 0)
+    {
+        if (!bcmolt_epon_protection_switching_configuration_pack(&this->protection_switching_cfg, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_CLOCK_TRANSPORT_CFG)) != 0)
+    {
+        if (!bcmolt_epon_clock_transport_configuration_pack(&this->clock_transport_cfg, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_DROPDOWN_WEIGHTS)) != 0)
+    {
+        if (!bcmolt_arr_u16_7_pack(&this->dropdown_weights, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_APPROXIMATE_SOLICITED_USAGE)) != 0)
+    {
+        if (!bcmolt_arr_bounds_8_pack(&this->approximate_solicited_usage, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_APPROXIMATE_TDM_USAGE)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->approximate_tdm_usage))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_NO_REPORTS_SOAK_TIME)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, this->no_reports_soak_time))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_PON_AGGREGATE_SHAPER)) != 0)
+    {
+        if (!bcmolt_pon_aggregate_shaper_pack(&this->pon_aggregate_shaper, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_ESTIMATED_PON_LATENCY_TQ)) != 0)
+    {
+        if (!bcmolt_arr_bounds_8_pack(&this->estimated_pon_latency_tq, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_ONU_UPGRADE_PARAMS)) != 0)
+    {
+        if (!bcmolt_epon_onu_upgrade_params_pack(&this->onu_upgrade_params, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_AUTO_ROGUE_DETECT_10G_EN)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->auto_rogue_detect_10g_en))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_AUTO_ROGUE_DETECT_1G_EN)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->auto_rogue_detect_1g_en))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_AUTO_ROGUE_DETECT_10G_THRESHOLD)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->auto_rogue_detect_10g_threshold))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_ni_cfg_data_get_packed_length(const bcmolt_epon_ni_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_MAC_ADDRESS)) != 0)
+    {
+        count += 6;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_EPON_NI_EN)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_REGISTRATION_BEHAVIOR)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_MTU_1G)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_MTU_10G)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_MINIMUM_FIBER_LENGTH)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_MAXIMUM_FIBER_LENGTH)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_GRANT_SPACING_TQ)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_EPON_LOGICAL_LINK_OPTIONS)) != 0)
+    {
+        count += bcmolt_epon_logical_link_options_get_packed_length(&this->epon_logical_link_options);
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_MPCP_DISCOVERY_PERIOD_MS)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_ALARM_STATE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_ALL_LINKS)) != 0)
+    {
+        count += bcmolt_macaddress_list_u32_max_2048_get_packed_length(&this->all_links);
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_ENCRYPTION_CFG)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_PROTECTION_SWITCHING_CFG)) != 0)
+    {
+        count += 12;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_CLOCK_TRANSPORT_CFG)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_DROPDOWN_WEIGHTS)) != 0)
+    {
+        count += 14;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_APPROXIMATE_SOLICITED_USAGE)) != 0)
+    {
+        count += 64;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_APPROXIMATE_TDM_USAGE)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_NO_REPORTS_SOAK_TIME)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_PON_AGGREGATE_SHAPER)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_ESTIMATED_PON_LATENCY_TQ)) != 0)
+    {
+        count += 64;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_ONU_UPGRADE_PARAMS)) != 0)
+    {
+        count += bcmolt_epon_onu_upgrade_params_get_packed_length(&this->onu_upgrade_params);
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_AUTO_ROGUE_DETECT_10G_EN)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_AUTO_ROGUE_DETECT_1G_EN)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_AUTO_ROGUE_DETECT_10G_THRESHOLD)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_cfg_data_unpack(bcmolt_epon_ni_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_MAC_ADDRESS)) != 0)
+    {
+        if (!bcmolt_buf_read_mac_address(buf, &this->mac_address))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_EPON_NI_EN)) != 0)
+    {
+        if (!bcmolt_epon_ni_en_state_unpack(&this->epon_ni_en, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_REGISTRATION_BEHAVIOR)) != 0)
+    {
+        if (!bcmolt_registration_behavior_unpack(&this->registration_behavior, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_MTU_1G)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, &this->mtu_1g))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_MTU_10G)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, &this->mtu_10g))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_MINIMUM_FIBER_LENGTH)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, (uint32_t *) &this->minimum_fiber_length))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_MAXIMUM_FIBER_LENGTH)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, (uint32_t *) &this->maximum_fiber_length))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_GRANT_SPACING_TQ)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, (uint32_t *) &this->grant_spacing_tq))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_EPON_LOGICAL_LINK_OPTIONS)) != 0)
+    {
+        if (!bcmolt_epon_logical_link_options_unpack(&this->epon_logical_link_options, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_MPCP_DISCOVERY_PERIOD_MS)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->mpcp_discovery_period_ms))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_ALARM_STATE)) != 0)
+    {
+        if (!bcmolt_epon_ni_alarm_state_unpack(&this->alarm_state, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_ALL_LINKS)) != 0)
+    {
+        if (!bcmolt_macaddress_list_u32_max_2048_unpack(&this->all_links, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_ENCRYPTION_CFG)) != 0)
+    {
+        if (!bcmolt_epon_ni_encryption_cfg_unpack(&this->encryption_cfg, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_PROTECTION_SWITCHING_CFG)) != 0)
+    {
+        if (!bcmolt_epon_protection_switching_configuration_unpack(&this->protection_switching_cfg, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_CLOCK_TRANSPORT_CFG)) != 0)
+    {
+        if (!bcmolt_epon_clock_transport_configuration_unpack(&this->clock_transport_cfg, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_DROPDOWN_WEIGHTS)) != 0)
+    {
+        if (!bcmolt_arr_u16_7_unpack(&this->dropdown_weights, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_APPROXIMATE_SOLICITED_USAGE)) != 0)
+    {
+        if (!bcmolt_arr_bounds_8_unpack(&this->approximate_solicited_usage, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_APPROXIMATE_TDM_USAGE)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->approximate_tdm_usage))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_NO_REPORTS_SOAK_TIME)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, &this->no_reports_soak_time))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_PON_AGGREGATE_SHAPER)) != 0)
+    {
+        if (!bcmolt_pon_aggregate_shaper_unpack(&this->pon_aggregate_shaper, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_ESTIMATED_PON_LATENCY_TQ)) != 0)
+    {
+        if (!bcmolt_arr_bounds_8_unpack(&this->estimated_pon_latency_tq, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_ONU_UPGRADE_PARAMS)) != 0)
+    {
+        if (!bcmolt_epon_onu_upgrade_params_unpack(&this->onu_upgrade_params, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_AUTO_ROGUE_DETECT_10G_EN)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->auto_rogue_detect_10g_en))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_AUTO_ROGUE_DETECT_1G_EN)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->auto_rogue_detect_1g_en))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_AUTO_ROGUE_DETECT_10G_THRESHOLD)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->auto_rogue_detect_10g_threshold))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_MAC_ADDRESS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 6))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_EPON_NI_EN)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_REGISTRATION_BEHAVIOR)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_MTU_1G)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_MTU_10G)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_MINIMUM_FIBER_LENGTH)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_MAXIMUM_FIBER_LENGTH)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_GRANT_SPACING_TQ)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_EPON_LOGICAL_LINK_OPTIONS)) != 0)
+    {
+        if (!bcmolt_epon_logical_link_options_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_MPCP_DISCOVERY_PERIOD_MS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_ALARM_STATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_ALL_LINKS)) != 0)
+    {
+        if (!bcmolt_macaddress_list_u32_max_2048_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_ENCRYPTION_CFG)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_PROTECTION_SWITCHING_CFG)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 12))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_CLOCK_TRANSPORT_CFG)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_DROPDOWN_WEIGHTS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 14))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_APPROXIMATE_SOLICITED_USAGE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 64))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_APPROXIMATE_TDM_USAGE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_NO_REPORTS_SOAK_TIME)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_PON_AGGREGATE_SHAPER)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_ESTIMATED_PON_LATENCY_TQ)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 64))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_ONU_UPGRADE_PARAMS)) != 0)
+    {
+        if (!bcmolt_epon_onu_upgrade_params_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_AUTO_ROGUE_DETECT_10G_EN)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_AUTO_ROGUE_DETECT_1G_EN)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_AUTO_ROGUE_DETECT_10G_THRESHOLD)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_cfg_data_bounds_check(const bcmolt_epon_ni_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_ni_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_EPON_NI_EN)) != 0)
+    {
+        switch (this->epon_ni_en)
+        {
+            case BCMOLT_EPON_NI_EN_STATE_DISABLED:
+                break;
+            case BCMOLT_EPON_NI_EN_STATE_ENABLED:
+                break;
+            case BCMOLT_EPON_NI_EN_STATE_PROTECTED_WORKING:
+                break;
+            case BCMOLT_EPON_NI_EN_STATE_PROTECTED_STANDBY:
+                break;
+            case BCMOLT_EPON_NI_EN_STATE_PROCESSING:
+                break;
+            default:
+                *failed_prop = BCMOLT_EPON_NI_CFG_ID_EPON_NI_EN;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_REGISTRATION_BEHAVIOR)) != 0)
+    {
+        switch (this->registration_behavior)
+        {
+            case BCMOLT_REGISTRATION_BEHAVIOR_AUTOMATIC:
+                break;
+            case BCMOLT_REGISTRATION_BEHAVIOR_NOTIFY_UNKNOWN:
+                break;
+            default:
+                *failed_prop = BCMOLT_EPON_NI_CFG_ID_REGISTRATION_BEHAVIOR;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_MTU_1G)) != 0)
+    {
+        if (this->mtu_1g < 64)
+        {
+            *failed_prop = BCMOLT_EPON_NI_CFG_ID_MTU_1G;
+            return BCMOS_FALSE;
+        }
+
+        if (this->mtu_1g > 2000)
+        {
+            *failed_prop = BCMOLT_EPON_NI_CFG_ID_MTU_1G;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_MTU_10G)) != 0)
+    {
+        if (this->mtu_10g < 64)
+        {
+            *failed_prop = BCMOLT_EPON_NI_CFG_ID_MTU_10G;
+            return BCMOS_FALSE;
+        }
+
+        if (this->mtu_10g > 10000)
+        {
+            *failed_prop = BCMOLT_EPON_NI_CFG_ID_MTU_10G;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_GRANT_SPACING_TQ)) != 0)
+    {
+        if (this->grant_spacing_tq > (bcmolt_time_quanta) 65535UL)
+        {
+            *failed_prop = BCMOLT_EPON_NI_CFG_ID_GRANT_SPACING_TQ;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_EPON_LOGICAL_LINK_OPTIONS)) != 0)
+    {
+        if (!bcmolt_epon_logical_link_options_bounds_check(&this->epon_logical_link_options))
+        {
+            *failed_prop = BCMOLT_EPON_NI_CFG_ID_EPON_LOGICAL_LINK_OPTIONS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_MPCP_DISCOVERY_PERIOD_MS)) != 0)
+    {
+        if (this->mpcp_discovery_period_ms < 100)
+        {
+            *failed_prop = BCMOLT_EPON_NI_CFG_ID_MPCP_DISCOVERY_PERIOD_MS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_ALARM_STATE)) != 0)
+    {
+        if (!bcmolt_epon_ni_alarm_state_bounds_check(&this->alarm_state))
+        {
+            *failed_prop = BCMOLT_EPON_NI_CFG_ID_ALARM_STATE;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_ALL_LINKS)) != 0)
+    {
+        if (this->all_links.len > 2048)
+        {
+            return BCMOS_FALSE;
+        }
+
+        if (!bcmolt_macaddress_list_u32_max_2048_bounds_check(&this->all_links))
+        {
+            *failed_prop = BCMOLT_EPON_NI_CFG_ID_ALL_LINKS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_ENCRYPTION_CFG)) != 0)
+    {
+        if (!bcmolt_epon_ni_encryption_cfg_bounds_check(&this->encryption_cfg))
+        {
+            *failed_prop = BCMOLT_EPON_NI_CFG_ID_ENCRYPTION_CFG;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_PROTECTION_SWITCHING_CFG)) != 0)
+    {
+        if (!bcmolt_epon_protection_switching_configuration_bounds_check(&this->protection_switching_cfg))
+        {
+            *failed_prop = BCMOLT_EPON_NI_CFG_ID_PROTECTION_SWITCHING_CFG;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_CLOCK_TRANSPORT_CFG)) != 0)
+    {
+        if (!bcmolt_epon_clock_transport_configuration_bounds_check(&this->clock_transport_cfg))
+        {
+            *failed_prop = BCMOLT_EPON_NI_CFG_ID_CLOCK_TRANSPORT_CFG;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_DROPDOWN_WEIGHTS)) != 0)
+    {
+        if (!bcmolt_arr_u16_7_bounds_check(&this->dropdown_weights))
+        {
+            *failed_prop = BCMOLT_EPON_NI_CFG_ID_DROPDOWN_WEIGHTS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_APPROXIMATE_SOLICITED_USAGE)) != 0)
+    {
+        if (!bcmolt_arr_bounds_8_bounds_check(&this->approximate_solicited_usage))
+        {
+            *failed_prop = BCMOLT_EPON_NI_CFG_ID_APPROXIMATE_SOLICITED_USAGE;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_NO_REPORTS_SOAK_TIME)) != 0)
+    {
+        if (this->no_reports_soak_time > 67)
+        {
+            *failed_prop = BCMOLT_EPON_NI_CFG_ID_NO_REPORTS_SOAK_TIME;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_PON_AGGREGATE_SHAPER)) != 0)
+    {
+        if (!bcmolt_pon_aggregate_shaper_bounds_check(&this->pon_aggregate_shaper))
+        {
+            *failed_prop = BCMOLT_EPON_NI_CFG_ID_PON_AGGREGATE_SHAPER;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_ESTIMATED_PON_LATENCY_TQ)) != 0)
+    {
+        if (!bcmolt_arr_bounds_8_bounds_check(&this->estimated_pon_latency_tq))
+        {
+            *failed_prop = BCMOLT_EPON_NI_CFG_ID_ESTIMATED_PON_LATENCY_TQ;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_CFG_ID_ONU_UPGRADE_PARAMS)) != 0)
+    {
+        if (!bcmolt_epon_onu_upgrade_params_bounds_check(&this->onu_upgrade_params))
+        {
+            *failed_prop = BCMOLT_EPON_NI_CFG_ID_ONU_UPGRADE_PARAMS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_ni_llid_quarantined_data_set_default(bcmolt_epon_ni_llid_quarantined_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_LLID_QUARANTINED_ID_LLID)) != 0)
+    {
+        this->llid = (bcmolt_epon_llid) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_LLID_QUARANTINED_ID_LINK_RATE)) != 0)
+    {
+        this->link_rate = BCMOLT_EPON_LINK_RATE_TEN_TEN;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_LLID_QUARANTINED_ID_LINK_MAC)) != 0)
+    {
+        bcmos_mac_address_init(&this->link_mac);
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_LLID_QUARANTINED_ID_RANGE_VALUE_TQ)) != 0)
+    {
+        this->range_value_tq = (bcmolt_time_quanta) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_llid_quarantined_data_pack(const bcmolt_epon_ni_llid_quarantined_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_LLID_QUARANTINED_ID_LLID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->llid))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_LLID_QUARANTINED_ID_LINK_RATE)) != 0)
+    {
+        if (!bcmolt_epon_link_rate_pack(this->link_rate, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_LLID_QUARANTINED_ID_LINK_MAC)) != 0)
+    {
+        if (!bcmolt_buf_write_mac_address(buf, this->link_mac))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_LLID_QUARANTINED_ID_RANGE_VALUE_TQ)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, (uint32_t) this->range_value_tq))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_ni_llid_quarantined_data_get_packed_length(const bcmolt_epon_ni_llid_quarantined_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_LLID_QUARANTINED_ID_LLID)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_LLID_QUARANTINED_ID_LINK_RATE)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_LLID_QUARANTINED_ID_LINK_MAC)) != 0)
+    {
+        count += 6;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_LLID_QUARANTINED_ID_RANGE_VALUE_TQ)) != 0)
+    {
+        count += 4;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_llid_quarantined_data_unpack(bcmolt_epon_ni_llid_quarantined_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_LLID_QUARANTINED_ID_LLID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->llid))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_LLID_QUARANTINED_ID_LINK_RATE)) != 0)
+    {
+        if (!bcmolt_epon_link_rate_unpack(&this->link_rate, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_LLID_QUARANTINED_ID_LINK_MAC)) != 0)
+    {
+        if (!bcmolt_buf_read_mac_address(buf, &this->link_mac))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_LLID_QUARANTINED_ID_RANGE_VALUE_TQ)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, (uint32_t *) &this->range_value_tq))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_llid_quarantined_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_LLID_QUARANTINED_ID_LLID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_LLID_QUARANTINED_ID_LINK_RATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_LLID_QUARANTINED_ID_LINK_MAC)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 6))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_LLID_QUARANTINED_ID_RANGE_VALUE_TQ)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_llid_quarantined_data_bounds_check(const bcmolt_epon_ni_llid_quarantined_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_ni_llid_quarantined_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_LLID_QUARANTINED_ID_LINK_RATE)) != 0)
+    {
+        switch (this->link_rate)
+        {
+            case BCMOLT_EPON_LINK_RATE_TEN_TEN:
+                break;
+            case BCMOLT_EPON_LINK_RATE_TEN_ONE:
+                break;
+            case BCMOLT_EPON_LINK_RATE_ONE_ONE:
+                break;
+            default:
+                *failed_prop = BCMOLT_EPON_NI_LLID_QUARANTINED_ID_LINK_RATE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_ni_mpcp_timestamp_changed_data_set_default(bcmolt_epon_ni_mpcp_timestamp_changed_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_MPCP_TIMESTAMP_CHANGED_ID_MPCP_TIMESTAMP)) != 0)
+    {
+        this->mpcp_timestamp = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_mpcp_timestamp_changed_data_pack(const bcmolt_epon_ni_mpcp_timestamp_changed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_MPCP_TIMESTAMP_CHANGED_ID_MPCP_TIMESTAMP)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->mpcp_timestamp))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_ni_mpcp_timestamp_changed_data_get_packed_length(const bcmolt_epon_ni_mpcp_timestamp_changed_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_MPCP_TIMESTAMP_CHANGED_ID_MPCP_TIMESTAMP)) != 0)
+    {
+        count += 4;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_mpcp_timestamp_changed_data_unpack(bcmolt_epon_ni_mpcp_timestamp_changed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_MPCP_TIMESTAMP_CHANGED_ID_MPCP_TIMESTAMP)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->mpcp_timestamp))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_mpcp_timestamp_changed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_MPCP_TIMESTAMP_CHANGED_ID_MPCP_TIMESTAMP)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_mpcp_timestamp_changed_data_bounds_check(const bcmolt_epon_ni_mpcp_timestamp_changed_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_ni_mpcp_timestamp_changed_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_ni_no_reports_data_set_default(bcmolt_epon_ni_no_reports_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_NO_REPORTS_ID_ALARM_STATUS)) != 0)
+    {
+        this->alarm_status = BCMOLT_STATUS_OFF;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_no_reports_data_pack(const bcmolt_epon_ni_no_reports_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_NO_REPORTS_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_pack(this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_ni_no_reports_data_get_packed_length(const bcmolt_epon_ni_no_reports_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_NO_REPORTS_ID_ALARM_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_no_reports_data_unpack(bcmolt_epon_ni_no_reports_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_NO_REPORTS_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_unpack(&this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_no_reports_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_NO_REPORTS_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_no_reports_data_bounds_check(const bcmolt_epon_ni_no_reports_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_ni_no_reports_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_NO_REPORTS_ID_ALARM_STATUS)) != 0)
+    {
+        switch (this->alarm_status)
+        {
+            case BCMOLT_STATUS_OFF:
+                break;
+            case BCMOLT_STATUS_ON:
+                break;
+            case BCMOLT_STATUS_NO_CHANGE:
+                break;
+            default:
+                *failed_prop = BCMOLT_EPON_NI_NO_REPORTS_ID_ALARM_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_ni_onu_upgrade_complete_data_set_default(bcmolt_epon_ni_onu_upgrade_complete_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ONU_UPGRADE_COMPLETE_ID_STATUS)) != 0)
+    {
+        this->status = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ONU_UPGRADE_COMPLETE_ID_LIST_OF_FAILED_ENTITIES)) != 0)
+    {
+        this->list_of_failed_entities.len = 0;
+        this->list_of_failed_entities.val = NULL;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_onu_upgrade_complete_data_pack(const bcmolt_epon_ni_onu_upgrade_complete_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ONU_UPGRADE_COMPLETE_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->status))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ONU_UPGRADE_COMPLETE_ID_LIST_OF_FAILED_ENTITIES)) != 0)
+    {
+        if (!bcmolt_epon_onu_upgrade_status_list_u32_pack(&this->list_of_failed_entities, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_ni_onu_upgrade_complete_data_get_packed_length(const bcmolt_epon_ni_onu_upgrade_complete_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ONU_UPGRADE_COMPLETE_ID_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ONU_UPGRADE_COMPLETE_ID_LIST_OF_FAILED_ENTITIES)) != 0)
+    {
+        count += bcmolt_epon_onu_upgrade_status_list_u32_get_packed_length(&this->list_of_failed_entities);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_onu_upgrade_complete_data_unpack(bcmolt_epon_ni_onu_upgrade_complete_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ONU_UPGRADE_COMPLETE_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->status))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ONU_UPGRADE_COMPLETE_ID_LIST_OF_FAILED_ENTITIES)) != 0)
+    {
+        if (!bcmolt_epon_onu_upgrade_status_list_u32_unpack(&this->list_of_failed_entities, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_onu_upgrade_complete_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ONU_UPGRADE_COMPLETE_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ONU_UPGRADE_COMPLETE_ID_LIST_OF_FAILED_ENTITIES)) != 0)
+    {
+        if (!bcmolt_epon_onu_upgrade_status_list_u32_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_onu_upgrade_complete_data_bounds_check(const bcmolt_epon_ni_onu_upgrade_complete_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_ni_onu_upgrade_complete_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ONU_UPGRADE_COMPLETE_ID_LIST_OF_FAILED_ENTITIES)) != 0)
+    {
+        if (!bcmolt_epon_onu_upgrade_status_list_u32_bounds_check(&this->list_of_failed_entities))
+        {
+            *failed_prop = BCMOLT_EPON_NI_ONU_UPGRADE_COMPLETE_ID_LIST_OF_FAILED_ENTITIES;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_ni_rogue_scan_complete_data_set_default(bcmolt_epon_ni_rogue_scan_complete_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ROGUE_SCAN_COMPLETE_ID_RETURN_IND_STATUS)) != 0)
+    {
+        this->return_ind_status = BCMOLT_ROGUE_SCAN_STATUS_COMPLETE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_rogue_scan_complete_data_pack(const bcmolt_epon_ni_rogue_scan_complete_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ROGUE_SCAN_COMPLETE_ID_RETURN_IND_STATUS)) != 0)
+    {
+        if (!bcmolt_rogue_scan_status_pack(this->return_ind_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_ni_rogue_scan_complete_data_get_packed_length(const bcmolt_epon_ni_rogue_scan_complete_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ROGUE_SCAN_COMPLETE_ID_RETURN_IND_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_rogue_scan_complete_data_unpack(bcmolt_epon_ni_rogue_scan_complete_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ROGUE_SCAN_COMPLETE_ID_RETURN_IND_STATUS)) != 0)
+    {
+        if (!bcmolt_rogue_scan_status_unpack(&this->return_ind_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_rogue_scan_complete_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ROGUE_SCAN_COMPLETE_ID_RETURN_IND_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_rogue_scan_complete_data_bounds_check(const bcmolt_epon_ni_rogue_scan_complete_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_ni_rogue_scan_complete_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ROGUE_SCAN_COMPLETE_ID_RETURN_IND_STATUS)) != 0)
+    {
+        switch (this->return_ind_status)
+        {
+            case BCMOLT_ROGUE_SCAN_STATUS_COMPLETE:
+                break;
+            case BCMOLT_ROGUE_SCAN_STATUS_LLID_STATE_IS_BAD:
+                break;
+            case BCMOLT_ROGUE_SCAN_STATUS_LLID_IS_OOR:
+                break;
+            case BCMOLT_ROGUE_SCAN_STATUS_SCAN_ERR_NORES:
+                break;
+            case BCMOLT_ROGUE_SCAN_STATUS_SCAN_ERR_INTERNAL:
+                break;
+            default:
+                *failed_prop = BCMOLT_EPON_NI_ROGUE_SCAN_COMPLETE_ID_RETURN_IND_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_ni_rssi_measurement_completed_data_set_default(bcmolt_epon_ni_rssi_measurement_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_RSSI_MEASUREMENT_COMPLETED_ID_STATUS)) != 0)
+    {
+        this->status = BCMOLT_RESULT_SUCCESS;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_RSSI_MEASUREMENT_COMPLETED_ID_LLID)) != 0)
+    {
+        this->llid = (bcmolt_epon_llid) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_RSSI_MEASUREMENT_COMPLETED_ID_LINK_MAC)) != 0)
+    {
+        bcmos_mac_address_init(&this->link_mac);
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_rssi_measurement_completed_data_pack(const bcmolt_epon_ni_rssi_measurement_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_RSSI_MEASUREMENT_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_result_pack(this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_RSSI_MEASUREMENT_COMPLETED_ID_LLID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->llid))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_RSSI_MEASUREMENT_COMPLETED_ID_LINK_MAC)) != 0)
+    {
+        if (!bcmolt_buf_write_mac_address(buf, this->link_mac))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_ni_rssi_measurement_completed_data_get_packed_length(const bcmolt_epon_ni_rssi_measurement_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_RSSI_MEASUREMENT_COMPLETED_ID_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_RSSI_MEASUREMENT_COMPLETED_ID_LLID)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_RSSI_MEASUREMENT_COMPLETED_ID_LINK_MAC)) != 0)
+    {
+        count += 6;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_rssi_measurement_completed_data_unpack(bcmolt_epon_ni_rssi_measurement_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_RSSI_MEASUREMENT_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_result_unpack(&this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_RSSI_MEASUREMENT_COMPLETED_ID_LLID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->llid))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_RSSI_MEASUREMENT_COMPLETED_ID_LINK_MAC)) != 0)
+    {
+        if (!bcmolt_buf_read_mac_address(buf, &this->link_mac))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_rssi_measurement_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_RSSI_MEASUREMENT_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_RSSI_MEASUREMENT_COMPLETED_ID_LLID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_RSSI_MEASUREMENT_COMPLETED_ID_LINK_MAC)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 6))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_rssi_measurement_completed_data_bounds_check(const bcmolt_epon_ni_rssi_measurement_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_ni_rssi_measurement_completed_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_RSSI_MEASUREMENT_COMPLETED_ID_STATUS)) != 0)
+    {
+        switch (this->status)
+        {
+            case BCMOLT_RESULT_SUCCESS:
+                break;
+            case BCMOLT_RESULT_FAIL:
+                break;
+            default:
+                *failed_prop = BCMOLT_EPON_NI_RSSI_MEASUREMENT_COMPLETED_ID_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_ni_state_change_completed_data_set_default(bcmolt_epon_ni_state_change_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_STATE_CHANGE_COMPLETED_ID_NEW_STATE)) != 0)
+    {
+        this->new_state = BCMOLT_EPON_NI_EN_STATE_DISABLED;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_state_change_completed_data_pack(const bcmolt_epon_ni_state_change_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_STATE_CHANGE_COMPLETED_ID_NEW_STATE)) != 0)
+    {
+        if (!bcmolt_epon_ni_en_state_pack(this->new_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_ni_state_change_completed_data_get_packed_length(const bcmolt_epon_ni_state_change_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_STATE_CHANGE_COMPLETED_ID_NEW_STATE)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_state_change_completed_data_unpack(bcmolt_epon_ni_state_change_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_STATE_CHANGE_COMPLETED_ID_NEW_STATE)) != 0)
+    {
+        if (!bcmolt_epon_ni_en_state_unpack(&this->new_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_state_change_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_STATE_CHANGE_COMPLETED_ID_NEW_STATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_state_change_completed_data_bounds_check(const bcmolt_epon_ni_state_change_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_ni_state_change_completed_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_STATE_CHANGE_COMPLETED_ID_NEW_STATE)) != 0)
+    {
+        switch (this->new_state)
+        {
+            case BCMOLT_EPON_NI_EN_STATE_DISABLED:
+                break;
+            case BCMOLT_EPON_NI_EN_STATE_ENABLED:
+                break;
+            case BCMOLT_EPON_NI_EN_STATE_PROTECTED_WORKING:
+                break;
+            case BCMOLT_EPON_NI_EN_STATE_PROTECTED_STANDBY:
+                break;
+            case BCMOLT_EPON_NI_EN_STATE_PROCESSING:
+                break;
+            default:
+                *failed_prop = BCMOLT_EPON_NI_STATE_CHANGE_COMPLETED_ID_NEW_STATE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_ni_auto_cfg_data_set_default(bcmolt_epon_ni_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_AUTO_ROGUE_SCAN_10G_FAILURE)) != 0)
+    {
+        this->auto_rogue_scan_10g_failure = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_AUTO_ROGUE_SCAN_1G_FAILURE)) != 0)
+    {
+        this->auto_rogue_scan_1g_failure = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_LLID_QUARANTINED)) != 0)
+    {
+        this->llid_quarantined = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_MPCP_TIMESTAMP_CHANGED)) != 0)
+    {
+        this->mpcp_timestamp_changed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_NO_REPORTS)) != 0)
+    {
+        this->no_reports = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_ONU_UPGRADE_COMPLETE)) != 0)
+    {
+        this->onu_upgrade_complete = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_RERANGE_FAILURE)) != 0)
+    {
+        this->rerange_failure = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_ROGUE_SCAN_COMPLETE)) != 0)
+    {
+        this->rogue_scan_complete = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_RSSI_MEASUREMENT_COMPLETED)) != 0)
+    {
+        this->rssi_measurement_completed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_STATE_CHANGE_COMPLETED)) != 0)
+    {
+        this->state_change_completed = BCMOS_FALSE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_auto_cfg_data_pack(const bcmolt_epon_ni_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_AUTO_ROGUE_SCAN_10G_FAILURE)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->auto_rogue_scan_10g_failure))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_AUTO_ROGUE_SCAN_1G_FAILURE)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->auto_rogue_scan_1g_failure))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_LLID_QUARANTINED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->llid_quarantined))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_MPCP_TIMESTAMP_CHANGED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->mpcp_timestamp_changed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_NO_REPORTS)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->no_reports))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_ONU_UPGRADE_COMPLETE)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->onu_upgrade_complete))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_RERANGE_FAILURE)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->rerange_failure))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_ROGUE_SCAN_COMPLETE)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->rogue_scan_complete))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_RSSI_MEASUREMENT_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->rssi_measurement_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_STATE_CHANGE_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->state_change_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_ni_auto_cfg_data_get_packed_length(const bcmolt_epon_ni_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_AUTO_ROGUE_SCAN_10G_FAILURE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_AUTO_ROGUE_SCAN_1G_FAILURE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_LLID_QUARANTINED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_MPCP_TIMESTAMP_CHANGED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_NO_REPORTS)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_ONU_UPGRADE_COMPLETE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_RERANGE_FAILURE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_ROGUE_SCAN_COMPLETE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_RSSI_MEASUREMENT_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_STATE_CHANGE_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_auto_cfg_data_unpack(bcmolt_epon_ni_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_AUTO_ROGUE_SCAN_10G_FAILURE)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->auto_rogue_scan_10g_failure))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_AUTO_ROGUE_SCAN_1G_FAILURE)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->auto_rogue_scan_1g_failure))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_LLID_QUARANTINED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->llid_quarantined))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_MPCP_TIMESTAMP_CHANGED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->mpcp_timestamp_changed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_NO_REPORTS)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->no_reports))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_ONU_UPGRADE_COMPLETE)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->onu_upgrade_complete))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_RERANGE_FAILURE)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->rerange_failure))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_ROGUE_SCAN_COMPLETE)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->rogue_scan_complete))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_RSSI_MEASUREMENT_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->rssi_measurement_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_STATE_CHANGE_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->state_change_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_AUTO_ROGUE_SCAN_10G_FAILURE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_AUTO_ROGUE_SCAN_1G_FAILURE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_LLID_QUARANTINED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_MPCP_TIMESTAMP_CHANGED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_NO_REPORTS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_ONU_UPGRADE_COMPLETE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_RERANGE_FAILURE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_ROGUE_SCAN_COMPLETE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_RSSI_MEASUREMENT_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_AUTO_CFG_ID_STATE_CHANGE_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_auto_cfg_data_bounds_check(const bcmolt_epon_ni_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_ni_auto_cfg_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_ni_add_link_data_set_default(bcmolt_epon_ni_add_link_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ADD_LINK_ID_MAC_ADDRESS)) != 0)
+    {
+        bcmos_mac_address_init(&this->mac_address);
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ADD_LINK_ID_RATE)) != 0)
+    {
+        this->rate = BCMOLT_EPON_LINK_RATE_TEN_TEN;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_add_link_data_pack(const bcmolt_epon_ni_add_link_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ADD_LINK_ID_MAC_ADDRESS)) != 0)
+    {
+        if (!bcmolt_buf_write_mac_address(buf, this->mac_address))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ADD_LINK_ID_RATE)) != 0)
+    {
+        if (!bcmolt_epon_link_rate_pack(this->rate, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_ni_add_link_data_get_packed_length(const bcmolt_epon_ni_add_link_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ADD_LINK_ID_MAC_ADDRESS)) != 0)
+    {
+        count += 6;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ADD_LINK_ID_RATE)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_add_link_data_unpack(bcmolt_epon_ni_add_link_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ADD_LINK_ID_MAC_ADDRESS)) != 0)
+    {
+        if (!bcmolt_buf_read_mac_address(buf, &this->mac_address))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ADD_LINK_ID_RATE)) != 0)
+    {
+        if (!bcmolt_epon_link_rate_unpack(&this->rate, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_add_link_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ADD_LINK_ID_MAC_ADDRESS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 6))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ADD_LINK_ID_RATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_add_link_data_bounds_check(const bcmolt_epon_ni_add_link_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_ni_add_link_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ADD_LINK_ID_RATE)) != 0)
+    {
+        switch (this->rate)
+        {
+            case BCMOLT_EPON_LINK_RATE_TEN_TEN:
+                break;
+            case BCMOLT_EPON_LINK_RATE_TEN_ONE:
+                break;
+            case BCMOLT_EPON_LINK_RATE_ONE_ONE:
+                break;
+            default:
+                *failed_prop = BCMOLT_EPON_NI_ADD_LINK_ID_RATE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_ni_add_multicast_link_data_set_default(bcmolt_epon_ni_add_multicast_link_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ADD_MULTICAST_LINK_ID_MAC_ADDRESS)) != 0)
+    {
+        bcmos_mac_address_init(&this->mac_address);
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ADD_MULTICAST_LINK_ID_RATE)) != 0)
+    {
+        this->rate = BCMOLT_EPON_LINK_RATE_TEN_TEN;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_add_multicast_link_data_pack(const bcmolt_epon_ni_add_multicast_link_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ADD_MULTICAST_LINK_ID_MAC_ADDRESS)) != 0)
+    {
+        if (!bcmolt_buf_write_mac_address(buf, this->mac_address))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ADD_MULTICAST_LINK_ID_RATE)) != 0)
+    {
+        if (!bcmolt_epon_link_rate_pack(this->rate, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_ni_add_multicast_link_data_get_packed_length(const bcmolt_epon_ni_add_multicast_link_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ADD_MULTICAST_LINK_ID_MAC_ADDRESS)) != 0)
+    {
+        count += 6;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ADD_MULTICAST_LINK_ID_RATE)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_add_multicast_link_data_unpack(bcmolt_epon_ni_add_multicast_link_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ADD_MULTICAST_LINK_ID_MAC_ADDRESS)) != 0)
+    {
+        if (!bcmolt_buf_read_mac_address(buf, &this->mac_address))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ADD_MULTICAST_LINK_ID_RATE)) != 0)
+    {
+        if (!bcmolt_epon_link_rate_unpack(&this->rate, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_add_multicast_link_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ADD_MULTICAST_LINK_ID_MAC_ADDRESS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 6))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ADD_MULTICAST_LINK_ID_RATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_add_multicast_link_data_bounds_check(const bcmolt_epon_ni_add_multicast_link_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_ni_add_multicast_link_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ADD_MULTICAST_LINK_ID_RATE)) != 0)
+    {
+        switch (this->rate)
+        {
+            case BCMOLT_EPON_LINK_RATE_TEN_TEN:
+                break;
+            case BCMOLT_EPON_LINK_RATE_TEN_ONE:
+                break;
+            case BCMOLT_EPON_LINK_RATE_ONE_ONE:
+                break;
+            default:
+                *failed_prop = BCMOLT_EPON_NI_ADD_MULTICAST_LINK_ID_RATE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_ni_add_protected_standby_link_data_set_default(bcmolt_epon_ni_add_protected_standby_link_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ADD_PROTECTED_STANDBY_LINK_ID_MAC_ADDRESS)) != 0)
+    {
+        bcmos_mac_address_init(&this->mac_address);
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ADD_PROTECTED_STANDBY_LINK_ID_WORKING_LINK_INFO)) != 0)
+    {
+        this->working_link_info.link_status = (bcmolt_epon_link_status) 0;
+        this->working_link_info.rate = BCMOLT_EPON_LINK_RATE_TEN_TEN;
+        this->working_link_info.llid = (bcmolt_epon_llid) 0;
+        this->working_link_info.mpcp_discovery_info = (bcmolt_mpcp_discovery_info) 0;
+        this->working_link_info.onu_laser_on_time_tq = (bcmolt_time_quanta) 0;
+        this->working_link_info.onu_laser_off_time_tq = (bcmolt_time_quanta) 0;
+        this->working_link_info.pending_grants = 0;
+        this->working_link_info.range_value_tq = (bcmolt_time_quanta) 0;
+        this->working_link_info.tunnel_id = (bcmolt_epon_tunnel_id) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_add_protected_standby_link_data_pack(const bcmolt_epon_ni_add_protected_standby_link_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ADD_PROTECTED_STANDBY_LINK_ID_MAC_ADDRESS)) != 0)
+    {
+        if (!bcmolt_buf_write_mac_address(buf, this->mac_address))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ADD_PROTECTED_STANDBY_LINK_ID_WORKING_LINK_INFO)) != 0)
+    {
+        if (!bcmolt_epon_link_info_pack(&this->working_link_info, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_ni_add_protected_standby_link_data_get_packed_length(const bcmolt_epon_ni_add_protected_standby_link_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ADD_PROTECTED_STANDBY_LINK_ID_MAC_ADDRESS)) != 0)
+    {
+        count += 6;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ADD_PROTECTED_STANDBY_LINK_ID_WORKING_LINK_INFO)) != 0)
+    {
+        count += 24;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_add_protected_standby_link_data_unpack(bcmolt_epon_ni_add_protected_standby_link_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ADD_PROTECTED_STANDBY_LINK_ID_MAC_ADDRESS)) != 0)
+    {
+        if (!bcmolt_buf_read_mac_address(buf, &this->mac_address))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ADD_PROTECTED_STANDBY_LINK_ID_WORKING_LINK_INFO)) != 0)
+    {
+        if (!bcmolt_epon_link_info_unpack(&this->working_link_info, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_add_protected_standby_link_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ADD_PROTECTED_STANDBY_LINK_ID_MAC_ADDRESS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 6))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ADD_PROTECTED_STANDBY_LINK_ID_WORKING_LINK_INFO)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 24))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_add_protected_standby_link_data_bounds_check(const bcmolt_epon_ni_add_protected_standby_link_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_ni_add_protected_standby_link_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ADD_PROTECTED_STANDBY_LINK_ID_WORKING_LINK_INFO)) != 0)
+    {
+        if (!bcmolt_epon_link_info_bounds_check(&this->working_link_info))
+        {
+            *failed_prop = BCMOLT_EPON_NI_ADD_PROTECTED_STANDBY_LINK_ID_WORKING_LINK_INFO;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_ni_issue_rssi_grant_data_set_default(bcmolt_epon_ni_issue_rssi_grant_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ISSUE_RSSI_GRANT_ID_GRANTED_LINK)) != 0)
+    {
+        bcmos_mac_address_init(&this->granted_link);
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ISSUE_RSSI_GRANT_ID_TRIGGER_WIDTH)) != 0)
+    {
+        this->trigger_width = 32;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ISSUE_RSSI_GRANT_ID_TRIGGER_DELAY)) != 0)
+    {
+        this->trigger_delay = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ISSUE_RSSI_GRANT_ID_SAMPLE_PERIOD)) != 0)
+    {
+        this->sample_period = 500;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_issue_rssi_grant_data_pack(const bcmolt_epon_ni_issue_rssi_grant_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ISSUE_RSSI_GRANT_ID_GRANTED_LINK)) != 0)
+    {
+        if (!bcmolt_buf_write_mac_address(buf, this->granted_link))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ISSUE_RSSI_GRANT_ID_TRIGGER_WIDTH)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, this->trigger_width))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ISSUE_RSSI_GRANT_ID_TRIGGER_DELAY)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, this->trigger_delay))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ISSUE_RSSI_GRANT_ID_SAMPLE_PERIOD)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, this->sample_period))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_ni_issue_rssi_grant_data_get_packed_length(const bcmolt_epon_ni_issue_rssi_grant_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ISSUE_RSSI_GRANT_ID_GRANTED_LINK)) != 0)
+    {
+        count += 6;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ISSUE_RSSI_GRANT_ID_TRIGGER_WIDTH)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ISSUE_RSSI_GRANT_ID_TRIGGER_DELAY)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ISSUE_RSSI_GRANT_ID_SAMPLE_PERIOD)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_issue_rssi_grant_data_unpack(bcmolt_epon_ni_issue_rssi_grant_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ISSUE_RSSI_GRANT_ID_GRANTED_LINK)) != 0)
+    {
+        if (!bcmolt_buf_read_mac_address(buf, &this->granted_link))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ISSUE_RSSI_GRANT_ID_TRIGGER_WIDTH)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, &this->trigger_width))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ISSUE_RSSI_GRANT_ID_TRIGGER_DELAY)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, &this->trigger_delay))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ISSUE_RSSI_GRANT_ID_SAMPLE_PERIOD)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, &this->sample_period))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_issue_rssi_grant_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ISSUE_RSSI_GRANT_ID_GRANTED_LINK)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 6))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ISSUE_RSSI_GRANT_ID_TRIGGER_WIDTH)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ISSUE_RSSI_GRANT_ID_TRIGGER_DELAY)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ISSUE_RSSI_GRANT_ID_SAMPLE_PERIOD)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_issue_rssi_grant_data_bounds_check(const bcmolt_epon_ni_issue_rssi_grant_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_ni_issue_rssi_grant_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ISSUE_RSSI_GRANT_ID_TRIGGER_WIDTH)) != 0)
+    {
+        if (this->trigger_width < 32)
+        {
+            *failed_prop = BCMOLT_EPON_NI_ISSUE_RSSI_GRANT_ID_TRIGGER_WIDTH;
+            return BCMOS_FALSE;
+        }
+
+        if (this->trigger_width > 3000)
+        {
+            *failed_prop = BCMOLT_EPON_NI_ISSUE_RSSI_GRANT_ID_TRIGGER_WIDTH;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ISSUE_RSSI_GRANT_ID_TRIGGER_DELAY)) != 0)
+    {
+        if (this->trigger_delay > 1500)
+        {
+            *failed_prop = BCMOLT_EPON_NI_ISSUE_RSSI_GRANT_ID_TRIGGER_DELAY;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ISSUE_RSSI_GRANT_ID_SAMPLE_PERIOD)) != 0)
+    {
+        if (this->sample_period < 100)
+        {
+            *failed_prop = BCMOLT_EPON_NI_ISSUE_RSSI_GRANT_ID_SAMPLE_PERIOD;
+            return BCMOS_FALSE;
+        }
+
+        if (this->sample_period > 900)
+        {
+            *failed_prop = BCMOLT_EPON_NI_ISSUE_RSSI_GRANT_ID_SAMPLE_PERIOD;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_ni_protection_switching_apply_rerange_delta_data_set_default(bcmolt_epon_ni_protection_switching_apply_rerange_delta_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_PROTECTION_SWITCHING_APPLY_RERANGE_DELTA_ID_RERANGE_DELTA)) != 0)
+    {
+        this->rerange_delta = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_protection_switching_apply_rerange_delta_data_pack(const bcmolt_epon_ni_protection_switching_apply_rerange_delta_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_PROTECTION_SWITCHING_APPLY_RERANGE_DELTA_ID_RERANGE_DELTA)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->rerange_delta))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_ni_protection_switching_apply_rerange_delta_data_get_packed_length(const bcmolt_epon_ni_protection_switching_apply_rerange_delta_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_PROTECTION_SWITCHING_APPLY_RERANGE_DELTA_ID_RERANGE_DELTA)) != 0)
+    {
+        count += 4;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_protection_switching_apply_rerange_delta_data_unpack(bcmolt_epon_ni_protection_switching_apply_rerange_delta_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_PROTECTION_SWITCHING_APPLY_RERANGE_DELTA_ID_RERANGE_DELTA)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->rerange_delta))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_protection_switching_apply_rerange_delta_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_PROTECTION_SWITCHING_APPLY_RERANGE_DELTA_ID_RERANGE_DELTA)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_protection_switching_apply_rerange_delta_data_bounds_check(const bcmolt_epon_ni_protection_switching_apply_rerange_delta_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_ni_protection_switching_apply_rerange_delta_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_ni_rogue_llid_scan_data_set_default(bcmolt_epon_ni_rogue_llid_scan_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ROGUE_LLID_SCAN_ID_MODE)) != 0)
+    {
+        this->mode = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ROGUE_LLID_SCAN_ID_LLID)) != 0)
+    {
+        this->llid = (bcmolt_epon_llid) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_rogue_llid_scan_data_pack(const bcmolt_epon_ni_rogue_llid_scan_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ROGUE_LLID_SCAN_ID_MODE)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->mode))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ROGUE_LLID_SCAN_ID_LLID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->llid))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_ni_rogue_llid_scan_data_get_packed_length(const bcmolt_epon_ni_rogue_llid_scan_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ROGUE_LLID_SCAN_ID_MODE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ROGUE_LLID_SCAN_ID_LLID)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_rogue_llid_scan_data_unpack(bcmolt_epon_ni_rogue_llid_scan_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ROGUE_LLID_SCAN_ID_MODE)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->mode))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ROGUE_LLID_SCAN_ID_LLID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->llid))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_rogue_llid_scan_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ROGUE_LLID_SCAN_ID_MODE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_ROGUE_LLID_SCAN_ID_LLID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_rogue_llid_scan_data_bounds_check(const bcmolt_epon_ni_rogue_llid_scan_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_ni_rogue_llid_scan_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_ni_set_epon_ni_en_state_data_set_default(bcmolt_epon_ni_set_epon_ni_en_state_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_SET_EPON_NI_EN_STATE_ID_NEW_STATE)) != 0)
+    {
+        this->new_state = BCMOLT_EPON_NI_EN_STATE_DISABLED;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_set_epon_ni_en_state_data_pack(const bcmolt_epon_ni_set_epon_ni_en_state_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_SET_EPON_NI_EN_STATE_ID_NEW_STATE)) != 0)
+    {
+        if (!bcmolt_epon_ni_en_state_pack(this->new_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_ni_set_epon_ni_en_state_data_get_packed_length(const bcmolt_epon_ni_set_epon_ni_en_state_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_SET_EPON_NI_EN_STATE_ID_NEW_STATE)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_set_epon_ni_en_state_data_unpack(bcmolt_epon_ni_set_epon_ni_en_state_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_SET_EPON_NI_EN_STATE_ID_NEW_STATE)) != 0)
+    {
+        if (!bcmolt_epon_ni_en_state_unpack(&this->new_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_set_epon_ni_en_state_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_SET_EPON_NI_EN_STATE_ID_NEW_STATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_set_epon_ni_en_state_data_bounds_check(const bcmolt_epon_ni_set_epon_ni_en_state_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_ni_set_epon_ni_en_state_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_SET_EPON_NI_EN_STATE_ID_NEW_STATE)) != 0)
+    {
+        switch (this->new_state)
+        {
+            case BCMOLT_EPON_NI_EN_STATE_DISABLED:
+                break;
+            case BCMOLT_EPON_NI_EN_STATE_ENABLED:
+                break;
+            case BCMOLT_EPON_NI_EN_STATE_PROTECTED_WORKING:
+                break;
+            case BCMOLT_EPON_NI_EN_STATE_PROTECTED_STANDBY:
+                break;
+            case BCMOLT_EPON_NI_EN_STATE_PROCESSING:
+                break;
+            default:
+                *failed_prop = BCMOLT_EPON_NI_SET_EPON_NI_EN_STATE_ID_NEW_STATE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_ni_start_onu_upgrade_data_set_default(bcmolt_epon_ni_start_onu_upgrade_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_START_ONU_UPGRADE_ID_LIST_OF_ONU_IDS)) != 0)
+    {
+        this->list_of_onu_ids.len = 0;
+        this->list_of_onu_ids.val = NULL;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_start_onu_upgrade_data_pack(const bcmolt_epon_ni_start_onu_upgrade_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_START_ONU_UPGRADE_ID_LIST_OF_ONU_IDS)) != 0)
+    {
+        if (!bcmolt_macaddress_list_u32_pack(&this->list_of_onu_ids, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_ni_start_onu_upgrade_data_get_packed_length(const bcmolt_epon_ni_start_onu_upgrade_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_START_ONU_UPGRADE_ID_LIST_OF_ONU_IDS)) != 0)
+    {
+        count += bcmolt_macaddress_list_u32_get_packed_length(&this->list_of_onu_ids);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_start_onu_upgrade_data_unpack(bcmolt_epon_ni_start_onu_upgrade_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_START_ONU_UPGRADE_ID_LIST_OF_ONU_IDS)) != 0)
+    {
+        if (!bcmolt_macaddress_list_u32_unpack(&this->list_of_onu_ids, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_start_onu_upgrade_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_START_ONU_UPGRADE_ID_LIST_OF_ONU_IDS)) != 0)
+    {
+        if (!bcmolt_macaddress_list_u32_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_ni_start_onu_upgrade_data_bounds_check(const bcmolt_epon_ni_start_onu_upgrade_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_ni_start_onu_upgrade_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_NI_START_ONU_UPGRADE_ID_LIST_OF_ONU_IDS)) != 0)
+    {
+        if (!bcmolt_macaddress_list_u32_bounds_check(&this->list_of_onu_ids))
+        {
+            *failed_prop = BCMOLT_EPON_NI_START_ONU_UPGRADE_ID_LIST_OF_ONU_IDS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_onu_10g_us_key_set_default(bcmolt_epon_onu_10g_us_key *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_KEY_ID_EPON_NI)) != 0)
+    {
+        this->epon_ni = (bcmolt_epon_ni) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_KEY_ID_ONU_ID)) != 0)
+    {
+        this->onu_id = (bcmolt_epon_onu_id) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_10g_us_key_pack(const bcmolt_epon_onu_10g_us_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_KEY_ID_EPON_NI)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->epon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_KEY_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, (uint8_t) this->onu_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_onu_10g_us_key_get_packed_length(const bcmolt_epon_onu_10g_us_key *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_KEY_ID_EPON_NI)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_KEY_ID_ONU_ID)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_10g_us_key_unpack(bcmolt_epon_onu_10g_us_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_KEY_ID_EPON_NI)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->epon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_KEY_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, (uint8_t *) &this->onu_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_10g_us_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_KEY_ID_EPON_NI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_KEY_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_10g_us_key_bounds_check(const bcmolt_epon_onu_10g_us_key *this, bcmolt_presence_mask fields_present, bcmolt_epon_onu_10g_us_key_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_KEY_ID_ONU_ID)) != 0)
+    {
+        if (this->onu_id > (bcmolt_epon_onu_id) 127)
+        {
+            *failed_prop = BCMOLT_EPON_ONU_10G_US_KEY_ID_ONU_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_onu_10g_us_cfg_data_set_default(bcmolt_epon_onu_10g_us_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_CFG_ID_ALL_LINKS)) != 0)
+    {
+        this->all_links.len = 0;
+        this->all_links.val = NULL;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_10g_us_cfg_data_pack(const bcmolt_epon_onu_10g_us_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_CFG_ID_ALL_LINKS)) != 0)
+    {
+        if (!bcmolt_macaddress_list_u32_max_2048_pack(&this->all_links, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_onu_10g_us_cfg_data_get_packed_length(const bcmolt_epon_onu_10g_us_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_CFG_ID_ALL_LINKS)) != 0)
+    {
+        count += bcmolt_macaddress_list_u32_max_2048_get_packed_length(&this->all_links);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_10g_us_cfg_data_unpack(bcmolt_epon_onu_10g_us_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_CFG_ID_ALL_LINKS)) != 0)
+    {
+        if (!bcmolt_macaddress_list_u32_max_2048_unpack(&this->all_links, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_10g_us_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_CFG_ID_ALL_LINKS)) != 0)
+    {
+        if (!bcmolt_macaddress_list_u32_max_2048_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_10g_us_cfg_data_bounds_check(const bcmolt_epon_onu_10g_us_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_onu_10g_us_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_CFG_ID_ALL_LINKS)) != 0)
+    {
+        if (this->all_links.len > 2048)
+        {
+            return BCMOS_FALSE;
+        }
+
+        if (!bcmolt_macaddress_list_u32_max_2048_bounds_check(&this->all_links))
+        {
+            *failed_prop = BCMOLT_EPON_ONU_10G_US_CFG_ID_ALL_LINKS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_onu_10g_us_stat_data_set_default(bcmolt_epon_onu_10g_us_stat_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_STAT_ID_FEC_CODE_WORDS_TOTAL)) != 0)
+    {
+        this->fec_code_words_total = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_STAT_ID_FEC_CODE_WORDS_DECODE_FAILS)) != 0)
+    {
+        this->fec_code_words_decode_fails = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_STAT_ID_FEC_ZEROES_CORRECTED)) != 0)
+    {
+        this->fec_zeroes_corrected = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_STAT_ID_FEC_ONES_CORRECTED)) != 0)
+    {
+        this->fec_ones_corrected = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_10g_us_stat_data_pack(const bcmolt_epon_onu_10g_us_stat_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_STAT_ID_FEC_CODE_WORDS_TOTAL)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->fec_code_words_total))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_STAT_ID_FEC_CODE_WORDS_DECODE_FAILS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->fec_code_words_decode_fails))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_STAT_ID_FEC_ZEROES_CORRECTED)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->fec_zeroes_corrected))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_STAT_ID_FEC_ONES_CORRECTED)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->fec_ones_corrected))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_onu_10g_us_stat_data_get_packed_length(const bcmolt_epon_onu_10g_us_stat_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_STAT_ID_FEC_CODE_WORDS_TOTAL)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_STAT_ID_FEC_CODE_WORDS_DECODE_FAILS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_STAT_ID_FEC_ZEROES_CORRECTED)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_STAT_ID_FEC_ONES_CORRECTED)) != 0)
+    {
+        count += 8;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_10g_us_stat_data_unpack(bcmolt_epon_onu_10g_us_stat_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_STAT_ID_FEC_CODE_WORDS_TOTAL)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->fec_code_words_total))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_STAT_ID_FEC_CODE_WORDS_DECODE_FAILS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->fec_code_words_decode_fails))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_STAT_ID_FEC_ZEROES_CORRECTED)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->fec_zeroes_corrected))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_STAT_ID_FEC_ONES_CORRECTED)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->fec_ones_corrected))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_10g_us_stat_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_STAT_ID_FEC_CODE_WORDS_TOTAL)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_STAT_ID_FEC_CODE_WORDS_DECODE_FAILS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_STAT_ID_FEC_ZEROES_CORRECTED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_STAT_ID_FEC_ONES_CORRECTED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_10g_us_stat_data_bounds_check(const bcmolt_epon_onu_10g_us_stat_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_onu_10g_us_stat_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_onu_10g_us_stat_cfg_data_set_default(bcmolt_epon_onu_10g_us_stat_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_STAT_CFG_ID_CFG)) != 0)
+    {
+        this->cfg.trigger.type = BCMOLT_STAT_CONDITION_TYPE_NONE;
+        this->cfg.soak.active_soak_time = 0;
+        this->cfg.soak.clear_soak_time = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_10g_us_stat_cfg_data_pack(const bcmolt_epon_onu_10g_us_stat_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_pack(&this->cfg, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_onu_10g_us_stat_cfg_data_get_packed_length(const bcmolt_epon_onu_10g_us_stat_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_STAT_CFG_ID_CFG)) != 0)
+    {
+        count += bcmolt_stat_alarm_config_get_packed_length(&this->cfg);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_10g_us_stat_cfg_data_unpack(bcmolt_epon_onu_10g_us_stat_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_unpack(&this->cfg, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_10g_us_stat_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_10g_us_stat_cfg_data_bounds_check(const bcmolt_epon_onu_10g_us_stat_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_onu_10g_us_stat_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_bounds_check(&this->cfg))
+        {
+            *failed_prop = BCMOLT_EPON_ONU_10G_US_STAT_CFG_ID_CFG;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_onu_10g_us_stat_alarm_cleared_data_set_default(bcmolt_epon_onu_10g_us_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        this->stat = BCMOLT_EPON_ONU_10G_US_STAT_ID_FEC_CODE_WORDS_TOTAL;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_10g_us_stat_alarm_cleared_data_pack(const bcmolt_epon_onu_10g_us_stat_alarm_cleared_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_epon_onu_10g_us_stat_id_pack(this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_onu_10g_us_stat_alarm_cleared_data_get_packed_length(const bcmolt_epon_onu_10g_us_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_10g_us_stat_alarm_cleared_data_unpack(bcmolt_epon_onu_10g_us_stat_alarm_cleared_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_epon_onu_10g_us_stat_id_unpack(&this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_10g_us_stat_alarm_cleared_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_10g_us_stat_alarm_cleared_data_bounds_check(const bcmolt_epon_onu_10g_us_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_onu_10g_us_stat_alarm_cleared_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        switch (this->stat)
+        {
+            case BCMOLT_EPON_ONU_10G_US_STAT_ID_FEC_CODE_WORDS_TOTAL:
+                break;
+            case BCMOLT_EPON_ONU_10G_US_STAT_ID_FEC_CODE_WORDS_DECODE_FAILS:
+                break;
+            case BCMOLT_EPON_ONU_10G_US_STAT_ID_FEC_ZEROES_CORRECTED:
+                break;
+            case BCMOLT_EPON_ONU_10G_US_STAT_ID_FEC_ONES_CORRECTED:
+                break;
+            default:
+                *failed_prop = BCMOLT_EPON_ONU_10G_US_STAT_ALARM_CLEARED_ID_STAT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_onu_10g_us_stat_alarm_raised_data_set_default(bcmolt_epon_onu_10g_us_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        this->stat = BCMOLT_EPON_ONU_10G_US_STAT_ID_FEC_CODE_WORDS_TOTAL;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_10g_us_stat_alarm_raised_data_pack(const bcmolt_epon_onu_10g_us_stat_alarm_raised_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_epon_onu_10g_us_stat_id_pack(this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_onu_10g_us_stat_alarm_raised_data_get_packed_length(const bcmolt_epon_onu_10g_us_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_10g_us_stat_alarm_raised_data_unpack(bcmolt_epon_onu_10g_us_stat_alarm_raised_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_epon_onu_10g_us_stat_id_unpack(&this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_10g_us_stat_alarm_raised_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_10g_us_stat_alarm_raised_data_bounds_check(const bcmolt_epon_onu_10g_us_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_onu_10g_us_stat_alarm_raised_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        switch (this->stat)
+        {
+            case BCMOLT_EPON_ONU_10G_US_STAT_ID_FEC_CODE_WORDS_TOTAL:
+                break;
+            case BCMOLT_EPON_ONU_10G_US_STAT_ID_FEC_CODE_WORDS_DECODE_FAILS:
+                break;
+            case BCMOLT_EPON_ONU_10G_US_STAT_ID_FEC_ZEROES_CORRECTED:
+                break;
+            case BCMOLT_EPON_ONU_10G_US_STAT_ID_FEC_ONES_CORRECTED:
+                break;
+            default:
+                *failed_prop = BCMOLT_EPON_ONU_10G_US_STAT_ALARM_RAISED_ID_STAT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_onu_10g_us_auto_cfg_data_set_default(bcmolt_epon_onu_10g_us_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        this->stat_alarm_cleared = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        this->stat_alarm_raised = BCMOS_FALSE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_10g_us_auto_cfg_data_pack(const bcmolt_epon_onu_10g_us_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->stat_alarm_cleared))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->stat_alarm_raised))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_onu_10g_us_auto_cfg_data_get_packed_length(const bcmolt_epon_onu_10g_us_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_10g_us_auto_cfg_data_unpack(bcmolt_epon_onu_10g_us_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->stat_alarm_cleared))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->stat_alarm_raised))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_10g_us_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_10G_US_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_10g_us_auto_cfg_data_bounds_check(const bcmolt_epon_onu_10g_us_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_onu_10g_us_auto_cfg_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_onu_1g_us_key_set_default(bcmolt_epon_onu_1g_us_key *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_KEY_ID_EPON_NI)) != 0)
+    {
+        this->epon_ni = (bcmolt_epon_ni) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_KEY_ID_ONU_ID)) != 0)
+    {
+        this->onu_id = (bcmolt_epon_onu_id) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_1g_us_key_pack(const bcmolt_epon_onu_1g_us_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_KEY_ID_EPON_NI)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->epon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_KEY_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, (uint8_t) this->onu_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_onu_1g_us_key_get_packed_length(const bcmolt_epon_onu_1g_us_key *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_KEY_ID_EPON_NI)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_KEY_ID_ONU_ID)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_1g_us_key_unpack(bcmolt_epon_onu_1g_us_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_KEY_ID_EPON_NI)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->epon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_KEY_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, (uint8_t *) &this->onu_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_1g_us_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_KEY_ID_EPON_NI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_KEY_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_1g_us_key_bounds_check(const bcmolt_epon_onu_1g_us_key *this, bcmolt_presence_mask fields_present, bcmolt_epon_onu_1g_us_key_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_KEY_ID_ONU_ID)) != 0)
+    {
+        if (this->onu_id > (bcmolt_epon_onu_id) 127)
+        {
+            *failed_prop = BCMOLT_EPON_ONU_1G_US_KEY_ID_ONU_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_onu_1g_us_cfg_data_set_default(bcmolt_epon_onu_1g_us_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_CFG_ID_ALL_LINKS)) != 0)
+    {
+        this->all_links.len = 0;
+        this->all_links.val = NULL;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_1g_us_cfg_data_pack(const bcmolt_epon_onu_1g_us_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_CFG_ID_ALL_LINKS)) != 0)
+    {
+        if (!bcmolt_macaddress_list_u32_pack(&this->all_links, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_onu_1g_us_cfg_data_get_packed_length(const bcmolt_epon_onu_1g_us_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_CFG_ID_ALL_LINKS)) != 0)
+    {
+        count += bcmolt_macaddress_list_u32_get_packed_length(&this->all_links);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_1g_us_cfg_data_unpack(bcmolt_epon_onu_1g_us_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_CFG_ID_ALL_LINKS)) != 0)
+    {
+        if (!bcmolt_macaddress_list_u32_unpack(&this->all_links, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_1g_us_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_CFG_ID_ALL_LINKS)) != 0)
+    {
+        if (!bcmolt_macaddress_list_u32_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_1g_us_cfg_data_bounds_check(const bcmolt_epon_onu_1g_us_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_onu_1g_us_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_CFG_ID_ALL_LINKS)) != 0)
+    {
+        if (!bcmolt_macaddress_list_u32_bounds_check(&this->all_links))
+        {
+            *failed_prop = BCMOLT_EPON_ONU_1G_US_CFG_ID_ALL_LINKS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_onu_1g_us_stat_data_set_default(bcmolt_epon_onu_1g_us_stat_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_GOOD_FRAMES)) != 0)
+    {
+        this->good_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_GOOD_BYTES)) != 0)
+    {
+        this->good_bytes = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_OVERSZ_FRAMES)) != 0)
+    {
+        this->oversz_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_NON_FEC_GOOD_FRAMES)) != 0)
+    {
+        this->non_fec_good_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_NON_FEC_GOOD_BYTES)) != 0)
+    {
+        this->non_fec_good_bytes = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_GOOD_FRAMES)) != 0)
+    {
+        this->fec_good_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_GOOD_BYTES)) != 0)
+    {
+        this->fec_good_bytes = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_FRAMES_EXC_ERRS)) != 0)
+    {
+        this->fec_frames_exc_errs = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_BLKS_NO_ERRS)) != 0)
+    {
+        this->fec_blks_no_errs = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_BLKS_CORR_ERRS)) != 0)
+    {
+        this->fec_blks_corr_errs = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_BLKS_UNCORR_ERRS)) != 0)
+    {
+        this->fec_blks_uncorr_errs = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_CORR_BYTES)) != 0)
+    {
+        this->fec_corr_bytes = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_CORR_ZEROES)) != 0)
+    {
+        this->fec_corr_zeroes = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_CORR_ONES)) != 0)
+    {
+        this->fec_corr_ones = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_UNDERSZ_FRAMES)) != 0)
+    {
+        this->undersz_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_ERRORSZ_FRAMES)) != 0)
+    {
+        this->errorsz_frames = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_1g_us_stat_data_pack(const bcmolt_epon_onu_1g_us_stat_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_GOOD_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->good_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_GOOD_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->good_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_OVERSZ_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->oversz_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_NON_FEC_GOOD_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->non_fec_good_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_NON_FEC_GOOD_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->non_fec_good_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_GOOD_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->fec_good_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_GOOD_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->fec_good_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_FRAMES_EXC_ERRS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->fec_frames_exc_errs))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_BLKS_NO_ERRS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->fec_blks_no_errs))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_BLKS_CORR_ERRS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->fec_blks_corr_errs))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_BLKS_UNCORR_ERRS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->fec_blks_uncorr_errs))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_CORR_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->fec_corr_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_CORR_ZEROES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->fec_corr_zeroes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_CORR_ONES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->fec_corr_ones))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_UNDERSZ_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->undersz_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_ERRORSZ_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->errorsz_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_onu_1g_us_stat_data_get_packed_length(const bcmolt_epon_onu_1g_us_stat_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_GOOD_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_GOOD_BYTES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_OVERSZ_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_NON_FEC_GOOD_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_NON_FEC_GOOD_BYTES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_GOOD_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_GOOD_BYTES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_FRAMES_EXC_ERRS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_BLKS_NO_ERRS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_BLKS_CORR_ERRS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_BLKS_UNCORR_ERRS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_CORR_BYTES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_CORR_ZEROES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_CORR_ONES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_UNDERSZ_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_ERRORSZ_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_1g_us_stat_data_unpack(bcmolt_epon_onu_1g_us_stat_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_GOOD_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->good_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_GOOD_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->good_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_OVERSZ_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->oversz_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_NON_FEC_GOOD_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->non_fec_good_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_NON_FEC_GOOD_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->non_fec_good_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_GOOD_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->fec_good_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_GOOD_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->fec_good_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_FRAMES_EXC_ERRS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->fec_frames_exc_errs))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_BLKS_NO_ERRS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->fec_blks_no_errs))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_BLKS_CORR_ERRS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->fec_blks_corr_errs))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_BLKS_UNCORR_ERRS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->fec_blks_uncorr_errs))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_CORR_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->fec_corr_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_CORR_ZEROES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->fec_corr_zeroes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_CORR_ONES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->fec_corr_ones))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_UNDERSZ_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->undersz_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_ERRORSZ_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->errorsz_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_1g_us_stat_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_GOOD_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_GOOD_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_OVERSZ_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_NON_FEC_GOOD_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_NON_FEC_GOOD_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_GOOD_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_GOOD_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_FRAMES_EXC_ERRS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_BLKS_NO_ERRS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_BLKS_CORR_ERRS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_BLKS_UNCORR_ERRS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_CORR_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_CORR_ZEROES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_CORR_ONES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_UNDERSZ_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ID_ERRORSZ_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_1g_us_stat_data_bounds_check(const bcmolt_epon_onu_1g_us_stat_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_onu_1g_us_stat_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_onu_1g_us_stat_cfg_data_set_default(bcmolt_epon_onu_1g_us_stat_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_CFG_ID_CFG)) != 0)
+    {
+        this->cfg.trigger.type = BCMOLT_STAT_CONDITION_TYPE_NONE;
+        this->cfg.soak.active_soak_time = 0;
+        this->cfg.soak.clear_soak_time = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_1g_us_stat_cfg_data_pack(const bcmolt_epon_onu_1g_us_stat_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_pack(&this->cfg, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_onu_1g_us_stat_cfg_data_get_packed_length(const bcmolt_epon_onu_1g_us_stat_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_CFG_ID_CFG)) != 0)
+    {
+        count += bcmolt_stat_alarm_config_get_packed_length(&this->cfg);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_1g_us_stat_cfg_data_unpack(bcmolt_epon_onu_1g_us_stat_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_unpack(&this->cfg, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_1g_us_stat_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_1g_us_stat_cfg_data_bounds_check(const bcmolt_epon_onu_1g_us_stat_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_onu_1g_us_stat_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_bounds_check(&this->cfg))
+        {
+            *failed_prop = BCMOLT_EPON_ONU_1G_US_STAT_CFG_ID_CFG;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_onu_1g_us_stat_alarm_cleared_data_set_default(bcmolt_epon_onu_1g_us_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        this->stat = BCMOLT_EPON_ONU_1G_US_STAT_ID_GOOD_FRAMES;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_1g_us_stat_alarm_cleared_data_pack(const bcmolt_epon_onu_1g_us_stat_alarm_cleared_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_epon_onu_1g_us_stat_id_pack(this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_onu_1g_us_stat_alarm_cleared_data_get_packed_length(const bcmolt_epon_onu_1g_us_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_1g_us_stat_alarm_cleared_data_unpack(bcmolt_epon_onu_1g_us_stat_alarm_cleared_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_epon_onu_1g_us_stat_id_unpack(&this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_1g_us_stat_alarm_cleared_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_1g_us_stat_alarm_cleared_data_bounds_check(const bcmolt_epon_onu_1g_us_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_onu_1g_us_stat_alarm_cleared_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        switch (this->stat)
+        {
+            case BCMOLT_EPON_ONU_1G_US_STAT_ID_GOOD_FRAMES:
+                break;
+            case BCMOLT_EPON_ONU_1G_US_STAT_ID_GOOD_BYTES:
+                break;
+            case BCMOLT_EPON_ONU_1G_US_STAT_ID_OVERSZ_FRAMES:
+                break;
+            case BCMOLT_EPON_ONU_1G_US_STAT_ID_NON_FEC_GOOD_FRAMES:
+                break;
+            case BCMOLT_EPON_ONU_1G_US_STAT_ID_NON_FEC_GOOD_BYTES:
+                break;
+            case BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_GOOD_FRAMES:
+                break;
+            case BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_GOOD_BYTES:
+                break;
+            case BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_FRAMES_EXC_ERRS:
+                break;
+            case BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_BLKS_NO_ERRS:
+                break;
+            case BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_BLKS_CORR_ERRS:
+                break;
+            case BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_BLKS_UNCORR_ERRS:
+                break;
+            case BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_CORR_BYTES:
+                break;
+            case BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_CORR_ZEROES:
+                break;
+            case BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_CORR_ONES:
+                break;
+            case BCMOLT_EPON_ONU_1G_US_STAT_ID_UNDERSZ_FRAMES:
+                break;
+            case BCMOLT_EPON_ONU_1G_US_STAT_ID_ERRORSZ_FRAMES:
+                break;
+            default:
+                *failed_prop = BCMOLT_EPON_ONU_1G_US_STAT_ALARM_CLEARED_ID_STAT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_onu_1g_us_stat_alarm_raised_data_set_default(bcmolt_epon_onu_1g_us_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        this->stat = BCMOLT_EPON_ONU_1G_US_STAT_ID_GOOD_FRAMES;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_1g_us_stat_alarm_raised_data_pack(const bcmolt_epon_onu_1g_us_stat_alarm_raised_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_epon_onu_1g_us_stat_id_pack(this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_onu_1g_us_stat_alarm_raised_data_get_packed_length(const bcmolt_epon_onu_1g_us_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_1g_us_stat_alarm_raised_data_unpack(bcmolt_epon_onu_1g_us_stat_alarm_raised_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_epon_onu_1g_us_stat_id_unpack(&this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_1g_us_stat_alarm_raised_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_1g_us_stat_alarm_raised_data_bounds_check(const bcmolt_epon_onu_1g_us_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_onu_1g_us_stat_alarm_raised_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        switch (this->stat)
+        {
+            case BCMOLT_EPON_ONU_1G_US_STAT_ID_GOOD_FRAMES:
+                break;
+            case BCMOLT_EPON_ONU_1G_US_STAT_ID_GOOD_BYTES:
+                break;
+            case BCMOLT_EPON_ONU_1G_US_STAT_ID_OVERSZ_FRAMES:
+                break;
+            case BCMOLT_EPON_ONU_1G_US_STAT_ID_NON_FEC_GOOD_FRAMES:
+                break;
+            case BCMOLT_EPON_ONU_1G_US_STAT_ID_NON_FEC_GOOD_BYTES:
+                break;
+            case BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_GOOD_FRAMES:
+                break;
+            case BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_GOOD_BYTES:
+                break;
+            case BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_FRAMES_EXC_ERRS:
+                break;
+            case BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_BLKS_NO_ERRS:
+                break;
+            case BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_BLKS_CORR_ERRS:
+                break;
+            case BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_BLKS_UNCORR_ERRS:
+                break;
+            case BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_CORR_BYTES:
+                break;
+            case BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_CORR_ZEROES:
+                break;
+            case BCMOLT_EPON_ONU_1G_US_STAT_ID_FEC_CORR_ONES:
+                break;
+            case BCMOLT_EPON_ONU_1G_US_STAT_ID_UNDERSZ_FRAMES:
+                break;
+            case BCMOLT_EPON_ONU_1G_US_STAT_ID_ERRORSZ_FRAMES:
+                break;
+            default:
+                *failed_prop = BCMOLT_EPON_ONU_1G_US_STAT_ALARM_RAISED_ID_STAT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_onu_1g_us_auto_cfg_data_set_default(bcmolt_epon_onu_1g_us_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        this->stat_alarm_cleared = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        this->stat_alarm_raised = BCMOS_FALSE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_1g_us_auto_cfg_data_pack(const bcmolt_epon_onu_1g_us_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->stat_alarm_cleared))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->stat_alarm_raised))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_onu_1g_us_auto_cfg_data_get_packed_length(const bcmolt_epon_onu_1g_us_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_1g_us_auto_cfg_data_unpack(bcmolt_epon_onu_1g_us_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->stat_alarm_cleared))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->stat_alarm_raised))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_1g_us_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_ONU_1G_US_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_onu_1g_us_auto_cfg_data_bounds_check(const bcmolt_epon_onu_1g_us_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_onu_1g_us_auto_cfg_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_path_10g_ds_key_set_default(bcmolt_epon_path_10g_ds_key *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_KEY_ID_EPON_NI)) != 0)
+    {
+        this->epon_ni = (bcmolt_epon_ni) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_ds_key_pack(const bcmolt_epon_path_10g_ds_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_KEY_ID_EPON_NI)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->epon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_path_10g_ds_key_get_packed_length(const bcmolt_epon_path_10g_ds_key *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_KEY_ID_EPON_NI)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_ds_key_unpack(bcmolt_epon_path_10g_ds_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_KEY_ID_EPON_NI)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->epon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_ds_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_KEY_ID_EPON_NI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_ds_key_bounds_check(const bcmolt_epon_path_10g_ds_key *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_10g_ds_key_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_path_10g_ds_cfg_data_set_default(bcmolt_epon_path_10g_ds_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_CFG_ID_FEC_STATE)) != 0)
+    {
+        this->fec_state = BCMOLT_EPON_FEC_EN_STATE_ENABLED;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_CFG_ID_PRBS_GENERATOR)) != 0)
+    {
+        this->prbs_generator.polynom = BCMOLT_PRBS_POLYNOMIAL_PRBS_7;
+        this->prbs_generator.error_insert = BCMOS_FALSE;
+        this->prbs_generator.invert = BCMOS_FALSE;
+        this->prbs_generator.control = BCMOLT_CONTROL_STATE_DISABLE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_ds_cfg_data_pack(const bcmolt_epon_path_10g_ds_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_CFG_ID_FEC_STATE)) != 0)
+    {
+        if (!bcmolt_epon_fec_en_state_pack(this->fec_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_CFG_ID_PRBS_GENERATOR)) != 0)
+    {
+        if (!bcmolt_prbs_generator_config_pack(&this->prbs_generator, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_path_10g_ds_cfg_data_get_packed_length(const bcmolt_epon_path_10g_ds_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_CFG_ID_FEC_STATE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_CFG_ID_PRBS_GENERATOR)) != 0)
+    {
+        count += 4;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_ds_cfg_data_unpack(bcmolt_epon_path_10g_ds_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_CFG_ID_FEC_STATE)) != 0)
+    {
+        if (!bcmolt_epon_fec_en_state_unpack(&this->fec_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_CFG_ID_PRBS_GENERATOR)) != 0)
+    {
+        if (!bcmolt_prbs_generator_config_unpack(&this->prbs_generator, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_ds_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_CFG_ID_FEC_STATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_CFG_ID_PRBS_GENERATOR)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_ds_cfg_data_bounds_check(const bcmolt_epon_path_10g_ds_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_10g_ds_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_CFG_ID_FEC_STATE)) != 0)
+    {
+        switch (this->fec_state)
+        {
+            case BCMOLT_EPON_FEC_EN_STATE_DISABLED:
+                break;
+            case BCMOLT_EPON_FEC_EN_STATE_ENABLED:
+                break;
+            default:
+                *failed_prop = BCMOLT_EPON_PATH_10G_DS_CFG_ID_FEC_STATE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_CFG_ID_PRBS_GENERATOR)) != 0)
+    {
+        if (!bcmolt_prbs_generator_config_bounds_check(&this->prbs_generator))
+        {
+            *failed_prop = BCMOLT_EPON_PATH_10G_DS_CFG_ID_PRBS_GENERATOR;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_path_10g_ds_stat_data_set_default(bcmolt_epon_path_10g_ds_stat_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_BYTES)) != 0)
+    {
+        this->bytes = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES)) != 0)
+    {
+        this->frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_64)) != 0)
+    {
+        this->frames_64 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_65_127)) != 0)
+    {
+        this->frames_65_127 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_128_255)) != 0)
+    {
+        this->frames_128_255 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_256_511)) != 0)
+    {
+        this->frames_256_511 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_512_1023)) != 0)
+    {
+        this->frames_512_1023 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_1024_1518)) != 0)
+    {
+        this->frames_1024_1518 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_1519_2047)) != 0)
+    {
+        this->frames_1519_2047 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_2048_4095)) != 0)
+    {
+        this->frames_2048_4095 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_4096_9216)) != 0)
+    {
+        this->frames_4096_9216 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_9217_16383)) != 0)
+    {
+        this->frames_9217_16383 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_BROADCAST_FRAMES)) != 0)
+    {
+        this->broadcast_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_DATA_BYTES)) != 0)
+    {
+        this->data_bytes = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_MULTICAST_FRAMES)) != 0)
+    {
+        this->multicast_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_UNICAST_FRAMES)) != 0)
+    {
+        this->unicast_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_OAM_BYTES)) != 0)
+    {
+        this->oam_bytes = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_OAM_FRAMES)) != 0)
+    {
+        this->oam_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_GATE_FRAMES)) != 0)
+    {
+        this->gate_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_MPCP_FRAMES)) != 0)
+    {
+        this->mpcp_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_ABORT_FRAMES)) != 0)
+    {
+        this->abort_frames = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_ds_stat_data_pack(const bcmolt_epon_path_10g_ds_stat_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_64)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_64))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_65_127)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_65_127))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_128_255)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_128_255))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_256_511)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_256_511))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_512_1023)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_512_1023))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_1024_1518)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_1024_1518))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_1519_2047)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_1519_2047))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_2048_4095)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_2048_4095))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_4096_9216)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_4096_9216))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_9217_16383)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_9217_16383))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_BROADCAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->broadcast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_DATA_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->data_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_MULTICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->multicast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_UNICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->unicast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_OAM_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->oam_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_OAM_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->oam_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_GATE_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->gate_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_MPCP_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->mpcp_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_ABORT_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->abort_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_path_10g_ds_stat_data_get_packed_length(const bcmolt_epon_path_10g_ds_stat_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_BYTES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_64)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_65_127)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_128_255)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_256_511)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_512_1023)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_1024_1518)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_1519_2047)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_2048_4095)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_4096_9216)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_9217_16383)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_BROADCAST_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_DATA_BYTES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_MULTICAST_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_UNICAST_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_OAM_BYTES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_OAM_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_GATE_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_MPCP_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_ABORT_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_ds_stat_data_unpack(bcmolt_epon_path_10g_ds_stat_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_64)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_64))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_65_127)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_65_127))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_128_255)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_128_255))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_256_511)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_256_511))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_512_1023)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_512_1023))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_1024_1518)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_1024_1518))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_1519_2047)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_1519_2047))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_2048_4095)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_2048_4095))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_4096_9216)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_4096_9216))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_9217_16383)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_9217_16383))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_BROADCAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->broadcast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_DATA_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->data_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_MULTICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->multicast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_UNICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->unicast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_OAM_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->oam_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_OAM_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->oam_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_GATE_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->gate_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_MPCP_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->mpcp_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_ABORT_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->abort_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_ds_stat_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_64)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_65_127)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_128_255)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_256_511)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_512_1023)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_1024_1518)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_1519_2047)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_2048_4095)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_4096_9216)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_9217_16383)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_BROADCAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_DATA_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_MULTICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_UNICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_OAM_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_OAM_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_GATE_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_MPCP_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ID_ABORT_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_ds_stat_data_bounds_check(const bcmolt_epon_path_10g_ds_stat_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_10g_ds_stat_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_path_10g_ds_stat_cfg_data_set_default(bcmolt_epon_path_10g_ds_stat_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_CFG_ID_CFG)) != 0)
+    {
+        this->cfg.trigger.type = BCMOLT_STAT_CONDITION_TYPE_NONE;
+        this->cfg.soak.active_soak_time = 0;
+        this->cfg.soak.clear_soak_time = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_ds_stat_cfg_data_pack(const bcmolt_epon_path_10g_ds_stat_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_pack(&this->cfg, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_path_10g_ds_stat_cfg_data_get_packed_length(const bcmolt_epon_path_10g_ds_stat_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_CFG_ID_CFG)) != 0)
+    {
+        count += bcmolt_stat_alarm_config_get_packed_length(&this->cfg);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_ds_stat_cfg_data_unpack(bcmolt_epon_path_10g_ds_stat_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_unpack(&this->cfg, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_ds_stat_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_ds_stat_cfg_data_bounds_check(const bcmolt_epon_path_10g_ds_stat_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_10g_ds_stat_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_bounds_check(&this->cfg))
+        {
+            *failed_prop = BCMOLT_EPON_PATH_10G_DS_STAT_CFG_ID_CFG;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_path_10g_ds_stat_alarm_cleared_data_set_default(bcmolt_epon_path_10g_ds_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        this->stat = BCMOLT_EPON_PATH_10G_DS_STAT_ID_BYTES;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_ds_stat_alarm_cleared_data_pack(const bcmolt_epon_path_10g_ds_stat_alarm_cleared_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_epon_path_10g_ds_stat_id_pack(this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_path_10g_ds_stat_alarm_cleared_data_get_packed_length(const bcmolt_epon_path_10g_ds_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_ds_stat_alarm_cleared_data_unpack(bcmolt_epon_path_10g_ds_stat_alarm_cleared_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_epon_path_10g_ds_stat_id_unpack(&this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_ds_stat_alarm_cleared_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_ds_stat_alarm_cleared_data_bounds_check(const bcmolt_epon_path_10g_ds_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_10g_ds_stat_alarm_cleared_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        switch (this->stat)
+        {
+            case BCMOLT_EPON_PATH_10G_DS_STAT_ID_BYTES:
+                break;
+            case BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_64:
+                break;
+            case BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_65_127:
+                break;
+            case BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_128_255:
+                break;
+            case BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_256_511:
+                break;
+            case BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_512_1023:
+                break;
+            case BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_1024_1518:
+                break;
+            case BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_1519_2047:
+                break;
+            case BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_2048_4095:
+                break;
+            case BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_4096_9216:
+                break;
+            case BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_9217_16383:
+                break;
+            case BCMOLT_EPON_PATH_10G_DS_STAT_ID_BROADCAST_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_10G_DS_STAT_ID_DATA_BYTES:
+                break;
+            case BCMOLT_EPON_PATH_10G_DS_STAT_ID_MULTICAST_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_10G_DS_STAT_ID_UNICAST_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_10G_DS_STAT_ID_OAM_BYTES:
+                break;
+            case BCMOLT_EPON_PATH_10G_DS_STAT_ID_OAM_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_10G_DS_STAT_ID_GATE_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_10G_DS_STAT_ID_MPCP_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_10G_DS_STAT_ID_ABORT_FRAMES:
+                break;
+            default:
+                *failed_prop = BCMOLT_EPON_PATH_10G_DS_STAT_ALARM_CLEARED_ID_STAT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_path_10g_ds_stat_alarm_raised_data_set_default(bcmolt_epon_path_10g_ds_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        this->stat = BCMOLT_EPON_PATH_10G_DS_STAT_ID_BYTES;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_ds_stat_alarm_raised_data_pack(const bcmolt_epon_path_10g_ds_stat_alarm_raised_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_epon_path_10g_ds_stat_id_pack(this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_path_10g_ds_stat_alarm_raised_data_get_packed_length(const bcmolt_epon_path_10g_ds_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_ds_stat_alarm_raised_data_unpack(bcmolt_epon_path_10g_ds_stat_alarm_raised_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_epon_path_10g_ds_stat_id_unpack(&this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_ds_stat_alarm_raised_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_ds_stat_alarm_raised_data_bounds_check(const bcmolt_epon_path_10g_ds_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_10g_ds_stat_alarm_raised_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        switch (this->stat)
+        {
+            case BCMOLT_EPON_PATH_10G_DS_STAT_ID_BYTES:
+                break;
+            case BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_64:
+                break;
+            case BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_65_127:
+                break;
+            case BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_128_255:
+                break;
+            case BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_256_511:
+                break;
+            case BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_512_1023:
+                break;
+            case BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_1024_1518:
+                break;
+            case BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_1519_2047:
+                break;
+            case BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_2048_4095:
+                break;
+            case BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_4096_9216:
+                break;
+            case BCMOLT_EPON_PATH_10G_DS_STAT_ID_FRAMES_9217_16383:
+                break;
+            case BCMOLT_EPON_PATH_10G_DS_STAT_ID_BROADCAST_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_10G_DS_STAT_ID_DATA_BYTES:
+                break;
+            case BCMOLT_EPON_PATH_10G_DS_STAT_ID_MULTICAST_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_10G_DS_STAT_ID_UNICAST_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_10G_DS_STAT_ID_OAM_BYTES:
+                break;
+            case BCMOLT_EPON_PATH_10G_DS_STAT_ID_OAM_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_10G_DS_STAT_ID_GATE_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_10G_DS_STAT_ID_MPCP_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_10G_DS_STAT_ID_ABORT_FRAMES:
+                break;
+            default:
+                *failed_prop = BCMOLT_EPON_PATH_10G_DS_STAT_ALARM_RAISED_ID_STAT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_path_10g_ds_auto_cfg_data_set_default(bcmolt_epon_path_10g_ds_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        this->stat_alarm_cleared = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        this->stat_alarm_raised = BCMOS_FALSE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_ds_auto_cfg_data_pack(const bcmolt_epon_path_10g_ds_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->stat_alarm_cleared))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->stat_alarm_raised))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_path_10g_ds_auto_cfg_data_get_packed_length(const bcmolt_epon_path_10g_ds_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_ds_auto_cfg_data_unpack(bcmolt_epon_path_10g_ds_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->stat_alarm_cleared))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->stat_alarm_raised))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_ds_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_DS_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_ds_auto_cfg_data_bounds_check(const bcmolt_epon_path_10g_ds_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_10g_ds_auto_cfg_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_path_10g_us_key_set_default(bcmolt_epon_path_10g_us_key *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_KEY_ID_EPON_NI)) != 0)
+    {
+        this->epon_ni = (bcmolt_epon_ni) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_us_key_pack(const bcmolt_epon_path_10g_us_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_KEY_ID_EPON_NI)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->epon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_path_10g_us_key_get_packed_length(const bcmolt_epon_path_10g_us_key *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_KEY_ID_EPON_NI)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_us_key_unpack(bcmolt_epon_path_10g_us_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_KEY_ID_EPON_NI)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->epon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_us_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_KEY_ID_EPON_NI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_us_key_bounds_check(const bcmolt_epon_path_10g_us_key *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_10g_us_key_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_path_10g_us_cfg_data_set_default(bcmolt_epon_path_10g_us_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_CFG_ID_FEC_STATE)) != 0)
+    {
+        this->fec_state = BCMOLT_EPON_FEC_EN_STATE_ENABLED;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_CFG_ID_SYNC_TIME_TQ)) != 0)
+    {
+        this->sync_time_tq = (bcmolt_time_quanta) 32;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_CFG_ID_PRBS_CHECKER)) != 0)
+    {
+        this->prbs_checker.polynom = BCMOLT_PRBS_POLYNOMIAL_PRBS_7;
+        this->prbs_checker.mode = BCMOLT_PRBS_CHECKER_MODE_SELF_SYNC;
+        this->prbs_checker.data_invert = BCMOS_FALSE;
+        this->prbs_checker.control = BCMOLT_CONTROL_STATE_DISABLE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_CFG_ID_PRBS_STATUS)) != 0)
+    {
+        this->prbs_status.lock_state = BCMOLT_PRBS_LOCK_STATE_UNLOCKED;
+        this->prbs_status.error_counts = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_us_cfg_data_pack(const bcmolt_epon_path_10g_us_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_CFG_ID_FEC_STATE)) != 0)
+    {
+        if (!bcmolt_epon_fec_en_state_pack(this->fec_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_CFG_ID_SYNC_TIME_TQ)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, (uint32_t) this->sync_time_tq))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_CFG_ID_PRBS_CHECKER)) != 0)
+    {
+        if (!bcmolt_prbs_checker_config_pack(&this->prbs_checker, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_CFG_ID_PRBS_STATUS)) != 0)
+    {
+        if (!bcmolt_prbs_status_pack(&this->prbs_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_path_10g_us_cfg_data_get_packed_length(const bcmolt_epon_path_10g_us_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_CFG_ID_FEC_STATE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_CFG_ID_SYNC_TIME_TQ)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_CFG_ID_PRBS_CHECKER)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_CFG_ID_PRBS_STATUS)) != 0)
+    {
+        count += 5;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_us_cfg_data_unpack(bcmolt_epon_path_10g_us_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_CFG_ID_FEC_STATE)) != 0)
+    {
+        if (!bcmolt_epon_fec_en_state_unpack(&this->fec_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_CFG_ID_SYNC_TIME_TQ)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, (uint32_t *) &this->sync_time_tq))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_CFG_ID_PRBS_CHECKER)) != 0)
+    {
+        if (!bcmolt_prbs_checker_config_unpack(&this->prbs_checker, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_CFG_ID_PRBS_STATUS)) != 0)
+    {
+        if (!bcmolt_prbs_status_unpack(&this->prbs_status, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_us_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_CFG_ID_FEC_STATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_CFG_ID_SYNC_TIME_TQ)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_CFG_ID_PRBS_CHECKER)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_CFG_ID_PRBS_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 5))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_us_cfg_data_bounds_check(const bcmolt_epon_path_10g_us_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_10g_us_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_CFG_ID_FEC_STATE)) != 0)
+    {
+        switch (this->fec_state)
+        {
+            case BCMOLT_EPON_FEC_EN_STATE_DISABLED:
+                break;
+            case BCMOLT_EPON_FEC_EN_STATE_ENABLED:
+                break;
+            default:
+                *failed_prop = BCMOLT_EPON_PATH_10G_US_CFG_ID_FEC_STATE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_CFG_ID_SYNC_TIME_TQ)) != 0)
+    {
+        if (this->sync_time_tq > (bcmolt_time_quanta) 65535UL)
+        {
+            *failed_prop = BCMOLT_EPON_PATH_10G_US_CFG_ID_SYNC_TIME_TQ;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_CFG_ID_PRBS_CHECKER)) != 0)
+    {
+        if (!bcmolt_prbs_checker_config_bounds_check(&this->prbs_checker))
+        {
+            *failed_prop = BCMOLT_EPON_PATH_10G_US_CFG_ID_PRBS_CHECKER;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_CFG_ID_PRBS_STATUS)) != 0)
+    {
+        if (!bcmolt_prbs_status_bounds_check(&this->prbs_status))
+        {
+            *failed_prop = BCMOLT_EPON_PATH_10G_US_CFG_ID_PRBS_STATUS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_path_10g_us_stat_data_set_default(bcmolt_epon_path_10g_us_stat_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_BYTES)) != 0)
+    {
+        this->bytes = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES)) != 0)
+    {
+        this->frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_64)) != 0)
+    {
+        this->frames_64 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_65_127)) != 0)
+    {
+        this->frames_65_127 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_128_255)) != 0)
+    {
+        this->frames_128_255 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_256_511)) != 0)
+    {
+        this->frames_256_511 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_512_1023)) != 0)
+    {
+        this->frames_512_1023 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_1024_1518)) != 0)
+    {
+        this->frames_1024_1518 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_1519_2047)) != 0)
+    {
+        this->frames_1519_2047 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_2048_4095)) != 0)
+    {
+        this->frames_2048_4095 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_4096_9216)) != 0)
+    {
+        this->frames_4096_9216 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_9217_16383)) != 0)
+    {
+        this->frames_9217_16383 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_BROADCAST_FRAMES)) != 0)
+    {
+        this->broadcast_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_DATA_BYTES)) != 0)
+    {
+        this->data_bytes = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_MULTICAST_FRAMES)) != 0)
+    {
+        this->multicast_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_UNICAST_FRAMES)) != 0)
+    {
+        this->unicast_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_MPCP_FRAMES)) != 0)
+    {
+        this->mpcp_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_OAM_BYTES)) != 0)
+    {
+        this->oam_bytes = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_OAM_FRAMES)) != 0)
+    {
+        this->oam_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_REPORT_FRAMES)) != 0)
+    {
+        this->report_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_ABORT_FRAMES)) != 0)
+    {
+        this->abort_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FCS_ERROR)) != 0)
+    {
+        this->fcs_error = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_CRC_8_ERROR)) != 0)
+    {
+        this->crc_8_error = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_OUT_OF_SLOT)) != 0)
+    {
+        this->out_of_slot = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_OVERSIZE_ERROR)) != 0)
+    {
+        this->oversize_error = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_RUNT_ERROR)) != 0)
+    {
+        this->runt_error = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_us_stat_data_pack(const bcmolt_epon_path_10g_us_stat_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_64)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_64))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_65_127)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_65_127))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_128_255)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_128_255))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_256_511)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_256_511))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_512_1023)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_512_1023))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_1024_1518)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_1024_1518))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_1519_2047)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_1519_2047))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_2048_4095)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_2048_4095))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_4096_9216)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_4096_9216))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_9217_16383)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_9217_16383))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_BROADCAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->broadcast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_DATA_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->data_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_MULTICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->multicast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_UNICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->unicast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_MPCP_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->mpcp_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_OAM_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->oam_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_OAM_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->oam_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_REPORT_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->report_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_ABORT_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->abort_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FCS_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->fcs_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_CRC_8_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->crc_8_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_OUT_OF_SLOT)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->out_of_slot))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_OVERSIZE_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->oversize_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_RUNT_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->runt_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_path_10g_us_stat_data_get_packed_length(const bcmolt_epon_path_10g_us_stat_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_BYTES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_64)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_65_127)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_128_255)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_256_511)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_512_1023)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_1024_1518)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_1519_2047)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_2048_4095)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_4096_9216)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_9217_16383)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_BROADCAST_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_DATA_BYTES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_MULTICAST_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_UNICAST_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_MPCP_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_OAM_BYTES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_OAM_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_REPORT_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_ABORT_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FCS_ERROR)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_CRC_8_ERROR)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_OUT_OF_SLOT)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_OVERSIZE_ERROR)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_RUNT_ERROR)) != 0)
+    {
+        count += 8;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_us_stat_data_unpack(bcmolt_epon_path_10g_us_stat_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_64)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_64))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_65_127)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_65_127))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_128_255)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_128_255))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_256_511)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_256_511))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_512_1023)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_512_1023))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_1024_1518)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_1024_1518))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_1519_2047)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_1519_2047))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_2048_4095)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_2048_4095))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_4096_9216)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_4096_9216))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_9217_16383)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_9217_16383))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_BROADCAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->broadcast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_DATA_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->data_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_MULTICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->multicast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_UNICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->unicast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_MPCP_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->mpcp_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_OAM_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->oam_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_OAM_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->oam_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_REPORT_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->report_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_ABORT_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->abort_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FCS_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->fcs_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_CRC_8_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->crc_8_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_OUT_OF_SLOT)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->out_of_slot))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_OVERSIZE_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->oversize_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_RUNT_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->runt_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_us_stat_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_64)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_65_127)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_128_255)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_256_511)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_512_1023)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_1024_1518)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_1519_2047)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_2048_4095)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_4096_9216)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_9217_16383)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_BROADCAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_DATA_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_MULTICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_UNICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_MPCP_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_OAM_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_OAM_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_REPORT_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_ABORT_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_FCS_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_CRC_8_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_OUT_OF_SLOT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_OVERSIZE_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ID_RUNT_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_us_stat_data_bounds_check(const bcmolt_epon_path_10g_us_stat_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_10g_us_stat_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_path_10g_us_stat_cfg_data_set_default(bcmolt_epon_path_10g_us_stat_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_CFG_ID_CFG)) != 0)
+    {
+        this->cfg.trigger.type = BCMOLT_STAT_CONDITION_TYPE_NONE;
+        this->cfg.soak.active_soak_time = 0;
+        this->cfg.soak.clear_soak_time = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_us_stat_cfg_data_pack(const bcmolt_epon_path_10g_us_stat_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_pack(&this->cfg, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_path_10g_us_stat_cfg_data_get_packed_length(const bcmolt_epon_path_10g_us_stat_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_CFG_ID_CFG)) != 0)
+    {
+        count += bcmolt_stat_alarm_config_get_packed_length(&this->cfg);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_us_stat_cfg_data_unpack(bcmolt_epon_path_10g_us_stat_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_unpack(&this->cfg, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_us_stat_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_us_stat_cfg_data_bounds_check(const bcmolt_epon_path_10g_us_stat_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_10g_us_stat_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_bounds_check(&this->cfg))
+        {
+            *failed_prop = BCMOLT_EPON_PATH_10G_US_STAT_CFG_ID_CFG;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_path_10g_us_stat_alarm_cleared_data_set_default(bcmolt_epon_path_10g_us_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        this->stat = BCMOLT_EPON_PATH_10G_US_STAT_ID_BYTES;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_us_stat_alarm_cleared_data_pack(const bcmolt_epon_path_10g_us_stat_alarm_cleared_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_epon_path_10g_us_stat_id_pack(this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_path_10g_us_stat_alarm_cleared_data_get_packed_length(const bcmolt_epon_path_10g_us_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_us_stat_alarm_cleared_data_unpack(bcmolt_epon_path_10g_us_stat_alarm_cleared_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_epon_path_10g_us_stat_id_unpack(&this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_us_stat_alarm_cleared_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_us_stat_alarm_cleared_data_bounds_check(const bcmolt_epon_path_10g_us_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_10g_us_stat_alarm_cleared_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        switch (this->stat)
+        {
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_BYTES:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_64:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_65_127:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_128_255:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_256_511:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_512_1023:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_1024_1518:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_1519_2047:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_2048_4095:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_4096_9216:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_9217_16383:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_BROADCAST_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_DATA_BYTES:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_MULTICAST_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_UNICAST_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_MPCP_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_OAM_BYTES:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_OAM_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_REPORT_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_ABORT_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_FCS_ERROR:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_CRC_8_ERROR:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_OUT_OF_SLOT:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_OVERSIZE_ERROR:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_RUNT_ERROR:
+                break;
+            default:
+                *failed_prop = BCMOLT_EPON_PATH_10G_US_STAT_ALARM_CLEARED_ID_STAT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_path_10g_us_stat_alarm_raised_data_set_default(bcmolt_epon_path_10g_us_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        this->stat = BCMOLT_EPON_PATH_10G_US_STAT_ID_BYTES;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_us_stat_alarm_raised_data_pack(const bcmolt_epon_path_10g_us_stat_alarm_raised_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_epon_path_10g_us_stat_id_pack(this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_path_10g_us_stat_alarm_raised_data_get_packed_length(const bcmolt_epon_path_10g_us_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_us_stat_alarm_raised_data_unpack(bcmolt_epon_path_10g_us_stat_alarm_raised_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_epon_path_10g_us_stat_id_unpack(&this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_us_stat_alarm_raised_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_us_stat_alarm_raised_data_bounds_check(const bcmolt_epon_path_10g_us_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_10g_us_stat_alarm_raised_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        switch (this->stat)
+        {
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_BYTES:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_64:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_65_127:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_128_255:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_256_511:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_512_1023:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_1024_1518:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_1519_2047:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_2048_4095:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_4096_9216:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_FRAMES_9217_16383:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_BROADCAST_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_DATA_BYTES:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_MULTICAST_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_UNICAST_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_MPCP_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_OAM_BYTES:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_OAM_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_REPORT_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_ABORT_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_FCS_ERROR:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_CRC_8_ERROR:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_OUT_OF_SLOT:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_OVERSIZE_ERROR:
+                break;
+            case BCMOLT_EPON_PATH_10G_US_STAT_ID_RUNT_ERROR:
+                break;
+            default:
+                *failed_prop = BCMOLT_EPON_PATH_10G_US_STAT_ALARM_RAISED_ID_STAT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_path_10g_us_auto_cfg_data_set_default(bcmolt_epon_path_10g_us_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        this->stat_alarm_cleared = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        this->stat_alarm_raised = BCMOS_FALSE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_us_auto_cfg_data_pack(const bcmolt_epon_path_10g_us_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->stat_alarm_cleared))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->stat_alarm_raised))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_path_10g_us_auto_cfg_data_get_packed_length(const bcmolt_epon_path_10g_us_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_us_auto_cfg_data_unpack(bcmolt_epon_path_10g_us_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->stat_alarm_cleared))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->stat_alarm_raised))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_us_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_10G_US_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_10g_us_auto_cfg_data_bounds_check(const bcmolt_epon_path_10g_us_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_10g_us_auto_cfg_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_path_1g_ds_key_set_default(bcmolt_epon_path_1g_ds_key *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_KEY_ID_EPON_NI)) != 0)
+    {
+        this->epon_ni = (bcmolt_epon_ni) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_ds_key_pack(const bcmolt_epon_path_1g_ds_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_KEY_ID_EPON_NI)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->epon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_path_1g_ds_key_get_packed_length(const bcmolt_epon_path_1g_ds_key *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_KEY_ID_EPON_NI)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_ds_key_unpack(bcmolt_epon_path_1g_ds_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_KEY_ID_EPON_NI)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->epon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_ds_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_KEY_ID_EPON_NI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_ds_key_bounds_check(const bcmolt_epon_path_1g_ds_key *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_1g_ds_key_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_path_1g_ds_cfg_data_set_default(bcmolt_epon_path_1g_ds_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_CFG_ID_DEFAULT_FEC_STATE)) != 0)
+    {
+        this->default_fec_state = BCMOLT_EPON_FEC_EN_STATE_DISABLED;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_CFG_ID_RAMAN_MODE)) != 0)
+    {
+        this->raman_mode = BCMOLT_RAMAN_MITIGATION_MODE_DISABLED;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_CFG_ID_TURBO_2G_MODE)) != 0)
+    {
+        this->turbo_2g_mode = BCMOLT_EPON_1G_TURBO_MODE_DISABLED;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_CFG_ID_PRBS_GENERATOR)) != 0)
+    {
+        this->prbs_generator.polynom = BCMOLT_PRBS_POLYNOMIAL_PRBS_7;
+        this->prbs_generator.error_insert = BCMOS_FALSE;
+        this->prbs_generator.invert = BCMOS_FALSE;
+        this->prbs_generator.control = BCMOLT_CONTROL_STATE_DISABLE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_ds_cfg_data_pack(const bcmolt_epon_path_1g_ds_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_CFG_ID_DEFAULT_FEC_STATE)) != 0)
+    {
+        if (!bcmolt_epon_fec_en_state_pack(this->default_fec_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_CFG_ID_RAMAN_MODE)) != 0)
+    {
+        if (!bcmolt_raman_mitigation_mode_pack(this->raman_mode, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_CFG_ID_TURBO_2G_MODE)) != 0)
+    {
+        if (!bcmolt_epon_1g_turbo_mode_pack(this->turbo_2g_mode, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_CFG_ID_PRBS_GENERATOR)) != 0)
+    {
+        if (!bcmolt_prbs_generator_config_pack(&this->prbs_generator, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_path_1g_ds_cfg_data_get_packed_length(const bcmolt_epon_path_1g_ds_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_CFG_ID_DEFAULT_FEC_STATE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_CFG_ID_RAMAN_MODE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_CFG_ID_TURBO_2G_MODE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_CFG_ID_PRBS_GENERATOR)) != 0)
+    {
+        count += 4;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_ds_cfg_data_unpack(bcmolt_epon_path_1g_ds_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_CFG_ID_DEFAULT_FEC_STATE)) != 0)
+    {
+        if (!bcmolt_epon_fec_en_state_unpack(&this->default_fec_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_CFG_ID_RAMAN_MODE)) != 0)
+    {
+        if (!bcmolt_raman_mitigation_mode_unpack(&this->raman_mode, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_CFG_ID_TURBO_2G_MODE)) != 0)
+    {
+        if (!bcmolt_epon_1g_turbo_mode_unpack(&this->turbo_2g_mode, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_CFG_ID_PRBS_GENERATOR)) != 0)
+    {
+        if (!bcmolt_prbs_generator_config_unpack(&this->prbs_generator, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_ds_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_CFG_ID_DEFAULT_FEC_STATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_CFG_ID_RAMAN_MODE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_CFG_ID_TURBO_2G_MODE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_CFG_ID_PRBS_GENERATOR)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_ds_cfg_data_bounds_check(const bcmolt_epon_path_1g_ds_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_1g_ds_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_CFG_ID_DEFAULT_FEC_STATE)) != 0)
+    {
+        switch (this->default_fec_state)
+        {
+            case BCMOLT_EPON_FEC_EN_STATE_DISABLED:
+                break;
+            case BCMOLT_EPON_FEC_EN_STATE_ENABLED:
+                break;
+            default:
+                *failed_prop = BCMOLT_EPON_PATH_1G_DS_CFG_ID_DEFAULT_FEC_STATE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_CFG_ID_RAMAN_MODE)) != 0)
+    {
+        switch (this->raman_mode)
+        {
+            case BCMOLT_RAMAN_MITIGATION_MODE_DISABLED:
+                break;
+            case BCMOLT_RAMAN_MITIGATION_MODE_RANDOM:
+                break;
+            case BCMOLT_RAMAN_MITIGATION_MODE_FIXED:
+                break;
+            default:
+                *failed_prop = BCMOLT_EPON_PATH_1G_DS_CFG_ID_RAMAN_MODE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_CFG_ID_TURBO_2G_MODE)) != 0)
+    {
+        switch (this->turbo_2g_mode)
+        {
+            case BCMOLT_EPON_1G_TURBO_MODE_DISABLED:
+                break;
+            case BCMOLT_EPON_1G_TURBO_MODE_ENABLED:
+                break;
+            default:
+                *failed_prop = BCMOLT_EPON_PATH_1G_DS_CFG_ID_TURBO_2G_MODE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_CFG_ID_PRBS_GENERATOR)) != 0)
+    {
+        if (!bcmolt_prbs_generator_config_bounds_check(&this->prbs_generator))
+        {
+            *failed_prop = BCMOLT_EPON_PATH_1G_DS_CFG_ID_PRBS_GENERATOR;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_path_1g_ds_stat_data_set_default(bcmolt_epon_path_1g_ds_stat_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_BYTES)) != 0)
+    {
+        this->bytes = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES)) != 0)
+    {
+        this->frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_64)) != 0)
+    {
+        this->frames_64 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_65_127)) != 0)
+    {
+        this->frames_65_127 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_128_255)) != 0)
+    {
+        this->frames_128_255 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_256_511)) != 0)
+    {
+        this->frames_256_511 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_512_1023)) != 0)
+    {
+        this->frames_512_1023 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_1024_1518)) != 0)
+    {
+        this->frames_1024_1518 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_1519_2047)) != 0)
+    {
+        this->frames_1519_2047 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_2048_4095)) != 0)
+    {
+        this->frames_2048_4095 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_4096_9216)) != 0)
+    {
+        this->frames_4096_9216 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_9217_16383)) != 0)
+    {
+        this->frames_9217_16383 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_BROADCAST_FRAMES)) != 0)
+    {
+        this->broadcast_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_DATA_BYTES)) != 0)
+    {
+        this->data_bytes = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_MULTICAST_FRAMES)) != 0)
+    {
+        this->multicast_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_UNICAST_FRAMES)) != 0)
+    {
+        this->unicast_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_OAM_BYTES)) != 0)
+    {
+        this->oam_bytes = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_OAM_FRAMES)) != 0)
+    {
+        this->oam_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_GATE_FRAMES)) != 0)
+    {
+        this->gate_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_MPCP_FRAMES)) != 0)
+    {
+        this->mpcp_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_ABORT_FRAMES)) != 0)
+    {
+        this->abort_frames = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_ds_stat_data_pack(const bcmolt_epon_path_1g_ds_stat_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_64)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_64))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_65_127)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_65_127))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_128_255)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_128_255))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_256_511)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_256_511))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_512_1023)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_512_1023))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_1024_1518)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_1024_1518))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_1519_2047)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_1519_2047))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_2048_4095)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_2048_4095))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_4096_9216)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_4096_9216))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_9217_16383)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_9217_16383))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_BROADCAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->broadcast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_DATA_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->data_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_MULTICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->multicast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_UNICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->unicast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_OAM_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->oam_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_OAM_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->oam_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_GATE_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->gate_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_MPCP_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->mpcp_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_ABORT_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->abort_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_path_1g_ds_stat_data_get_packed_length(const bcmolt_epon_path_1g_ds_stat_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_BYTES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_64)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_65_127)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_128_255)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_256_511)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_512_1023)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_1024_1518)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_1519_2047)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_2048_4095)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_4096_9216)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_9217_16383)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_BROADCAST_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_DATA_BYTES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_MULTICAST_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_UNICAST_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_OAM_BYTES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_OAM_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_GATE_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_MPCP_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_ABORT_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_ds_stat_data_unpack(bcmolt_epon_path_1g_ds_stat_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_64)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_64))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_65_127)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_65_127))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_128_255)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_128_255))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_256_511)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_256_511))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_512_1023)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_512_1023))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_1024_1518)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_1024_1518))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_1519_2047)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_1519_2047))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_2048_4095)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_2048_4095))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_4096_9216)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_4096_9216))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_9217_16383)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_9217_16383))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_BROADCAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->broadcast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_DATA_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->data_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_MULTICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->multicast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_UNICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->unicast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_OAM_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->oam_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_OAM_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->oam_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_GATE_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->gate_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_MPCP_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->mpcp_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_ABORT_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->abort_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_ds_stat_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_64)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_65_127)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_128_255)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_256_511)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_512_1023)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_1024_1518)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_1519_2047)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_2048_4095)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_4096_9216)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_9217_16383)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_BROADCAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_DATA_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_MULTICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_UNICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_OAM_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_OAM_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_GATE_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_MPCP_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ID_ABORT_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_ds_stat_data_bounds_check(const bcmolt_epon_path_1g_ds_stat_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_1g_ds_stat_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_path_1g_ds_stat_cfg_data_set_default(bcmolt_epon_path_1g_ds_stat_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_CFG_ID_CFG)) != 0)
+    {
+        this->cfg.trigger.type = BCMOLT_STAT_CONDITION_TYPE_NONE;
+        this->cfg.soak.active_soak_time = 0;
+        this->cfg.soak.clear_soak_time = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_ds_stat_cfg_data_pack(const bcmolt_epon_path_1g_ds_stat_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_pack(&this->cfg, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_path_1g_ds_stat_cfg_data_get_packed_length(const bcmolt_epon_path_1g_ds_stat_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_CFG_ID_CFG)) != 0)
+    {
+        count += bcmolt_stat_alarm_config_get_packed_length(&this->cfg);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_ds_stat_cfg_data_unpack(bcmolt_epon_path_1g_ds_stat_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_unpack(&this->cfg, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_ds_stat_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_ds_stat_cfg_data_bounds_check(const bcmolt_epon_path_1g_ds_stat_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_1g_ds_stat_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_bounds_check(&this->cfg))
+        {
+            *failed_prop = BCMOLT_EPON_PATH_1G_DS_STAT_CFG_ID_CFG;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_path_1g_ds_stat_alarm_cleared_data_set_default(bcmolt_epon_path_1g_ds_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        this->stat = BCMOLT_EPON_PATH_1G_DS_STAT_ID_BYTES;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_ds_stat_alarm_cleared_data_pack(const bcmolt_epon_path_1g_ds_stat_alarm_cleared_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_epon_path_1g_ds_stat_id_pack(this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_path_1g_ds_stat_alarm_cleared_data_get_packed_length(const bcmolt_epon_path_1g_ds_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_ds_stat_alarm_cleared_data_unpack(bcmolt_epon_path_1g_ds_stat_alarm_cleared_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_epon_path_1g_ds_stat_id_unpack(&this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_ds_stat_alarm_cleared_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_ds_stat_alarm_cleared_data_bounds_check(const bcmolt_epon_path_1g_ds_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_1g_ds_stat_alarm_cleared_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        switch (this->stat)
+        {
+            case BCMOLT_EPON_PATH_1G_DS_STAT_ID_BYTES:
+                break;
+            case BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_64:
+                break;
+            case BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_65_127:
+                break;
+            case BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_128_255:
+                break;
+            case BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_256_511:
+                break;
+            case BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_512_1023:
+                break;
+            case BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_1024_1518:
+                break;
+            case BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_1519_2047:
+                break;
+            case BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_2048_4095:
+                break;
+            case BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_4096_9216:
+                break;
+            case BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_9217_16383:
+                break;
+            case BCMOLT_EPON_PATH_1G_DS_STAT_ID_BROADCAST_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_1G_DS_STAT_ID_DATA_BYTES:
+                break;
+            case BCMOLT_EPON_PATH_1G_DS_STAT_ID_MULTICAST_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_1G_DS_STAT_ID_UNICAST_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_1G_DS_STAT_ID_OAM_BYTES:
+                break;
+            case BCMOLT_EPON_PATH_1G_DS_STAT_ID_OAM_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_1G_DS_STAT_ID_GATE_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_1G_DS_STAT_ID_MPCP_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_1G_DS_STAT_ID_ABORT_FRAMES:
+                break;
+            default:
+                *failed_prop = BCMOLT_EPON_PATH_1G_DS_STAT_ALARM_CLEARED_ID_STAT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_path_1g_ds_stat_alarm_raised_data_set_default(bcmolt_epon_path_1g_ds_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        this->stat = BCMOLT_EPON_PATH_1G_DS_STAT_ID_BYTES;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_ds_stat_alarm_raised_data_pack(const bcmolt_epon_path_1g_ds_stat_alarm_raised_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_epon_path_1g_ds_stat_id_pack(this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_path_1g_ds_stat_alarm_raised_data_get_packed_length(const bcmolt_epon_path_1g_ds_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_ds_stat_alarm_raised_data_unpack(bcmolt_epon_path_1g_ds_stat_alarm_raised_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_epon_path_1g_ds_stat_id_unpack(&this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_ds_stat_alarm_raised_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_ds_stat_alarm_raised_data_bounds_check(const bcmolt_epon_path_1g_ds_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_1g_ds_stat_alarm_raised_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        switch (this->stat)
+        {
+            case BCMOLT_EPON_PATH_1G_DS_STAT_ID_BYTES:
+                break;
+            case BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_64:
+                break;
+            case BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_65_127:
+                break;
+            case BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_128_255:
+                break;
+            case BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_256_511:
+                break;
+            case BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_512_1023:
+                break;
+            case BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_1024_1518:
+                break;
+            case BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_1519_2047:
+                break;
+            case BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_2048_4095:
+                break;
+            case BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_4096_9216:
+                break;
+            case BCMOLT_EPON_PATH_1G_DS_STAT_ID_FRAMES_9217_16383:
+                break;
+            case BCMOLT_EPON_PATH_1G_DS_STAT_ID_BROADCAST_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_1G_DS_STAT_ID_DATA_BYTES:
+                break;
+            case BCMOLT_EPON_PATH_1G_DS_STAT_ID_MULTICAST_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_1G_DS_STAT_ID_UNICAST_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_1G_DS_STAT_ID_OAM_BYTES:
+                break;
+            case BCMOLT_EPON_PATH_1G_DS_STAT_ID_OAM_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_1G_DS_STAT_ID_GATE_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_1G_DS_STAT_ID_MPCP_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_1G_DS_STAT_ID_ABORT_FRAMES:
+                break;
+            default:
+                *failed_prop = BCMOLT_EPON_PATH_1G_DS_STAT_ALARM_RAISED_ID_STAT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_path_1g_ds_auto_cfg_data_set_default(bcmolt_epon_path_1g_ds_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        this->stat_alarm_cleared = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        this->stat_alarm_raised = BCMOS_FALSE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_ds_auto_cfg_data_pack(const bcmolt_epon_path_1g_ds_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->stat_alarm_cleared))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->stat_alarm_raised))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_path_1g_ds_auto_cfg_data_get_packed_length(const bcmolt_epon_path_1g_ds_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_ds_auto_cfg_data_unpack(bcmolt_epon_path_1g_ds_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->stat_alarm_cleared))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->stat_alarm_raised))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_ds_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_DS_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_ds_auto_cfg_data_bounds_check(const bcmolt_epon_path_1g_ds_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_1g_ds_auto_cfg_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_path_1g_us_key_set_default(bcmolt_epon_path_1g_us_key *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_KEY_ID_EPON_NI)) != 0)
+    {
+        this->epon_ni = (bcmolt_epon_ni) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_us_key_pack(const bcmolt_epon_path_1g_us_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_KEY_ID_EPON_NI)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->epon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_path_1g_us_key_get_packed_length(const bcmolt_epon_path_1g_us_key *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_KEY_ID_EPON_NI)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_us_key_unpack(bcmolt_epon_path_1g_us_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_KEY_ID_EPON_NI)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->epon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_us_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_KEY_ID_EPON_NI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_us_key_bounds_check(const bcmolt_epon_path_1g_us_key *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_1g_us_key_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_path_1g_us_cfg_data_set_default(bcmolt_epon_path_1g_us_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_CFG_ID_DEFAULT_FEC_STATE)) != 0)
+    {
+        this->default_fec_state = BCMOLT_EPON_FEC_EN_STATE_DISABLED;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_CFG_ID_SYNC_TIME_TQ)) != 0)
+    {
+        this->sync_time_tq = (bcmolt_time_quanta) 32;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_CFG_ID_PRBS_CHECKER)) != 0)
+    {
+        this->prbs_checker.polynom = BCMOLT_PRBS_POLYNOMIAL_PRBS_7;
+        this->prbs_checker.mode = BCMOLT_PRBS_CHECKER_MODE_SELF_SYNC;
+        this->prbs_checker.data_invert = BCMOS_FALSE;
+        this->prbs_checker.control = BCMOLT_CONTROL_STATE_DISABLE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_CFG_ID_PRBS_STATUS)) != 0)
+    {
+        this->prbs_status.lock_state = BCMOLT_PRBS_LOCK_STATE_UNLOCKED;
+        this->prbs_status.error_counts = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_us_cfg_data_pack(const bcmolt_epon_path_1g_us_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_CFG_ID_DEFAULT_FEC_STATE)) != 0)
+    {
+        if (!bcmolt_epon_fec_en_state_pack(this->default_fec_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_CFG_ID_SYNC_TIME_TQ)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, (uint32_t) this->sync_time_tq))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_CFG_ID_PRBS_CHECKER)) != 0)
+    {
+        if (!bcmolt_prbs_checker_config_pack(&this->prbs_checker, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_CFG_ID_PRBS_STATUS)) != 0)
+    {
+        if (!bcmolt_prbs_status_pack(&this->prbs_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_path_1g_us_cfg_data_get_packed_length(const bcmolt_epon_path_1g_us_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_CFG_ID_DEFAULT_FEC_STATE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_CFG_ID_SYNC_TIME_TQ)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_CFG_ID_PRBS_CHECKER)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_CFG_ID_PRBS_STATUS)) != 0)
+    {
+        count += 5;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_us_cfg_data_unpack(bcmolt_epon_path_1g_us_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_CFG_ID_DEFAULT_FEC_STATE)) != 0)
+    {
+        if (!bcmolt_epon_fec_en_state_unpack(&this->default_fec_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_CFG_ID_SYNC_TIME_TQ)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, (uint32_t *) &this->sync_time_tq))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_CFG_ID_PRBS_CHECKER)) != 0)
+    {
+        if (!bcmolt_prbs_checker_config_unpack(&this->prbs_checker, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_CFG_ID_PRBS_STATUS)) != 0)
+    {
+        if (!bcmolt_prbs_status_unpack(&this->prbs_status, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_us_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_CFG_ID_DEFAULT_FEC_STATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_CFG_ID_SYNC_TIME_TQ)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_CFG_ID_PRBS_CHECKER)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_CFG_ID_PRBS_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 5))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_us_cfg_data_bounds_check(const bcmolt_epon_path_1g_us_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_1g_us_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_CFG_ID_DEFAULT_FEC_STATE)) != 0)
+    {
+        switch (this->default_fec_state)
+        {
+            case BCMOLT_EPON_FEC_EN_STATE_DISABLED:
+                break;
+            case BCMOLT_EPON_FEC_EN_STATE_ENABLED:
+                break;
+            default:
+                *failed_prop = BCMOLT_EPON_PATH_1G_US_CFG_ID_DEFAULT_FEC_STATE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_CFG_ID_SYNC_TIME_TQ)) != 0)
+    {
+        if (this->sync_time_tq > (bcmolt_time_quanta) 65535UL)
+        {
+            *failed_prop = BCMOLT_EPON_PATH_1G_US_CFG_ID_SYNC_TIME_TQ;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_CFG_ID_PRBS_CHECKER)) != 0)
+    {
+        if (!bcmolt_prbs_checker_config_bounds_check(&this->prbs_checker))
+        {
+            *failed_prop = BCMOLT_EPON_PATH_1G_US_CFG_ID_PRBS_CHECKER;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_CFG_ID_PRBS_STATUS)) != 0)
+    {
+        if (!bcmolt_prbs_status_bounds_check(&this->prbs_status))
+        {
+            *failed_prop = BCMOLT_EPON_PATH_1G_US_CFG_ID_PRBS_STATUS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_path_1g_us_stat_data_set_default(bcmolt_epon_path_1g_us_stat_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_BYTES)) != 0)
+    {
+        this->bytes = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES)) != 0)
+    {
+        this->frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_64)) != 0)
+    {
+        this->frames_64 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_65_127)) != 0)
+    {
+        this->frames_65_127 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_128_255)) != 0)
+    {
+        this->frames_128_255 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_256_511)) != 0)
+    {
+        this->frames_256_511 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_512_1023)) != 0)
+    {
+        this->frames_512_1023 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_1024_1518)) != 0)
+    {
+        this->frames_1024_1518 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_1519_2047)) != 0)
+    {
+        this->frames_1519_2047 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_2048_4095)) != 0)
+    {
+        this->frames_2048_4095 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_4096_9216)) != 0)
+    {
+        this->frames_4096_9216 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_9217_16383)) != 0)
+    {
+        this->frames_9217_16383 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_BROADCAST_FRAMES)) != 0)
+    {
+        this->broadcast_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_DATA_BYTES)) != 0)
+    {
+        this->data_bytes = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_MULTICAST_FRAMES)) != 0)
+    {
+        this->multicast_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_UNICAST_FRAMES)) != 0)
+    {
+        this->unicast_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_MPCP_FRAMES)) != 0)
+    {
+        this->mpcp_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_OAM_BYTES)) != 0)
+    {
+        this->oam_bytes = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_OAM_FRAMES)) != 0)
+    {
+        this->oam_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_REPORT_FRAMES)) != 0)
+    {
+        this->report_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_ABORT_FRAMES)) != 0)
+    {
+        this->abort_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FCS_ERROR)) != 0)
+    {
+        this->fcs_error = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_CRC_8_ERROR)) != 0)
+    {
+        this->crc_8_error = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_OUT_OF_SLOT)) != 0)
+    {
+        this->out_of_slot = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_OVERSIZE_ERROR)) != 0)
+    {
+        this->oversize_error = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_RUNT_ERROR)) != 0)
+    {
+        this->runt_error = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_us_stat_data_pack(const bcmolt_epon_path_1g_us_stat_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_64)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_64))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_65_127)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_65_127))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_128_255)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_128_255))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_256_511)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_256_511))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_512_1023)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_512_1023))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_1024_1518)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_1024_1518))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_1519_2047)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_1519_2047))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_2048_4095)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_2048_4095))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_4096_9216)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_4096_9216))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_9217_16383)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->frames_9217_16383))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_BROADCAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->broadcast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_DATA_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->data_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_MULTICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->multicast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_UNICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->unicast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_MPCP_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->mpcp_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_OAM_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->oam_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_OAM_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->oam_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_REPORT_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->report_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_ABORT_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->abort_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FCS_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->fcs_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_CRC_8_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->crc_8_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_OUT_OF_SLOT)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->out_of_slot))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_OVERSIZE_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->oversize_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_RUNT_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->runt_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_path_1g_us_stat_data_get_packed_length(const bcmolt_epon_path_1g_us_stat_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_BYTES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_64)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_65_127)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_128_255)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_256_511)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_512_1023)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_1024_1518)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_1519_2047)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_2048_4095)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_4096_9216)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_9217_16383)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_BROADCAST_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_DATA_BYTES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_MULTICAST_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_UNICAST_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_MPCP_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_OAM_BYTES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_OAM_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_REPORT_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_ABORT_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FCS_ERROR)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_CRC_8_ERROR)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_OUT_OF_SLOT)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_OVERSIZE_ERROR)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_RUNT_ERROR)) != 0)
+    {
+        count += 8;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_us_stat_data_unpack(bcmolt_epon_path_1g_us_stat_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_64)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_64))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_65_127)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_65_127))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_128_255)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_128_255))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_256_511)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_256_511))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_512_1023)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_512_1023))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_1024_1518)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_1024_1518))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_1519_2047)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_1519_2047))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_2048_4095)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_2048_4095))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_4096_9216)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_4096_9216))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_9217_16383)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->frames_9217_16383))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_BROADCAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->broadcast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_DATA_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->data_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_MULTICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->multicast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_UNICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->unicast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_MPCP_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->mpcp_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_OAM_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->oam_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_OAM_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->oam_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_REPORT_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->report_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_ABORT_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->abort_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FCS_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->fcs_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_CRC_8_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->crc_8_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_OUT_OF_SLOT)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->out_of_slot))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_OVERSIZE_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->oversize_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_RUNT_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->runt_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_us_stat_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_64)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_65_127)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_128_255)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_256_511)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_512_1023)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_1024_1518)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_1519_2047)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_2048_4095)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_4096_9216)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_9217_16383)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_BROADCAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_DATA_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_MULTICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_UNICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_MPCP_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_OAM_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_OAM_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_REPORT_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_ABORT_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_FCS_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_CRC_8_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_OUT_OF_SLOT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_OVERSIZE_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ID_RUNT_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_us_stat_data_bounds_check(const bcmolt_epon_path_1g_us_stat_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_1g_us_stat_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_path_1g_us_stat_cfg_data_set_default(bcmolt_epon_path_1g_us_stat_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_CFG_ID_CFG)) != 0)
+    {
+        this->cfg.trigger.type = BCMOLT_STAT_CONDITION_TYPE_NONE;
+        this->cfg.soak.active_soak_time = 0;
+        this->cfg.soak.clear_soak_time = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_us_stat_cfg_data_pack(const bcmolt_epon_path_1g_us_stat_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_pack(&this->cfg, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_path_1g_us_stat_cfg_data_get_packed_length(const bcmolt_epon_path_1g_us_stat_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_CFG_ID_CFG)) != 0)
+    {
+        count += bcmolt_stat_alarm_config_get_packed_length(&this->cfg);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_us_stat_cfg_data_unpack(bcmolt_epon_path_1g_us_stat_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_unpack(&this->cfg, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_us_stat_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_us_stat_cfg_data_bounds_check(const bcmolt_epon_path_1g_us_stat_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_1g_us_stat_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_bounds_check(&this->cfg))
+        {
+            *failed_prop = BCMOLT_EPON_PATH_1G_US_STAT_CFG_ID_CFG;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_path_1g_us_stat_alarm_cleared_data_set_default(bcmolt_epon_path_1g_us_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        this->stat = BCMOLT_EPON_PATH_1G_US_STAT_ID_BYTES;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_us_stat_alarm_cleared_data_pack(const bcmolt_epon_path_1g_us_stat_alarm_cleared_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_epon_path_1g_us_stat_id_pack(this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_path_1g_us_stat_alarm_cleared_data_get_packed_length(const bcmolt_epon_path_1g_us_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_us_stat_alarm_cleared_data_unpack(bcmolt_epon_path_1g_us_stat_alarm_cleared_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_epon_path_1g_us_stat_id_unpack(&this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_us_stat_alarm_cleared_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_us_stat_alarm_cleared_data_bounds_check(const bcmolt_epon_path_1g_us_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_1g_us_stat_alarm_cleared_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        switch (this->stat)
+        {
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_BYTES:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_64:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_65_127:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_128_255:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_256_511:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_512_1023:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_1024_1518:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_1519_2047:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_2048_4095:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_4096_9216:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_9217_16383:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_BROADCAST_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_DATA_BYTES:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_MULTICAST_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_UNICAST_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_MPCP_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_OAM_BYTES:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_OAM_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_REPORT_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_ABORT_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_FCS_ERROR:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_CRC_8_ERROR:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_OUT_OF_SLOT:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_OVERSIZE_ERROR:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_RUNT_ERROR:
+                break;
+            default:
+                *failed_prop = BCMOLT_EPON_PATH_1G_US_STAT_ALARM_CLEARED_ID_STAT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_path_1g_us_stat_alarm_raised_data_set_default(bcmolt_epon_path_1g_us_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        this->stat = BCMOLT_EPON_PATH_1G_US_STAT_ID_BYTES;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_us_stat_alarm_raised_data_pack(const bcmolt_epon_path_1g_us_stat_alarm_raised_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_epon_path_1g_us_stat_id_pack(this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_path_1g_us_stat_alarm_raised_data_get_packed_length(const bcmolt_epon_path_1g_us_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_us_stat_alarm_raised_data_unpack(bcmolt_epon_path_1g_us_stat_alarm_raised_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_epon_path_1g_us_stat_id_unpack(&this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_us_stat_alarm_raised_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_us_stat_alarm_raised_data_bounds_check(const bcmolt_epon_path_1g_us_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_1g_us_stat_alarm_raised_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        switch (this->stat)
+        {
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_BYTES:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_64:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_65_127:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_128_255:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_256_511:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_512_1023:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_1024_1518:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_1519_2047:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_2048_4095:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_4096_9216:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_FRAMES_9217_16383:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_BROADCAST_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_DATA_BYTES:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_MULTICAST_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_UNICAST_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_MPCP_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_OAM_BYTES:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_OAM_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_REPORT_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_ABORT_FRAMES:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_FCS_ERROR:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_CRC_8_ERROR:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_OUT_OF_SLOT:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_OVERSIZE_ERROR:
+                break;
+            case BCMOLT_EPON_PATH_1G_US_STAT_ID_RUNT_ERROR:
+                break;
+            default:
+                *failed_prop = BCMOLT_EPON_PATH_1G_US_STAT_ALARM_RAISED_ID_STAT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_path_1g_us_auto_cfg_data_set_default(bcmolt_epon_path_1g_us_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        this->stat_alarm_cleared = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        this->stat_alarm_raised = BCMOS_FALSE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_us_auto_cfg_data_pack(const bcmolt_epon_path_1g_us_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->stat_alarm_cleared))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->stat_alarm_raised))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_path_1g_us_auto_cfg_data_get_packed_length(const bcmolt_epon_path_1g_us_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_us_auto_cfg_data_unpack(bcmolt_epon_path_1g_us_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->stat_alarm_cleared))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->stat_alarm_raised))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_us_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_PATH_1G_US_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_path_1g_us_auto_cfg_data_bounds_check(const bcmolt_epon_path_1g_us_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_1g_us_auto_cfg_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_rp_key_set_default(bcmolt_epon_rp_key *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_KEY_ID_EPON_NI)) != 0)
+    {
+        this->epon_ni = (bcmolt_epon_ni) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_KEY_ID_LINK_RATE)) != 0)
+    {
+        this->link_rate = BCMOLT_EPON_LINK_RATE_TEN_TEN;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_rp_key_pack(const bcmolt_epon_rp_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_KEY_ID_EPON_NI)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->epon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_KEY_ID_LINK_RATE)) != 0)
+    {
+        if (!bcmolt_epon_link_rate_pack(this->link_rate, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_rp_key_get_packed_length(const bcmolt_epon_rp_key *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_KEY_ID_EPON_NI)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_KEY_ID_LINK_RATE)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_rp_key_unpack(bcmolt_epon_rp_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_KEY_ID_EPON_NI)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->epon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_KEY_ID_LINK_RATE)) != 0)
+    {
+        if (!bcmolt_epon_link_rate_unpack(&this->link_rate, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_rp_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_KEY_ID_EPON_NI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_KEY_ID_LINK_RATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_rp_key_bounds_check(const bcmolt_epon_rp_key *this, bcmolt_presence_mask fields_present, bcmolt_epon_rp_key_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_KEY_ID_LINK_RATE)) != 0)
+    {
+        switch (this->link_rate)
+        {
+            case BCMOLT_EPON_LINK_RATE_TEN_TEN:
+                break;
+            case BCMOLT_EPON_LINK_RATE_TEN_ONE:
+                break;
+            case BCMOLT_EPON_LINK_RATE_ONE_ONE:
+                break;
+            default:
+                *failed_prop = BCMOLT_EPON_RP_KEY_ID_LINK_RATE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_epon_rp_cfg_data_set_default(bcmolt_epon_rp_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_CFG_ID_BASE_LLID)) != 0)
+    {
+        this->base_llid = (bcmolt_epon_llid) 15360;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_CFG_ID_MPCP_DISC_EN)) != 0)
+    {
+        this->mpcp_disc_en = BCMOS_TRUE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_CFG_ID_MPCP_DISC_GNT_LEN_TQ)) != 0)
+    {
+        this->mpcp_disc_gnt_len_tq = (bcmolt_time_quanta) 8160;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_CFG_ID_MPCP_REPORT_TIMEOUT)) != 0)
+    {
+        this->mpcp_report_timeout = 50;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_CFG_ID_MAX_MPCP_REG_PER_DISC_WINDOW)) != 0)
+    {
+        this->max_mpcp_reg_per_disc_window = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_CFG_ID_MAX_LINKS)) != 0)
+    {
+        this->max_links = 256;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_CFG_ID_DEFAULT_UPSTREAM_BANDWIDTH)) != 0)
+    {
+        this->default_upstream_bandwidth.polling_interval_us = BCMOLT_POLLING_INTERVAL_AUTOMATIC;
+        this->default_upstream_bandwidth.grant_threshold_tq = (bcmolt_time_quanta) 0;
+        this->default_upstream_bandwidth.min_schedulershaper.bandwidth_Kbps = (bcmolt_bandwidth_Kbps) 0;
+        this->default_upstream_bandwidth.min_schedulershaper.max_burst_size_tq = (bcmolt_time_quanta) 0;
+        this->default_upstream_bandwidth.min_schedulershaper.priority = 0;
+        this->default_upstream_bandwidth.min_schedulershaper.weight_tq = (bcmolt_time_quanta) 0;
+        this->default_upstream_bandwidth.max_schedulershaper.bandwidth_Kbps = (bcmolt_bandwidth_Kbps) 0;
+        this->default_upstream_bandwidth.max_schedulershaper.max_burst_size_tq = (bcmolt_time_quanta) 0;
+        this->default_upstream_bandwidth.max_schedulershaper.priority = 0;
+        this->default_upstream_bandwidth.max_schedulershaper.weight_tq = (bcmolt_time_quanta) 0;
+        this->default_upstream_bandwidth.tdm_grant_size_tq = (bcmolt_time_quanta) 0;
+        this->default_upstream_bandwidth.tdm_grant_interval_us = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_CFG_ID_RATE_OF_REFRACTION)) != 0)
+    {
+        this->rate_of_refraction = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_rp_cfg_data_pack(const bcmolt_epon_rp_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_CFG_ID_BASE_LLID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->base_llid))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_CFG_ID_MPCP_DISC_EN)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->mpcp_disc_en))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_CFG_ID_MPCP_DISC_GNT_LEN_TQ)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, (uint32_t) this->mpcp_disc_gnt_len_tq))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_CFG_ID_MPCP_REPORT_TIMEOUT)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, this->mpcp_report_timeout))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_CFG_ID_MAX_MPCP_REG_PER_DISC_WINDOW)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, this->max_mpcp_reg_per_disc_window))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_CFG_ID_MAX_LINKS)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, this->max_links))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_CFG_ID_DEFAULT_UPSTREAM_BANDWIDTH)) != 0)
+    {
+        if (!bcmolt_upstream_bandwidth_distribution_pack(&this->default_upstream_bandwidth, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_CFG_ID_RATE_OF_REFRACTION)) != 0)
+    {
+        if (!bcmolt_buf_write_double(buf, this->rate_of_refraction))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_epon_rp_cfg_data_get_packed_length(const bcmolt_epon_rp_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_CFG_ID_BASE_LLID)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_CFG_ID_MPCP_DISC_EN)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_CFG_ID_MPCP_DISC_GNT_LEN_TQ)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_CFG_ID_MPCP_REPORT_TIMEOUT)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_CFG_ID_MAX_MPCP_REG_PER_DISC_WINDOW)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_CFG_ID_MAX_LINKS)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_CFG_ID_DEFAULT_UPSTREAM_BANDWIDTH)) != 0)
+    {
+        count += 42;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_CFG_ID_RATE_OF_REFRACTION)) != 0)
+    {
+        count += 8;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_rp_cfg_data_unpack(bcmolt_epon_rp_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_CFG_ID_BASE_LLID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->base_llid))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_CFG_ID_MPCP_DISC_EN)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->mpcp_disc_en))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_CFG_ID_MPCP_DISC_GNT_LEN_TQ)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, (uint32_t *) &this->mpcp_disc_gnt_len_tq))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_CFG_ID_MPCP_REPORT_TIMEOUT)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, &this->mpcp_report_timeout))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_CFG_ID_MAX_MPCP_REG_PER_DISC_WINDOW)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, &this->max_mpcp_reg_per_disc_window))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_CFG_ID_MAX_LINKS)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, &this->max_links))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_CFG_ID_DEFAULT_UPSTREAM_BANDWIDTH)) != 0)
+    {
+        if (!bcmolt_upstream_bandwidth_distribution_unpack(&this->default_upstream_bandwidth, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_CFG_ID_RATE_OF_REFRACTION)) != 0)
+    {
+        if (!bcmolt_buf_read_double(buf, &this->rate_of_refraction))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_rp_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_CFG_ID_BASE_LLID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_CFG_ID_MPCP_DISC_EN)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_CFG_ID_MPCP_DISC_GNT_LEN_TQ)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_CFG_ID_MPCP_REPORT_TIMEOUT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_CFG_ID_MAX_MPCP_REG_PER_DISC_WINDOW)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_CFG_ID_MAX_LINKS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_CFG_ID_DEFAULT_UPSTREAM_BANDWIDTH)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 42))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_CFG_ID_RATE_OF_REFRACTION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_epon_rp_cfg_data_bounds_check(const bcmolt_epon_rp_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_rp_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_CFG_ID_BASE_LLID)) != 0)
+    {
+        if (this->base_llid > (bcmolt_epon_llid) 32511)
+        {
+            *failed_prop = BCMOLT_EPON_RP_CFG_ID_BASE_LLID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_CFG_ID_MPCP_DISC_GNT_LEN_TQ)) != 0)
+    {
+        if (this->mpcp_disc_gnt_len_tq < (bcmolt_time_quanta) 5)
+        {
+            *failed_prop = BCMOLT_EPON_RP_CFG_ID_MPCP_DISC_GNT_LEN_TQ;
+            return BCMOS_FALSE;
+        }
+
+        if (this->mpcp_disc_gnt_len_tq > (bcmolt_time_quanta) 65535UL)
+        {
+            *failed_prop = BCMOLT_EPON_RP_CFG_ID_MPCP_DISC_GNT_LEN_TQ;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_CFG_ID_MAX_LINKS)) != 0)
+    {
+        if (this->max_links > 2046)
+        {
+            *failed_prop = BCMOLT_EPON_RP_CFG_ID_MAX_LINKS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_EPON_RP_CFG_ID_DEFAULT_UPSTREAM_BANDWIDTH)) != 0)
+    {
+        if (!bcmolt_upstream_bandwidth_distribution_bounds_check(&this->default_upstream_bandwidth))
+        {
+            *failed_prop = BCMOLT_EPON_RP_CFG_ID_DEFAULT_UPSTREAM_BANDWIDTH;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpio_key_set_default(bcmolt_gpio_key *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPIO_KEY_ID_RESERVED)) != 0)
+    {
+        this->reserved = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPIO_KEY_ID_GPIO_ID)) != 0)
+    {
+        this->gpio_id = BCMOLT_GPIO_PIN_PIN0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpio_key_pack(const bcmolt_gpio_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPIO_KEY_ID_RESERVED)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->reserved))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPIO_KEY_ID_GPIO_ID)) != 0)
+    {
+        if (!bcmolt_gpio_pin_pack(this->gpio_id, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpio_key_get_packed_length(const bcmolt_gpio_key *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPIO_KEY_ID_RESERVED)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPIO_KEY_ID_GPIO_ID)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpio_key_unpack(bcmolt_gpio_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPIO_KEY_ID_RESERVED)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->reserved))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPIO_KEY_ID_GPIO_ID)) != 0)
+    {
+        if (!bcmolt_gpio_pin_unpack(&this->gpio_id, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpio_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPIO_KEY_ID_RESERVED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPIO_KEY_ID_GPIO_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpio_key_bounds_check(const bcmolt_gpio_key *this, bcmolt_presence_mask fields_present, bcmolt_gpio_key_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPIO_KEY_ID_GPIO_ID)) != 0)
+    {
+        switch (this->gpio_id)
+        {
+            case BCMOLT_GPIO_PIN_PIN0:
+                break;
+            case BCMOLT_GPIO_PIN_PIN1:
+                break;
+            case BCMOLT_GPIO_PIN_PIN2:
+                break;
+            case BCMOLT_GPIO_PIN_PIN3:
+                break;
+            case BCMOLT_GPIO_PIN_PIN4:
+                break;
+            case BCMOLT_GPIO_PIN_PIN5:
+                break;
+            case BCMOLT_GPIO_PIN_PIN6:
+                break;
+            case BCMOLT_GPIO_PIN_PIN7:
+                break;
+            case BCMOLT_GPIO_PIN_PIN8:
+                break;
+            case BCMOLT_GPIO_PIN_PIN9:
+                break;
+            case BCMOLT_GPIO_PIN_PIN10:
+                break;
+            case BCMOLT_GPIO_PIN_PIN11:
+                break;
+            case BCMOLT_GPIO_PIN_PIN12:
+                break;
+            case BCMOLT_GPIO_PIN_PIN13:
+                break;
+            case BCMOLT_GPIO_PIN_PIN14:
+                break;
+            case BCMOLT_GPIO_PIN_PIN15:
+                break;
+            case BCMOLT_GPIO_PIN_PIN16:
+                break;
+            case BCMOLT_GPIO_PIN_PIN17:
+                break;
+            case BCMOLT_GPIO_PIN_PIN18:
+                break;
+            case BCMOLT_GPIO_PIN_PIN19:
+                break;
+            case BCMOLT_GPIO_PIN_PIN20:
+                break;
+            case BCMOLT_GPIO_PIN_PIN21:
+                break;
+            case BCMOLT_GPIO_PIN_PIN22:
+                break;
+            case BCMOLT_GPIO_PIN_PIN23:
+                break;
+            case BCMOLT_GPIO_PIN_PIN24:
+                break;
+            case BCMOLT_GPIO_PIN_PIN25:
+                break;
+            case BCMOLT_GPIO_PIN_PIN26:
+                break;
+            case BCMOLT_GPIO_PIN_PIN27:
+                break;
+            case BCMOLT_GPIO_PIN_PIN28:
+                break;
+            case BCMOLT_GPIO_PIN_PIN29:
+                break;
+            case BCMOLT_GPIO_PIN_PIN30:
+                break;
+            case BCMOLT_GPIO_PIN_PIN31:
+                break;
+            case BCMOLT_GPIO_PIN_PIN32:
+                break;
+            case BCMOLT_GPIO_PIN_PIN33:
+                break;
+            case BCMOLT_GPIO_PIN_PIN34:
+                break;
+            case BCMOLT_GPIO_PIN_PIN35:
+                break;
+            case BCMOLT_GPIO_PIN_PIN36:
+                break;
+            case BCMOLT_GPIO_PIN_PIN37:
+                break;
+            case BCMOLT_GPIO_PIN_PIN38:
+                break;
+            case BCMOLT_GPIO_PIN_PIN39:
+                break;
+            case BCMOLT_GPIO_PIN_PIN40:
+                break;
+            case BCMOLT_GPIO_PIN_PIN41:
+                break;
+            case BCMOLT_GPIO_PIN_PIN42:
+                break;
+            case BCMOLT_GPIO_PIN_PIN43:
+                break;
+            case BCMOLT_GPIO_PIN_PIN44:
+                break;
+            case BCMOLT_GPIO_PIN_PIN45:
+                break;
+            case BCMOLT_GPIO_PIN_PIN46:
+                break;
+            case BCMOLT_GPIO_PIN_PIN47:
+                break;
+            case BCMOLT_GPIO_PIN_PIN48:
+                break;
+            case BCMOLT_GPIO_PIN_PIN49:
+                break;
+            case BCMOLT_GPIO_PIN_PIN50:
+                break;
+            case BCMOLT_GPIO_PIN_PIN51:
+                break;
+            case BCMOLT_GPIO_PIN_PIN52:
+                break;
+            case BCMOLT_GPIO_PIN_PIN53:
+                break;
+            case BCMOLT_GPIO_PIN_PIN54:
+                break;
+            case BCMOLT_GPIO_PIN_PIN55:
+                break;
+            case BCMOLT_GPIO_PIN_PIN56:
+                break;
+            case BCMOLT_GPIO_PIN_PIN57:
+                break;
+            case BCMOLT_GPIO_PIN_PIN58:
+                break;
+            case BCMOLT_GPIO_PIN_PIN59:
+                break;
+            case BCMOLT_GPIO_PIN_PIN60:
+                break;
+            case BCMOLT_GPIO_PIN_PIN61:
+                break;
+            case BCMOLT_GPIO_PIN_PIN62:
+                break;
+            case BCMOLT_GPIO_PIN_PIN63:
+                break;
+            case BCMOLT_GPIO_PIN_PIN64:
+                break;
+            case BCMOLT_GPIO_PIN_PIN65:
+                break;
+            case BCMOLT_GPIO_PIN_PIN66:
+                break;
+            case BCMOLT_GPIO_PIN_PIN67:
+                break;
+            case BCMOLT_GPIO_PIN_PIN68:
+                break;
+            case BCMOLT_GPIO_PIN_PIN69:
+                break;
+            case BCMOLT_GPIO_PIN_PIN70:
+                break;
+            case BCMOLT_GPIO_PIN_PIN71:
+                break;
+            case BCMOLT_GPIO_PIN_PIN72:
+                break;
+            case BCMOLT_GPIO_PIN_PIN73:
+                break;
+            case BCMOLT_GPIO_PIN_PIN74:
+                break;
+            case BCMOLT_GPIO_PIN_PIN75:
+                break;
+            case BCMOLT_GPIO_PIN_PIN76:
+                break;
+            case BCMOLT_GPIO_PIN_PIN77:
+                break;
+            case BCMOLT_GPIO_PIN_PIN78:
+                break;
+            case BCMOLT_GPIO_PIN_PIN79:
+                break;
+            case BCMOLT_GPIO_PIN_PIN80:
+                break;
+            case BCMOLT_GPIO_PIN_PIN81:
+                break;
+            case BCMOLT_GPIO_PIN_PIN82:
+                break;
+            case BCMOLT_GPIO_PIN_PIN83:
+                break;
+            case BCMOLT_GPIO_PIN_PIN84:
+                break;
+            case BCMOLT_GPIO_PIN_PIN85:
+                break;
+            case BCMOLT_GPIO_PIN_PIN86:
+                break;
+            case BCMOLT_GPIO_PIN_PIN87:
+                break;
+            case BCMOLT_GPIO_PIN_PIN88:
+                break;
+            case BCMOLT_GPIO_PIN_PIN89:
+                break;
+            case BCMOLT_GPIO_PIN_PIN90:
+                break;
+            case BCMOLT_GPIO_PIN_PIN91:
+                break;
+            case BCMOLT_GPIO_PIN_PIN92:
+                break;
+            case BCMOLT_GPIO_PIN_PIN93:
+                break;
+            case BCMOLT_GPIO_PIN_PIN94:
+                break;
+            case BCMOLT_GPIO_PIN_PIN95:
+                break;
+            case BCMOLT_GPIO_PIN_PIN96:
+                break;
+            case BCMOLT_GPIO_PIN_PIN97:
+                break;
+            case BCMOLT_GPIO_PIN_PIN98:
+                break;
+            case BCMOLT_GPIO_PIN_PIN99:
+                break;
+            case BCMOLT_GPIO_PIN_PIN100:
+                break;
+            case BCMOLT_GPIO_PIN_PIN101:
+                break;
+            case BCMOLT_GPIO_PIN_PIN102:
+                break;
+            case BCMOLT_GPIO_PIN_PIN103:
+                break;
+            case BCMOLT_GPIO_PIN_PIN104:
+                break;
+            case BCMOLT_GPIO_PIN_PIN105:
+                break;
+            case BCMOLT_GPIO_PIN_PIN106:
+                break;
+            case BCMOLT_GPIO_PIN_UNCONFIGURED:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPIO_KEY_ID_GPIO_ID;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpio_cfg_data_set_default(bcmolt_gpio_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPIO_CFG_ID_DIRECTION)) != 0)
+    {
+        this->direction = BCMOLT_GPIO_PIN_DIR_INPUT;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPIO_CFG_ID_VALUE)) != 0)
+    {
+        this->value = BCMOLT_GPIO_VALUE_CLEAR;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpio_cfg_data_pack(const bcmolt_gpio_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPIO_CFG_ID_DIRECTION)) != 0)
+    {
+        if (!bcmolt_gpio_pin_dir_pack(this->direction, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPIO_CFG_ID_VALUE)) != 0)
+    {
+        if (!bcmolt_gpio_value_pack(this->value, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpio_cfg_data_get_packed_length(const bcmolt_gpio_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPIO_CFG_ID_DIRECTION)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPIO_CFG_ID_VALUE)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpio_cfg_data_unpack(bcmolt_gpio_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPIO_CFG_ID_DIRECTION)) != 0)
+    {
+        if (!bcmolt_gpio_pin_dir_unpack(&this->direction, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPIO_CFG_ID_VALUE)) != 0)
+    {
+        if (!bcmolt_gpio_value_unpack(&this->value, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpio_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPIO_CFG_ID_DIRECTION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPIO_CFG_ID_VALUE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpio_cfg_data_bounds_check(const bcmolt_gpio_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_gpio_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPIO_CFG_ID_DIRECTION)) != 0)
+    {
+        switch (this->direction)
+        {
+            case BCMOLT_GPIO_PIN_DIR_INPUT:
+                break;
+            case BCMOLT_GPIO_PIN_DIR_OUTPUT:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPIO_CFG_ID_DIRECTION;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPIO_CFG_ID_VALUE)) != 0)
+    {
+        switch (this->value)
+        {
+            case BCMOLT_GPIO_VALUE_CLEAR:
+                break;
+            case BCMOLT_GPIO_VALUE_SET:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPIO_CFG_ID_VALUE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_alloc_key_set_default(bcmolt_gpon_alloc_key *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_KEY_ID_PON_NI)) != 0)
+    {
+        this->pon_ni = (bcmolt_gpon_ni) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_KEY_ID_ALLOC_ID)) != 0)
+    {
+        this->alloc_id = (bcmolt_gpon_alloc_id) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_key_pack(const bcmolt_gpon_alloc_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, (uint8_t) this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_KEY_ID_ALLOC_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->alloc_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_alloc_key_get_packed_length(const bcmolt_gpon_alloc_key *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_KEY_ID_PON_NI)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_KEY_ID_ALLOC_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_key_unpack(bcmolt_gpon_alloc_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, (uint8_t *) &this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_KEY_ID_ALLOC_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->alloc_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_KEY_ID_ALLOC_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_key_bounds_check(const bcmolt_gpon_alloc_key *this, bcmolt_presence_mask fields_present, bcmolt_gpon_alloc_key_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_KEY_ID_PON_NI)) != 0)
+    {
+        if (this->pon_ni > (bcmolt_gpon_ni) 15)
+        {
+            *failed_prop = BCMOLT_GPON_ALLOC_KEY_ID_PON_NI;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_KEY_ID_ALLOC_ID)) != 0)
+    {
+        if (this->alloc_id > (bcmolt_gpon_alloc_id) 4095)
+        {
+            *failed_prop = BCMOLT_GPON_ALLOC_KEY_ID_ALLOC_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_alloc_cfg_data_set_default(bcmolt_gpon_alloc_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_CFG_ID_STATE)) != 0)
+    {
+        this->state = BCMOLT_ALLOC_STATE_NOT_CONFIGURED;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_CFG_ID_SLA)) != 0)
+    {
+        this->sla.cbr_rt_bw = 0;
+        this->sla.cbr_nrt_bw = 0;
+        this->sla.guaranteed_bw = 0;
+        this->sla.maximum_bw = 0;
+        this->sla.additional_bw_eligibility = BCMOLT_ADDITIONAL_BW_ELIGIBILITY_NONE;
+        this->sla.cbr_rt_compensation = BCMOS_FALSE;
+        this->sla.cbr_rt_ap_index = 0;
+        this->sla.cbr_nrt_ap_index = 0;
+        this->sla.alloc_type = BCMOLT_ALLOC_TYPE_NONE;
+        this->sla.weight = 0;
+        this->sla.priority = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_CFG_ID_ONU_ID)) != 0)
+    {
+        this->onu_id = (bcmolt_gpon_onu_id) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_CFG_ID_COLLECT_STATS)) != 0)
+    {
+        this->collect_stats = BCMOS_FALSE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_cfg_data_pack(const bcmolt_gpon_alloc_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_CFG_ID_STATE)) != 0)
+    {
+        if (!bcmolt_alloc_state_pack(this->state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_CFG_ID_SLA)) != 0)
+    {
+        if (!bcmolt_pon_alloc_sla_pack(&this->sla, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_CFG_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->onu_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_CFG_ID_COLLECT_STATS)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->collect_stats))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_alloc_cfg_data_get_packed_length(const bcmolt_gpon_alloc_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_CFG_ID_STATE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_CFG_ID_SLA)) != 0)
+    {
+        count += 23;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_CFG_ID_ONU_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_CFG_ID_COLLECT_STATS)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_cfg_data_unpack(bcmolt_gpon_alloc_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_CFG_ID_STATE)) != 0)
+    {
+        if (!bcmolt_alloc_state_unpack(&this->state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_CFG_ID_SLA)) != 0)
+    {
+        if (!bcmolt_pon_alloc_sla_unpack(&this->sla, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_CFG_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->onu_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_CFG_ID_COLLECT_STATS)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->collect_stats))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_CFG_ID_STATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_CFG_ID_SLA)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 23))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_CFG_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_CFG_ID_COLLECT_STATS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_cfg_data_bounds_check(const bcmolt_gpon_alloc_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_alloc_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_CFG_ID_STATE)) != 0)
+    {
+        switch (this->state)
+        {
+            case BCMOLT_ALLOC_STATE_NOT_CONFIGURED:
+                break;
+            case BCMOLT_ALLOC_STATE_INACTIVE:
+                break;
+            case BCMOLT_ALLOC_STATE_PROCESSING:
+                break;
+            case BCMOLT_ALLOC_STATE_ACTIVE:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_ALLOC_CFG_ID_STATE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_CFG_ID_SLA)) != 0)
+    {
+        if (!bcmolt_pon_alloc_sla_bounds_check(&this->sla))
+        {
+            *failed_prop = BCMOLT_GPON_ALLOC_CFG_ID_SLA;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_CFG_ID_ONU_ID)) != 0)
+    {
+        if (this->onu_id > (bcmolt_gpon_onu_id) 127)
+        {
+            *failed_prop = BCMOLT_GPON_ALLOC_CFG_ID_ONU_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_alloc_stat_data_set_default(bcmolt_gpon_alloc_stat_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_STAT_ID_RX_BYTES)) != 0)
+    {
+        this->rx_bytes = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_stat_data_pack(const bcmolt_gpon_alloc_stat_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_STAT_ID_RX_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_alloc_stat_data_get_packed_length(const bcmolt_gpon_alloc_stat_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_STAT_ID_RX_BYTES)) != 0)
+    {
+        count += 8;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_stat_data_unpack(bcmolt_gpon_alloc_stat_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_STAT_ID_RX_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_stat_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_STAT_ID_RX_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_stat_data_bounds_check(const bcmolt_gpon_alloc_stat_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_alloc_stat_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_alloc_stat_cfg_data_set_default(bcmolt_gpon_alloc_stat_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_STAT_CFG_ID_CFG)) != 0)
+    {
+        this->cfg.trigger.type = BCMOLT_STAT_CONDITION_TYPE_NONE;
+        this->cfg.soak.active_soak_time = 0;
+        this->cfg.soak.clear_soak_time = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_stat_cfg_data_pack(const bcmolt_gpon_alloc_stat_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_pack(&this->cfg, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_alloc_stat_cfg_data_get_packed_length(const bcmolt_gpon_alloc_stat_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_STAT_CFG_ID_CFG)) != 0)
+    {
+        count += bcmolt_stat_alarm_config_get_packed_length(&this->cfg);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_stat_cfg_data_unpack(bcmolt_gpon_alloc_stat_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_unpack(&this->cfg, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_stat_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_stat_cfg_data_bounds_check(const bcmolt_gpon_alloc_stat_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_alloc_stat_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_bounds_check(&this->cfg))
+        {
+            *failed_prop = BCMOLT_GPON_ALLOC_STAT_CFG_ID_CFG;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_alloc_configuration_completed_data_set_default(bcmolt_gpon_alloc_configuration_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_CONFIGURATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        this->status = BCMOLT_RESULT_SUCCESS;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_CONFIGURATION_COMPLETED_ID_NEW_STATE)) != 0)
+    {
+        this->new_state = BCMOLT_ALLOC_STATE_NOT_CONFIGURED;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_configuration_completed_data_pack(const bcmolt_gpon_alloc_configuration_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_CONFIGURATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_result_pack(this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_CONFIGURATION_COMPLETED_ID_NEW_STATE)) != 0)
+    {
+        if (!bcmolt_alloc_state_pack(this->new_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_alloc_configuration_completed_data_get_packed_length(const bcmolt_gpon_alloc_configuration_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_CONFIGURATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_CONFIGURATION_COMPLETED_ID_NEW_STATE)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_configuration_completed_data_unpack(bcmolt_gpon_alloc_configuration_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_CONFIGURATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_result_unpack(&this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_CONFIGURATION_COMPLETED_ID_NEW_STATE)) != 0)
+    {
+        if (!bcmolt_alloc_state_unpack(&this->new_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_configuration_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_CONFIGURATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_CONFIGURATION_COMPLETED_ID_NEW_STATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_configuration_completed_data_bounds_check(const bcmolt_gpon_alloc_configuration_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_alloc_configuration_completed_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_CONFIGURATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        switch (this->status)
+        {
+            case BCMOLT_RESULT_SUCCESS:
+                break;
+            case BCMOLT_RESULT_FAIL:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_ALLOC_CONFIGURATION_COMPLETED_ID_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_CONFIGURATION_COMPLETED_ID_NEW_STATE)) != 0)
+    {
+        switch (this->new_state)
+        {
+            case BCMOLT_ALLOC_STATE_NOT_CONFIGURED:
+                break;
+            case BCMOLT_ALLOC_STATE_INACTIVE:
+                break;
+            case BCMOLT_ALLOC_STATE_PROCESSING:
+                break;
+            case BCMOLT_ALLOC_STATE_ACTIVE:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_ALLOC_CONFIGURATION_COMPLETED_ID_NEW_STATE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_alloc_get_alloc_stats_completed_data_set_default(bcmolt_gpon_alloc_get_alloc_stats_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_STATUS)) != 0)
+    {
+        this->status = BCMOLT_RESULT_SUCCESS;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_AVERAGE_NSR_USED)) != 0)
+    {
+        this->average_nsr_used = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_AVERAGE_NSR_ALLOCATED)) != 0)
+    {
+        this->average_nsr_allocated = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_AVERAGE_SR_REPORT)) != 0)
+    {
+        this->average_sr_report = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_get_alloc_stats_completed_data_pack(const bcmolt_gpon_alloc_get_alloc_stats_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_result_pack(this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_AVERAGE_NSR_USED)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->average_nsr_used))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_AVERAGE_NSR_ALLOCATED)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->average_nsr_allocated))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_AVERAGE_SR_REPORT)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->average_sr_report))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_alloc_get_alloc_stats_completed_data_get_packed_length(const bcmolt_gpon_alloc_get_alloc_stats_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_AVERAGE_NSR_USED)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_AVERAGE_NSR_ALLOCATED)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_AVERAGE_SR_REPORT)) != 0)
+    {
+        count += 4;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_get_alloc_stats_completed_data_unpack(bcmolt_gpon_alloc_get_alloc_stats_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_result_unpack(&this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_AVERAGE_NSR_USED)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->average_nsr_used))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_AVERAGE_NSR_ALLOCATED)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->average_nsr_allocated))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_AVERAGE_SR_REPORT)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->average_sr_report))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_get_alloc_stats_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_AVERAGE_NSR_USED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_AVERAGE_NSR_ALLOCATED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_AVERAGE_SR_REPORT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_get_alloc_stats_completed_data_bounds_check(const bcmolt_gpon_alloc_get_alloc_stats_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_alloc_get_alloc_stats_completed_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_STATUS)) != 0)
+    {
+        switch (this->status)
+        {
+            case BCMOLT_RESULT_SUCCESS:
+                break;
+            case BCMOLT_RESULT_FAIL:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_alloc_stat_alarm_cleared_data_set_default(bcmolt_gpon_alloc_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        this->stat = BCMOLT_GPON_ALLOC_STAT_ID_RX_BYTES;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_stat_alarm_cleared_data_pack(const bcmolt_gpon_alloc_stat_alarm_cleared_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_gpon_alloc_stat_id_pack(this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_alloc_stat_alarm_cleared_data_get_packed_length(const bcmolt_gpon_alloc_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_stat_alarm_cleared_data_unpack(bcmolt_gpon_alloc_stat_alarm_cleared_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_gpon_alloc_stat_id_unpack(&this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_stat_alarm_cleared_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_stat_alarm_cleared_data_bounds_check(const bcmolt_gpon_alloc_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_alloc_stat_alarm_cleared_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        switch (this->stat)
+        {
+            case BCMOLT_GPON_ALLOC_STAT_ID_RX_BYTES:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_ALLOC_STAT_ALARM_CLEARED_ID_STAT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_alloc_stat_alarm_raised_data_set_default(bcmolt_gpon_alloc_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        this->stat = BCMOLT_GPON_ALLOC_STAT_ID_RX_BYTES;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_stat_alarm_raised_data_pack(const bcmolt_gpon_alloc_stat_alarm_raised_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_gpon_alloc_stat_id_pack(this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_alloc_stat_alarm_raised_data_get_packed_length(const bcmolt_gpon_alloc_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_stat_alarm_raised_data_unpack(bcmolt_gpon_alloc_stat_alarm_raised_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_gpon_alloc_stat_id_unpack(&this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_stat_alarm_raised_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_stat_alarm_raised_data_bounds_check(const bcmolt_gpon_alloc_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_alloc_stat_alarm_raised_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        switch (this->stat)
+        {
+            case BCMOLT_GPON_ALLOC_STAT_ID_RX_BYTES:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_ALLOC_STAT_ALARM_RAISED_ID_STAT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_alloc_auto_cfg_data_set_default(bcmolt_gpon_alloc_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_AUTO_CFG_ID_CONFIGURATION_COMPLETED)) != 0)
+    {
+        this->configuration_completed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_AUTO_CFG_ID_GET_ALLOC_STATS_COMPLETED)) != 0)
+    {
+        this->get_alloc_stats_completed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        this->stat_alarm_cleared = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        this->stat_alarm_raised = BCMOS_FALSE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_auto_cfg_data_pack(const bcmolt_gpon_alloc_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_AUTO_CFG_ID_CONFIGURATION_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->configuration_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_AUTO_CFG_ID_GET_ALLOC_STATS_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->get_alloc_stats_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->stat_alarm_cleared))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->stat_alarm_raised))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_alloc_auto_cfg_data_get_packed_length(const bcmolt_gpon_alloc_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_AUTO_CFG_ID_CONFIGURATION_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_AUTO_CFG_ID_GET_ALLOC_STATS_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_auto_cfg_data_unpack(bcmolt_gpon_alloc_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_AUTO_CFG_ID_CONFIGURATION_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->configuration_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_AUTO_CFG_ID_GET_ALLOC_STATS_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->get_alloc_stats_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->stat_alarm_cleared))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->stat_alarm_raised))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_AUTO_CFG_ID_CONFIGURATION_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_AUTO_CFG_ID_GET_ALLOC_STATS_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_auto_cfg_data_bounds_check(const bcmolt_gpon_alloc_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_alloc_auto_cfg_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_alloc_get_stats_data_set_default(bcmolt_gpon_alloc_get_stats_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_GET_STATS_ID_NUM_OF_CYCLES)) != 0)
+    {
+        this->num_of_cycles = 1;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_get_stats_data_pack(const bcmolt_gpon_alloc_get_stats_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_GET_STATS_ID_NUM_OF_CYCLES)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->num_of_cycles))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_alloc_get_stats_data_get_packed_length(const bcmolt_gpon_alloc_get_stats_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_GET_STATS_ID_NUM_OF_CYCLES)) != 0)
+    {
+        count += 4;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_get_stats_data_unpack(bcmolt_gpon_alloc_get_stats_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_GET_STATS_ID_NUM_OF_CYCLES)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->num_of_cycles))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_get_stats_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_GET_STATS_ID_NUM_OF_CYCLES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_get_stats_data_bounds_check(const bcmolt_gpon_alloc_get_stats_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_alloc_get_stats_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_GET_STATS_ID_NUM_OF_CYCLES)) != 0)
+    {
+        if (this->num_of_cycles < 1)
+        {
+            *failed_prop = BCMOLT_GPON_ALLOC_GET_STATS_ID_NUM_OF_CYCLES;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_alloc_set_state_data_set_default(bcmolt_gpon_alloc_set_state_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_SET_STATE_ID_STATE)) != 0)
+    {
+        this->state = BCMOLT_ALLOC_OPERATION_ACTIVATE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_set_state_data_pack(const bcmolt_gpon_alloc_set_state_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_SET_STATE_ID_STATE)) != 0)
+    {
+        if (!bcmolt_alloc_operation_pack(this->state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_alloc_set_state_data_get_packed_length(const bcmolt_gpon_alloc_set_state_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_SET_STATE_ID_STATE)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_set_state_data_unpack(bcmolt_gpon_alloc_set_state_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_SET_STATE_ID_STATE)) != 0)
+    {
+        if (!bcmolt_alloc_operation_unpack(&this->state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_set_state_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_SET_STATE_ID_STATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_alloc_set_state_data_bounds_check(const bcmolt_gpon_alloc_set_state_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_alloc_set_state_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ALLOC_SET_STATE_ID_STATE)) != 0)
+    {
+        switch (this->state)
+        {
+            case BCMOLT_ALLOC_OPERATION_ACTIVATE:
+                break;
+            case BCMOLT_ALLOC_OPERATION_DEACTIVATE:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_ALLOC_SET_STATE_ID_STATE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_gem_port_key_set_default(bcmolt_gpon_gem_port_key *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_KEY_ID_PON_NI)) != 0)
+    {
+        this->pon_ni = (bcmolt_gpon_ni) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_KEY_ID_GEM_PORT_ID)) != 0)
+    {
+        this->gem_port_id = (bcmolt_gpon_gem_id) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_key_pack(const bcmolt_gpon_gem_port_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, (uint8_t) this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_KEY_ID_GEM_PORT_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->gem_port_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_gem_port_key_get_packed_length(const bcmolt_gpon_gem_port_key *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_KEY_ID_PON_NI)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_KEY_ID_GEM_PORT_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_key_unpack(bcmolt_gpon_gem_port_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, (uint8_t *) &this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_KEY_ID_GEM_PORT_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->gem_port_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_KEY_ID_GEM_PORT_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_key_bounds_check(const bcmolt_gpon_gem_port_key *this, bcmolt_presence_mask fields_present, bcmolt_gpon_gem_port_key_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_KEY_ID_PON_NI)) != 0)
+    {
+        if (this->pon_ni > (bcmolt_gpon_ni) 15)
+        {
+            *failed_prop = BCMOLT_GPON_GEM_PORT_KEY_ID_PON_NI;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_KEY_ID_GEM_PORT_ID)) != 0)
+    {
+        if (this->gem_port_id > (bcmolt_gpon_gem_id) 4095)
+        {
+            *failed_prop = BCMOLT_GPON_GEM_PORT_KEY_ID_GEM_PORT_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_gem_port_cfg_data_set_default(bcmolt_gpon_gem_port_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_CONFIGURATION)) != 0)
+    {
+        this->configuration.direction = BCMOLT_GEM_PORT_DIRECTION_DOWNSTREAM;
+        this->configuration.type = BCMOLT_GEM_PORT_TYPE_UNICAST;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_ONU_ID)) != 0)
+    {
+        this->onu_id = (bcmolt_gpon_onu_id) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_GEM_PORT_STATE)) != 0)
+    {
+        this->gem_port_state = BCMOLT_GPON_GEM_PORT_STATE_NOT_CONFIGURED;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_DOWNSTREAM_ENCRYPTION_MODE)) != 0)
+    {
+        this->downstream_encryption_mode = BCMOLT_CONTROL_STATE_DISABLE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_UPSTREAM_DESTINATION_QUEUE)) != 0)
+    {
+        this->upstream_destination_queue = BCMOLT_US_GEM_PORT_DESTINATION_DATA;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_CONTROL)) != 0)
+    {
+        this->control = BCMOLT_CONTROL_STATE_DISABLE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_DEBUG_FLOW_CONFIG)) != 0)
+    {
+        this->debug_flow_config.untagged_flow = BCMOLT_CONTROL_STATE_DISABLE;
+        this->debug_flow_config.untagged_vid = (bcmolt_vlan_id) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_MAC_TABLE_ENTRY_LIMIT)) != 0)
+    {
+        this->mac_table_entry_limit = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_cfg_data_pack(const bcmolt_gpon_gem_port_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_CONFIGURATION)) != 0)
+    {
+        if (!bcmolt_gem_port_configuration_pack(&this->configuration, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->onu_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_GEM_PORT_STATE)) != 0)
+    {
+        if (!bcmolt_gpon_gem_port_state_pack(this->gem_port_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_DOWNSTREAM_ENCRYPTION_MODE)) != 0)
+    {
+        if (!bcmolt_control_state_pack(this->downstream_encryption_mode, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_UPSTREAM_DESTINATION_QUEUE)) != 0)
+    {
+        if (!bcmolt_us_gem_port_destination_pack(this->upstream_destination_queue, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_CONTROL)) != 0)
+    {
+        if (!bcmolt_control_state_pack(this->control, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_DEBUG_FLOW_CONFIG)) != 0)
+    {
+        if (!bcmolt_gpon_debug_flow_config_pack(&this->debug_flow_config, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_MAC_TABLE_ENTRY_LIMIT)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, this->mac_table_entry_limit))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_gem_port_cfg_data_get_packed_length(const bcmolt_gpon_gem_port_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_CONFIGURATION)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_ONU_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_GEM_PORT_STATE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_DOWNSTREAM_ENCRYPTION_MODE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_UPSTREAM_DESTINATION_QUEUE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_CONTROL)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_DEBUG_FLOW_CONFIG)) != 0)
+    {
+        count += 3;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_MAC_TABLE_ENTRY_LIMIT)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_cfg_data_unpack(bcmolt_gpon_gem_port_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_CONFIGURATION)) != 0)
+    {
+        if (!bcmolt_gem_port_configuration_unpack(&this->configuration, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->onu_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_GEM_PORT_STATE)) != 0)
+    {
+        if (!bcmolt_gpon_gem_port_state_unpack(&this->gem_port_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_DOWNSTREAM_ENCRYPTION_MODE)) != 0)
+    {
+        if (!bcmolt_control_state_unpack(&this->downstream_encryption_mode, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_UPSTREAM_DESTINATION_QUEUE)) != 0)
+    {
+        if (!bcmolt_us_gem_port_destination_unpack(&this->upstream_destination_queue, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_CONTROL)) != 0)
+    {
+        if (!bcmolt_control_state_unpack(&this->control, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_DEBUG_FLOW_CONFIG)) != 0)
+    {
+        if (!bcmolt_gpon_debug_flow_config_unpack(&this->debug_flow_config, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_MAC_TABLE_ENTRY_LIMIT)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, &this->mac_table_entry_limit))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_CONFIGURATION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_GEM_PORT_STATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_DOWNSTREAM_ENCRYPTION_MODE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_UPSTREAM_DESTINATION_QUEUE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_CONTROL)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_DEBUG_FLOW_CONFIG)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 3))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_MAC_TABLE_ENTRY_LIMIT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_cfg_data_bounds_check(const bcmolt_gpon_gem_port_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_gem_port_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_CONFIGURATION)) != 0)
+    {
+        if (!bcmolt_gem_port_configuration_bounds_check(&this->configuration))
+        {
+            *failed_prop = BCMOLT_GPON_GEM_PORT_CFG_ID_CONFIGURATION;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_ONU_ID)) != 0)
+    {
+        if (this->onu_id > (bcmolt_gpon_onu_id) 127)
+        {
+            *failed_prop = BCMOLT_GPON_GEM_PORT_CFG_ID_ONU_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_GEM_PORT_STATE)) != 0)
+    {
+        switch (this->gem_port_state)
+        {
+            case BCMOLT_GPON_GEM_PORT_STATE_NOT_CONFIGURED:
+                break;
+            case BCMOLT_GPON_GEM_PORT_STATE_INACTIVE:
+                break;
+            case BCMOLT_GPON_GEM_PORT_STATE_PROCESSING:
+                break;
+            case BCMOLT_GPON_GEM_PORT_STATE_ACTIVE:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_GEM_PORT_CFG_ID_GEM_PORT_STATE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_DOWNSTREAM_ENCRYPTION_MODE)) != 0)
+    {
+        switch (this->downstream_encryption_mode)
+        {
+            case BCMOLT_CONTROL_STATE_DISABLE:
+                break;
+            case BCMOLT_CONTROL_STATE_ENABLE:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_GEM_PORT_CFG_ID_DOWNSTREAM_ENCRYPTION_MODE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_UPSTREAM_DESTINATION_QUEUE)) != 0)
+    {
+        switch (this->upstream_destination_queue)
+        {
+            case BCMOLT_US_GEM_PORT_DESTINATION_DATA:
+                break;
+            case BCMOLT_US_GEM_PORT_DESTINATION_CPU:
+                break;
+            case BCMOLT_US_GEM_PORT_DESTINATION_OMCI:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_GEM_PORT_CFG_ID_UPSTREAM_DESTINATION_QUEUE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_CONTROL)) != 0)
+    {
+        switch (this->control)
+        {
+            case BCMOLT_CONTROL_STATE_DISABLE:
+                break;
+            case BCMOLT_CONTROL_STATE_ENABLE:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_GEM_PORT_CFG_ID_CONTROL;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_DEBUG_FLOW_CONFIG)) != 0)
+    {
+        if (!bcmolt_gpon_debug_flow_config_bounds_check(&this->debug_flow_config))
+        {
+            *failed_prop = BCMOLT_GPON_GEM_PORT_CFG_ID_DEBUG_FLOW_CONFIG;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_MAC_TABLE_ENTRY_LIMIT)) != 0)
+    {
+        if (this->mac_table_entry_limit > 128)
+        {
+            *failed_prop = BCMOLT_GPON_GEM_PORT_CFG_ID_MAC_TABLE_ENTRY_LIMIT;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_gem_port_stat_data_set_default(bcmolt_gpon_gem_port_stat_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_STAT_ID_RX_PACKETS)) != 0)
+    {
+        this->rx_packets = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_STAT_ID_RX_BYTES)) != 0)
+    {
+        this->rx_bytes = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_STAT_ID_TX_PACKETS)) != 0)
+    {
+        this->tx_packets = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_STAT_ID_TX_BYTES)) != 0)
+    {
+        this->tx_bytes = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_stat_data_pack(const bcmolt_gpon_gem_port_stat_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_STAT_ID_RX_PACKETS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_packets))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_STAT_ID_RX_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_STAT_ID_TX_PACKETS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_packets))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_STAT_ID_TX_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_gem_port_stat_data_get_packed_length(const bcmolt_gpon_gem_port_stat_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_STAT_ID_RX_PACKETS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_STAT_ID_RX_BYTES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_STAT_ID_TX_PACKETS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_STAT_ID_TX_BYTES)) != 0)
+    {
+        count += 8;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_stat_data_unpack(bcmolt_gpon_gem_port_stat_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_STAT_ID_RX_PACKETS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_packets))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_STAT_ID_RX_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_STAT_ID_TX_PACKETS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_packets))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_STAT_ID_TX_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_stat_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_STAT_ID_RX_PACKETS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_STAT_ID_RX_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_STAT_ID_TX_PACKETS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_STAT_ID_TX_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_stat_data_bounds_check(const bcmolt_gpon_gem_port_stat_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_gem_port_stat_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_gem_port_stat_cfg_data_set_default(bcmolt_gpon_gem_port_stat_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_STAT_CFG_ID_CFG)) != 0)
+    {
+        this->cfg.trigger.type = BCMOLT_STAT_CONDITION_TYPE_NONE;
+        this->cfg.soak.active_soak_time = 0;
+        this->cfg.soak.clear_soak_time = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_stat_cfg_data_pack(const bcmolt_gpon_gem_port_stat_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_pack(&this->cfg, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_gem_port_stat_cfg_data_get_packed_length(const bcmolt_gpon_gem_port_stat_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_STAT_CFG_ID_CFG)) != 0)
+    {
+        count += bcmolt_stat_alarm_config_get_packed_length(&this->cfg);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_stat_cfg_data_unpack(bcmolt_gpon_gem_port_stat_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_unpack(&this->cfg, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_stat_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_stat_cfg_data_bounds_check(const bcmolt_gpon_gem_port_stat_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_gem_port_stat_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_bounds_check(&this->cfg))
+        {
+            *failed_prop = BCMOLT_GPON_GEM_PORT_STAT_CFG_ID_CFG;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_gem_port_configuration_completed_data_set_default(bcmolt_gpon_gem_port_configuration_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CONFIGURATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        this->status = BCMOLT_RESULT_SUCCESS;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CONFIGURATION_COMPLETED_ID_NEW_STATE)) != 0)
+    {
+        this->new_state = BCMOLT_GPON_GEM_PORT_STATE_NOT_CONFIGURED;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_configuration_completed_data_pack(const bcmolt_gpon_gem_port_configuration_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CONFIGURATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_result_pack(this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CONFIGURATION_COMPLETED_ID_NEW_STATE)) != 0)
+    {
+        if (!bcmolt_gpon_gem_port_state_pack(this->new_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_gem_port_configuration_completed_data_get_packed_length(const bcmolt_gpon_gem_port_configuration_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CONFIGURATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CONFIGURATION_COMPLETED_ID_NEW_STATE)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_configuration_completed_data_unpack(bcmolt_gpon_gem_port_configuration_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CONFIGURATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_result_unpack(&this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CONFIGURATION_COMPLETED_ID_NEW_STATE)) != 0)
+    {
+        if (!bcmolt_gpon_gem_port_state_unpack(&this->new_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_configuration_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CONFIGURATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CONFIGURATION_COMPLETED_ID_NEW_STATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_configuration_completed_data_bounds_check(const bcmolt_gpon_gem_port_configuration_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_gem_port_configuration_completed_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CONFIGURATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        switch (this->status)
+        {
+            case BCMOLT_RESULT_SUCCESS:
+                break;
+            case BCMOLT_RESULT_FAIL:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_GEM_PORT_CONFIGURATION_COMPLETED_ID_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_CONFIGURATION_COMPLETED_ID_NEW_STATE)) != 0)
+    {
+        switch (this->new_state)
+        {
+            case BCMOLT_GPON_GEM_PORT_STATE_NOT_CONFIGURED:
+                break;
+            case BCMOLT_GPON_GEM_PORT_STATE_INACTIVE:
+                break;
+            case BCMOLT_GPON_GEM_PORT_STATE_PROCESSING:
+                break;
+            case BCMOLT_GPON_GEM_PORT_STATE_ACTIVE:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_GEM_PORT_CONFIGURATION_COMPLETED_ID_NEW_STATE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_gem_port_stat_alarm_cleared_data_set_default(bcmolt_gpon_gem_port_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        this->stat = BCMOLT_GPON_GEM_PORT_STAT_ID_RX_PACKETS;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_stat_alarm_cleared_data_pack(const bcmolt_gpon_gem_port_stat_alarm_cleared_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_gpon_gem_port_stat_id_pack(this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_gem_port_stat_alarm_cleared_data_get_packed_length(const bcmolt_gpon_gem_port_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_stat_alarm_cleared_data_unpack(bcmolt_gpon_gem_port_stat_alarm_cleared_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_gpon_gem_port_stat_id_unpack(&this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_stat_alarm_cleared_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_stat_alarm_cleared_data_bounds_check(const bcmolt_gpon_gem_port_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_gem_port_stat_alarm_cleared_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        switch (this->stat)
+        {
+            case BCMOLT_GPON_GEM_PORT_STAT_ID_RX_PACKETS:
+                break;
+            case BCMOLT_GPON_GEM_PORT_STAT_ID_RX_BYTES:
+                break;
+            case BCMOLT_GPON_GEM_PORT_STAT_ID_TX_PACKETS:
+                break;
+            case BCMOLT_GPON_GEM_PORT_STAT_ID_TX_BYTES:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_GEM_PORT_STAT_ALARM_CLEARED_ID_STAT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_gem_port_stat_alarm_raised_data_set_default(bcmolt_gpon_gem_port_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        this->stat = BCMOLT_GPON_GEM_PORT_STAT_ID_RX_PACKETS;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_stat_alarm_raised_data_pack(const bcmolt_gpon_gem_port_stat_alarm_raised_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_gpon_gem_port_stat_id_pack(this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_gem_port_stat_alarm_raised_data_get_packed_length(const bcmolt_gpon_gem_port_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_stat_alarm_raised_data_unpack(bcmolt_gpon_gem_port_stat_alarm_raised_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_gpon_gem_port_stat_id_unpack(&this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_stat_alarm_raised_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_stat_alarm_raised_data_bounds_check(const bcmolt_gpon_gem_port_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_gem_port_stat_alarm_raised_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        switch (this->stat)
+        {
+            case BCMOLT_GPON_GEM_PORT_STAT_ID_RX_PACKETS:
+                break;
+            case BCMOLT_GPON_GEM_PORT_STAT_ID_RX_BYTES:
+                break;
+            case BCMOLT_GPON_GEM_PORT_STAT_ID_TX_PACKETS:
+                break;
+            case BCMOLT_GPON_GEM_PORT_STAT_ID_TX_BYTES:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_GEM_PORT_STAT_ALARM_RAISED_ID_STAT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_gem_port_auto_cfg_data_set_default(bcmolt_gpon_gem_port_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_AUTO_CFG_ID_CONFIGURATION_COMPLETED)) != 0)
+    {
+        this->configuration_completed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        this->stat_alarm_cleared = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        this->stat_alarm_raised = BCMOS_FALSE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_auto_cfg_data_pack(const bcmolt_gpon_gem_port_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_AUTO_CFG_ID_CONFIGURATION_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->configuration_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->stat_alarm_cleared))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->stat_alarm_raised))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_gem_port_auto_cfg_data_get_packed_length(const bcmolt_gpon_gem_port_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_AUTO_CFG_ID_CONFIGURATION_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_auto_cfg_data_unpack(bcmolt_gpon_gem_port_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_AUTO_CFG_ID_CONFIGURATION_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->configuration_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->stat_alarm_cleared))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->stat_alarm_raised))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_AUTO_CFG_ID_CONFIGURATION_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_auto_cfg_data_bounds_check(const bcmolt_gpon_gem_port_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_gem_port_auto_cfg_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_gem_port_set_state_data_set_default(bcmolt_gpon_gem_port_set_state_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_SET_STATE_ID_STATE)) != 0)
+    {
+        this->state = BCMOLT_GEM_PORT_OPERATION_ACTIVATE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_set_state_data_pack(const bcmolt_gpon_gem_port_set_state_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_SET_STATE_ID_STATE)) != 0)
+    {
+        if (!bcmolt_gem_port_operation_pack(this->state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_gem_port_set_state_data_get_packed_length(const bcmolt_gpon_gem_port_set_state_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_SET_STATE_ID_STATE)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_set_state_data_unpack(bcmolt_gpon_gem_port_set_state_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_SET_STATE_ID_STATE)) != 0)
+    {
+        if (!bcmolt_gem_port_operation_unpack(&this->state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_set_state_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_SET_STATE_ID_STATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_gem_port_set_state_data_bounds_check(const bcmolt_gpon_gem_port_set_state_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_gem_port_set_state_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_GEM_PORT_SET_STATE_ID_STATE)) != 0)
+    {
+        switch (this->state)
+        {
+            case BCMOLT_GEM_PORT_OPERATION_ACTIVATE:
+                break;
+            case BCMOLT_GEM_PORT_OPERATION_DEACTIVATE:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_GEM_PORT_SET_STATE_ID_STATE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_iwf_key_set_default(bcmolt_gpon_iwf_key *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_KEY_ID_PON_NI)) != 0)
+    {
+        this->pon_ni = (bcmolt_gpon_ni) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_key_pack(const bcmolt_gpon_iwf_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, (uint8_t) this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_iwf_key_get_packed_length(const bcmolt_gpon_iwf_key *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_KEY_ID_PON_NI)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_key_unpack(bcmolt_gpon_iwf_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, (uint8_t *) &this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_key_bounds_check(const bcmolt_gpon_iwf_key *this, bcmolt_presence_mask fields_present, bcmolt_gpon_iwf_key_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_KEY_ID_PON_NI)) != 0)
+    {
+        if (this->pon_ni > (bcmolt_gpon_ni) 15)
+        {
+            *failed_prop = BCMOLT_GPON_IWF_KEY_ID_PON_NI;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_iwf_cfg_data_set_default(bcmolt_gpon_iwf_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_IWF_MODE)) != 0)
+    {
+        this->iwf_mode = BCMOLT_IWF_MODE_DIRECT_MAPPING_MODE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_US_TPID_PER_FLOW)) != 0)
+    {
+        this->us_tpid_per_flow.arr[0] = 33024U;
+        this->us_tpid_per_flow.arr[1] = 33024U;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_US_OTAG_DIRECT_TPID)) != 0)
+    {
+        this->us_otag_direct_tpid = 33024U;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_US_OTAG_DIRECT_PBIT)) != 0)
+    {
+        this->us_otag_direct_pbit = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_DS_TPID)) != 0)
+    {
+        this->ds_tpid.arr[0] = 33024U;
+        this->ds_tpid.arr[1] = 34984U;
+        this->ds_tpid.arr[2] = 37120U;
+        this->ds_tpid.arr[3] = 37376U;
+        this->ds_tpid.arr[4] = 33024U;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_MAC_TABLE_CONFIGURATION)) != 0)
+    {
+        this->mac_table_configuration.miss_fallback = BCMOLT_MAC_TABLE_MISS_FALLBACK_DROP;
+        this->mac_table_configuration.default_flow_id = (bcmolt_flow_id) 0;
+        this->mac_table_configuration.aging_time = 30;
+        this->mac_table_configuration.learning_mode = BCMOLT_MAC_TABLE_LEARNING_MODE_NORMAL;
+        this->mac_table_configuration.automatic_mac_learning = BCMOLT_CONTROL_STATE_DISABLE;
+        this->mac_table_configuration.automatic_mac_aging = BCMOLT_CONTROL_STATE_DISABLE;
+        this->mac_table_configuration.automatic_mac_move = BCMOLT_CONTROL_STATE_DISABLE;
+        this->mac_table_configuration.automatic_static_mode = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_DEBUG_FLOW_CONFIGURATION)) != 0)
+    {
+        this->debug_flow_configuration.learn_untagged_flow_vids = BCMOS_FALSE;
+        this->debug_flow_configuration.untagged_flow_shaping_ms_per_sec = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_MAC_TABLE_COUNT)) != 0)
+    {
+        this->mac_table_count = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_FORBIDDEN_VLAN_FLOW_GEM_RANGE_START)) != 0)
+    {
+        this->forbidden_vlan_flow_gem_range_start = 128;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_cfg_data_pack(const bcmolt_gpon_iwf_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_IWF_MODE)) != 0)
+    {
+        if (!bcmolt_iwf_mode_pack(this->iwf_mode, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_US_TPID_PER_FLOW)) != 0)
+    {
+        if (!bcmolt_arr_u16_2_hex_pack(&this->us_tpid_per_flow, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_US_OTAG_DIRECT_TPID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, this->us_otag_direct_tpid))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_US_OTAG_DIRECT_PBIT)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->us_otag_direct_pbit))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_DS_TPID)) != 0)
+    {
+        if (!bcmolt_arr_u16_5_hex_pack(&this->ds_tpid, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_MAC_TABLE_CONFIGURATION)) != 0)
+    {
+        if (!bcmolt_mac_table_configuration_pack(&this->mac_table_configuration, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_DEBUG_FLOW_CONFIGURATION)) != 0)
+    {
+        if (!bcmolt_gpon_iwf_debug_flow_config_pack(&this->debug_flow_configuration, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_MAC_TABLE_COUNT)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, this->mac_table_count))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_FORBIDDEN_VLAN_FLOW_GEM_RANGE_START)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, this->forbidden_vlan_flow_gem_range_start))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_iwf_cfg_data_get_packed_length(const bcmolt_gpon_iwf_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_IWF_MODE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_US_TPID_PER_FLOW)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_US_OTAG_DIRECT_TPID)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_US_OTAG_DIRECT_PBIT)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_DS_TPID)) != 0)
+    {
+        count += 10;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_MAC_TABLE_CONFIGURATION)) != 0)
+    {
+        count += 12;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_DEBUG_FLOW_CONFIGURATION)) != 0)
+    {
+        count += 3;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_MAC_TABLE_COUNT)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_FORBIDDEN_VLAN_FLOW_GEM_RANGE_START)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_cfg_data_unpack(bcmolt_gpon_iwf_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_IWF_MODE)) != 0)
+    {
+        if (!bcmolt_iwf_mode_unpack(&this->iwf_mode, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_US_TPID_PER_FLOW)) != 0)
+    {
+        if (!bcmolt_arr_u16_2_hex_unpack(&this->us_tpid_per_flow, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_US_OTAG_DIRECT_TPID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, &this->us_otag_direct_tpid))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_US_OTAG_DIRECT_PBIT)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->us_otag_direct_pbit))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_DS_TPID)) != 0)
+    {
+        if (!bcmolt_arr_u16_5_hex_unpack(&this->ds_tpid, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_MAC_TABLE_CONFIGURATION)) != 0)
+    {
+        if (!bcmolt_mac_table_configuration_unpack(&this->mac_table_configuration, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_DEBUG_FLOW_CONFIGURATION)) != 0)
+    {
+        if (!bcmolt_gpon_iwf_debug_flow_config_unpack(&this->debug_flow_configuration, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_MAC_TABLE_COUNT)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, &this->mac_table_count))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_FORBIDDEN_VLAN_FLOW_GEM_RANGE_START)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, &this->forbidden_vlan_flow_gem_range_start))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_IWF_MODE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_US_TPID_PER_FLOW)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_US_OTAG_DIRECT_TPID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_US_OTAG_DIRECT_PBIT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_DS_TPID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 10))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_MAC_TABLE_CONFIGURATION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 12))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_DEBUG_FLOW_CONFIGURATION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 3))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_MAC_TABLE_COUNT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_FORBIDDEN_VLAN_FLOW_GEM_RANGE_START)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_cfg_data_bounds_check(const bcmolt_gpon_iwf_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_iwf_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_IWF_MODE)) != 0)
+    {
+        switch (this->iwf_mode)
+        {
+            case BCMOLT_IWF_MODE_DIRECT_MAPPING_MODE:
+                break;
+            case BCMOLT_IWF_MODE_PER_FLOW_MODE:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_IWF_CFG_ID_IWF_MODE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_US_TPID_PER_FLOW)) != 0)
+    {
+        if (!bcmolt_arr_u16_2_hex_bounds_check(&this->us_tpid_per_flow))
+        {
+            *failed_prop = BCMOLT_GPON_IWF_CFG_ID_US_TPID_PER_FLOW;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_US_OTAG_DIRECT_PBIT)) != 0)
+    {
+        if (this->us_otag_direct_pbit > 7)
+        {
+            *failed_prop = BCMOLT_GPON_IWF_CFG_ID_US_OTAG_DIRECT_PBIT;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_DS_TPID)) != 0)
+    {
+        if (!bcmolt_arr_u16_5_hex_bounds_check(&this->ds_tpid))
+        {
+            *failed_prop = BCMOLT_GPON_IWF_CFG_ID_DS_TPID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_MAC_TABLE_CONFIGURATION)) != 0)
+    {
+        if (!bcmolt_mac_table_configuration_bounds_check(&this->mac_table_configuration))
+        {
+            *failed_prop = BCMOLT_GPON_IWF_CFG_ID_MAC_TABLE_CONFIGURATION;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_CFG_ID_DEBUG_FLOW_CONFIGURATION)) != 0)
+    {
+        if (!bcmolt_gpon_iwf_debug_flow_config_bounds_check(&this->debug_flow_configuration))
+        {
+            *failed_prop = BCMOLT_GPON_IWF_CFG_ID_DEBUG_FLOW_CONFIGURATION;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_iwf_stat_data_set_default(bcmolt_gpon_iwf_stat_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ID_DS_HIT_EVENT)) != 0)
+    {
+        this->ds_hit_event = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ID_DS_MISS_EVENT)) != 0)
+    {
+        this->ds_miss_event = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ID_DS_DROP_DUE_TO_MISS_EVENT)) != 0)
+    {
+        this->ds_drop_due_to_miss_event = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ID_DS_DROP_DUE_TO_HIT_EVENT)) != 0)
+    {
+        this->ds_drop_due_to_hit_event = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ID_DS_DROP_TO_DISABLED_GEM)) != 0)
+    {
+        this->ds_drop_to_disabled_gem = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ID_NEW_MAC_DISCOVERED)) != 0)
+    {
+        this->new_mac_discovered = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ID_MOVE_EVENT)) != 0)
+    {
+        this->move_event = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ID_NEW_MAC_DROP_DUE_TO_FIFO_FULL)) != 0)
+    {
+        this->new_mac_drop_due_to_fifo_full = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_stat_data_pack(const bcmolt_gpon_iwf_stat_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ID_DS_HIT_EVENT)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->ds_hit_event))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ID_DS_MISS_EVENT)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->ds_miss_event))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ID_DS_DROP_DUE_TO_MISS_EVENT)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->ds_drop_due_to_miss_event))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ID_DS_DROP_DUE_TO_HIT_EVENT)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->ds_drop_due_to_hit_event))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ID_DS_DROP_TO_DISABLED_GEM)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->ds_drop_to_disabled_gem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ID_NEW_MAC_DISCOVERED)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->new_mac_discovered))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ID_MOVE_EVENT)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->move_event))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ID_NEW_MAC_DROP_DUE_TO_FIFO_FULL)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->new_mac_drop_due_to_fifo_full))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_iwf_stat_data_get_packed_length(const bcmolt_gpon_iwf_stat_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ID_DS_HIT_EVENT)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ID_DS_MISS_EVENT)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ID_DS_DROP_DUE_TO_MISS_EVENT)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ID_DS_DROP_DUE_TO_HIT_EVENT)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ID_DS_DROP_TO_DISABLED_GEM)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ID_NEW_MAC_DISCOVERED)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ID_MOVE_EVENT)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ID_NEW_MAC_DROP_DUE_TO_FIFO_FULL)) != 0)
+    {
+        count += 8;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_stat_data_unpack(bcmolt_gpon_iwf_stat_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ID_DS_HIT_EVENT)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->ds_hit_event))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ID_DS_MISS_EVENT)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->ds_miss_event))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ID_DS_DROP_DUE_TO_MISS_EVENT)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->ds_drop_due_to_miss_event))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ID_DS_DROP_DUE_TO_HIT_EVENT)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->ds_drop_due_to_hit_event))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ID_DS_DROP_TO_DISABLED_GEM)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->ds_drop_to_disabled_gem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ID_NEW_MAC_DISCOVERED)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->new_mac_discovered))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ID_MOVE_EVENT)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->move_event))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ID_NEW_MAC_DROP_DUE_TO_FIFO_FULL)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->new_mac_drop_due_to_fifo_full))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_stat_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ID_DS_HIT_EVENT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ID_DS_MISS_EVENT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ID_DS_DROP_DUE_TO_MISS_EVENT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ID_DS_DROP_DUE_TO_HIT_EVENT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ID_DS_DROP_TO_DISABLED_GEM)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ID_NEW_MAC_DISCOVERED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ID_MOVE_EVENT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ID_NEW_MAC_DROP_DUE_TO_FIFO_FULL)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_stat_data_bounds_check(const bcmolt_gpon_iwf_stat_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_iwf_stat_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_iwf_stat_cfg_data_set_default(bcmolt_gpon_iwf_stat_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_CFG_ID_CFG)) != 0)
+    {
+        this->cfg.trigger.type = BCMOLT_STAT_CONDITION_TYPE_NONE;
+        this->cfg.soak.active_soak_time = 0;
+        this->cfg.soak.clear_soak_time = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_stat_cfg_data_pack(const bcmolt_gpon_iwf_stat_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_pack(&this->cfg, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_iwf_stat_cfg_data_get_packed_length(const bcmolt_gpon_iwf_stat_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_CFG_ID_CFG)) != 0)
+    {
+        count += bcmolt_stat_alarm_config_get_packed_length(&this->cfg);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_stat_cfg_data_unpack(bcmolt_gpon_iwf_stat_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_unpack(&this->cfg, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_stat_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_stat_cfg_data_bounds_check(const bcmolt_gpon_iwf_stat_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_iwf_stat_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_bounds_check(&this->cfg))
+        {
+            *failed_prop = BCMOLT_GPON_IWF_STAT_CFG_ID_CFG;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_iwf_scan_mac_table_completed_data_set_default(bcmolt_gpon_iwf_scan_mac_table_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_SCAN_MAC_TABLE_COMPLETED_ID_MAC_ADDRESS)) != 0)
+    {
+        bcmos_mac_address_init(&this->mac_address);
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_SCAN_MAC_TABLE_COMPLETED_ID_ENTRIES)) != 0)
+    {
+        this->entries.len = 0;
+        this->entries.val = NULL;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_scan_mac_table_completed_data_pack(const bcmolt_gpon_iwf_scan_mac_table_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_SCAN_MAC_TABLE_COMPLETED_ID_MAC_ADDRESS)) != 0)
+    {
+        if (!bcmolt_buf_write_mac_address(buf, this->mac_address))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_SCAN_MAC_TABLE_COMPLETED_ID_ENTRIES)) != 0)
+    {
+        if (!bcmolt_gpon_mac_table_scan_result_list_u16_pack(&this->entries, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_iwf_scan_mac_table_completed_data_get_packed_length(const bcmolt_gpon_iwf_scan_mac_table_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_SCAN_MAC_TABLE_COMPLETED_ID_MAC_ADDRESS)) != 0)
+    {
+        count += 6;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_SCAN_MAC_TABLE_COMPLETED_ID_ENTRIES)) != 0)
+    {
+        count += bcmolt_gpon_mac_table_scan_result_list_u16_get_packed_length(&this->entries);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_scan_mac_table_completed_data_unpack(bcmolt_gpon_iwf_scan_mac_table_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_SCAN_MAC_TABLE_COMPLETED_ID_MAC_ADDRESS)) != 0)
+    {
+        if (!bcmolt_buf_read_mac_address(buf, &this->mac_address))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_SCAN_MAC_TABLE_COMPLETED_ID_ENTRIES)) != 0)
+    {
+        if (!bcmolt_gpon_mac_table_scan_result_list_u16_unpack(&this->entries, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_scan_mac_table_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_SCAN_MAC_TABLE_COMPLETED_ID_MAC_ADDRESS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 6))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_SCAN_MAC_TABLE_COMPLETED_ID_ENTRIES)) != 0)
+    {
+        if (!bcmolt_gpon_mac_table_scan_result_list_u16_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_scan_mac_table_completed_data_bounds_check(const bcmolt_gpon_iwf_scan_mac_table_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_iwf_scan_mac_table_completed_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_SCAN_MAC_TABLE_COMPLETED_ID_ENTRIES)) != 0)
+    {
+        if (!bcmolt_gpon_mac_table_scan_result_list_u16_bounds_check(&this->entries))
+        {
+            *failed_prop = BCMOLT_GPON_IWF_SCAN_MAC_TABLE_COMPLETED_ID_ENTRIES;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_iwf_stat_alarm_cleared_data_set_default(bcmolt_gpon_iwf_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        this->stat = BCMOLT_GPON_IWF_STAT_ID_DS_HIT_EVENT;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_stat_alarm_cleared_data_pack(const bcmolt_gpon_iwf_stat_alarm_cleared_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_gpon_iwf_stat_id_pack(this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_iwf_stat_alarm_cleared_data_get_packed_length(const bcmolt_gpon_iwf_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_stat_alarm_cleared_data_unpack(bcmolt_gpon_iwf_stat_alarm_cleared_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_gpon_iwf_stat_id_unpack(&this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_stat_alarm_cleared_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_stat_alarm_cleared_data_bounds_check(const bcmolt_gpon_iwf_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_iwf_stat_alarm_cleared_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        switch (this->stat)
+        {
+            case BCMOLT_GPON_IWF_STAT_ID_DS_HIT_EVENT:
+                break;
+            case BCMOLT_GPON_IWF_STAT_ID_DS_MISS_EVENT:
+                break;
+            case BCMOLT_GPON_IWF_STAT_ID_DS_DROP_DUE_TO_MISS_EVENT:
+                break;
+            case BCMOLT_GPON_IWF_STAT_ID_DS_DROP_DUE_TO_HIT_EVENT:
+                break;
+            case BCMOLT_GPON_IWF_STAT_ID_DS_DROP_TO_DISABLED_GEM:
+                break;
+            case BCMOLT_GPON_IWF_STAT_ID_NEW_MAC_DISCOVERED:
+                break;
+            case BCMOLT_GPON_IWF_STAT_ID_MOVE_EVENT:
+                break;
+            case BCMOLT_GPON_IWF_STAT_ID_NEW_MAC_DROP_DUE_TO_FIFO_FULL:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_IWF_STAT_ALARM_CLEARED_ID_STAT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_iwf_stat_alarm_raised_data_set_default(bcmolt_gpon_iwf_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        this->stat = BCMOLT_GPON_IWF_STAT_ID_DS_HIT_EVENT;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_stat_alarm_raised_data_pack(const bcmolt_gpon_iwf_stat_alarm_raised_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_gpon_iwf_stat_id_pack(this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_iwf_stat_alarm_raised_data_get_packed_length(const bcmolt_gpon_iwf_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_stat_alarm_raised_data_unpack(bcmolt_gpon_iwf_stat_alarm_raised_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_gpon_iwf_stat_id_unpack(&this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_stat_alarm_raised_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_stat_alarm_raised_data_bounds_check(const bcmolt_gpon_iwf_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_iwf_stat_alarm_raised_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        switch (this->stat)
+        {
+            case BCMOLT_GPON_IWF_STAT_ID_DS_HIT_EVENT:
+                break;
+            case BCMOLT_GPON_IWF_STAT_ID_DS_MISS_EVENT:
+                break;
+            case BCMOLT_GPON_IWF_STAT_ID_DS_DROP_DUE_TO_MISS_EVENT:
+                break;
+            case BCMOLT_GPON_IWF_STAT_ID_DS_DROP_DUE_TO_HIT_EVENT:
+                break;
+            case BCMOLT_GPON_IWF_STAT_ID_DS_DROP_TO_DISABLED_GEM:
+                break;
+            case BCMOLT_GPON_IWF_STAT_ID_NEW_MAC_DISCOVERED:
+                break;
+            case BCMOLT_GPON_IWF_STAT_ID_MOVE_EVENT:
+                break;
+            case BCMOLT_GPON_IWF_STAT_ID_NEW_MAC_DROP_DUE_TO_FIFO_FULL:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_IWF_STAT_ALARM_RAISED_ID_STAT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_iwf_auto_cfg_data_set_default(bcmolt_gpon_iwf_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_AUTO_CFG_ID_FLUSH_MAC_TABLE_COMPLETED)) != 0)
+    {
+        this->flush_mac_table_completed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_AUTO_CFG_ID_SCAN_MAC_TABLE_COMPLETED)) != 0)
+    {
+        this->scan_mac_table_completed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        this->stat_alarm_cleared = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        this->stat_alarm_raised = BCMOS_FALSE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_auto_cfg_data_pack(const bcmolt_gpon_iwf_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_AUTO_CFG_ID_FLUSH_MAC_TABLE_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->flush_mac_table_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_AUTO_CFG_ID_SCAN_MAC_TABLE_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->scan_mac_table_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->stat_alarm_cleared))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->stat_alarm_raised))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_iwf_auto_cfg_data_get_packed_length(const bcmolt_gpon_iwf_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_AUTO_CFG_ID_FLUSH_MAC_TABLE_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_AUTO_CFG_ID_SCAN_MAC_TABLE_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_auto_cfg_data_unpack(bcmolt_gpon_iwf_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_AUTO_CFG_ID_FLUSH_MAC_TABLE_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->flush_mac_table_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_AUTO_CFG_ID_SCAN_MAC_TABLE_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->scan_mac_table_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->stat_alarm_cleared))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->stat_alarm_raised))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_AUTO_CFG_ID_FLUSH_MAC_TABLE_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_AUTO_CFG_ID_SCAN_MAC_TABLE_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_auto_cfg_data_bounds_check(const bcmolt_gpon_iwf_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_iwf_auto_cfg_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_iwf_flush_mac_table_data_set_default(bcmolt_gpon_iwf_flush_mac_table_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_FLUSH_MAC_TABLE_ID_CONTROL)) != 0)
+    {
+        this->control = BCMOLT_FLUSH_MAC_TABLE_OPTION_ALL;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_FLUSH_MAC_TABLE_ID_VID)) != 0)
+    {
+        this->vid = (bcmolt_vlan_id) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_FLUSH_MAC_TABLE_ID_FLOW_ID)) != 0)
+    {
+        this->flow_id = (bcmolt_flow_id) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_flush_mac_table_data_pack(const bcmolt_gpon_iwf_flush_mac_table_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_FLUSH_MAC_TABLE_ID_CONTROL)) != 0)
+    {
+        if (!bcmolt_flush_mac_table_option_pack(this->control, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_FLUSH_MAC_TABLE_ID_VID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->vid))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_FLUSH_MAC_TABLE_ID_FLOW_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->flow_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_iwf_flush_mac_table_data_get_packed_length(const bcmolt_gpon_iwf_flush_mac_table_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_FLUSH_MAC_TABLE_ID_CONTROL)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_FLUSH_MAC_TABLE_ID_VID)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_FLUSH_MAC_TABLE_ID_FLOW_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_flush_mac_table_data_unpack(bcmolt_gpon_iwf_flush_mac_table_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_FLUSH_MAC_TABLE_ID_CONTROL)) != 0)
+    {
+        if (!bcmolt_flush_mac_table_option_unpack(&this->control, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_FLUSH_MAC_TABLE_ID_VID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->vid))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_FLUSH_MAC_TABLE_ID_FLOW_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->flow_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_flush_mac_table_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_FLUSH_MAC_TABLE_ID_CONTROL)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_FLUSH_MAC_TABLE_ID_VID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_FLUSH_MAC_TABLE_ID_FLOW_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_flush_mac_table_data_bounds_check(const bcmolt_gpon_iwf_flush_mac_table_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_iwf_flush_mac_table_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_FLUSH_MAC_TABLE_ID_CONTROL)) != 0)
+    {
+        switch (this->control)
+        {
+            case BCMOLT_FLUSH_MAC_TABLE_OPTION_ALL:
+                break;
+            case BCMOLT_FLUSH_MAC_TABLE_OPTION_PER_VID:
+                break;
+            case BCMOLT_FLUSH_MAC_TABLE_OPTION_PER_FLOW:
+                break;
+            case BCMOLT_FLUSH_MAC_TABLE_OPTION_VID_PLUS_FLOW:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_IWF_FLUSH_MAC_TABLE_ID_CONTROL;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_FLUSH_MAC_TABLE_ID_VID)) != 0)
+    {
+        if (this->vid > (bcmolt_vlan_id) 4095)
+        {
+            *failed_prop = BCMOLT_GPON_IWF_FLUSH_MAC_TABLE_ID_VID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_FLUSH_MAC_TABLE_ID_FLOW_ID)) != 0)
+    {
+        if (this->flow_id > (bcmolt_flow_id) 4095)
+        {
+            *failed_prop = BCMOLT_GPON_IWF_FLUSH_MAC_TABLE_ID_FLOW_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_iwf_scan_mac_table_data_set_default(bcmolt_gpon_iwf_scan_mac_table_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_SCAN_MAC_TABLE_ID_MAC_ADDRESS)) != 0)
+    {
+        bcmos_mac_address_init(&this->mac_address);
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_scan_mac_table_data_pack(const bcmolt_gpon_iwf_scan_mac_table_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_SCAN_MAC_TABLE_ID_MAC_ADDRESS)) != 0)
+    {
+        if (!bcmolt_buf_write_mac_address(buf, this->mac_address))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_iwf_scan_mac_table_data_get_packed_length(const bcmolt_gpon_iwf_scan_mac_table_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_SCAN_MAC_TABLE_ID_MAC_ADDRESS)) != 0)
+    {
+        count += 6;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_scan_mac_table_data_unpack(bcmolt_gpon_iwf_scan_mac_table_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_SCAN_MAC_TABLE_ID_MAC_ADDRESS)) != 0)
+    {
+        if (!bcmolt_buf_read_mac_address(buf, &this->mac_address))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_scan_mac_table_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_SCAN_MAC_TABLE_ID_MAC_ADDRESS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 6))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_scan_mac_table_data_bounds_check(const bcmolt_gpon_iwf_scan_mac_table_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_iwf_scan_mac_table_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_iwf_ds_egress_flow_key_set_default(bcmolt_gpon_iwf_ds_egress_flow_key *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_EGRESS_FLOW_KEY_ID_PON_NI)) != 0)
+    {
+        this->pon_ni = (bcmolt_gpon_ni) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_EGRESS_FLOW_KEY_ID_FLOW_ID)) != 0)
+    {
+        this->flow_id = (bcmolt_flow_id) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_ds_egress_flow_key_pack(const bcmolt_gpon_iwf_ds_egress_flow_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_EGRESS_FLOW_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, (uint8_t) this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_EGRESS_FLOW_KEY_ID_FLOW_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->flow_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_iwf_ds_egress_flow_key_get_packed_length(const bcmolt_gpon_iwf_ds_egress_flow_key *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_EGRESS_FLOW_KEY_ID_PON_NI)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_EGRESS_FLOW_KEY_ID_FLOW_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_ds_egress_flow_key_unpack(bcmolt_gpon_iwf_ds_egress_flow_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_EGRESS_FLOW_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, (uint8_t *) &this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_EGRESS_FLOW_KEY_ID_FLOW_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->flow_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_ds_egress_flow_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_EGRESS_FLOW_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_EGRESS_FLOW_KEY_ID_FLOW_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_ds_egress_flow_key_bounds_check(const bcmolt_gpon_iwf_ds_egress_flow_key *this, bcmolt_presence_mask fields_present, bcmolt_gpon_iwf_ds_egress_flow_key_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_EGRESS_FLOW_KEY_ID_PON_NI)) != 0)
+    {
+        if (this->pon_ni > (bcmolt_gpon_ni) 15)
+        {
+            *failed_prop = BCMOLT_GPON_IWF_DS_EGRESS_FLOW_KEY_ID_PON_NI;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_EGRESS_FLOW_KEY_ID_FLOW_ID)) != 0)
+    {
+        if (this->flow_id > (bcmolt_flow_id) 4095)
+        {
+            *failed_prop = BCMOLT_GPON_IWF_DS_EGRESS_FLOW_KEY_ID_FLOW_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_iwf_ds_egress_flow_cfg_data_set_default(bcmolt_gpon_iwf_ds_egress_flow_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_EGRESS_FLOW_CFG_ID_GEM_PORT)) != 0)
+    {
+        this->gem_port = (bcmolt_gpon_gem_id) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_EGRESS_FLOW_CFG_ID_PBIT_CONTROL)) != 0)
+    {
+        this->pbit_control = BCMOS_FALSE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_ds_egress_flow_cfg_data_pack(const bcmolt_gpon_iwf_ds_egress_flow_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_EGRESS_FLOW_CFG_ID_GEM_PORT)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->gem_port))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_EGRESS_FLOW_CFG_ID_PBIT_CONTROL)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->pbit_control))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_iwf_ds_egress_flow_cfg_data_get_packed_length(const bcmolt_gpon_iwf_ds_egress_flow_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_EGRESS_FLOW_CFG_ID_GEM_PORT)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_EGRESS_FLOW_CFG_ID_PBIT_CONTROL)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_ds_egress_flow_cfg_data_unpack(bcmolt_gpon_iwf_ds_egress_flow_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_EGRESS_FLOW_CFG_ID_GEM_PORT)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->gem_port))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_EGRESS_FLOW_CFG_ID_PBIT_CONTROL)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->pbit_control))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_ds_egress_flow_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_EGRESS_FLOW_CFG_ID_GEM_PORT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_EGRESS_FLOW_CFG_ID_PBIT_CONTROL)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_ds_egress_flow_cfg_data_bounds_check(const bcmolt_gpon_iwf_ds_egress_flow_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_iwf_ds_egress_flow_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_EGRESS_FLOW_CFG_ID_GEM_PORT)) != 0)
+    {
+        if (this->gem_port > (bcmolt_gpon_gem_id) 4095)
+        {
+            *failed_prop = BCMOLT_GPON_IWF_DS_EGRESS_FLOW_CFG_ID_GEM_PORT;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_iwf_ds_ingress_flow_key_set_default(bcmolt_gpon_iwf_ds_ingress_flow_key *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_INGRESS_FLOW_KEY_ID_PON_NI)) != 0)
+    {
+        this->pon_ni = (bcmolt_gpon_ni) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_INGRESS_FLOW_KEY_ID_VLAN_ID)) != 0)
+    {
+        this->vlan_id = (bcmolt_vlan_id) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_ds_ingress_flow_key_pack(const bcmolt_gpon_iwf_ds_ingress_flow_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_INGRESS_FLOW_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, (uint8_t) this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_INGRESS_FLOW_KEY_ID_VLAN_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->vlan_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_iwf_ds_ingress_flow_key_get_packed_length(const bcmolt_gpon_iwf_ds_ingress_flow_key *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_INGRESS_FLOW_KEY_ID_PON_NI)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_INGRESS_FLOW_KEY_ID_VLAN_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_ds_ingress_flow_key_unpack(bcmolt_gpon_iwf_ds_ingress_flow_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_INGRESS_FLOW_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, (uint8_t *) &this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_INGRESS_FLOW_KEY_ID_VLAN_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->vlan_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_ds_ingress_flow_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_INGRESS_FLOW_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_INGRESS_FLOW_KEY_ID_VLAN_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_ds_ingress_flow_key_bounds_check(const bcmolt_gpon_iwf_ds_ingress_flow_key *this, bcmolt_presence_mask fields_present, bcmolt_gpon_iwf_ds_ingress_flow_key_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_INGRESS_FLOW_KEY_ID_PON_NI)) != 0)
+    {
+        if (this->pon_ni > (bcmolt_gpon_ni) 15)
+        {
+            *failed_prop = BCMOLT_GPON_IWF_DS_INGRESS_FLOW_KEY_ID_PON_NI;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_INGRESS_FLOW_KEY_ID_VLAN_ID)) != 0)
+    {
+        if (this->vlan_id > (bcmolt_vlan_id) 4095)
+        {
+            *failed_prop = BCMOLT_GPON_IWF_DS_INGRESS_FLOW_KEY_ID_VLAN_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_iwf_ds_ingress_flow_cfg_data_set_default(bcmolt_gpon_iwf_ds_ingress_flow_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_INGRESS_FLOW_CFG_ID_MAPPING_METHOD)) != 0)
+    {
+        this->mapping_method = BCMOLT_VLAN_TO_FLOW_MAPPING_METHOD_VID;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_INGRESS_FLOW_CFG_ID_MAPPING_TAG)) != 0)
+    {
+        this->mapping_tag = BCMOLT_MAPPING_TAG_METHOD_OUTER_VID;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_INGRESS_FLOW_CFG_ID_VLAN_ACTION)) != 0)
+    {
+        this->vlan_action = BCMOLT_DS_VLAN_ACTION_REMOVE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_ds_ingress_flow_cfg_data_pack(const bcmolt_gpon_iwf_ds_ingress_flow_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_INGRESS_FLOW_CFG_ID_MAPPING_METHOD)) != 0)
+    {
+        if (!bcmolt_vlan_to_flow_mapping_method_pack(this->mapping_method, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_INGRESS_FLOW_CFG_ID_MAPPING_TAG)) != 0)
+    {
+        if (!bcmolt_mapping_tag_method_pack(this->mapping_tag, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_INGRESS_FLOW_CFG_ID_VLAN_ACTION)) != 0)
+    {
+        if (!bcmolt_ds_vlan_action_pack(this->vlan_action, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_iwf_ds_ingress_flow_cfg_data_get_packed_length(const bcmolt_gpon_iwf_ds_ingress_flow_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_INGRESS_FLOW_CFG_ID_MAPPING_METHOD)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_INGRESS_FLOW_CFG_ID_MAPPING_TAG)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_INGRESS_FLOW_CFG_ID_VLAN_ACTION)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_ds_ingress_flow_cfg_data_unpack(bcmolt_gpon_iwf_ds_ingress_flow_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_INGRESS_FLOW_CFG_ID_MAPPING_METHOD)) != 0)
+    {
+        if (!bcmolt_vlan_to_flow_mapping_method_unpack(&this->mapping_method, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_INGRESS_FLOW_CFG_ID_MAPPING_TAG)) != 0)
+    {
+        if (!bcmolt_mapping_tag_method_unpack(&this->mapping_tag, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_INGRESS_FLOW_CFG_ID_VLAN_ACTION)) != 0)
+    {
+        if (!bcmolt_ds_vlan_action_unpack(&this->vlan_action, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_ds_ingress_flow_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_INGRESS_FLOW_CFG_ID_MAPPING_METHOD)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_INGRESS_FLOW_CFG_ID_MAPPING_TAG)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_INGRESS_FLOW_CFG_ID_VLAN_ACTION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_ds_ingress_flow_cfg_data_bounds_check(const bcmolt_gpon_iwf_ds_ingress_flow_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_iwf_ds_ingress_flow_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_INGRESS_FLOW_CFG_ID_MAPPING_METHOD)) != 0)
+    {
+        switch (this->mapping_method)
+        {
+            case BCMOLT_VLAN_TO_FLOW_MAPPING_METHOD_VID:
+                break;
+            case BCMOLT_VLAN_TO_FLOW_MAPPING_METHOD_MACPLUSVID:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_IWF_DS_INGRESS_FLOW_CFG_ID_MAPPING_METHOD;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_INGRESS_FLOW_CFG_ID_MAPPING_TAG)) != 0)
+    {
+        switch (this->mapping_tag)
+        {
+            case BCMOLT_MAPPING_TAG_METHOD_OUTER_VID:
+                break;
+            case BCMOLT_MAPPING_TAG_METHOD_INNER_VID:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_IWF_DS_INGRESS_FLOW_CFG_ID_MAPPING_TAG;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_DS_INGRESS_FLOW_CFG_ID_VLAN_ACTION)) != 0)
+    {
+        switch (this->vlan_action)
+        {
+            case BCMOLT_DS_VLAN_ACTION_REMOVE:
+                break;
+            case BCMOLT_DS_VLAN_ACTION_TRANSPARENT:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_IWF_DS_INGRESS_FLOW_CFG_ID_VLAN_ACTION;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_iwf_mac_table_key_set_default(bcmolt_gpon_iwf_mac_table_key *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_KEY_ID_PON_NI)) != 0)
+    {
+        this->pon_ni = (bcmolt_gpon_ni) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_KEY_ID_MAC_ADDRESS)) != 0)
+    {
+        bcmos_mac_address_init(&this->mac_address);
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_KEY_ID_VLAN)) != 0)
+    {
+        this->vlan = (bcmolt_vlan_id) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_mac_table_key_pack(const bcmolt_gpon_iwf_mac_table_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, (uint8_t) this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_KEY_ID_MAC_ADDRESS)) != 0)
+    {
+        if (!bcmolt_buf_write_mac_address(buf, this->mac_address))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_KEY_ID_VLAN)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->vlan))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_iwf_mac_table_key_get_packed_length(const bcmolt_gpon_iwf_mac_table_key *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_KEY_ID_PON_NI)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_KEY_ID_MAC_ADDRESS)) != 0)
+    {
+        count += 6;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_KEY_ID_VLAN)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_mac_table_key_unpack(bcmolt_gpon_iwf_mac_table_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, (uint8_t *) &this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_KEY_ID_MAC_ADDRESS)) != 0)
+    {
+        if (!bcmolt_buf_read_mac_address(buf, &this->mac_address))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_KEY_ID_VLAN)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->vlan))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_mac_table_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_KEY_ID_MAC_ADDRESS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 6))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_KEY_ID_VLAN)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_mac_table_key_bounds_check(const bcmolt_gpon_iwf_mac_table_key *this, bcmolt_presence_mask fields_present, bcmolt_gpon_iwf_mac_table_key_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_KEY_ID_PON_NI)) != 0)
+    {
+        if (this->pon_ni > (bcmolt_gpon_ni) 15)
+        {
+            *failed_prop = BCMOLT_GPON_IWF_MAC_TABLE_KEY_ID_PON_NI;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_iwf_mac_table_cfg_data_set_default(bcmolt_gpon_iwf_mac_table_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_CFG_ID_FLOW_ID)) != 0)
+    {
+        this->flow_id = (bcmolt_flow_id) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_CFG_ID_STAT)) != 0)
+    {
+        this->stat = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_CFG_ID_GEM_PORT_ID)) != 0)
+    {
+        this->gem_port_id = (bcmolt_gpon_gem_id) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_CFG_ID_ONU_ID)) != 0)
+    {
+        this->onu_id = (bcmolt_gpon_onu_id) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_mac_table_cfg_data_pack(const bcmolt_gpon_iwf_mac_table_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_CFG_ID_FLOW_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->flow_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_CFG_ID_STAT)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->stat))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_CFG_ID_GEM_PORT_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->gem_port_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_CFG_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->onu_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_iwf_mac_table_cfg_data_get_packed_length(const bcmolt_gpon_iwf_mac_table_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_CFG_ID_FLOW_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_CFG_ID_STAT)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_CFG_ID_GEM_PORT_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_CFG_ID_ONU_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_mac_table_cfg_data_unpack(bcmolt_gpon_iwf_mac_table_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_CFG_ID_FLOW_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->flow_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_CFG_ID_STAT)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->stat))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_CFG_ID_GEM_PORT_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->gem_port_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_CFG_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->onu_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_mac_table_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_CFG_ID_FLOW_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_CFG_ID_STAT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_CFG_ID_GEM_PORT_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_CFG_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_mac_table_cfg_data_bounds_check(const bcmolt_gpon_iwf_mac_table_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_iwf_mac_table_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_CFG_ID_FLOW_ID)) != 0)
+    {
+        if (this->flow_id > (bcmolt_flow_id) 4095)
+        {
+            *failed_prop = BCMOLT_GPON_IWF_MAC_TABLE_CFG_ID_FLOW_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_CFG_ID_GEM_PORT_ID)) != 0)
+    {
+        if (this->gem_port_id > (bcmolt_gpon_gem_id) 4095)
+        {
+            *failed_prop = BCMOLT_GPON_IWF_MAC_TABLE_CFG_ID_GEM_PORT_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_CFG_ID_ONU_ID)) != 0)
+    {
+        if (this->onu_id > (bcmolt_gpon_onu_id) 127)
+        {
+            *failed_prop = BCMOLT_GPON_IWF_MAC_TABLE_CFG_ID_ONU_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_iwf_mac_table_mac_dropped_data_set_default(bcmolt_gpon_iwf_mac_table_mac_dropped_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_MAC_DROPPED_ID_FLOW_ID)) != 0)
+    {
+        this->flow_id = (bcmolt_flow_id) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_mac_table_mac_dropped_data_pack(const bcmolt_gpon_iwf_mac_table_mac_dropped_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_MAC_DROPPED_ID_FLOW_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->flow_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_iwf_mac_table_mac_dropped_data_get_packed_length(const bcmolt_gpon_iwf_mac_table_mac_dropped_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_MAC_DROPPED_ID_FLOW_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_mac_table_mac_dropped_data_unpack(bcmolt_gpon_iwf_mac_table_mac_dropped_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_MAC_DROPPED_ID_FLOW_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->flow_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_mac_table_mac_dropped_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_MAC_DROPPED_ID_FLOW_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_mac_table_mac_dropped_data_bounds_check(const bcmolt_gpon_iwf_mac_table_mac_dropped_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_iwf_mac_table_mac_dropped_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_MAC_DROPPED_ID_FLOW_ID)) != 0)
+    {
+        if (this->flow_id > (bcmolt_flow_id) 4095)
+        {
+            *failed_prop = BCMOLT_GPON_IWF_MAC_TABLE_MAC_DROPPED_ID_FLOW_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_iwf_mac_table_mac_move_data_set_default(bcmolt_gpon_iwf_mac_table_mac_move_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_MAC_MOVE_ID_OLD_FLOW_ID)) != 0)
+    {
+        this->old_flow_id = (bcmolt_flow_id) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_MAC_MOVE_ID_NEW_FLOW_ID)) != 0)
+    {
+        this->new_flow_id = (bcmolt_flow_id) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_mac_table_mac_move_data_pack(const bcmolt_gpon_iwf_mac_table_mac_move_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_MAC_MOVE_ID_OLD_FLOW_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->old_flow_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_MAC_MOVE_ID_NEW_FLOW_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->new_flow_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_iwf_mac_table_mac_move_data_get_packed_length(const bcmolt_gpon_iwf_mac_table_mac_move_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_MAC_MOVE_ID_OLD_FLOW_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_MAC_MOVE_ID_NEW_FLOW_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_mac_table_mac_move_data_unpack(bcmolt_gpon_iwf_mac_table_mac_move_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_MAC_MOVE_ID_OLD_FLOW_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->old_flow_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_MAC_MOVE_ID_NEW_FLOW_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->new_flow_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_mac_table_mac_move_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_MAC_MOVE_ID_OLD_FLOW_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_MAC_MOVE_ID_NEW_FLOW_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_mac_table_mac_move_data_bounds_check(const bcmolt_gpon_iwf_mac_table_mac_move_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_iwf_mac_table_mac_move_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_MAC_MOVE_ID_OLD_FLOW_ID)) != 0)
+    {
+        if (this->old_flow_id > (bcmolt_flow_id) 4095)
+        {
+            *failed_prop = BCMOLT_GPON_IWF_MAC_TABLE_MAC_MOVE_ID_OLD_FLOW_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_MAC_MOVE_ID_NEW_FLOW_ID)) != 0)
+    {
+        if (this->new_flow_id > (bcmolt_flow_id) 4095)
+        {
+            *failed_prop = BCMOLT_GPON_IWF_MAC_TABLE_MAC_MOVE_ID_NEW_FLOW_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_iwf_mac_table_new_mac_data_set_default(bcmolt_gpon_iwf_mac_table_new_mac_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_NEW_MAC_ID_FLOW_ID)) != 0)
+    {
+        this->flow_id = (bcmolt_flow_id) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_mac_table_new_mac_data_pack(const bcmolt_gpon_iwf_mac_table_new_mac_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_NEW_MAC_ID_FLOW_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->flow_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_iwf_mac_table_new_mac_data_get_packed_length(const bcmolt_gpon_iwf_mac_table_new_mac_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_NEW_MAC_ID_FLOW_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_mac_table_new_mac_data_unpack(bcmolt_gpon_iwf_mac_table_new_mac_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_NEW_MAC_ID_FLOW_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->flow_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_mac_table_new_mac_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_NEW_MAC_ID_FLOW_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_mac_table_new_mac_data_bounds_check(const bcmolt_gpon_iwf_mac_table_new_mac_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_iwf_mac_table_new_mac_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_NEW_MAC_ID_FLOW_ID)) != 0)
+    {
+        if (this->flow_id > (bcmolt_flow_id) 4095)
+        {
+            *failed_prop = BCMOLT_GPON_IWF_MAC_TABLE_NEW_MAC_ID_FLOW_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_iwf_mac_table_auto_cfg_data_set_default(bcmolt_gpon_iwf_mac_table_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_AUTO_CFG_ID_MAC_AGED)) != 0)
+    {
+        this->mac_aged = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_AUTO_CFG_ID_MAC_DROPPED)) != 0)
+    {
+        this->mac_dropped = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_AUTO_CFG_ID_MAC_MOVE)) != 0)
+    {
+        this->mac_move = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_AUTO_CFG_ID_NEW_MAC)) != 0)
+    {
+        this->new_mac = BCMOS_FALSE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_mac_table_auto_cfg_data_pack(const bcmolt_gpon_iwf_mac_table_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_AUTO_CFG_ID_MAC_AGED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->mac_aged))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_AUTO_CFG_ID_MAC_DROPPED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->mac_dropped))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_AUTO_CFG_ID_MAC_MOVE)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->mac_move))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_AUTO_CFG_ID_NEW_MAC)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->new_mac))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_iwf_mac_table_auto_cfg_data_get_packed_length(const bcmolt_gpon_iwf_mac_table_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_AUTO_CFG_ID_MAC_AGED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_AUTO_CFG_ID_MAC_DROPPED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_AUTO_CFG_ID_MAC_MOVE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_AUTO_CFG_ID_NEW_MAC)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_mac_table_auto_cfg_data_unpack(bcmolt_gpon_iwf_mac_table_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_AUTO_CFG_ID_MAC_AGED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->mac_aged))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_AUTO_CFG_ID_MAC_DROPPED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->mac_dropped))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_AUTO_CFG_ID_MAC_MOVE)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->mac_move))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_AUTO_CFG_ID_NEW_MAC)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->new_mac))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_mac_table_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_AUTO_CFG_ID_MAC_AGED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_AUTO_CFG_ID_MAC_DROPPED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_AUTO_CFG_ID_MAC_MOVE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_AUTO_CFG_ID_NEW_MAC)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_mac_table_auto_cfg_data_bounds_check(const bcmolt_gpon_iwf_mac_table_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_iwf_mac_table_auto_cfg_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_iwf_us_flow_key_set_default(bcmolt_gpon_iwf_us_flow_key *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_US_FLOW_KEY_ID_PON_NI)) != 0)
+    {
+        this->pon_ni = (bcmolt_gpon_ni) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_US_FLOW_KEY_ID_GEM_PORT_ID)) != 0)
+    {
+        this->gem_port_id = (bcmolt_gpon_gem_id) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_us_flow_key_pack(const bcmolt_gpon_iwf_us_flow_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_US_FLOW_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, (uint8_t) this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_US_FLOW_KEY_ID_GEM_PORT_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->gem_port_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_iwf_us_flow_key_get_packed_length(const bcmolt_gpon_iwf_us_flow_key *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_US_FLOW_KEY_ID_PON_NI)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_US_FLOW_KEY_ID_GEM_PORT_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_us_flow_key_unpack(bcmolt_gpon_iwf_us_flow_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_US_FLOW_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, (uint8_t *) &this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_US_FLOW_KEY_ID_GEM_PORT_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->gem_port_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_us_flow_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_US_FLOW_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_US_FLOW_KEY_ID_GEM_PORT_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_us_flow_key_bounds_check(const bcmolt_gpon_iwf_us_flow_key *this, bcmolt_presence_mask fields_present, bcmolt_gpon_iwf_us_flow_key_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_US_FLOW_KEY_ID_PON_NI)) != 0)
+    {
+        if (this->pon_ni > (bcmolt_gpon_ni) 15)
+        {
+            *failed_prop = BCMOLT_GPON_IWF_US_FLOW_KEY_ID_PON_NI;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_US_FLOW_KEY_ID_GEM_PORT_ID)) != 0)
+    {
+        if (this->gem_port_id > (bcmolt_gpon_gem_id) 4095)
+        {
+            *failed_prop = BCMOLT_GPON_IWF_US_FLOW_KEY_ID_GEM_PORT_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_iwf_us_flow_cfg_data_set_default(bcmolt_gpon_iwf_us_flow_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_US_FLOW_CFG_ID_FLOW_ID)) != 0)
+    {
+        this->flow_id = (bcmolt_flow_id) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_US_FLOW_CFG_ID_MAC_LEARNING)) != 0)
+    {
+        this->mac_learning = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_US_FLOW_CFG_ID_VLAN_ACTION)) != 0)
+    {
+        this->vlan_action = BCMOLT_US_VLAN_ACTION_ADD;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_US_FLOW_CFG_ID_VLAN_TAG)) != 0)
+    {
+        this->vlan_tag.vlan_id = (bcmolt_vlan_id) 0;
+        this->vlan_tag.pbit = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_US_FLOW_CFG_ID_TPID_INDEX)) != 0)
+    {
+        this->tpid_index = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_us_flow_cfg_data_pack(const bcmolt_gpon_iwf_us_flow_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_US_FLOW_CFG_ID_FLOW_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->flow_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_US_FLOW_CFG_ID_MAC_LEARNING)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->mac_learning))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_US_FLOW_CFG_ID_VLAN_ACTION)) != 0)
+    {
+        if (!bcmolt_us_vlan_action_pack(this->vlan_action, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_US_FLOW_CFG_ID_VLAN_TAG)) != 0)
+    {
+        if (!bcmolt_vlan_tag_pack(&this->vlan_tag, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_US_FLOW_CFG_ID_TPID_INDEX)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->tpid_index))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_iwf_us_flow_cfg_data_get_packed_length(const bcmolt_gpon_iwf_us_flow_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_US_FLOW_CFG_ID_FLOW_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_US_FLOW_CFG_ID_MAC_LEARNING)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_US_FLOW_CFG_ID_VLAN_ACTION)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_US_FLOW_CFG_ID_VLAN_TAG)) != 0)
+    {
+        count += 3;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_US_FLOW_CFG_ID_TPID_INDEX)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_us_flow_cfg_data_unpack(bcmolt_gpon_iwf_us_flow_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_US_FLOW_CFG_ID_FLOW_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->flow_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_US_FLOW_CFG_ID_MAC_LEARNING)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->mac_learning))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_US_FLOW_CFG_ID_VLAN_ACTION)) != 0)
+    {
+        if (!bcmolt_us_vlan_action_unpack(&this->vlan_action, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_US_FLOW_CFG_ID_VLAN_TAG)) != 0)
+    {
+        if (!bcmolt_vlan_tag_unpack(&this->vlan_tag, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_US_FLOW_CFG_ID_TPID_INDEX)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->tpid_index))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_us_flow_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_US_FLOW_CFG_ID_FLOW_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_US_FLOW_CFG_ID_MAC_LEARNING)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_US_FLOW_CFG_ID_VLAN_ACTION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_US_FLOW_CFG_ID_VLAN_TAG)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 3))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_US_FLOW_CFG_ID_TPID_INDEX)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_iwf_us_flow_cfg_data_bounds_check(const bcmolt_gpon_iwf_us_flow_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_iwf_us_flow_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_US_FLOW_CFG_ID_FLOW_ID)) != 0)
+    {
+        if (this->flow_id > (bcmolt_flow_id) 4095)
+        {
+            *failed_prop = BCMOLT_GPON_IWF_US_FLOW_CFG_ID_FLOW_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_US_FLOW_CFG_ID_VLAN_ACTION)) != 0)
+    {
+        switch (this->vlan_action)
+        {
+            case BCMOLT_US_VLAN_ACTION_ADD:
+                break;
+            case BCMOLT_US_VLAN_ACTION_TRANSPARENT:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_IWF_US_FLOW_CFG_ID_VLAN_ACTION;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_US_FLOW_CFG_ID_VLAN_TAG)) != 0)
+    {
+        if (!bcmolt_vlan_tag_bounds_check(&this->vlan_tag))
+        {
+            *failed_prop = BCMOLT_GPON_IWF_US_FLOW_CFG_ID_VLAN_TAG;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_IWF_US_FLOW_CFG_ID_TPID_INDEX)) != 0)
+    {
+        if (this->tpid_index > 1)
+        {
+            *failed_prop = BCMOLT_GPON_IWF_US_FLOW_CFG_ID_TPID_INDEX;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_ni_key_set_default(bcmolt_gpon_ni_key *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_KEY_ID_PON_NI)) != 0)
+    {
+        this->pon_ni = (bcmolt_gpon_ni) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_key_pack(const bcmolt_gpon_ni_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, (uint8_t) this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_ni_key_get_packed_length(const bcmolt_gpon_ni_key *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_KEY_ID_PON_NI)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_key_unpack(bcmolt_gpon_ni_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, (uint8_t *) &this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_key_bounds_check(const bcmolt_gpon_ni_key *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_key_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_KEY_ID_PON_NI)) != 0)
+    {
+        if (this->pon_ni > (bcmolt_gpon_ni) 15)
+        {
+            *failed_prop = BCMOLT_GPON_NI_KEY_ID_PON_NI;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_ni_cfg_data_set_default(bcmolt_gpon_ni_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PON_STATUS)) != 0)
+    {
+        this->pon_status.state = BCMOLT_PON_STATE_INACTIVE;
+        this->pon_status.los_status = BCMOLT_STATUS_OFF;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_AVAILABLE_BANDWIDTH)) != 0)
+    {
+        this->available_bandwidth.cbr_bw = 0;
+        this->available_bandwidth.total_bw = 0;
+        this->available_bandwidth.next_onu_total_bw = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_NUMBER_OF_ACTIVE_ONUS)) != 0)
+    {
+        this->number_of_active_onus = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_NUMBER_OF_ACTIVE_STANDBY_ONUS)) != 0)
+    {
+        this->number_of_active_standby_onus = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PRBS_STATUS)) != 0)
+    {
+        this->prbs_status.lock_state = BCMOLT_PRBS_LOCK_STATE_UNLOCKED;
+        this->prbs_status.error_counts = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PON_DISTANCE)) != 0)
+    {
+        this->pon_distance.max_log_distance = 20;
+        this->pon_distance.max_diff_reach = 20;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_RANGING_WINDOW_SIZE)) != 0)
+    {
+        this->ranging_window_size = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PREASSIGNED_EQUALIZATION_DELAY)) != 0)
+    {
+        this->preassigned_equalization_delay = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_EQD_CYCLES_NUMBER)) != 0)
+    {
+        this->eqd_cycles_number = 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_POWER_LEVEL)) != 0)
+    {
+        this->power_level.pls_maximum_allocation_size = 120;
+        this->power_level.mode = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_DS_FEC_MODE)) != 0)
+    {
+        this->ds_fec_mode = BCMOLT_CONTROL_STATE_ENABLE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_DRIFT_CONTROL)) != 0)
+    {
+        this->drift_control.drift_interval = 1000;
+        this->drift_control.drift_limit = 4;
+        this->drift_control.transmission_control_limit = 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_DS_BER_REPORTING_INTERVAL)) != 0)
+    {
+        this->ds_ber_reporting_interval = (bcmolt_ber_interval) 5000;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_LOS_ALARM_THRESHOLD)) != 0)
+    {
+        this->los_alarm_threshold = 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_LOS_INITIAL_VALUE)) != 0)
+    {
+        this->los_initial_value = BCMOLT_STATUS_ON;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_ONU_ALARMS_THRESHOLDS)) != 0)
+    {
+        this->onu_alarms_thresholds.losi = 4;
+        this->onu_alarms_thresholds.lofi = 4;
+        this->onu_alarms_thresholds.loami = 3;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_BER_MONITOR)) != 0)
+    {
+        this->ber_monitor.us_ber_interval = 5000;
+        this->ber_monitor.sf_threshold = 3;
+        this->ber_monitor.sd_threshold = 5;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PLOAM_ACK_TIMEOUT)) != 0)
+    {
+        this->ploam_ack_timeout = 2000;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_ONU_ACTIVATION)) != 0)
+    {
+        this->onu_activation.key_exchange = BCMOLT_CONTROL_STATE_DISABLE;
+        this->onu_activation.password_authentication = BCMOLT_CONTROL_STATE_ENABLE;
+        this->onu_activation.fail_due_to_password_authentication_failure = BCMOLT_CONTROL_STATE_ENABLE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_SN_ACQUISITION)) != 0)
+    {
+        this->sn_acquisition.interval = 1000;
+        this->sn_acquisition.control = BCMOLT_CONTROL_STATE_DISABLE;
+        this->sn_acquisition.onu_post_discovery_mode = BCMOLT_ONU_POST_DISCOVERY_MODE_DISABLE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_KEY_EXCHANGE)) != 0)
+    {
+        this->key_exchange.interval = 10000;
+        this->key_exchange.control = BCMOLT_CONTROL_STATE_DISABLE;
+        this->key_exchange.mode = BCMOLT_KEY_EXCHANGE_MODE_NORMAL;
+        this->key_exchange.encrypted_ports_only = BCMOLT_CONTROL_STATE_ENABLE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PROTECTION_SWITCHING)) != 0)
+    {
+        this->protection_switching.timeout = 100;
+        this->protection_switching.gpio_pin = BCMOLT_GPIO_PIN_UNCONFIGURED;
+        this->protection_switching.options = (bcmolt_pon_protection_switching_options) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_CBR_RT_ALLOCATION_PROFILE)) != 0)
+    {
+        this->cbr_rt_allocation_profile.ma_7 = 64;
+        this->cbr_rt_allocation_profile.ma_3 = 256;
+        this->cbr_rt_allocation_profile.ma_1 = 512;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_CBR_NRT_ALLOCATION_PROFILE)) != 0)
+    {
+        this->cbr_nrt_allocation_profile.arr[0] = 4096;
+        this->cbr_nrt_allocation_profile.arr[1] = 8192;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_DBA)) != 0)
+    {
+        this->dba.sr_reporting_block_size = 48;
+        this->dba.dba_mode = BCMOLT_DBA_MODE_NORMAL;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_POWER_MANAGEMENT)) != 0)
+    {
+        this->power_management.ilowpower = 1600;
+        this->power_management.iaware = 160;
+        this->power_management.itransinit = 80;
+        this->power_management.itxinit = 40;
+        this->power_management.irxoff = 1600;
+        this->power_management.low_power_clobi = 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_ROGUE_ONU_DETECTION_PROCESS)) != 0)
+    {
+        this->rogue_onu_detection_process.control = BCMOLT_CONTROL_STATE_DISABLE;
+        this->rogue_onu_detection_process.detection_algorithm.algorithm_type = BCMOLT_ROGUE_DETECTION_ALGORITHM_TYPE_EARLY_ROGUE_DETECTION;
+        this->rogue_onu_detection_process.detection_algorithm.u.early_rogue_detection.measurement_type = BCMOLT_ROGUE_DETECTION_WINDOW_SILENT_WINDOW;
+        this->rogue_onu_detection_process.detection_algorithm.u.early_rogue_detection.interval = 10000;
+        this->rogue_onu_detection_process.detection_algorithm.u.early_rogue_detection.second_ranging_window = BCMOS_FALSE;
+        this->rogue_onu_detection_process.detection_algorithm.u.early_rogue_detection.alloc_type_to_scan = BCMOLT_ALLOC_TYPE_TO_SCAN_ALL;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PERIODIC_STANDBY_PON_MONITORING)) != 0)
+    {
+        this->periodic_standby_pon_monitoring.interval = 5000;
+        this->periodic_standby_pon_monitoring.control = BCMOLT_CONTROL_STATE_DISABLE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PRBS_CHECKER)) != 0)
+    {
+        this->prbs_checker.polynom = BCMOLT_PRBS_POLYNOMIAL_PRBS_7;
+        this->prbs_checker.mode = BCMOLT_PRBS_CHECKER_MODE_SELF_SYNC;
+        this->prbs_checker.data_invert = BCMOS_FALSE;
+        this->prbs_checker.control = BCMOLT_CONTROL_STATE_DISABLE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PRBS_GENERATOR)) != 0)
+    {
+        this->prbs_generator.polynom = BCMOLT_PRBS_POLYNOMIAL_PRBS_7;
+        this->prbs_generator.error_insert = BCMOS_FALSE;
+        this->prbs_generator.invert = BCMOS_FALSE;
+        this->prbs_generator.control = BCMOLT_CONTROL_STATE_DISABLE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_MIN_DATA_ALLOC_ID)) != 0)
+    {
+        this->min_data_alloc_id = (bcmolt_gpon_alloc_id) 256;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_AUTOMATIC_ONU_DEACTIVATION)) != 0)
+    {
+        this->automatic_onu_deactivation.los = BCMOS_TRUE;
+        this->automatic_onu_deactivation.onu_alarms = BCMOS_TRUE;
+        this->automatic_onu_deactivation.tiwi = BCMOS_TRUE;
+        this->automatic_onu_deactivation.ack_timeout = BCMOS_TRUE;
+        this->automatic_onu_deactivation.sfi = BCMOS_TRUE;
+        this->automatic_onu_deactivation.loki = BCMOS_TRUE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_US_BANDWIDTH_LIMIT)) != 0)
+    {
+        this->us_bandwidth_limit = 155520000UL;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_ALL_ONUS)) != 0)
+    {
+        this->all_onus.len = 0;
+        this->all_onus.val = NULL;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_ALL_MCAST_GEM_PORTS)) != 0)
+    {
+        this->all_mcast_gem_ports.len = 0;
+        this->all_mcast_gem_ports.val = NULL;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_DEBUG)) != 0)
+    {
+        this->debug.number_of_gem_ports_per_onu = 64;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_ONU_UPGRADE_PARAMS)) != 0)
+    {
+        this->onu_upgrade_params.response_timeout_ms = 1000;
+        this->onu_upgrade_params.max_retry_count = 23;
+        this->onu_upgrade_params.omci_format = BCMOLT_OMCI_DEVICE_ID_EXTENDED;
+        this->onu_upgrade_params.window_size = 32;
+        this->onu_upgrade_params.activate_commit = BCMOS_FALSE;
+        this->onu_upgrade_params.delay_for_commit_ms = 40000UL;
+        this->onu_upgrade_params.max_activation_attempts = 23;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PS_C_WAIT_BEFORE_DEACTIVATION_TIMEOUT)) != 0)
+    {
+        this->ps_c_wait_before_deactivation_timeout = 1000;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_BIP32_INDICATION_CONTROL)) != 0)
+    {
+        this->bip32_indication_control = BCMOLT_CONTROL_STATE_ENABLE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_cfg_data_pack(const bcmolt_gpon_ni_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PON_STATUS)) != 0)
+    {
+        if (!bcmolt_pon_status_pack(&this->pon_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_AVAILABLE_BANDWIDTH)) != 0)
+    {
+        if (!bcmolt_pon_available_bandwidth_pack(&this->available_bandwidth, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_NUMBER_OF_ACTIVE_ONUS)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, this->number_of_active_onus))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_NUMBER_OF_ACTIVE_STANDBY_ONUS)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, this->number_of_active_standby_onus))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PRBS_STATUS)) != 0)
+    {
+        if (!bcmolt_prbs_status_pack(&this->prbs_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PON_DISTANCE)) != 0)
+    {
+        if (!bcmolt_pon_distance_pack(&this->pon_distance, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_RANGING_WINDOW_SIZE)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->ranging_window_size))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PREASSIGNED_EQUALIZATION_DELAY)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->preassigned_equalization_delay))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_EQD_CYCLES_NUMBER)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->eqd_cycles_number))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_POWER_LEVEL)) != 0)
+    {
+        if (!bcmolt_pon_power_level_pack(&this->power_level, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_DS_FEC_MODE)) != 0)
+    {
+        if (!bcmolt_control_state_pack(this->ds_fec_mode, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_DRIFT_CONTROL)) != 0)
+    {
+        if (!bcmolt_pon_drift_control_pack(&this->drift_control, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_DS_BER_REPORTING_INTERVAL)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, (uint32_t) this->ds_ber_reporting_interval))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_LOS_ALARM_THRESHOLD)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->los_alarm_threshold))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_LOS_INITIAL_VALUE)) != 0)
+    {
+        if (!bcmolt_status_pack(this->los_initial_value, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_ONU_ALARMS_THRESHOLDS)) != 0)
+    {
+        if (!bcmolt_gpon_onu_alarms_thresholds_pack(&this->onu_alarms_thresholds, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_BER_MONITOR)) != 0)
+    {
+        if (!bcmolt_ber_monitor_params_pack(&this->ber_monitor, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PLOAM_ACK_TIMEOUT)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, this->ploam_ack_timeout))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_ONU_ACTIVATION)) != 0)
+    {
+        if (!bcmolt_gpon_onu_activation_pack(&this->onu_activation, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_SN_ACQUISITION)) != 0)
+    {
+        if (!bcmolt_gpon_sn_acquisition_pack(&this->sn_acquisition, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_KEY_EXCHANGE)) != 0)
+    {
+        if (!bcmolt_gpon_key_exchange_pack(&this->key_exchange, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PROTECTION_SWITCHING)) != 0)
+    {
+        if (!bcmolt_pon_protection_switching_pack(&this->protection_switching, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_CBR_RT_ALLOCATION_PROFILE)) != 0)
+    {
+        if (!bcmolt_cbr_rt_allocation_profile_pack(&this->cbr_rt_allocation_profile, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_CBR_NRT_ALLOCATION_PROFILE)) != 0)
+    {
+        if (!bcmolt_arr_u16_2_pack(&this->cbr_nrt_allocation_profile, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_DBA)) != 0)
+    {
+        if (!bcmolt_pon_dba_pack(&this->dba, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_POWER_MANAGEMENT)) != 0)
+    {
+        if (!bcmolt_onu_power_management_configuration_pack(&this->power_management, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_ROGUE_ONU_DETECTION_PROCESS)) != 0)
+    {
+        if (!bcmolt_rogue_onu_detection_process_pack(&this->rogue_onu_detection_process, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PERIODIC_STANDBY_PON_MONITORING)) != 0)
+    {
+        if (!bcmolt_periodic_standby_pon_monitoring_pack(&this->periodic_standby_pon_monitoring, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PRBS_CHECKER)) != 0)
+    {
+        if (!bcmolt_prbs_checker_config_pack(&this->prbs_checker, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PRBS_GENERATOR)) != 0)
+    {
+        if (!bcmolt_prbs_generator_config_pack(&this->prbs_generator, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_MIN_DATA_ALLOC_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->min_data_alloc_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_AUTOMATIC_ONU_DEACTIVATION)) != 0)
+    {
+        if (!bcmolt_automatic_onu_deactivation_pack(&this->automatic_onu_deactivation, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_US_BANDWIDTH_LIMIT)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->us_bandwidth_limit))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_ALL_ONUS)) != 0)
+    {
+        if (!bcmolt_gpon_onu_with_state_list_u16_max_128_pack(&this->all_onus, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_ALL_MCAST_GEM_PORTS)) != 0)
+    {
+        if (!bcmolt_gpon_gem_port_with_state_list_u16_max_128_pack(&this->all_mcast_gem_ports, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_DEBUG)) != 0)
+    {
+        if (!bcmolt_gpon_ni_debug_pack(&this->debug, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_ONU_UPGRADE_PARAMS)) != 0)
+    {
+        if (!bcmolt_gpon_onu_upgrade_params_pack(&this->onu_upgrade_params, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PS_C_WAIT_BEFORE_DEACTIVATION_TIMEOUT)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, this->ps_c_wait_before_deactivation_timeout))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_BIP32_INDICATION_CONTROL)) != 0)
+    {
+        if (!bcmolt_control_state_pack(this->bip32_indication_control, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_ni_cfg_data_get_packed_length(const bcmolt_gpon_ni_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PON_STATUS)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_AVAILABLE_BANDWIDTH)) != 0)
+    {
+        count += 12;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_NUMBER_OF_ACTIVE_ONUS)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_NUMBER_OF_ACTIVE_STANDBY_ONUS)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PRBS_STATUS)) != 0)
+    {
+        count += 5;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PON_DISTANCE)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_RANGING_WINDOW_SIZE)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PREASSIGNED_EQUALIZATION_DELAY)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_EQD_CYCLES_NUMBER)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_POWER_LEVEL)) != 0)
+    {
+        count += 5;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_DS_FEC_MODE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_DRIFT_CONTROL)) != 0)
+    {
+        count += 6;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_DS_BER_REPORTING_INTERVAL)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_LOS_ALARM_THRESHOLD)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_LOS_INITIAL_VALUE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_ONU_ALARMS_THRESHOLDS)) != 0)
+    {
+        count += 3;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_BER_MONITOR)) != 0)
+    {
+        count += 6;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PLOAM_ACK_TIMEOUT)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_ONU_ACTIVATION)) != 0)
+    {
+        count += 3;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_SN_ACQUISITION)) != 0)
+    {
+        count += 6;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_KEY_EXCHANGE)) != 0)
+    {
+        count += 7;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PROTECTION_SWITCHING)) != 0)
+    {
+        count += 7;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_CBR_RT_ALLOCATION_PROFILE)) != 0)
+    {
+        count += 6;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_CBR_NRT_ALLOCATION_PROFILE)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_DBA)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_POWER_MANAGEMENT)) != 0)
+    {
+        count += 18;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_ROGUE_ONU_DETECTION_PROCESS)) != 0)
+    {
+        count += bcmolt_rogue_onu_detection_process_get_packed_length(&this->rogue_onu_detection_process);
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PERIODIC_STANDBY_PON_MONITORING)) != 0)
+    {
+        count += 5;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PRBS_CHECKER)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PRBS_GENERATOR)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_MIN_DATA_ALLOC_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_AUTOMATIC_ONU_DEACTIVATION)) != 0)
+    {
+        count += 6;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_US_BANDWIDTH_LIMIT)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_ALL_ONUS)) != 0)
+    {
+        count += bcmolt_gpon_onu_with_state_list_u16_max_128_get_packed_length(&this->all_onus);
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_ALL_MCAST_GEM_PORTS)) != 0)
+    {
+        count += bcmolt_gpon_gem_port_with_state_list_u16_max_128_get_packed_length(&this->all_mcast_gem_ports);
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_DEBUG)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_ONU_UPGRADE_PARAMS)) != 0)
+    {
+        count += 14;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PS_C_WAIT_BEFORE_DEACTIVATION_TIMEOUT)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_BIP32_INDICATION_CONTROL)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_cfg_data_unpack(bcmolt_gpon_ni_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PON_STATUS)) != 0)
+    {
+        if (!bcmolt_pon_status_unpack(&this->pon_status, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_AVAILABLE_BANDWIDTH)) != 0)
+    {
+        if (!bcmolt_pon_available_bandwidth_unpack(&this->available_bandwidth, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_NUMBER_OF_ACTIVE_ONUS)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, &this->number_of_active_onus))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_NUMBER_OF_ACTIVE_STANDBY_ONUS)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, &this->number_of_active_standby_onus))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PRBS_STATUS)) != 0)
+    {
+        if (!bcmolt_prbs_status_unpack(&this->prbs_status, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PON_DISTANCE)) != 0)
+    {
+        if (!bcmolt_pon_distance_unpack(&this->pon_distance, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_RANGING_WINDOW_SIZE)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->ranging_window_size))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PREASSIGNED_EQUALIZATION_DELAY)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->preassigned_equalization_delay))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_EQD_CYCLES_NUMBER)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->eqd_cycles_number))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_POWER_LEVEL)) != 0)
+    {
+        if (!bcmolt_pon_power_level_unpack(&this->power_level, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_DS_FEC_MODE)) != 0)
+    {
+        if (!bcmolt_control_state_unpack(&this->ds_fec_mode, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_DRIFT_CONTROL)) != 0)
+    {
+        if (!bcmolt_pon_drift_control_unpack(&this->drift_control, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_DS_BER_REPORTING_INTERVAL)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, (uint32_t *) &this->ds_ber_reporting_interval))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_LOS_ALARM_THRESHOLD)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->los_alarm_threshold))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_LOS_INITIAL_VALUE)) != 0)
+    {
+        if (!bcmolt_status_unpack(&this->los_initial_value, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_ONU_ALARMS_THRESHOLDS)) != 0)
+    {
+        if (!bcmolt_gpon_onu_alarms_thresholds_unpack(&this->onu_alarms_thresholds, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_BER_MONITOR)) != 0)
+    {
+        if (!bcmolt_ber_monitor_params_unpack(&this->ber_monitor, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PLOAM_ACK_TIMEOUT)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, &this->ploam_ack_timeout))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_ONU_ACTIVATION)) != 0)
+    {
+        if (!bcmolt_gpon_onu_activation_unpack(&this->onu_activation, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_SN_ACQUISITION)) != 0)
+    {
+        if (!bcmolt_gpon_sn_acquisition_unpack(&this->sn_acquisition, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_KEY_EXCHANGE)) != 0)
+    {
+        if (!bcmolt_gpon_key_exchange_unpack(&this->key_exchange, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PROTECTION_SWITCHING)) != 0)
+    {
+        if (!bcmolt_pon_protection_switching_unpack(&this->protection_switching, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_CBR_RT_ALLOCATION_PROFILE)) != 0)
+    {
+        if (!bcmolt_cbr_rt_allocation_profile_unpack(&this->cbr_rt_allocation_profile, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_CBR_NRT_ALLOCATION_PROFILE)) != 0)
+    {
+        if (!bcmolt_arr_u16_2_unpack(&this->cbr_nrt_allocation_profile, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_DBA)) != 0)
+    {
+        if (!bcmolt_pon_dba_unpack(&this->dba, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_POWER_MANAGEMENT)) != 0)
+    {
+        if (!bcmolt_onu_power_management_configuration_unpack(&this->power_management, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_ROGUE_ONU_DETECTION_PROCESS)) != 0)
+    {
+        if (!bcmolt_rogue_onu_detection_process_unpack(&this->rogue_onu_detection_process, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PERIODIC_STANDBY_PON_MONITORING)) != 0)
+    {
+        if (!bcmolt_periodic_standby_pon_monitoring_unpack(&this->periodic_standby_pon_monitoring, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PRBS_CHECKER)) != 0)
+    {
+        if (!bcmolt_prbs_checker_config_unpack(&this->prbs_checker, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PRBS_GENERATOR)) != 0)
+    {
+        if (!bcmolt_prbs_generator_config_unpack(&this->prbs_generator, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_MIN_DATA_ALLOC_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->min_data_alloc_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_AUTOMATIC_ONU_DEACTIVATION)) != 0)
+    {
+        if (!bcmolt_automatic_onu_deactivation_unpack(&this->automatic_onu_deactivation, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_US_BANDWIDTH_LIMIT)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->us_bandwidth_limit))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_ALL_ONUS)) != 0)
+    {
+        if (!bcmolt_gpon_onu_with_state_list_u16_max_128_unpack(&this->all_onus, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_ALL_MCAST_GEM_PORTS)) != 0)
+    {
+        if (!bcmolt_gpon_gem_port_with_state_list_u16_max_128_unpack(&this->all_mcast_gem_ports, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_DEBUG)) != 0)
+    {
+        if (!bcmolt_gpon_ni_debug_unpack(&this->debug, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_ONU_UPGRADE_PARAMS)) != 0)
+    {
+        if (!bcmolt_gpon_onu_upgrade_params_unpack(&this->onu_upgrade_params, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PS_C_WAIT_BEFORE_DEACTIVATION_TIMEOUT)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, &this->ps_c_wait_before_deactivation_timeout))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_BIP32_INDICATION_CONTROL)) != 0)
+    {
+        if (!bcmolt_control_state_unpack(&this->bip32_indication_control, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PON_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_AVAILABLE_BANDWIDTH)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 12))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_NUMBER_OF_ACTIVE_ONUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_NUMBER_OF_ACTIVE_STANDBY_ONUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PRBS_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 5))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PON_DISTANCE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_RANGING_WINDOW_SIZE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PREASSIGNED_EQUALIZATION_DELAY)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_EQD_CYCLES_NUMBER)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_POWER_LEVEL)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 5))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_DS_FEC_MODE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_DRIFT_CONTROL)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 6))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_DS_BER_REPORTING_INTERVAL)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_LOS_ALARM_THRESHOLD)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_LOS_INITIAL_VALUE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_ONU_ALARMS_THRESHOLDS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 3))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_BER_MONITOR)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 6))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PLOAM_ACK_TIMEOUT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_ONU_ACTIVATION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 3))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_SN_ACQUISITION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 6))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_KEY_EXCHANGE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 7))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PROTECTION_SWITCHING)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 7))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_CBR_RT_ALLOCATION_PROFILE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 6))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_CBR_NRT_ALLOCATION_PROFILE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_DBA)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_POWER_MANAGEMENT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 18))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_ROGUE_ONU_DETECTION_PROCESS)) != 0)
+    {
+        if (!bcmolt_rogue_onu_detection_process_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PERIODIC_STANDBY_PON_MONITORING)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 5))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PRBS_CHECKER)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PRBS_GENERATOR)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_MIN_DATA_ALLOC_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_AUTOMATIC_ONU_DEACTIVATION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 6))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_US_BANDWIDTH_LIMIT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_ALL_ONUS)) != 0)
+    {
+        if (!bcmolt_gpon_onu_with_state_list_u16_max_128_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_ALL_MCAST_GEM_PORTS)) != 0)
+    {
+        if (!bcmolt_gpon_gem_port_with_state_list_u16_max_128_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_DEBUG)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_ONU_UPGRADE_PARAMS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 14))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PS_C_WAIT_BEFORE_DEACTIVATION_TIMEOUT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_BIP32_INDICATION_CONTROL)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_cfg_data_bounds_check(const bcmolt_gpon_ni_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PON_STATUS)) != 0)
+    {
+        if (!bcmolt_pon_status_bounds_check(&this->pon_status))
+        {
+            *failed_prop = BCMOLT_GPON_NI_CFG_ID_PON_STATUS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_AVAILABLE_BANDWIDTH)) != 0)
+    {
+        if (!bcmolt_pon_available_bandwidth_bounds_check(&this->available_bandwidth))
+        {
+            *failed_prop = BCMOLT_GPON_NI_CFG_ID_AVAILABLE_BANDWIDTH;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PRBS_STATUS)) != 0)
+    {
+        if (!bcmolt_prbs_status_bounds_check(&this->prbs_status))
+        {
+            *failed_prop = BCMOLT_GPON_NI_CFG_ID_PRBS_STATUS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PON_DISTANCE)) != 0)
+    {
+        if (!bcmolt_pon_distance_bounds_check(&this->pon_distance))
+        {
+            *failed_prop = BCMOLT_GPON_NI_CFG_ID_PON_DISTANCE;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PREASSIGNED_EQUALIZATION_DELAY)) != 0)
+    {
+        if (this->preassigned_equalization_delay > 16776960UL)
+        {
+            *failed_prop = BCMOLT_GPON_NI_CFG_ID_PREASSIGNED_EQUALIZATION_DELAY;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_EQD_CYCLES_NUMBER)) != 0)
+    {
+        if (this->eqd_cycles_number > 255)
+        {
+            *failed_prop = BCMOLT_GPON_NI_CFG_ID_EQD_CYCLES_NUMBER;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_POWER_LEVEL)) != 0)
+    {
+        if (!bcmolt_pon_power_level_bounds_check(&this->power_level))
+        {
+            *failed_prop = BCMOLT_GPON_NI_CFG_ID_POWER_LEVEL;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_DS_FEC_MODE)) != 0)
+    {
+        switch (this->ds_fec_mode)
+        {
+            case BCMOLT_CONTROL_STATE_DISABLE:
+                break;
+            case BCMOLT_CONTROL_STATE_ENABLE:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_NI_CFG_ID_DS_FEC_MODE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_DRIFT_CONTROL)) != 0)
+    {
+        if (!bcmolt_pon_drift_control_bounds_check(&this->drift_control))
+        {
+            *failed_prop = BCMOLT_GPON_NI_CFG_ID_DRIFT_CONTROL;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_DS_BER_REPORTING_INTERVAL)) != 0)
+    {
+        if (this->ds_ber_reporting_interval > (bcmolt_ber_interval) 536870911UL)
+        {
+            *failed_prop = BCMOLT_GPON_NI_CFG_ID_DS_BER_REPORTING_INTERVAL;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_LOS_INITIAL_VALUE)) != 0)
+    {
+        switch (this->los_initial_value)
+        {
+            case BCMOLT_STATUS_OFF:
+                break;
+            case BCMOLT_STATUS_ON:
+                break;
+            case BCMOLT_STATUS_NO_CHANGE:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_NI_CFG_ID_LOS_INITIAL_VALUE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_ONU_ALARMS_THRESHOLDS)) != 0)
+    {
+        if (!bcmolt_gpon_onu_alarms_thresholds_bounds_check(&this->onu_alarms_thresholds))
+        {
+            *failed_prop = BCMOLT_GPON_NI_CFG_ID_ONU_ALARMS_THRESHOLDS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_BER_MONITOR)) != 0)
+    {
+        if (!bcmolt_ber_monitor_params_bounds_check(&this->ber_monitor))
+        {
+            *failed_prop = BCMOLT_GPON_NI_CFG_ID_BER_MONITOR;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_ONU_ACTIVATION)) != 0)
+    {
+        if (!bcmolt_gpon_onu_activation_bounds_check(&this->onu_activation))
+        {
+            *failed_prop = BCMOLT_GPON_NI_CFG_ID_ONU_ACTIVATION;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_SN_ACQUISITION)) != 0)
+    {
+        if (!bcmolt_gpon_sn_acquisition_bounds_check(&this->sn_acquisition))
+        {
+            *failed_prop = BCMOLT_GPON_NI_CFG_ID_SN_ACQUISITION;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_KEY_EXCHANGE)) != 0)
+    {
+        if (!bcmolt_gpon_key_exchange_bounds_check(&this->key_exchange))
+        {
+            *failed_prop = BCMOLT_GPON_NI_CFG_ID_KEY_EXCHANGE;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PROTECTION_SWITCHING)) != 0)
+    {
+        if (!bcmolt_pon_protection_switching_bounds_check(&this->protection_switching))
+        {
+            *failed_prop = BCMOLT_GPON_NI_CFG_ID_PROTECTION_SWITCHING;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_CBR_RT_ALLOCATION_PROFILE)) != 0)
+    {
+        if (!bcmolt_cbr_rt_allocation_profile_bounds_check(&this->cbr_rt_allocation_profile))
+        {
+            *failed_prop = BCMOLT_GPON_NI_CFG_ID_CBR_RT_ALLOCATION_PROFILE;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_CBR_NRT_ALLOCATION_PROFILE)) != 0)
+    {
+        if (!bcmolt_arr_u16_2_bounds_check(&this->cbr_nrt_allocation_profile))
+        {
+            *failed_prop = BCMOLT_GPON_NI_CFG_ID_CBR_NRT_ALLOCATION_PROFILE;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_DBA)) != 0)
+    {
+        if (!bcmolt_pon_dba_bounds_check(&this->dba))
+        {
+            *failed_prop = BCMOLT_GPON_NI_CFG_ID_DBA;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_POWER_MANAGEMENT)) != 0)
+    {
+        if (!bcmolt_onu_power_management_configuration_bounds_check(&this->power_management))
+        {
+            *failed_prop = BCMOLT_GPON_NI_CFG_ID_POWER_MANAGEMENT;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_ROGUE_ONU_DETECTION_PROCESS)) != 0)
+    {
+        if (!bcmolt_rogue_onu_detection_process_bounds_check(&this->rogue_onu_detection_process))
+        {
+            *failed_prop = BCMOLT_GPON_NI_CFG_ID_ROGUE_ONU_DETECTION_PROCESS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PERIODIC_STANDBY_PON_MONITORING)) != 0)
+    {
+        if (!bcmolt_periodic_standby_pon_monitoring_bounds_check(&this->periodic_standby_pon_monitoring))
+        {
+            *failed_prop = BCMOLT_GPON_NI_CFG_ID_PERIODIC_STANDBY_PON_MONITORING;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PRBS_CHECKER)) != 0)
+    {
+        if (!bcmolt_prbs_checker_config_bounds_check(&this->prbs_checker))
+        {
+            *failed_prop = BCMOLT_GPON_NI_CFG_ID_PRBS_CHECKER;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_PRBS_GENERATOR)) != 0)
+    {
+        if (!bcmolt_prbs_generator_config_bounds_check(&this->prbs_generator))
+        {
+            *failed_prop = BCMOLT_GPON_NI_CFG_ID_PRBS_GENERATOR;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_MIN_DATA_ALLOC_ID)) != 0)
+    {
+        if (this->min_data_alloc_id < (bcmolt_gpon_alloc_id) 256)
+        {
+            *failed_prop = BCMOLT_GPON_NI_CFG_ID_MIN_DATA_ALLOC_ID;
+            return BCMOS_FALSE;
+        }
+
+        if (this->min_data_alloc_id > (bcmolt_gpon_alloc_id) 3200)
+        {
+            *failed_prop = BCMOLT_GPON_NI_CFG_ID_MIN_DATA_ALLOC_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_AUTOMATIC_ONU_DEACTIVATION)) != 0)
+    {
+        if (!bcmolt_automatic_onu_deactivation_bounds_check(&this->automatic_onu_deactivation))
+        {
+            *failed_prop = BCMOLT_GPON_NI_CFG_ID_AUTOMATIC_ONU_DEACTIVATION;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_US_BANDWIDTH_LIMIT)) != 0)
+    {
+        if (this->us_bandwidth_limit < 800000UL)
+        {
+            *failed_prop = BCMOLT_GPON_NI_CFG_ID_US_BANDWIDTH_LIMIT;
+            return BCMOS_FALSE;
+        }
+
+        if (this->us_bandwidth_limit > 155520000UL)
+        {
+            *failed_prop = BCMOLT_GPON_NI_CFG_ID_US_BANDWIDTH_LIMIT;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_ALL_ONUS)) != 0)
+    {
+        if (this->all_onus.len > 128)
+        {
+            return BCMOS_FALSE;
+        }
+
+        if (!bcmolt_gpon_onu_with_state_list_u16_max_128_bounds_check(&this->all_onus))
+        {
+            *failed_prop = BCMOLT_GPON_NI_CFG_ID_ALL_ONUS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_ALL_MCAST_GEM_PORTS)) != 0)
+    {
+        if (this->all_mcast_gem_ports.len > 128)
+        {
+            return BCMOS_FALSE;
+        }
+
+        if (!bcmolt_gpon_gem_port_with_state_list_u16_max_128_bounds_check(&this->all_mcast_gem_ports))
+        {
+            *failed_prop = BCMOLT_GPON_NI_CFG_ID_ALL_MCAST_GEM_PORTS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_DEBUG)) != 0)
+    {
+        if (!bcmolt_gpon_ni_debug_bounds_check(&this->debug))
+        {
+            *failed_prop = BCMOLT_GPON_NI_CFG_ID_DEBUG;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_ONU_UPGRADE_PARAMS)) != 0)
+    {
+        if (!bcmolt_gpon_onu_upgrade_params_bounds_check(&this->onu_upgrade_params))
+        {
+            *failed_prop = BCMOLT_GPON_NI_CFG_ID_ONU_UPGRADE_PARAMS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CFG_ID_BIP32_INDICATION_CONTROL)) != 0)
+    {
+        switch (this->bip32_indication_control)
+        {
+            case BCMOLT_CONTROL_STATE_DISABLE:
+                break;
+            case BCMOLT_CONTROL_STATE_ENABLE:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_NI_CFG_ID_BIP32_INDICATION_CONTROL;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_ni_stat_data_set_default(bcmolt_gpon_ni_stat_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_FEC_CODEWORDS)) != 0)
+    {
+        this->fec_codewords = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_FEC_CODEWORDS_UNCORRECTED)) != 0)
+    {
+        this->fec_codewords_uncorrected = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_BIP8_BYTES)) != 0)
+    {
+        this->bip8_bytes = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_BIP8_ERRORS)) != 0)
+    {
+        this->bip8_errors = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_GEM_PACKETS)) != 0)
+    {
+        this->rx_gem_packets = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_GEM_DROPPED)) != 0)
+    {
+        this->rx_gem_dropped = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_GEM_IDLE)) != 0)
+    {
+        this->rx_gem_idle = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_GEM_CORRECTED)) != 0)
+    {
+        this->rx_gem_corrected = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_GEM_ILLEGAL)) != 0)
+    {
+        this->rx_gem_illegal = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_ALLOCATIONS_VALID)) != 0)
+    {
+        this->rx_allocations_valid = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_ALLOCATIONS_INVALID)) != 0)
+    {
+        this->rx_allocations_invalid = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_ALLOCATIONS_DISABLED)) != 0)
+    {
+        this->rx_allocations_disabled = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_PLOAMS)) != 0)
+    {
+        this->rx_ploams = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_PLOAMS_NON_IDLE)) != 0)
+    {
+        this->rx_ploams_non_idle = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_PLOAMS_ERROR)) != 0)
+    {
+        this->rx_ploams_error = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_PLOAMS_DROPPED)) != 0)
+    {
+        this->rx_ploams_dropped = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_CPU)) != 0)
+    {
+        this->rx_cpu = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_OMCI)) != 0)
+    {
+        this->rx_omci = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_OMCI_PACKETS_CRC_ERROR)) != 0)
+    {
+        this->rx_omci_packets_crc_error = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_DROPPED_TOO_SHORT)) != 0)
+    {
+        this->rx_dropped_too_short = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_DROPPED_TOO_LONG)) != 0)
+    {
+        this->rx_dropped_too_long = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_CRC_ERRORS)) != 0)
+    {
+        this->rx_crc_errors = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_KEY_ERRORS)) != 0)
+    {
+        this->rx_key_errors = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_FRAGMENTS_ERRORS)) != 0)
+    {
+        this->rx_fragments_errors = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_PACKETS_DROPPED)) != 0)
+    {
+        this->rx_packets_dropped = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_TX_GEM)) != 0)
+    {
+        this->tx_gem = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_TX_PLOAMS)) != 0)
+    {
+        this->tx_ploams = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_TX_GEM_FRAGMENTS)) != 0)
+    {
+        this->tx_gem_fragments = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_TX_CPU)) != 0)
+    {
+        this->tx_cpu = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_TX_OMCI)) != 0)
+    {
+        this->tx_omci = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_TX_CPU_OMCI_PACKETS_DROPPED)) != 0)
+    {
+        this->tx_cpu_omci_packets_dropped = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_TX_DROPPED_ILLEGAL_LENGTH)) != 0)
+    {
+        this->tx_dropped_illegal_length = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_TX_DROPPED_TPID_MISS)) != 0)
+    {
+        this->tx_dropped_tpid_miss = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_TX_DROPPED_VID_MISS)) != 0)
+    {
+        this->tx_dropped_vid_miss = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_stat_data_pack(const bcmolt_gpon_ni_stat_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_FEC_CODEWORDS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->fec_codewords))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_FEC_CODEWORDS_UNCORRECTED)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->fec_codewords_uncorrected))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_BIP8_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->bip8_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_BIP8_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->bip8_errors))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_GEM_PACKETS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_gem_packets))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_GEM_DROPPED)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_gem_dropped))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_GEM_IDLE)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_gem_idle))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_GEM_CORRECTED)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_gem_corrected))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_GEM_ILLEGAL)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_gem_illegal))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_ALLOCATIONS_VALID)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_allocations_valid))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_ALLOCATIONS_INVALID)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_allocations_invalid))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_ALLOCATIONS_DISABLED)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_allocations_disabled))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_PLOAMS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_ploams))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_PLOAMS_NON_IDLE)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_ploams_non_idle))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_PLOAMS_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_ploams_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_PLOAMS_DROPPED)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_ploams_dropped))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_CPU)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_cpu))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_OMCI)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_omci))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_OMCI_PACKETS_CRC_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_omci_packets_crc_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_DROPPED_TOO_SHORT)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_dropped_too_short))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_DROPPED_TOO_LONG)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_dropped_too_long))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_CRC_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_crc_errors))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_KEY_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_key_errors))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_FRAGMENTS_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_fragments_errors))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_PACKETS_DROPPED)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_packets_dropped))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_TX_GEM)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_gem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_TX_PLOAMS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_ploams))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_TX_GEM_FRAGMENTS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_gem_fragments))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_TX_CPU)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_cpu))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_TX_OMCI)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_omci))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_TX_CPU_OMCI_PACKETS_DROPPED)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->tx_cpu_omci_packets_dropped))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_TX_DROPPED_ILLEGAL_LENGTH)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_dropped_illegal_length))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_TX_DROPPED_TPID_MISS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_dropped_tpid_miss))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_TX_DROPPED_VID_MISS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_dropped_vid_miss))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_ni_stat_data_get_packed_length(const bcmolt_gpon_ni_stat_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_FEC_CODEWORDS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_FEC_CODEWORDS_UNCORRECTED)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_BIP8_BYTES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_BIP8_ERRORS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_GEM_PACKETS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_GEM_DROPPED)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_GEM_IDLE)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_GEM_CORRECTED)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_GEM_ILLEGAL)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_ALLOCATIONS_VALID)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_ALLOCATIONS_INVALID)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_ALLOCATIONS_DISABLED)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_PLOAMS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_PLOAMS_NON_IDLE)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_PLOAMS_ERROR)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_PLOAMS_DROPPED)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_CPU)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_OMCI)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_OMCI_PACKETS_CRC_ERROR)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_DROPPED_TOO_SHORT)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_DROPPED_TOO_LONG)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_CRC_ERRORS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_KEY_ERRORS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_FRAGMENTS_ERRORS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_PACKETS_DROPPED)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_TX_GEM)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_TX_PLOAMS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_TX_GEM_FRAGMENTS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_TX_CPU)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_TX_OMCI)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_TX_CPU_OMCI_PACKETS_DROPPED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_TX_DROPPED_ILLEGAL_LENGTH)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_TX_DROPPED_TPID_MISS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_TX_DROPPED_VID_MISS)) != 0)
+    {
+        count += 8;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_stat_data_unpack(bcmolt_gpon_ni_stat_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_FEC_CODEWORDS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->fec_codewords))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_FEC_CODEWORDS_UNCORRECTED)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->fec_codewords_uncorrected))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_BIP8_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->bip8_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_BIP8_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->bip8_errors))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_GEM_PACKETS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_gem_packets))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_GEM_DROPPED)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_gem_dropped))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_GEM_IDLE)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_gem_idle))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_GEM_CORRECTED)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_gem_corrected))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_GEM_ILLEGAL)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_gem_illegal))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_ALLOCATIONS_VALID)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_allocations_valid))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_ALLOCATIONS_INVALID)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_allocations_invalid))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_ALLOCATIONS_DISABLED)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_allocations_disabled))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_PLOAMS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_ploams))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_PLOAMS_NON_IDLE)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_ploams_non_idle))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_PLOAMS_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_ploams_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_PLOAMS_DROPPED)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_ploams_dropped))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_CPU)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_cpu))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_OMCI)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_omci))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_OMCI_PACKETS_CRC_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_omci_packets_crc_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_DROPPED_TOO_SHORT)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_dropped_too_short))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_DROPPED_TOO_LONG)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_dropped_too_long))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_CRC_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_crc_errors))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_KEY_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_key_errors))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_FRAGMENTS_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_fragments_errors))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_PACKETS_DROPPED)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_packets_dropped))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_TX_GEM)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_gem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_TX_PLOAMS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_ploams))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_TX_GEM_FRAGMENTS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_gem_fragments))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_TX_CPU)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_cpu))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_TX_OMCI)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_omci))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_TX_CPU_OMCI_PACKETS_DROPPED)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->tx_cpu_omci_packets_dropped))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_TX_DROPPED_ILLEGAL_LENGTH)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_dropped_illegal_length))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_TX_DROPPED_TPID_MISS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_dropped_tpid_miss))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_TX_DROPPED_VID_MISS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_dropped_vid_miss))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_stat_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_FEC_CODEWORDS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_FEC_CODEWORDS_UNCORRECTED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_BIP8_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_BIP8_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_GEM_PACKETS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_GEM_DROPPED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_GEM_IDLE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_GEM_CORRECTED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_GEM_ILLEGAL)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_ALLOCATIONS_VALID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_ALLOCATIONS_INVALID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_ALLOCATIONS_DISABLED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_PLOAMS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_PLOAMS_NON_IDLE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_PLOAMS_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_PLOAMS_DROPPED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_CPU)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_OMCI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_OMCI_PACKETS_CRC_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_DROPPED_TOO_SHORT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_DROPPED_TOO_LONG)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_CRC_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_KEY_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_FRAGMENTS_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_RX_PACKETS_DROPPED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_TX_GEM)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_TX_PLOAMS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_TX_GEM_FRAGMENTS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_TX_CPU)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_TX_OMCI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_TX_CPU_OMCI_PACKETS_DROPPED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_TX_DROPPED_ILLEGAL_LENGTH)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_TX_DROPPED_TPID_MISS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ID_TX_DROPPED_VID_MISS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_stat_data_bounds_check(const bcmolt_gpon_ni_stat_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_stat_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_ni_stat_cfg_data_set_default(bcmolt_gpon_ni_stat_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_CFG_ID_CFG)) != 0)
+    {
+        this->cfg.trigger.type = BCMOLT_STAT_CONDITION_TYPE_NONE;
+        this->cfg.soak.active_soak_time = 0;
+        this->cfg.soak.clear_soak_time = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_stat_cfg_data_pack(const bcmolt_gpon_ni_stat_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_pack(&this->cfg, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_ni_stat_cfg_data_get_packed_length(const bcmolt_gpon_ni_stat_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_CFG_ID_CFG)) != 0)
+    {
+        count += bcmolt_stat_alarm_config_get_packed_length(&this->cfg);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_stat_cfg_data_unpack(bcmolt_gpon_ni_stat_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_unpack(&this->cfg, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_stat_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_stat_cfg_data_bounds_check(const bcmolt_gpon_ni_stat_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_stat_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_bounds_check(&this->cfg))
+        {
+            *failed_prop = BCMOLT_GPON_NI_STAT_CFG_ID_CFG;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_ni_cpu_packets_failure_data_set_default(bcmolt_gpon_ni_cpu_packets_failure_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CPU_PACKETS_FAILURE_ID_ERROR)) != 0)
+    {
+        this->error = BCMOLT_PACKET_INJECTION_ERROR_GEM_PORT_NOT_ACTIVE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CPU_PACKETS_FAILURE_ID_GEM_PORT_ID)) != 0)
+    {
+        this->gem_port_id = (bcmolt_gpon_gem_id) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_cpu_packets_failure_data_pack(const bcmolt_gpon_ni_cpu_packets_failure_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CPU_PACKETS_FAILURE_ID_ERROR)) != 0)
+    {
+        if (!bcmolt_packet_injection_error_pack(this->error, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CPU_PACKETS_FAILURE_ID_GEM_PORT_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->gem_port_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_ni_cpu_packets_failure_data_get_packed_length(const bcmolt_gpon_ni_cpu_packets_failure_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CPU_PACKETS_FAILURE_ID_ERROR)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CPU_PACKETS_FAILURE_ID_GEM_PORT_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_cpu_packets_failure_data_unpack(bcmolt_gpon_ni_cpu_packets_failure_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CPU_PACKETS_FAILURE_ID_ERROR)) != 0)
+    {
+        if (!bcmolt_packet_injection_error_unpack(&this->error, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CPU_PACKETS_FAILURE_ID_GEM_PORT_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->gem_port_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_cpu_packets_failure_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CPU_PACKETS_FAILURE_ID_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CPU_PACKETS_FAILURE_ID_GEM_PORT_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_cpu_packets_failure_data_bounds_check(const bcmolt_gpon_ni_cpu_packets_failure_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_cpu_packets_failure_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CPU_PACKETS_FAILURE_ID_ERROR)) != 0)
+    {
+        switch (this->error)
+        {
+            case BCMOLT_PACKET_INJECTION_ERROR_GEM_PORT_NOT_ACTIVE:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_NI_CPU_PACKETS_FAILURE_ID_ERROR;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CPU_PACKETS_FAILURE_ID_GEM_PORT_ID)) != 0)
+    {
+        if (this->gem_port_id > (bcmolt_gpon_gem_id) 4095)
+        {
+            *failed_prop = BCMOLT_GPON_NI_CPU_PACKETS_FAILURE_ID_GEM_PORT_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_ni_los_data_set_default(bcmolt_gpon_ni_los_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_LOS_ID_STATUS)) != 0)
+    {
+        this->status = BCMOLT_STATUS_OFF;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_los_data_pack(const bcmolt_gpon_ni_los_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_LOS_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_status_pack(this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_ni_los_data_get_packed_length(const bcmolt_gpon_ni_los_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_LOS_ID_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_los_data_unpack(bcmolt_gpon_ni_los_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_LOS_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_status_unpack(&this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_los_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_LOS_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_los_data_bounds_check(const bcmolt_gpon_ni_los_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_los_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_LOS_ID_STATUS)) != 0)
+    {
+        switch (this->status)
+        {
+            case BCMOLT_STATUS_OFF:
+                break;
+            case BCMOLT_STATUS_ON:
+                break;
+            case BCMOLT_STATUS_NO_CHANGE:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_NI_LOS_ID_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_ni_onu_discovered_data_set_default(bcmolt_gpon_ni_onu_discovered_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ONU_DISCOVERED_ID_SERIAL_NUMBER)) != 0)
+    {
+        memset(this->serial_number.vendor_id, 0, sizeof(this->serial_number.vendor_id));
+        memset(this->serial_number.vendor_specific, 0, sizeof(this->serial_number.vendor_specific));
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ONU_DISCOVERED_ID_RANGING_TIME)) != 0)
+    {
+        this->ranging_time = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ONU_DISCOVERED_ID_ONU_ID)) != 0)
+    {
+        this->onu_id = (bcmolt_gpon_onu_id) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_onu_discovered_data_pack(const bcmolt_gpon_ni_onu_discovered_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ONU_DISCOVERED_ID_SERIAL_NUMBER)) != 0)
+    {
+        if (!bcmolt_serial_number_pack(&this->serial_number, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ONU_DISCOVERED_ID_RANGING_TIME)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->ranging_time))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ONU_DISCOVERED_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->onu_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_ni_onu_discovered_data_get_packed_length(const bcmolt_gpon_ni_onu_discovered_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ONU_DISCOVERED_ID_SERIAL_NUMBER)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ONU_DISCOVERED_ID_RANGING_TIME)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ONU_DISCOVERED_ID_ONU_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_onu_discovered_data_unpack(bcmolt_gpon_ni_onu_discovered_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ONU_DISCOVERED_ID_SERIAL_NUMBER)) != 0)
+    {
+        if (!bcmolt_serial_number_unpack(&this->serial_number, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ONU_DISCOVERED_ID_RANGING_TIME)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->ranging_time))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ONU_DISCOVERED_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->onu_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_onu_discovered_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ONU_DISCOVERED_ID_SERIAL_NUMBER)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ONU_DISCOVERED_ID_RANGING_TIME)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ONU_DISCOVERED_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_onu_discovered_data_bounds_check(const bcmolt_gpon_ni_onu_discovered_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_onu_discovered_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ONU_DISCOVERED_ID_SERIAL_NUMBER)) != 0)
+    {
+        if (!bcmolt_serial_number_bounds_check(&this->serial_number))
+        {
+            *failed_prop = BCMOLT_GPON_NI_ONU_DISCOVERED_ID_SERIAL_NUMBER;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ONU_DISCOVERED_ID_ONU_ID)) != 0)
+    {
+        if (this->onu_id > (bcmolt_gpon_onu_id) 127)
+        {
+            *failed_prop = BCMOLT_GPON_NI_ONU_DISCOVERED_ID_ONU_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_ni_onu_upgrade_complete_data_set_default(bcmolt_gpon_ni_onu_upgrade_complete_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ONU_UPGRADE_COMPLETE_ID_STATUS)) != 0)
+    {
+        this->status = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ONU_UPGRADE_COMPLETE_ID_LIST_OF_FAILED_ENTITIES)) != 0)
+    {
+        this->list_of_failed_entities.len = 0;
+        this->list_of_failed_entities.val = NULL;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_onu_upgrade_complete_data_pack(const bcmolt_gpon_ni_onu_upgrade_complete_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ONU_UPGRADE_COMPLETE_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->status))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ONU_UPGRADE_COMPLETE_ID_LIST_OF_FAILED_ENTITIES)) != 0)
+    {
+        if (!bcmolt_gpon_onu_upgrade_status_list_u32_pack(&this->list_of_failed_entities, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_ni_onu_upgrade_complete_data_get_packed_length(const bcmolt_gpon_ni_onu_upgrade_complete_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ONU_UPGRADE_COMPLETE_ID_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ONU_UPGRADE_COMPLETE_ID_LIST_OF_FAILED_ENTITIES)) != 0)
+    {
+        count += bcmolt_gpon_onu_upgrade_status_list_u32_get_packed_length(&this->list_of_failed_entities);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_onu_upgrade_complete_data_unpack(bcmolt_gpon_ni_onu_upgrade_complete_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ONU_UPGRADE_COMPLETE_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->status))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ONU_UPGRADE_COMPLETE_ID_LIST_OF_FAILED_ENTITIES)) != 0)
+    {
+        if (!bcmolt_gpon_onu_upgrade_status_list_u32_unpack(&this->list_of_failed_entities, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_onu_upgrade_complete_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ONU_UPGRADE_COMPLETE_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ONU_UPGRADE_COMPLETE_ID_LIST_OF_FAILED_ENTITIES)) != 0)
+    {
+        if (!bcmolt_gpon_onu_upgrade_status_list_u32_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_onu_upgrade_complete_data_bounds_check(const bcmolt_gpon_ni_onu_upgrade_complete_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_onu_upgrade_complete_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ONU_UPGRADE_COMPLETE_ID_LIST_OF_FAILED_ENTITIES)) != 0)
+    {
+        if (!bcmolt_gpon_onu_upgrade_status_list_u32_bounds_check(&this->list_of_failed_entities))
+        {
+            *failed_prop = BCMOLT_GPON_NI_ONU_UPGRADE_COMPLETE_ID_LIST_OF_FAILED_ENTITIES;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_ni_protection_switching_onus_ranged_data_set_default(bcmolt_gpon_ni_protection_switching_onus_ranged_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_PROTECTION_SWITCHING_ONUS_RANGED_ID_ONUS)) != 0)
+    {
+        this->onus.len = 0;
+        this->onus.val = NULL;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_protection_switching_onus_ranged_data_pack(const bcmolt_gpon_ni_protection_switching_onus_ranged_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_PROTECTION_SWITCHING_ONUS_RANGED_ID_ONUS)) != 0)
+    {
+        if (!bcmolt_gpon_onu_eqd_list_u32_pack(&this->onus, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_ni_protection_switching_onus_ranged_data_get_packed_length(const bcmolt_gpon_ni_protection_switching_onus_ranged_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_PROTECTION_SWITCHING_ONUS_RANGED_ID_ONUS)) != 0)
+    {
+        count += bcmolt_gpon_onu_eqd_list_u32_get_packed_length(&this->onus);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_protection_switching_onus_ranged_data_unpack(bcmolt_gpon_ni_protection_switching_onus_ranged_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_PROTECTION_SWITCHING_ONUS_RANGED_ID_ONUS)) != 0)
+    {
+        if (!bcmolt_gpon_onu_eqd_list_u32_unpack(&this->onus, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_protection_switching_onus_ranged_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_PROTECTION_SWITCHING_ONUS_RANGED_ID_ONUS)) != 0)
+    {
+        if (!bcmolt_gpon_onu_eqd_list_u32_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_protection_switching_onus_ranged_data_bounds_check(const bcmolt_gpon_ni_protection_switching_onus_ranged_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_protection_switching_onus_ranged_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_PROTECTION_SWITCHING_ONUS_RANGED_ID_ONUS)) != 0)
+    {
+        if (!bcmolt_gpon_onu_eqd_list_u32_bounds_check(&this->onus))
+        {
+            *failed_prop = BCMOLT_GPON_NI_PROTECTION_SWITCHING_ONUS_RANGED_ID_ONUS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_ni_protection_switching_switchover_completed_data_set_default(bcmolt_gpon_ni_protection_switching_switchover_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED_ID_RESULT)) != 0)
+    {
+        this->result = BCMOLT_RESULT_SUCCESS;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_protection_switching_switchover_completed_data_pack(const bcmolt_gpon_ni_protection_switching_switchover_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED_ID_RESULT)) != 0)
+    {
+        if (!bcmolt_result_pack(this->result, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_ni_protection_switching_switchover_completed_data_get_packed_length(const bcmolt_gpon_ni_protection_switching_switchover_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED_ID_RESULT)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_protection_switching_switchover_completed_data_unpack(bcmolt_gpon_ni_protection_switching_switchover_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED_ID_RESULT)) != 0)
+    {
+        if (!bcmolt_result_unpack(&this->result, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_protection_switching_switchover_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED_ID_RESULT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_protection_switching_switchover_completed_data_bounds_check(const bcmolt_gpon_ni_protection_switching_switchover_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_protection_switching_switchover_completed_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED_ID_RESULT)) != 0)
+    {
+        switch (this->result)
+        {
+            case BCMOLT_RESULT_SUCCESS:
+                break;
+            case BCMOLT_RESULT_FAIL:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_NI_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED_ID_RESULT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_ni_protection_switching_traffic_resume_data_set_default(bcmolt_gpon_ni_protection_switching_traffic_resume_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_PROTECTION_SWITCHING_TRAFFIC_RESUME_ID_RESULT)) != 0)
+    {
+        this->result = BCMOLT_TRAFFIC_RESUME_RESULT_SUCCESS;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_protection_switching_traffic_resume_data_pack(const bcmolt_gpon_ni_protection_switching_traffic_resume_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_PROTECTION_SWITCHING_TRAFFIC_RESUME_ID_RESULT)) != 0)
+    {
+        if (!bcmolt_traffic_resume_result_pack(this->result, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_ni_protection_switching_traffic_resume_data_get_packed_length(const bcmolt_gpon_ni_protection_switching_traffic_resume_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_PROTECTION_SWITCHING_TRAFFIC_RESUME_ID_RESULT)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_protection_switching_traffic_resume_data_unpack(bcmolt_gpon_ni_protection_switching_traffic_resume_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_PROTECTION_SWITCHING_TRAFFIC_RESUME_ID_RESULT)) != 0)
+    {
+        if (!bcmolt_traffic_resume_result_unpack(&this->result, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_protection_switching_traffic_resume_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_PROTECTION_SWITCHING_TRAFFIC_RESUME_ID_RESULT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_protection_switching_traffic_resume_data_bounds_check(const bcmolt_gpon_ni_protection_switching_traffic_resume_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_protection_switching_traffic_resume_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_PROTECTION_SWITCHING_TRAFFIC_RESUME_ID_RESULT)) != 0)
+    {
+        switch (this->result)
+        {
+            case BCMOLT_TRAFFIC_RESUME_RESULT_SUCCESS:
+                break;
+            case BCMOLT_TRAFFIC_RESUME_RESULT_FAILURE:
+                break;
+            case BCMOLT_TRAFFIC_RESUME_RESULT_SUSPECTED_LOS:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_NI_PROTECTION_SWITCHING_TRAFFIC_RESUME_ID_RESULT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_ni_rogue_detection_completed_data_set_default(bcmolt_gpon_ni_rogue_detection_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_WINDOW_TYPE)) != 0)
+    {
+        this->window_type = BCMOLT_ROGUE_DETECTION_WINDOW_SILENT_WINDOW;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_MEASUREMENT_STATUS)) != 0)
+    {
+        this->measurement_status = BCMOLT_ROGUE_MEASUREMENT_RESULT_RSSI_COMPLETE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_ALLOC_ID)) != 0)
+    {
+        this->alloc_id = (bcmolt_gpon_alloc_id) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_ONU_ID)) != 0)
+    {
+        this->onu_id = (bcmolt_gpon_onu_id) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_IS_DELINEATION)) != 0)
+    {
+        this->is_delineation = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_IS_ED)) != 0)
+    {
+        this->is_ed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_RX_DATA)) != 0)
+    {
+        this->rx_data.len = 0;
+        this->rx_data.val = NULL;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_PLOAM_RECEIVED_ONU_ID)) != 0)
+    {
+        this->ploam_received_onu_id = (bcmolt_gpon_onu_id) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_PLOAM_RECEIVED_CRC_ERROR)) != 0)
+    {
+        this->ploam_received_crc_error = BCMOS_FALSE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_rogue_detection_completed_data_pack(const bcmolt_gpon_ni_rogue_detection_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_WINDOW_TYPE)) != 0)
+    {
+        if (!bcmolt_rogue_detection_window_pack(this->window_type, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_MEASUREMENT_STATUS)) != 0)
+    {
+        if (!bcmolt_rogue_measurement_result_pack(this->measurement_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_ALLOC_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->alloc_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->onu_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_IS_DELINEATION)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->is_delineation))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_IS_ED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->is_ed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_RX_DATA)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_pack(&this->rx_data, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_PLOAM_RECEIVED_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->ploam_received_onu_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_PLOAM_RECEIVED_CRC_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->ploam_received_crc_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_ni_rogue_detection_completed_data_get_packed_length(const bcmolt_gpon_ni_rogue_detection_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_WINDOW_TYPE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_MEASUREMENT_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_ALLOC_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_ONU_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_IS_DELINEATION)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_IS_ED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_RX_DATA)) != 0)
+    {
+        count += bcmolt_u8_list_u32_get_packed_length(&this->rx_data);
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_PLOAM_RECEIVED_ONU_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_PLOAM_RECEIVED_CRC_ERROR)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_rogue_detection_completed_data_unpack(bcmolt_gpon_ni_rogue_detection_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_WINDOW_TYPE)) != 0)
+    {
+        if (!bcmolt_rogue_detection_window_unpack(&this->window_type, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_MEASUREMENT_STATUS)) != 0)
+    {
+        if (!bcmolt_rogue_measurement_result_unpack(&this->measurement_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_ALLOC_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->alloc_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->onu_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_IS_DELINEATION)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->is_delineation))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_IS_ED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->is_ed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_RX_DATA)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_unpack(&this->rx_data, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_PLOAM_RECEIVED_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->ploam_received_onu_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_PLOAM_RECEIVED_CRC_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->ploam_received_crc_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_rogue_detection_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_WINDOW_TYPE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_MEASUREMENT_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_ALLOC_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_IS_DELINEATION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_IS_ED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_RX_DATA)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_PLOAM_RECEIVED_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_PLOAM_RECEIVED_CRC_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_rogue_detection_completed_data_bounds_check(const bcmolt_gpon_ni_rogue_detection_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_rogue_detection_completed_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_WINDOW_TYPE)) != 0)
+    {
+        switch (this->window_type)
+        {
+            case BCMOLT_ROGUE_DETECTION_WINDOW_SILENT_WINDOW:
+                break;
+            case BCMOLT_ROGUE_DETECTION_WINDOW_CUT_OFF_WINDOW:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_WINDOW_TYPE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_MEASUREMENT_STATUS)) != 0)
+    {
+        switch (this->measurement_status)
+        {
+            case BCMOLT_ROGUE_MEASUREMENT_RESULT_RSSI_COMPLETE:
+                break;
+            case BCMOLT_ROGUE_MEASUREMENT_RESULT_NOT_PERFORMED:
+                break;
+            case BCMOLT_ROGUE_MEASUREMENT_RESULT_ROGUE_CYCLE_STOP:
+                break;
+            case BCMOLT_ROGUE_MEASUREMENT_RESULT_RSSI_ERROR:
+                break;
+            case BCMOLT_ROGUE_MEASUREMENT_RESULT_RSSI_NOT_COMPLETE:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_MEASUREMENT_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_ALLOC_ID)) != 0)
+    {
+        if (this->alloc_id > (bcmolt_gpon_alloc_id) 4095)
+        {
+            *failed_prop = BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_ALLOC_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_ONU_ID)) != 0)
+    {
+        if (this->onu_id > (bcmolt_gpon_onu_id) 127)
+        {
+            *failed_prop = BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_ONU_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_RX_DATA)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_bounds_check(&this->rx_data))
+        {
+            *failed_prop = BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_RX_DATA;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_PLOAM_RECEIVED_ONU_ID)) != 0)
+    {
+        if (this->ploam_received_onu_id > (bcmolt_gpon_onu_id) 127)
+        {
+            *failed_prop = BCMOLT_GPON_NI_ROGUE_DETECTION_COMPLETED_ID_PLOAM_RECEIVED_ONU_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_data_set_default(bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STANDBY_PON_MONITORING_CYCLE_COMPLETED_ID_NUMBER_OF_DETECTED_DELIMITER)) != 0)
+    {
+        this->number_of_detected_delimiter = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STANDBY_PON_MONITORING_CYCLE_COMPLETED_ID_ENERGY_DETECT_SIGNAL)) != 0)
+    {
+        this->energy_detect_signal = BCMOLT_STATUS_OFF;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_data_pack(const bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STANDBY_PON_MONITORING_CYCLE_COMPLETED_ID_NUMBER_OF_DETECTED_DELIMITER)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->number_of_detected_delimiter))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STANDBY_PON_MONITORING_CYCLE_COMPLETED_ID_ENERGY_DETECT_SIGNAL)) != 0)
+    {
+        if (!bcmolt_status_pack(this->energy_detect_signal, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_data_get_packed_length(const bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STANDBY_PON_MONITORING_CYCLE_COMPLETED_ID_NUMBER_OF_DETECTED_DELIMITER)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STANDBY_PON_MONITORING_CYCLE_COMPLETED_ID_ENERGY_DETECT_SIGNAL)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_data_unpack(bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STANDBY_PON_MONITORING_CYCLE_COMPLETED_ID_NUMBER_OF_DETECTED_DELIMITER)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->number_of_detected_delimiter))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STANDBY_PON_MONITORING_CYCLE_COMPLETED_ID_ENERGY_DETECT_SIGNAL)) != 0)
+    {
+        if (!bcmolt_status_unpack(&this->energy_detect_signal, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STANDBY_PON_MONITORING_CYCLE_COMPLETED_ID_NUMBER_OF_DETECTED_DELIMITER)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STANDBY_PON_MONITORING_CYCLE_COMPLETED_ID_ENERGY_DETECT_SIGNAL)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_data_bounds_check(const bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STANDBY_PON_MONITORING_CYCLE_COMPLETED_ID_ENERGY_DETECT_SIGNAL)) != 0)
+    {
+        switch (this->energy_detect_signal)
+        {
+            case BCMOLT_STATUS_OFF:
+                break;
+            case BCMOLT_STATUS_ON:
+                break;
+            case BCMOLT_STATUS_NO_CHANGE:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_NI_STANDBY_PON_MONITORING_CYCLE_COMPLETED_ID_ENERGY_DETECT_SIGNAL;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_ni_stat_alarm_cleared_data_set_default(bcmolt_gpon_ni_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        this->stat = BCMOLT_GPON_NI_STAT_ID_FEC_CODEWORDS;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_stat_alarm_cleared_data_pack(const bcmolt_gpon_ni_stat_alarm_cleared_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_gpon_ni_stat_id_pack(this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_ni_stat_alarm_cleared_data_get_packed_length(const bcmolt_gpon_ni_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_stat_alarm_cleared_data_unpack(bcmolt_gpon_ni_stat_alarm_cleared_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_gpon_ni_stat_id_unpack(&this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_stat_alarm_cleared_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_stat_alarm_cleared_data_bounds_check(const bcmolt_gpon_ni_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_stat_alarm_cleared_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        switch (this->stat)
+        {
+            case BCMOLT_GPON_NI_STAT_ID_FEC_CODEWORDS:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_FEC_CODEWORDS_UNCORRECTED:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_BIP8_BYTES:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_BIP8_ERRORS:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_RX_GEM_PACKETS:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_RX_GEM_DROPPED:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_RX_GEM_IDLE:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_RX_GEM_CORRECTED:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_RX_GEM_ILLEGAL:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_RX_ALLOCATIONS_VALID:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_RX_ALLOCATIONS_INVALID:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_RX_ALLOCATIONS_DISABLED:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_RX_PLOAMS:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_RX_PLOAMS_NON_IDLE:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_RX_PLOAMS_ERROR:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_RX_PLOAMS_DROPPED:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_RX_CPU:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_RX_OMCI:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_RX_OMCI_PACKETS_CRC_ERROR:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_RX_DROPPED_TOO_SHORT:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_RX_DROPPED_TOO_LONG:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_RX_CRC_ERRORS:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_RX_KEY_ERRORS:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_RX_FRAGMENTS_ERRORS:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_RX_PACKETS_DROPPED:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_TX_GEM:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_TX_PLOAMS:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_TX_GEM_FRAGMENTS:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_TX_CPU:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_TX_OMCI:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_TX_CPU_OMCI_PACKETS_DROPPED:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_TX_DROPPED_ILLEGAL_LENGTH:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_TX_DROPPED_TPID_MISS:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_TX_DROPPED_VID_MISS:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_NI_STAT_ALARM_CLEARED_ID_STAT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_ni_stat_alarm_raised_data_set_default(bcmolt_gpon_ni_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        this->stat = BCMOLT_GPON_NI_STAT_ID_FEC_CODEWORDS;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_stat_alarm_raised_data_pack(const bcmolt_gpon_ni_stat_alarm_raised_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_gpon_ni_stat_id_pack(this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_ni_stat_alarm_raised_data_get_packed_length(const bcmolt_gpon_ni_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_stat_alarm_raised_data_unpack(bcmolt_gpon_ni_stat_alarm_raised_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_gpon_ni_stat_id_unpack(&this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_stat_alarm_raised_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_stat_alarm_raised_data_bounds_check(const bcmolt_gpon_ni_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_stat_alarm_raised_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        switch (this->stat)
+        {
+            case BCMOLT_GPON_NI_STAT_ID_FEC_CODEWORDS:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_FEC_CODEWORDS_UNCORRECTED:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_BIP8_BYTES:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_BIP8_ERRORS:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_RX_GEM_PACKETS:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_RX_GEM_DROPPED:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_RX_GEM_IDLE:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_RX_GEM_CORRECTED:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_RX_GEM_ILLEGAL:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_RX_ALLOCATIONS_VALID:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_RX_ALLOCATIONS_INVALID:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_RX_ALLOCATIONS_DISABLED:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_RX_PLOAMS:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_RX_PLOAMS_NON_IDLE:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_RX_PLOAMS_ERROR:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_RX_PLOAMS_DROPPED:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_RX_CPU:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_RX_OMCI:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_RX_OMCI_PACKETS_CRC_ERROR:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_RX_DROPPED_TOO_SHORT:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_RX_DROPPED_TOO_LONG:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_RX_CRC_ERRORS:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_RX_KEY_ERRORS:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_RX_FRAGMENTS_ERRORS:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_RX_PACKETS_DROPPED:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_TX_GEM:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_TX_PLOAMS:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_TX_GEM_FRAGMENTS:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_TX_CPU:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_TX_OMCI:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_TX_CPU_OMCI_PACKETS_DROPPED:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_TX_DROPPED_ILLEGAL_LENGTH:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_TX_DROPPED_TPID_MISS:
+                break;
+            case BCMOLT_GPON_NI_STAT_ID_TX_DROPPED_VID_MISS:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_NI_STAT_ALARM_RAISED_ID_STAT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_ni_state_change_completed_data_set_default(bcmolt_gpon_ni_state_change_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STATE_CHANGE_COMPLETED_ID_RESULT)) != 0)
+    {
+        this->result = BCMOLT_RESULT_SUCCESS;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STATE_CHANGE_COMPLETED_ID_PREVIOUS_STATE)) != 0)
+    {
+        this->previous_state = BCMOLT_PON_STATE_INACTIVE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STATE_CHANGE_COMPLETED_ID_NEW_STATE)) != 0)
+    {
+        this->new_state = BCMOLT_PON_STATE_INACTIVE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_state_change_completed_data_pack(const bcmolt_gpon_ni_state_change_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STATE_CHANGE_COMPLETED_ID_RESULT)) != 0)
+    {
+        if (!bcmolt_result_pack(this->result, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STATE_CHANGE_COMPLETED_ID_PREVIOUS_STATE)) != 0)
+    {
+        if (!bcmolt_pon_state_pack(this->previous_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STATE_CHANGE_COMPLETED_ID_NEW_STATE)) != 0)
+    {
+        if (!bcmolt_pon_state_pack(this->new_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_ni_state_change_completed_data_get_packed_length(const bcmolt_gpon_ni_state_change_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STATE_CHANGE_COMPLETED_ID_RESULT)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STATE_CHANGE_COMPLETED_ID_PREVIOUS_STATE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STATE_CHANGE_COMPLETED_ID_NEW_STATE)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_state_change_completed_data_unpack(bcmolt_gpon_ni_state_change_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STATE_CHANGE_COMPLETED_ID_RESULT)) != 0)
+    {
+        if (!bcmolt_result_unpack(&this->result, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STATE_CHANGE_COMPLETED_ID_PREVIOUS_STATE)) != 0)
+    {
+        if (!bcmolt_pon_state_unpack(&this->previous_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STATE_CHANGE_COMPLETED_ID_NEW_STATE)) != 0)
+    {
+        if (!bcmolt_pon_state_unpack(&this->new_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_state_change_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STATE_CHANGE_COMPLETED_ID_RESULT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STATE_CHANGE_COMPLETED_ID_PREVIOUS_STATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STATE_CHANGE_COMPLETED_ID_NEW_STATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_state_change_completed_data_bounds_check(const bcmolt_gpon_ni_state_change_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_state_change_completed_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STATE_CHANGE_COMPLETED_ID_RESULT)) != 0)
+    {
+        switch (this->result)
+        {
+            case BCMOLT_RESULT_SUCCESS:
+                break;
+            case BCMOLT_RESULT_FAIL:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_NI_STATE_CHANGE_COMPLETED_ID_RESULT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STATE_CHANGE_COMPLETED_ID_PREVIOUS_STATE)) != 0)
+    {
+        switch (this->previous_state)
+        {
+            case BCMOLT_PON_STATE_INACTIVE:
+                break;
+            case BCMOLT_PON_STATE_PROCESSING:
+                break;
+            case BCMOLT_PON_STATE_ACTIVE_WORKING:
+                break;
+            case BCMOLT_PON_STATE_ACTIVE_STANDBY:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_NI_STATE_CHANGE_COMPLETED_ID_PREVIOUS_STATE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_STATE_CHANGE_COMPLETED_ID_NEW_STATE)) != 0)
+    {
+        switch (this->new_state)
+        {
+            case BCMOLT_PON_STATE_INACTIVE:
+                break;
+            case BCMOLT_PON_STATE_PROCESSING:
+                break;
+            case BCMOLT_PON_STATE_ACTIVE_WORKING:
+                break;
+            case BCMOLT_PON_STATE_ACTIVE_STANDBY:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_NI_STATE_CHANGE_COMPLETED_ID_NEW_STATE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_ni_tod_request_completed_data_set_default(bcmolt_gpon_ni_tod_request_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_TOD_REQUEST_COMPLETED_ID_TOD_STRING)) != 0)
+    {
+        memset(this->tod_string.str, 0, 64);
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_TOD_REQUEST_COMPLETED_ID_SFC)) != 0)
+    {
+        this->sfc = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_TOD_REQUEST_COMPLETED_ID_RTC_OFFSET_SEC)) != 0)
+    {
+        this->rtc_offset_sec = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_TOD_REQUEST_COMPLETED_ID_RTC_OFFSET_NSEC)) != 0)
+    {
+        this->rtc_offset_nsec = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_TOD_REQUEST_COMPLETED_ID_STATUS)) != 0)
+    {
+        this->status = BCMOLT_RESULT_SUCCESS;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_tod_request_completed_data_pack(const bcmolt_gpon_ni_tod_request_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_TOD_REQUEST_COMPLETED_ID_TOD_STRING)) != 0)
+    {
+        if (!bcmolt_str_64_pack(&this->tod_string, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_TOD_REQUEST_COMPLETED_ID_SFC)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->sfc))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_TOD_REQUEST_COMPLETED_ID_RTC_OFFSET_SEC)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rtc_offset_sec))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_TOD_REQUEST_COMPLETED_ID_RTC_OFFSET_NSEC)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->rtc_offset_nsec))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_TOD_REQUEST_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_result_pack(this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_ni_tod_request_completed_data_get_packed_length(const bcmolt_gpon_ni_tod_request_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_TOD_REQUEST_COMPLETED_ID_TOD_STRING)) != 0)
+    {
+        count += 64;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_TOD_REQUEST_COMPLETED_ID_SFC)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_TOD_REQUEST_COMPLETED_ID_RTC_OFFSET_SEC)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_TOD_REQUEST_COMPLETED_ID_RTC_OFFSET_NSEC)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_TOD_REQUEST_COMPLETED_ID_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_tod_request_completed_data_unpack(bcmolt_gpon_ni_tod_request_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_TOD_REQUEST_COMPLETED_ID_TOD_STRING)) != 0)
+    {
+        if (!bcmolt_str_64_unpack(&this->tod_string, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_TOD_REQUEST_COMPLETED_ID_SFC)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->sfc))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_TOD_REQUEST_COMPLETED_ID_RTC_OFFSET_SEC)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rtc_offset_sec))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_TOD_REQUEST_COMPLETED_ID_RTC_OFFSET_NSEC)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->rtc_offset_nsec))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_TOD_REQUEST_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_result_unpack(&this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_tod_request_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_TOD_REQUEST_COMPLETED_ID_TOD_STRING)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 64))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_TOD_REQUEST_COMPLETED_ID_SFC)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_TOD_REQUEST_COMPLETED_ID_RTC_OFFSET_SEC)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_TOD_REQUEST_COMPLETED_ID_RTC_OFFSET_NSEC)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_TOD_REQUEST_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_tod_request_completed_data_bounds_check(const bcmolt_gpon_ni_tod_request_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_tod_request_completed_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_TOD_REQUEST_COMPLETED_ID_TOD_STRING)) != 0)
+    {
+        if (!bcmolt_str_64_bounds_check(&this->tod_string))
+        {
+            *failed_prop = BCMOLT_GPON_NI_TOD_REQUEST_COMPLETED_ID_TOD_STRING;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_TOD_REQUEST_COMPLETED_ID_STATUS)) != 0)
+    {
+        switch (this->status)
+        {
+            case BCMOLT_RESULT_SUCCESS:
+                break;
+            case BCMOLT_RESULT_FAIL:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_NI_TOD_REQUEST_COMPLETED_ID_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_ni_auto_cfg_data_set_default(bcmolt_gpon_ni_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_ACTIVATE_ALL_ONUS_COMPLETED)) != 0)
+    {
+        this->activate_all_onus_completed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_CPU_PACKETS_FAILURE)) != 0)
+    {
+        this->cpu_packets_failure = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_DEACTIVATE_ALL_ONUS_COMPLETED)) != 0)
+    {
+        this->deactivate_all_onus_completed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_DISABLE_ALL_ONUS_COMPLETED)) != 0)
+    {
+        this->disable_all_onus_completed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_ENABLE_ALL_ONUS_COMPLETED)) != 0)
+    {
+        this->enable_all_onus_completed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_LOS)) != 0)
+    {
+        this->los = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_ONU_DISCOVERED)) != 0)
+    {
+        this->onu_discovered = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_ONU_UPGRADE_COMPLETE)) != 0)
+    {
+        this->onu_upgrade_complete = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_PROTECTION_SWITCHING_ONUS_RANGED)) != 0)
+    {
+        this->protection_switching_onus_ranged = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED)) != 0)
+    {
+        this->protection_switching_switchover_completed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_PROTECTION_SWITCHING_TRAFFIC_RESUME)) != 0)
+    {
+        this->protection_switching_traffic_resume = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_ROGUE_DETECTION_COMPLETED)) != 0)
+    {
+        this->rogue_detection_completed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_ROGUE_ONU_SPECIAL_MAP_CYCLE_START)) != 0)
+    {
+        this->rogue_onu_special_map_cycle_start = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_SERIAL_NUMBER_ACQUISITION_CYCLE_START)) != 0)
+    {
+        this->serial_number_acquisition_cycle_start = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_STANDBY_PON_MONITORING_CYCLE_COMPLETED)) != 0)
+    {
+        this->standby_pon_monitoring_cycle_completed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        this->stat_alarm_cleared = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        this->stat_alarm_raised = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_STATE_CHANGE_COMPLETED)) != 0)
+    {
+        this->state_change_completed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_TOD_REQUEST_COMPLETED)) != 0)
+    {
+        this->tod_request_completed = BCMOS_FALSE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_auto_cfg_data_pack(const bcmolt_gpon_ni_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_ACTIVATE_ALL_ONUS_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->activate_all_onus_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_CPU_PACKETS_FAILURE)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->cpu_packets_failure))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_DEACTIVATE_ALL_ONUS_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->deactivate_all_onus_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_DISABLE_ALL_ONUS_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->disable_all_onus_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_ENABLE_ALL_ONUS_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->enable_all_onus_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_LOS)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->los))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_ONU_DISCOVERED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->onu_discovered))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_ONU_UPGRADE_COMPLETE)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->onu_upgrade_complete))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_PROTECTION_SWITCHING_ONUS_RANGED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->protection_switching_onus_ranged))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->protection_switching_switchover_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_PROTECTION_SWITCHING_TRAFFIC_RESUME)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->protection_switching_traffic_resume))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_ROGUE_DETECTION_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->rogue_detection_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_ROGUE_ONU_SPECIAL_MAP_CYCLE_START)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->rogue_onu_special_map_cycle_start))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_SERIAL_NUMBER_ACQUISITION_CYCLE_START)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->serial_number_acquisition_cycle_start))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_STANDBY_PON_MONITORING_CYCLE_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->standby_pon_monitoring_cycle_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->stat_alarm_cleared))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->stat_alarm_raised))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_STATE_CHANGE_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->state_change_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_TOD_REQUEST_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->tod_request_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_ni_auto_cfg_data_get_packed_length(const bcmolt_gpon_ni_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_ACTIVATE_ALL_ONUS_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_CPU_PACKETS_FAILURE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_DEACTIVATE_ALL_ONUS_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_DISABLE_ALL_ONUS_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_ENABLE_ALL_ONUS_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_LOS)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_ONU_DISCOVERED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_ONU_UPGRADE_COMPLETE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_PROTECTION_SWITCHING_ONUS_RANGED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_PROTECTION_SWITCHING_TRAFFIC_RESUME)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_ROGUE_DETECTION_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_ROGUE_ONU_SPECIAL_MAP_CYCLE_START)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_SERIAL_NUMBER_ACQUISITION_CYCLE_START)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_STANDBY_PON_MONITORING_CYCLE_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_STATE_CHANGE_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_TOD_REQUEST_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_auto_cfg_data_unpack(bcmolt_gpon_ni_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_ACTIVATE_ALL_ONUS_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->activate_all_onus_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_CPU_PACKETS_FAILURE)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->cpu_packets_failure))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_DEACTIVATE_ALL_ONUS_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->deactivate_all_onus_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_DISABLE_ALL_ONUS_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->disable_all_onus_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_ENABLE_ALL_ONUS_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->enable_all_onus_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_LOS)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->los))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_ONU_DISCOVERED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->onu_discovered))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_ONU_UPGRADE_COMPLETE)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->onu_upgrade_complete))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_PROTECTION_SWITCHING_ONUS_RANGED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->protection_switching_onus_ranged))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->protection_switching_switchover_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_PROTECTION_SWITCHING_TRAFFIC_RESUME)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->protection_switching_traffic_resume))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_ROGUE_DETECTION_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->rogue_detection_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_ROGUE_ONU_SPECIAL_MAP_CYCLE_START)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->rogue_onu_special_map_cycle_start))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_SERIAL_NUMBER_ACQUISITION_CYCLE_START)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->serial_number_acquisition_cycle_start))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_STANDBY_PON_MONITORING_CYCLE_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->standby_pon_monitoring_cycle_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->stat_alarm_cleared))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->stat_alarm_raised))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_STATE_CHANGE_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->state_change_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_TOD_REQUEST_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->tod_request_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_ACTIVATE_ALL_ONUS_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_CPU_PACKETS_FAILURE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_DEACTIVATE_ALL_ONUS_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_DISABLE_ALL_ONUS_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_ENABLE_ALL_ONUS_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_LOS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_ONU_DISCOVERED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_ONU_UPGRADE_COMPLETE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_PROTECTION_SWITCHING_ONUS_RANGED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_PROTECTION_SWITCHING_TRAFFIC_RESUME)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_ROGUE_DETECTION_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_ROGUE_ONU_SPECIAL_MAP_CYCLE_START)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_SERIAL_NUMBER_ACQUISITION_CYCLE_START)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_STANDBY_PON_MONITORING_CYCLE_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_STATE_CHANGE_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_AUTO_CFG_ID_TOD_REQUEST_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_auto_cfg_data_bounds_check(const bcmolt_gpon_ni_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_auto_cfg_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_ni_disable_serial_number_data_set_default(bcmolt_gpon_ni_disable_serial_number_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_DISABLE_SERIAL_NUMBER_ID_CONTROL)) != 0)
+    {
+        this->control = BCMOLT_DISABLE_SERIAL_NUMBER_CONTROL_UNICAST_DISABLE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_DISABLE_SERIAL_NUMBER_ID_SERIAL_NUMBER)) != 0)
+    {
+        memset(this->serial_number.vendor_id, 0, sizeof(this->serial_number.vendor_id));
+        memset(this->serial_number.vendor_specific, 0, sizeof(this->serial_number.vendor_specific));
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_disable_serial_number_data_pack(const bcmolt_gpon_ni_disable_serial_number_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_DISABLE_SERIAL_NUMBER_ID_CONTROL)) != 0)
+    {
+        if (!bcmolt_disable_serial_number_control_pack(this->control, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_DISABLE_SERIAL_NUMBER_ID_SERIAL_NUMBER)) != 0)
+    {
+        if (!bcmolt_serial_number_pack(&this->serial_number, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_ni_disable_serial_number_data_get_packed_length(const bcmolt_gpon_ni_disable_serial_number_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_DISABLE_SERIAL_NUMBER_ID_CONTROL)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_DISABLE_SERIAL_NUMBER_ID_SERIAL_NUMBER)) != 0)
+    {
+        count += 8;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_disable_serial_number_data_unpack(bcmolt_gpon_ni_disable_serial_number_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_DISABLE_SERIAL_NUMBER_ID_CONTROL)) != 0)
+    {
+        if (!bcmolt_disable_serial_number_control_unpack(&this->control, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_DISABLE_SERIAL_NUMBER_ID_SERIAL_NUMBER)) != 0)
+    {
+        if (!bcmolt_serial_number_unpack(&this->serial_number, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_disable_serial_number_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_DISABLE_SERIAL_NUMBER_ID_CONTROL)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_DISABLE_SERIAL_NUMBER_ID_SERIAL_NUMBER)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_disable_serial_number_data_bounds_check(const bcmolt_gpon_ni_disable_serial_number_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_disable_serial_number_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_DISABLE_SERIAL_NUMBER_ID_CONTROL)) != 0)
+    {
+        switch (this->control)
+        {
+            case BCMOLT_DISABLE_SERIAL_NUMBER_CONTROL_UNICAST_DISABLE:
+                break;
+            case BCMOLT_DISABLE_SERIAL_NUMBER_CONTROL_UNICAST_ENABLE:
+                break;
+            case BCMOLT_DISABLE_SERIAL_NUMBER_CONTROL_BROADCAST_ENABLE:
+                break;
+            case BCMOLT_DISABLE_SERIAL_NUMBER_CONTROL_BROADCAST_DISABLE:
+                break;
+            case BCMOLT_DISABLE_SERIAL_NUMBER_CONTROL_DISABLE_DISCOVERY:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_NI_DISABLE_SERIAL_NUMBER_ID_CONTROL;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_DISABLE_SERIAL_NUMBER_ID_SERIAL_NUMBER)) != 0)
+    {
+        if (!bcmolt_serial_number_bounds_check(&this->serial_number))
+        {
+            *failed_prop = BCMOLT_GPON_NI_DISABLE_SERIAL_NUMBER_ID_SERIAL_NUMBER;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_data_set_default(bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_PROTECTION_SWITCHING_TYPE_C_SET_MULTIPLE_ONU_STATE_ID_ONU_STATE)) != 0)
+    {
+        this->onu_state = BCMOLT_SWITCH_OVER_TYPE_C_ONU_STATE_ACTIVE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_PROTECTION_SWITCHING_TYPE_C_SET_MULTIPLE_ONU_STATE_ID_ONU_LIST)) != 0)
+    {
+        this->onu_list.len = 0;
+        this->onu_list.val = NULL;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_data_pack(const bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_PROTECTION_SWITCHING_TYPE_C_SET_MULTIPLE_ONU_STATE_ID_ONU_STATE)) != 0)
+    {
+        if (!bcmolt_switch_over_type_c_onu_state_pack(this->onu_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_PROTECTION_SWITCHING_TYPE_C_SET_MULTIPLE_ONU_STATE_ID_ONU_LIST)) != 0)
+    {
+        if (!bcmolt_gpon_onu_id_list_u32_max_256_pack(&this->onu_list, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_data_get_packed_length(const bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_PROTECTION_SWITCHING_TYPE_C_SET_MULTIPLE_ONU_STATE_ID_ONU_STATE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_PROTECTION_SWITCHING_TYPE_C_SET_MULTIPLE_ONU_STATE_ID_ONU_LIST)) != 0)
+    {
+        count += bcmolt_gpon_onu_id_list_u32_max_256_get_packed_length(&this->onu_list);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_data_unpack(bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_PROTECTION_SWITCHING_TYPE_C_SET_MULTIPLE_ONU_STATE_ID_ONU_STATE)) != 0)
+    {
+        if (!bcmolt_switch_over_type_c_onu_state_unpack(&this->onu_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_PROTECTION_SWITCHING_TYPE_C_SET_MULTIPLE_ONU_STATE_ID_ONU_LIST)) != 0)
+    {
+        if (!bcmolt_gpon_onu_id_list_u32_max_256_unpack(&this->onu_list, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_PROTECTION_SWITCHING_TYPE_C_SET_MULTIPLE_ONU_STATE_ID_ONU_STATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_PROTECTION_SWITCHING_TYPE_C_SET_MULTIPLE_ONU_STATE_ID_ONU_LIST)) != 0)
+    {
+        if (!bcmolt_gpon_onu_id_list_u32_max_256_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_data_bounds_check(const bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_PROTECTION_SWITCHING_TYPE_C_SET_MULTIPLE_ONU_STATE_ID_ONU_STATE)) != 0)
+    {
+        switch (this->onu_state)
+        {
+            case BCMOLT_SWITCH_OVER_TYPE_C_ONU_STATE_ACTIVE:
+                break;
+            case BCMOLT_SWITCH_OVER_TYPE_C_ONU_STATE_ACTIVE_STANDBY:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_NI_PROTECTION_SWITCHING_TYPE_C_SET_MULTIPLE_ONU_STATE_ID_ONU_STATE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_PROTECTION_SWITCHING_TYPE_C_SET_MULTIPLE_ONU_STATE_ID_ONU_LIST)) != 0)
+    {
+        if (this->onu_list.len > 256)
+        {
+            return BCMOS_FALSE;
+        }
+
+        if (!bcmolt_gpon_onu_id_list_u32_max_256_bounds_check(&this->onu_list))
+        {
+            *failed_prop = BCMOLT_GPON_NI_PROTECTION_SWITCHING_TYPE_C_SET_MULTIPLE_ONU_STATE_ID_ONU_LIST;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_ni_rogue_detection_window_data_set_default(bcmolt_gpon_ni_rogue_detection_window_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_WINDOW_ID_WINDOW_TYPE)) != 0)
+    {
+        this->window_type = BCMOLT_ROGUE_DETECTION_WINDOW_SILENT_WINDOW;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_WINDOW_ID_ALLOC_ID)) != 0)
+    {
+        this->alloc_id = (bcmolt_gpon_alloc_id) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_WINDOW_ID_ONU_ID)) != 0)
+    {
+        this->onu_id = (bcmolt_gpon_onu_id) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_WINDOW_ID_SECOND_RANGING_WINDOW)) != 0)
+    {
+        this->second_ranging_window = BCMOS_FALSE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_rogue_detection_window_data_pack(const bcmolt_gpon_ni_rogue_detection_window_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_WINDOW_ID_WINDOW_TYPE)) != 0)
+    {
+        if (!bcmolt_rogue_detection_window_pack(this->window_type, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_WINDOW_ID_ALLOC_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->alloc_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_WINDOW_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->onu_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_WINDOW_ID_SECOND_RANGING_WINDOW)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->second_ranging_window))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_ni_rogue_detection_window_data_get_packed_length(const bcmolt_gpon_ni_rogue_detection_window_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_WINDOW_ID_WINDOW_TYPE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_WINDOW_ID_ALLOC_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_WINDOW_ID_ONU_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_WINDOW_ID_SECOND_RANGING_WINDOW)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_rogue_detection_window_data_unpack(bcmolt_gpon_ni_rogue_detection_window_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_WINDOW_ID_WINDOW_TYPE)) != 0)
+    {
+        if (!bcmolt_rogue_detection_window_unpack(&this->window_type, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_WINDOW_ID_ALLOC_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->alloc_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_WINDOW_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->onu_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_WINDOW_ID_SECOND_RANGING_WINDOW)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->second_ranging_window))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_rogue_detection_window_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_WINDOW_ID_WINDOW_TYPE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_WINDOW_ID_ALLOC_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_WINDOW_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_WINDOW_ID_SECOND_RANGING_WINDOW)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_rogue_detection_window_data_bounds_check(const bcmolt_gpon_ni_rogue_detection_window_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_rogue_detection_window_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_WINDOW_ID_WINDOW_TYPE)) != 0)
+    {
+        switch (this->window_type)
+        {
+            case BCMOLT_ROGUE_DETECTION_WINDOW_SILENT_WINDOW:
+                break;
+            case BCMOLT_ROGUE_DETECTION_WINDOW_CUT_OFF_WINDOW:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_NI_ROGUE_DETECTION_WINDOW_ID_WINDOW_TYPE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_WINDOW_ID_ALLOC_ID)) != 0)
+    {
+        if (this->alloc_id > (bcmolt_gpon_alloc_id) 4095)
+        {
+            *failed_prop = BCMOLT_GPON_NI_ROGUE_DETECTION_WINDOW_ID_ALLOC_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_ROGUE_DETECTION_WINDOW_ID_ONU_ID)) != 0)
+    {
+        if (this->onu_id > (bcmolt_gpon_onu_id) 127)
+        {
+            *failed_prop = BCMOLT_GPON_NI_ROGUE_DETECTION_WINDOW_ID_ONU_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_ni_set_onu_state_data_set_default(bcmolt_gpon_ni_set_onu_state_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_SET_ONU_STATE_ID_ONU_STATE)) != 0)
+    {
+        this->onu_state = BCMOLT_ONU_OPERATION_INACTIVE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_set_onu_state_data_pack(const bcmolt_gpon_ni_set_onu_state_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_SET_ONU_STATE_ID_ONU_STATE)) != 0)
+    {
+        if (!bcmolt_onu_operation_pack(this->onu_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_ni_set_onu_state_data_get_packed_length(const bcmolt_gpon_ni_set_onu_state_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_SET_ONU_STATE_ID_ONU_STATE)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_set_onu_state_data_unpack(bcmolt_gpon_ni_set_onu_state_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_SET_ONU_STATE_ID_ONU_STATE)) != 0)
+    {
+        if (!bcmolt_onu_operation_unpack(&this->onu_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_set_onu_state_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_SET_ONU_STATE_ID_ONU_STATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_set_onu_state_data_bounds_check(const bcmolt_gpon_ni_set_onu_state_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_set_onu_state_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_SET_ONU_STATE_ID_ONU_STATE)) != 0)
+    {
+        switch (this->onu_state)
+        {
+            case BCMOLT_ONU_OPERATION_INACTIVE:
+                break;
+            case BCMOLT_ONU_OPERATION_ACTIVE:
+                break;
+            case BCMOLT_ONU_OPERATION_DISABLE:
+                break;
+            case BCMOLT_ONU_OPERATION_ENABLE:
+                break;
+            case BCMOLT_ONU_OPERATION_ACTIVE_STANDBY:
+                break;
+            case BCMOLT_ONU_OPERATION_AWAKE_FREE:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_NI_SET_ONU_STATE_ID_ONU_STATE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_ni_set_pon_state_data_set_default(bcmolt_gpon_ni_set_pon_state_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_SET_PON_STATE_ID_PON_STATE)) != 0)
+    {
+        this->pon_state = BCMOLT_PON_OPERATION_INACTIVE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_set_pon_state_data_pack(const bcmolt_gpon_ni_set_pon_state_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_SET_PON_STATE_ID_PON_STATE)) != 0)
+    {
+        if (!bcmolt_pon_operation_pack(this->pon_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_ni_set_pon_state_data_get_packed_length(const bcmolt_gpon_ni_set_pon_state_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_SET_PON_STATE_ID_PON_STATE)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_set_pon_state_data_unpack(bcmolt_gpon_ni_set_pon_state_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_SET_PON_STATE_ID_PON_STATE)) != 0)
+    {
+        if (!bcmolt_pon_operation_unpack(&this->pon_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_set_pon_state_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_SET_PON_STATE_ID_PON_STATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_set_pon_state_data_bounds_check(const bcmolt_gpon_ni_set_pon_state_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_set_pon_state_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_SET_PON_STATE_ID_PON_STATE)) != 0)
+    {
+        switch (this->pon_state)
+        {
+            case BCMOLT_PON_OPERATION_INACTIVE:
+                break;
+            case BCMOLT_PON_OPERATION_ACTIVE_WORKING:
+                break;
+            case BCMOLT_PON_OPERATION_ACTIVE_STANDBY:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_NI_SET_PON_STATE_ID_PON_STATE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_ni_start_onu_upgrade_data_set_default(bcmolt_gpon_ni_start_onu_upgrade_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_START_ONU_UPGRADE_ID_LIST_OF_ONU_IDS)) != 0)
+    {
+        this->list_of_onu_ids.len = 0;
+        this->list_of_onu_ids.val = NULL;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_start_onu_upgrade_data_pack(const bcmolt_gpon_ni_start_onu_upgrade_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_START_ONU_UPGRADE_ID_LIST_OF_ONU_IDS)) != 0)
+    {
+        if (!bcmolt_pon_onu_id_list_u32_pack(&this->list_of_onu_ids, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_ni_start_onu_upgrade_data_get_packed_length(const bcmolt_gpon_ni_start_onu_upgrade_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_START_ONU_UPGRADE_ID_LIST_OF_ONU_IDS)) != 0)
+    {
+        count += bcmolt_pon_onu_id_list_u32_get_packed_length(&this->list_of_onu_ids);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_start_onu_upgrade_data_unpack(bcmolt_gpon_ni_start_onu_upgrade_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_START_ONU_UPGRADE_ID_LIST_OF_ONU_IDS)) != 0)
+    {
+        if (!bcmolt_pon_onu_id_list_u32_unpack(&this->list_of_onu_ids, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_start_onu_upgrade_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_START_ONU_UPGRADE_ID_LIST_OF_ONU_IDS)) != 0)
+    {
+        if (!bcmolt_pon_onu_id_list_u32_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_start_onu_upgrade_data_bounds_check(const bcmolt_gpon_ni_start_onu_upgrade_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_start_onu_upgrade_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_START_ONU_UPGRADE_ID_LIST_OF_ONU_IDS)) != 0)
+    {
+        if (!bcmolt_pon_onu_id_list_u32_bounds_check(&this->list_of_onu_ids))
+        {
+            *failed_prop = BCMOLT_GPON_NI_START_ONU_UPGRADE_ID_LIST_OF_ONU_IDS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_ni_broadcast_ploam_packet_data_set_default(bcmolt_gpon_ni_broadcast_ploam_packet_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_BROADCAST_PLOAM_PACKET_ID_PLOAM)) != 0)
+    {
+        memset(this->ploam.arr, 0, sizeof(this->ploam.arr));
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_broadcast_ploam_packet_data_pack(const bcmolt_gpon_ni_broadcast_ploam_packet_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_BROADCAST_PLOAM_PACKET_ID_PLOAM)) != 0)
+    {
+        if (!bcmolt_arr_u8_12_pack(&this->ploam, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_ni_broadcast_ploam_packet_data_get_packed_length(const bcmolt_gpon_ni_broadcast_ploam_packet_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_BROADCAST_PLOAM_PACKET_ID_PLOAM)) != 0)
+    {
+        count += 12;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_broadcast_ploam_packet_data_unpack(bcmolt_gpon_ni_broadcast_ploam_packet_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_BROADCAST_PLOAM_PACKET_ID_PLOAM)) != 0)
+    {
+        if (!bcmolt_arr_u8_12_unpack(&this->ploam, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_broadcast_ploam_packet_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_BROADCAST_PLOAM_PACKET_ID_PLOAM)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 12))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_broadcast_ploam_packet_data_bounds_check(const bcmolt_gpon_ni_broadcast_ploam_packet_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_broadcast_ploam_packet_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_BROADCAST_PLOAM_PACKET_ID_PLOAM)) != 0)
+    {
+        if (!bcmolt_arr_u8_12_bounds_check(&this->ploam))
+        {
+            *failed_prop = BCMOLT_GPON_NI_BROADCAST_PLOAM_PACKET_ID_PLOAM;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_ni_cpu_packets_data_set_default(bcmolt_gpon_ni_cpu_packets_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CPU_PACKETS_ID_PACKET_TYPE)) != 0)
+    {
+        this->packet_type = BCMOLT_PACKET_TYPE_CPU;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CPU_PACKETS_ID_CALC_CRC)) != 0)
+    {
+        this->calc_crc = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CPU_PACKETS_ID_GEM_PORT_LIST)) != 0)
+    {
+        this->gem_port_list.len = 0;
+        this->gem_port_list.val = NULL;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CPU_PACKETS_ID_BUFFER)) != 0)
+    {
+        this->buffer.len = 0;
+        this->buffer.val = NULL;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_cpu_packets_data_pack(const bcmolt_gpon_ni_cpu_packets_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CPU_PACKETS_ID_PACKET_TYPE)) != 0)
+    {
+        if (!bcmolt_packet_type_pack(this->packet_type, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CPU_PACKETS_ID_CALC_CRC)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->calc_crc))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CPU_PACKETS_ID_GEM_PORT_LIST)) != 0)
+    {
+        if (!bcmolt_gpon_gem_id_list_u8_max_16_pack(&this->gem_port_list, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CPU_PACKETS_ID_BUFFER)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_max_2048_pack(&this->buffer, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_ni_cpu_packets_data_get_packed_length(const bcmolt_gpon_ni_cpu_packets_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CPU_PACKETS_ID_PACKET_TYPE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CPU_PACKETS_ID_CALC_CRC)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CPU_PACKETS_ID_GEM_PORT_LIST)) != 0)
+    {
+        count += bcmolt_gpon_gem_id_list_u8_max_16_get_packed_length(&this->gem_port_list);
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CPU_PACKETS_ID_BUFFER)) != 0)
+    {
+        count += bcmolt_u8_list_u32_max_2048_get_packed_length(&this->buffer);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_cpu_packets_data_unpack(bcmolt_gpon_ni_cpu_packets_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CPU_PACKETS_ID_PACKET_TYPE)) != 0)
+    {
+        if (!bcmolt_packet_type_unpack(&this->packet_type, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CPU_PACKETS_ID_CALC_CRC)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->calc_crc))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CPU_PACKETS_ID_GEM_PORT_LIST)) != 0)
+    {
+        if (!bcmolt_gpon_gem_id_list_u8_max_16_unpack(&this->gem_port_list, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CPU_PACKETS_ID_BUFFER)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_max_2048_unpack(&this->buffer, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_cpu_packets_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CPU_PACKETS_ID_PACKET_TYPE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CPU_PACKETS_ID_CALC_CRC)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CPU_PACKETS_ID_GEM_PORT_LIST)) != 0)
+    {
+        if (!bcmolt_gpon_gem_id_list_u8_max_16_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CPU_PACKETS_ID_BUFFER)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_max_2048_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_ni_cpu_packets_data_bounds_check(const bcmolt_gpon_ni_cpu_packets_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_cpu_packets_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CPU_PACKETS_ID_PACKET_TYPE)) != 0)
+    {
+        switch (this->packet_type)
+        {
+            case BCMOLT_PACKET_TYPE_CPU:
+                break;
+            case BCMOLT_PACKET_TYPE_OMCI:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_NI_CPU_PACKETS_ID_PACKET_TYPE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CPU_PACKETS_ID_GEM_PORT_LIST)) != 0)
+    {
+        if (this->gem_port_list.len > 16)
+        {
+            return BCMOS_FALSE;
+        }
+
+        if (!bcmolt_gpon_gem_id_list_u8_max_16_bounds_check(&this->gem_port_list))
+        {
+            *failed_prop = BCMOLT_GPON_NI_CPU_PACKETS_ID_GEM_PORT_LIST;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_NI_CPU_PACKETS_ID_BUFFER)) != 0)
+    {
+        if (this->buffer.len > 2048)
+        {
+            return BCMOS_FALSE;
+        }
+
+        if (!bcmolt_u8_list_u32_max_2048_bounds_check(&this->buffer))
+        {
+            *failed_prop = BCMOLT_GPON_NI_CPU_PACKETS_ID_BUFFER;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_key_set_default(bcmolt_gpon_onu_key *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_ID_PON_NI)) != 0)
+    {
+        this->pon_ni = (bcmolt_gpon_ni) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_ID_ONU_ID)) != 0)
+    {
+        this->onu_id = (bcmolt_gpon_onu_id) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_key_pack(const bcmolt_gpon_onu_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, (uint8_t) this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->onu_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_key_get_packed_length(const bcmolt_gpon_onu_key *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_ID_PON_NI)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_ID_ONU_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_key_unpack(bcmolt_gpon_onu_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, (uint8_t *) &this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->onu_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_key_bounds_check(const bcmolt_gpon_onu_key *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_key_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_ID_PON_NI)) != 0)
+    {
+        if (this->pon_ni > (bcmolt_gpon_ni) 15)
+        {
+            *failed_prop = BCMOLT_GPON_ONU_KEY_ID_PON_NI;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_ID_ONU_ID)) != 0)
+    {
+        if (this->onu_id > (bcmolt_gpon_onu_id) 127)
+        {
+            *failed_prop = BCMOLT_GPON_ONU_KEY_ID_ONU_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_cfg_data_set_default(bcmolt_gpon_onu_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_ONU_STATE)) != 0)
+    {
+        this->onu_state = BCMOLT_ONU_STATE_NOT_CONFIGURED;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_SERIAL_NUMBER)) != 0)
+    {
+        memset(this->serial_number.vendor_id, 0, sizeof(this->serial_number.vendor_id));
+        memset(this->serial_number.vendor_specific, 0, sizeof(this->serial_number.vendor_specific));
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_PASSWORD)) != 0)
+    {
+        memset(this->password.arr, 0, sizeof(this->password.arr));
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_AUTO_PASSWORD_LEARNING)) != 0)
+    {
+        this->auto_password_learning = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_US_FEC)) != 0)
+    {
+        this->us_fec = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_OMCI_PORT_ID)) != 0)
+    {
+        this->omci_port_id = (bcmolt_gpon_gem_id) 65535U;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_DS_BER_REPORTING_INTERVAL)) != 0)
+    {
+        this->ds_ber_reporting_interval = (bcmolt_ber_interval) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_AES_ENCRYPTION_KEY)) != 0)
+    {
+        memset(this->aes_encryption_key.bytes, 0, sizeof(this->aes_encryption_key.bytes));
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_ALARM_STATE)) != 0)
+    {
+        this->alarm_state.losi = BCMOLT_STATUS_OFF;
+        this->alarm_state.lofi = BCMOLT_STATUS_OFF;
+        this->alarm_state.loami = BCMOLT_STATUS_OFF;
+        this->alarm_state.dgi = BCMOLT_STATUS_OFF;
+        this->alarm_state.tiwi = BCMOLT_STATUS_OFF;
+        this->alarm_state.dowi = BCMOLT_STATUS_OFF;
+        this->alarm_state.sufi = BCMOLT_STATUS_OFF;
+        this->alarm_state.sfi = BCMOLT_STATUS_OFF;
+        this->alarm_state.sdi = BCMOLT_STATUS_OFF;
+        this->alarm_state.dfi = BCMOLT_STATUS_OFF;
+        this->alarm_state.loai = BCMOLT_STATUS_OFF;
+        this->alarm_state.loki = BCMOLT_STATUS_OFF;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_RANGING_TIME)) != 0)
+    {
+        this->ranging_time = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_DISABLED_AFTER_DISCOVERY)) != 0)
+    {
+        this->disabled_after_discovery = BCMOLT_STATUS_OFF;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_DEACTIVATION_REASON)) != 0)
+    {
+        this->deactivation_reason = BCMOLT_DEACTIVATION_REASON_NONE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_ALL_GEM_PORTS)) != 0)
+    {
+        this->all_gem_ports.len = 0;
+        this->all_gem_ports.val = NULL;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_ALL_ALLOCS)) != 0)
+    {
+        this->all_allocs.len = 0;
+        this->all_allocs.val = NULL;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_ONU_PS_TYPE_C)) != 0)
+    {
+        this->onu_ps_type_c = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_EXTENDED_GUARD_TIME)) != 0)
+    {
+        this->extended_guard_time.additional_preburst_guard_time = 0;
+        this->extended_guard_time.additional_postburst_guard_time = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_cfg_data_pack(const bcmolt_gpon_onu_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_ONU_STATE)) != 0)
+    {
+        if (!bcmolt_onu_state_pack(this->onu_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_SERIAL_NUMBER)) != 0)
+    {
+        if (!bcmolt_serial_number_pack(&this->serial_number, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_PASSWORD)) != 0)
+    {
+        if (!bcmolt_arr_u8_10_pack(&this->password, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_AUTO_PASSWORD_LEARNING)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->auto_password_learning))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_US_FEC)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->us_fec))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_OMCI_PORT_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->omci_port_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_DS_BER_REPORTING_INTERVAL)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, (uint32_t) this->ds_ber_reporting_interval))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_AES_ENCRYPTION_KEY)) != 0)
+    {
+        if (!bcmolt_aes_key_pack(&this->aes_encryption_key, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_ALARM_STATE)) != 0)
+    {
+        if (!bcmolt_gpon_onu_alarm_state_pack(&this->alarm_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_RANGING_TIME)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->ranging_time))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_DISABLED_AFTER_DISCOVERY)) != 0)
+    {
+        if (!bcmolt_status_pack(this->disabled_after_discovery, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_DEACTIVATION_REASON)) != 0)
+    {
+        if (!bcmolt_deactivation_reason_pack(this->deactivation_reason, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_ALL_GEM_PORTS)) != 0)
+    {
+        if (!bcmolt_gpon_gem_port_with_state_list_u16_max_256_pack(&this->all_gem_ports, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_ALL_ALLOCS)) != 0)
+    {
+        if (!bcmolt_gpon_alloc_with_state_list_u16_max_32_pack(&this->all_allocs, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_ONU_PS_TYPE_C)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->onu_ps_type_c))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_EXTENDED_GUARD_TIME)) != 0)
+    {
+        if (!bcmolt_extended_guard_time_pack(&this->extended_guard_time, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_cfg_data_get_packed_length(const bcmolt_gpon_onu_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_ONU_STATE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_SERIAL_NUMBER)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_PASSWORD)) != 0)
+    {
+        count += 10;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_AUTO_PASSWORD_LEARNING)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_US_FEC)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_OMCI_PORT_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_DS_BER_REPORTING_INTERVAL)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_AES_ENCRYPTION_KEY)) != 0)
+    {
+        count += 16;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_ALARM_STATE)) != 0)
+    {
+        count += 12;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_RANGING_TIME)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_DISABLED_AFTER_DISCOVERY)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_DEACTIVATION_REASON)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_ALL_GEM_PORTS)) != 0)
+    {
+        count += bcmolt_gpon_gem_port_with_state_list_u16_max_256_get_packed_length(&this->all_gem_ports);
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_ALL_ALLOCS)) != 0)
+    {
+        count += bcmolt_gpon_alloc_with_state_list_u16_max_32_get_packed_length(&this->all_allocs);
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_ONU_PS_TYPE_C)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_EXTENDED_GUARD_TIME)) != 0)
+    {
+        count += 8;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_cfg_data_unpack(bcmolt_gpon_onu_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_ONU_STATE)) != 0)
+    {
+        if (!bcmolt_onu_state_unpack(&this->onu_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_SERIAL_NUMBER)) != 0)
+    {
+        if (!bcmolt_serial_number_unpack(&this->serial_number, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_PASSWORD)) != 0)
+    {
+        if (!bcmolt_arr_u8_10_unpack(&this->password, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_AUTO_PASSWORD_LEARNING)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->auto_password_learning))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_US_FEC)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->us_fec))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_OMCI_PORT_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->omci_port_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_DS_BER_REPORTING_INTERVAL)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, (uint32_t *) &this->ds_ber_reporting_interval))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_AES_ENCRYPTION_KEY)) != 0)
+    {
+        if (!bcmolt_aes_key_unpack(&this->aes_encryption_key, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_ALARM_STATE)) != 0)
+    {
+        if (!bcmolt_gpon_onu_alarm_state_unpack(&this->alarm_state, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_RANGING_TIME)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->ranging_time))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_DISABLED_AFTER_DISCOVERY)) != 0)
+    {
+        if (!bcmolt_status_unpack(&this->disabled_after_discovery, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_DEACTIVATION_REASON)) != 0)
+    {
+        if (!bcmolt_deactivation_reason_unpack(&this->deactivation_reason, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_ALL_GEM_PORTS)) != 0)
+    {
+        if (!bcmolt_gpon_gem_port_with_state_list_u16_max_256_unpack(&this->all_gem_ports, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_ALL_ALLOCS)) != 0)
+    {
+        if (!bcmolt_gpon_alloc_with_state_list_u16_max_32_unpack(&this->all_allocs, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_ONU_PS_TYPE_C)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->onu_ps_type_c))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_EXTENDED_GUARD_TIME)) != 0)
+    {
+        if (!bcmolt_extended_guard_time_unpack(&this->extended_guard_time, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_ONU_STATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_SERIAL_NUMBER)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_PASSWORD)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 10))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_AUTO_PASSWORD_LEARNING)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_US_FEC)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_OMCI_PORT_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_DS_BER_REPORTING_INTERVAL)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_AES_ENCRYPTION_KEY)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 16))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_ALARM_STATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 12))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_RANGING_TIME)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_DISABLED_AFTER_DISCOVERY)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_DEACTIVATION_REASON)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_ALL_GEM_PORTS)) != 0)
+    {
+        if (!bcmolt_gpon_gem_port_with_state_list_u16_max_256_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_ALL_ALLOCS)) != 0)
+    {
+        if (!bcmolt_gpon_alloc_with_state_list_u16_max_32_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_ONU_PS_TYPE_C)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_EXTENDED_GUARD_TIME)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_cfg_data_bounds_check(const bcmolt_gpon_onu_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_ONU_STATE)) != 0)
+    {
+        switch (this->onu_state)
+        {
+            case BCMOLT_ONU_STATE_NOT_CONFIGURED:
+                break;
+            case BCMOLT_ONU_STATE_INACTIVE:
+                break;
+            case BCMOLT_ONU_STATE_ACTIVE:
+                break;
+            case BCMOLT_ONU_STATE_ACTIVE_STANDBY:
+                break;
+            case BCMOLT_ONU_STATE_DISABLED:
+                break;
+            case BCMOLT_ONU_STATE_AWAKE_FREE:
+                break;
+            case BCMOLT_ONU_STATE_PROCESSING:
+                break;
+            case BCMOLT_ONU_STATE_LOW_POWER_DOZE:
+                break;
+            case BCMOLT_ONU_STATE_LOW_POWER_SLEEP:
+                break;
+            case BCMOLT_ONU_STATE_LOW_POWER_WATCH:
+                break;
+            case BCMOLT_ONU_STATE_UNAWARE:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_ONU_CFG_ID_ONU_STATE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_SERIAL_NUMBER)) != 0)
+    {
+        if (!bcmolt_serial_number_bounds_check(&this->serial_number))
+        {
+            *failed_prop = BCMOLT_GPON_ONU_CFG_ID_SERIAL_NUMBER;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_PASSWORD)) != 0)
+    {
+        if (!bcmolt_arr_u8_10_bounds_check(&this->password))
+        {
+            *failed_prop = BCMOLT_GPON_ONU_CFG_ID_PASSWORD;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_OMCI_PORT_ID)) != 0)
+    {
+        if (this->omci_port_id > (bcmolt_gpon_gem_id) 4095)
+        {
+            *failed_prop = BCMOLT_GPON_ONU_CFG_ID_OMCI_PORT_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_DS_BER_REPORTING_INTERVAL)) != 0)
+    {
+        if (this->ds_ber_reporting_interval > (bcmolt_ber_interval) 536870911UL)
+        {
+            *failed_prop = BCMOLT_GPON_ONU_CFG_ID_DS_BER_REPORTING_INTERVAL;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_AES_ENCRYPTION_KEY)) != 0)
+    {
+        if (!bcmolt_aes_key_bounds_check(&this->aes_encryption_key))
+        {
+            *failed_prop = BCMOLT_GPON_ONU_CFG_ID_AES_ENCRYPTION_KEY;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_ALARM_STATE)) != 0)
+    {
+        if (!bcmolt_gpon_onu_alarm_state_bounds_check(&this->alarm_state))
+        {
+            *failed_prop = BCMOLT_GPON_ONU_CFG_ID_ALARM_STATE;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_DISABLED_AFTER_DISCOVERY)) != 0)
+    {
+        switch (this->disabled_after_discovery)
+        {
+            case BCMOLT_STATUS_OFF:
+                break;
+            case BCMOLT_STATUS_ON:
+                break;
+            case BCMOLT_STATUS_NO_CHANGE:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_ONU_CFG_ID_DISABLED_AFTER_DISCOVERY;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_DEACTIVATION_REASON)) != 0)
+    {
+        switch (this->deactivation_reason)
+        {
+            case BCMOLT_DEACTIVATION_REASON_NONE:
+                break;
+            case BCMOLT_DEACTIVATION_REASON_DEACTIVATION:
+                break;
+            case BCMOLT_DEACTIVATION_REASON_ACK_TIMEOUT:
+                break;
+            case BCMOLT_DEACTIVATION_REASON_SFI:
+                break;
+            case BCMOLT_DEACTIVATION_REASON_TIWI:
+                break;
+            case BCMOLT_DEACTIVATION_REASON_PASSWORD_AUTHENTICATION:
+                break;
+            case BCMOLT_DEACTIVATION_REASON_ONU_ALARM:
+                break;
+            case BCMOLT_DEACTIVATION_REASON_LOS:
+                break;
+            case BCMOLT_DEACTIVATION_REASON_LOKI:
+                break;
+            case BCMOLT_DEACTIVATION_REASON_RERANGE_FAILURE:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_ONU_CFG_ID_DEACTIVATION_REASON;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_ALL_GEM_PORTS)) != 0)
+    {
+        if (this->all_gem_ports.len > 256)
+        {
+            return BCMOS_FALSE;
+        }
+
+        if (!bcmolt_gpon_gem_port_with_state_list_u16_max_256_bounds_check(&this->all_gem_ports))
+        {
+            *failed_prop = BCMOLT_GPON_ONU_CFG_ID_ALL_GEM_PORTS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_ALL_ALLOCS)) != 0)
+    {
+        if (this->all_allocs.len > 32)
+        {
+            return BCMOS_FALSE;
+        }
+
+        if (!bcmolt_gpon_alloc_with_state_list_u16_max_32_bounds_check(&this->all_allocs))
+        {
+            *failed_prop = BCMOLT_GPON_ONU_CFG_ID_ALL_ALLOCS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CFG_ID_EXTENDED_GUARD_TIME)) != 0)
+    {
+        if (!bcmolt_extended_guard_time_bounds_check(&this->extended_guard_time))
+        {
+            *failed_prop = BCMOLT_GPON_ONU_CFG_ID_EXTENDED_GUARD_TIME;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_stat_data_set_default(bcmolt_gpon_onu_stat_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_FEC_CODEWORDS)) != 0)
+    {
+        this->fec_codewords = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_FEC_BYTES_CORRECTED)) != 0)
+    {
+        this->fec_bytes_corrected = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_FEC_CODEWORDS_CORRECTED)) != 0)
+    {
+        this->fec_codewords_corrected = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_FEC_CODEWORDS_UNCORRECTED)) != 0)
+    {
+        this->fec_codewords_uncorrected = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_BIP8_BYTES)) != 0)
+    {
+        this->bip8_bytes = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_BIP8_ERRORS)) != 0)
+    {
+        this->bip8_errors = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_RX_PLOAMS_CRC_ERROR)) != 0)
+    {
+        this->rx_ploams_crc_error = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_RX_PLOAMS_NON_IDLE)) != 0)
+    {
+        this->rx_ploams_non_idle = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_POSITIVE_DRIFT)) != 0)
+    {
+        this->positive_drift = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_NEGATIVE_DRIFT)) != 0)
+    {
+        this->negative_drift = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_RX_OMCI)) != 0)
+    {
+        this->rx_omci = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_RX_OMCI_PACKETS_CRC_ERROR)) != 0)
+    {
+        this->rx_omci_packets_crc_error = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_BER_REPORTED)) != 0)
+    {
+        this->ber_reported = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_UNRECEIVED_BURST)) != 0)
+    {
+        this->unreceived_burst = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_LCDG_ERRORS)) != 0)
+    {
+        this->lcdg_errors = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_RDI_ERRORS)) != 0)
+    {
+        this->rdi_errors = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_RX_BYTES)) != 0)
+    {
+        this->rx_bytes = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_RX_PACKETS)) != 0)
+    {
+        this->rx_packets = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_TX_BYTES)) != 0)
+    {
+        this->tx_bytes = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_TX_PACKETS)) != 0)
+    {
+        this->tx_packets = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_stat_data_pack(const bcmolt_gpon_onu_stat_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_FEC_CODEWORDS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->fec_codewords))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_FEC_BYTES_CORRECTED)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->fec_bytes_corrected))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_FEC_CODEWORDS_CORRECTED)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->fec_codewords_corrected))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_FEC_CODEWORDS_UNCORRECTED)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->fec_codewords_uncorrected))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_BIP8_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->bip8_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_BIP8_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->bip8_errors))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_RX_PLOAMS_CRC_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_ploams_crc_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_RX_PLOAMS_NON_IDLE)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_ploams_non_idle))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_POSITIVE_DRIFT)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->positive_drift))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_NEGATIVE_DRIFT)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->negative_drift))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_RX_OMCI)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_omci))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_RX_OMCI_PACKETS_CRC_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_omci_packets_crc_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_BER_REPORTED)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->ber_reported))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_UNRECEIVED_BURST)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->unreceived_burst))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_LCDG_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->lcdg_errors))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_RDI_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rdi_errors))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_RX_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_RX_PACKETS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_packets))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_TX_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_TX_PACKETS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_packets))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_stat_data_get_packed_length(const bcmolt_gpon_onu_stat_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_FEC_CODEWORDS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_FEC_BYTES_CORRECTED)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_FEC_CODEWORDS_CORRECTED)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_FEC_CODEWORDS_UNCORRECTED)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_BIP8_BYTES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_BIP8_ERRORS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_RX_PLOAMS_CRC_ERROR)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_RX_PLOAMS_NON_IDLE)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_POSITIVE_DRIFT)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_NEGATIVE_DRIFT)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_RX_OMCI)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_RX_OMCI_PACKETS_CRC_ERROR)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_BER_REPORTED)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_UNRECEIVED_BURST)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_LCDG_ERRORS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_RDI_ERRORS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_RX_BYTES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_RX_PACKETS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_TX_BYTES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_TX_PACKETS)) != 0)
+    {
+        count += 8;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_stat_data_unpack(bcmolt_gpon_onu_stat_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_FEC_CODEWORDS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->fec_codewords))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_FEC_BYTES_CORRECTED)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->fec_bytes_corrected))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_FEC_CODEWORDS_CORRECTED)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->fec_codewords_corrected))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_FEC_CODEWORDS_UNCORRECTED)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->fec_codewords_uncorrected))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_BIP8_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->bip8_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_BIP8_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->bip8_errors))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_RX_PLOAMS_CRC_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_ploams_crc_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_RX_PLOAMS_NON_IDLE)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_ploams_non_idle))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_POSITIVE_DRIFT)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->positive_drift))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_NEGATIVE_DRIFT)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->negative_drift))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_RX_OMCI)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_omci))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_RX_OMCI_PACKETS_CRC_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_omci_packets_crc_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_BER_REPORTED)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->ber_reported))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_UNRECEIVED_BURST)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->unreceived_burst))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_LCDG_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->lcdg_errors))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_RDI_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rdi_errors))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_RX_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_RX_PACKETS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_packets))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_TX_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_TX_PACKETS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_packets))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_stat_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_FEC_CODEWORDS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_FEC_BYTES_CORRECTED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_FEC_CODEWORDS_CORRECTED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_FEC_CODEWORDS_UNCORRECTED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_BIP8_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_BIP8_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_RX_PLOAMS_CRC_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_RX_PLOAMS_NON_IDLE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_POSITIVE_DRIFT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_NEGATIVE_DRIFT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_RX_OMCI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_RX_OMCI_PACKETS_CRC_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_BER_REPORTED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_UNRECEIVED_BURST)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_LCDG_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_RDI_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_RX_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_RX_PACKETS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_TX_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ID_TX_PACKETS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_stat_data_bounds_check(const bcmolt_gpon_onu_stat_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_stat_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_stat_cfg_data_set_default(bcmolt_gpon_onu_stat_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_CFG_ID_CFG)) != 0)
+    {
+        this->cfg.trigger.type = BCMOLT_STAT_CONDITION_TYPE_NONE;
+        this->cfg.soak.active_soak_time = 0;
+        this->cfg.soak.clear_soak_time = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_stat_cfg_data_pack(const bcmolt_gpon_onu_stat_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_pack(&this->cfg, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_stat_cfg_data_get_packed_length(const bcmolt_gpon_onu_stat_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_CFG_ID_CFG)) != 0)
+    {
+        count += bcmolt_stat_alarm_config_get_packed_length(&this->cfg);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_stat_cfg_data_unpack(bcmolt_gpon_onu_stat_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_unpack(&this->cfg, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_stat_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_stat_cfg_data_bounds_check(const bcmolt_gpon_onu_stat_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_stat_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_bounds_check(&this->cfg))
+        {
+            *failed_prop = BCMOLT_GPON_ONU_STAT_CFG_ID_CFG;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_ber_interval_configuration_completed_data_set_default(bcmolt_gpon_onu_ber_interval_configuration_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_BER_INTERVAL_CONFIGURATION_COMPLETED_ID_BER_INTERVAL)) != 0)
+    {
+        this->ber_interval = (bcmolt_ber_interval) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_BER_INTERVAL_CONFIGURATION_COMPLETED_ID_RESULT)) != 0)
+    {
+        this->result = BCMOLT_RESULT_SUCCESS;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_ber_interval_configuration_completed_data_pack(const bcmolt_gpon_onu_ber_interval_configuration_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_BER_INTERVAL_CONFIGURATION_COMPLETED_ID_BER_INTERVAL)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, (uint32_t) this->ber_interval))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_BER_INTERVAL_CONFIGURATION_COMPLETED_ID_RESULT)) != 0)
+    {
+        if (!bcmolt_result_pack(this->result, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_ber_interval_configuration_completed_data_get_packed_length(const bcmolt_gpon_onu_ber_interval_configuration_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_BER_INTERVAL_CONFIGURATION_COMPLETED_ID_BER_INTERVAL)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_BER_INTERVAL_CONFIGURATION_COMPLETED_ID_RESULT)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_ber_interval_configuration_completed_data_unpack(bcmolt_gpon_onu_ber_interval_configuration_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_BER_INTERVAL_CONFIGURATION_COMPLETED_ID_BER_INTERVAL)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, (uint32_t *) &this->ber_interval))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_BER_INTERVAL_CONFIGURATION_COMPLETED_ID_RESULT)) != 0)
+    {
+        if (!bcmolt_result_unpack(&this->result, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_ber_interval_configuration_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_BER_INTERVAL_CONFIGURATION_COMPLETED_ID_BER_INTERVAL)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_BER_INTERVAL_CONFIGURATION_COMPLETED_ID_RESULT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_ber_interval_configuration_completed_data_bounds_check(const bcmolt_gpon_onu_ber_interval_configuration_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_ber_interval_configuration_completed_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_BER_INTERVAL_CONFIGURATION_COMPLETED_ID_RESULT)) != 0)
+    {
+        switch (this->result)
+        {
+            case BCMOLT_RESULT_SUCCESS:
+                break;
+            case BCMOLT_RESULT_FAIL:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_ONU_BER_INTERVAL_CONFIGURATION_COMPLETED_ID_RESULT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_dfi_data_set_default(bcmolt_gpon_onu_dfi_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_DFI_ID_ALARM_STATUS)) != 0)
+    {
+        this->alarm_status = BCMOLT_STATUS_OFF;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_dfi_data_pack(const bcmolt_gpon_onu_dfi_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_DFI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_pack(this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_dfi_data_get_packed_length(const bcmolt_gpon_onu_dfi_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_DFI_ID_ALARM_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_dfi_data_unpack(bcmolt_gpon_onu_dfi_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_DFI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_unpack(&this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_dfi_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_DFI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_dfi_data_bounds_check(const bcmolt_gpon_onu_dfi_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_dfi_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_DFI_ID_ALARM_STATUS)) != 0)
+    {
+        switch (this->alarm_status)
+        {
+            case BCMOLT_STATUS_OFF:
+                break;
+            case BCMOLT_STATUS_ON:
+                break;
+            case BCMOLT_STATUS_NO_CHANGE:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_ONU_DFI_ID_ALARM_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_dgi_data_set_default(bcmolt_gpon_onu_dgi_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_DGI_ID_ALARM_STATUS)) != 0)
+    {
+        this->alarm_status = BCMOLT_STATUS_OFF;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_dgi_data_pack(const bcmolt_gpon_onu_dgi_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_DGI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_pack(this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_dgi_data_get_packed_length(const bcmolt_gpon_onu_dgi_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_DGI_ID_ALARM_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_dgi_data_unpack(bcmolt_gpon_onu_dgi_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_DGI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_unpack(&this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_dgi_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_DGI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_dgi_data_bounds_check(const bcmolt_gpon_onu_dgi_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_dgi_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_DGI_ID_ALARM_STATUS)) != 0)
+    {
+        switch (this->alarm_status)
+        {
+            case BCMOLT_STATUS_OFF:
+                break;
+            case BCMOLT_STATUS_ON:
+                break;
+            case BCMOLT_STATUS_NO_CHANGE:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_ONU_DGI_ID_ALARM_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_dowi_data_set_default(bcmolt_gpon_onu_dowi_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_DOWI_ID_ALARM_STATUS)) != 0)
+    {
+        this->alarm_status = BCMOLT_STATUS_OFF;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_DOWI_ID_DRIFT_VALUE)) != 0)
+    {
+        this->drift_value = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_DOWI_ID_NEW_EQD)) != 0)
+    {
+        this->new_eqd = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_dowi_data_pack(const bcmolt_gpon_onu_dowi_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_DOWI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_pack(this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_DOWI_ID_DRIFT_VALUE)) != 0)
+    {
+        if (!bcmolt_buf_write_s32(buf, this->drift_value))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_DOWI_ID_NEW_EQD)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->new_eqd))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_dowi_data_get_packed_length(const bcmolt_gpon_onu_dowi_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_DOWI_ID_ALARM_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_DOWI_ID_DRIFT_VALUE)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_DOWI_ID_NEW_EQD)) != 0)
+    {
+        count += 4;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_dowi_data_unpack(bcmolt_gpon_onu_dowi_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_DOWI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_unpack(&this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_DOWI_ID_DRIFT_VALUE)) != 0)
+    {
+        if (!bcmolt_buf_read_s32(buf, &this->drift_value))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_DOWI_ID_NEW_EQD)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->new_eqd))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_dowi_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_DOWI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_DOWI_ID_DRIFT_VALUE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_DOWI_ID_NEW_EQD)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_dowi_data_bounds_check(const bcmolt_gpon_onu_dowi_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_dowi_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_DOWI_ID_ALARM_STATUS)) != 0)
+    {
+        switch (this->alarm_status)
+        {
+            case BCMOLT_STATUS_OFF:
+                break;
+            case BCMOLT_STATUS_ON:
+                break;
+            case BCMOLT_STATUS_NO_CHANGE:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_ONU_DOWI_ID_ALARM_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_err_data_set_default(bcmolt_gpon_onu_err_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ERR_ID_BIP8_ERRORS)) != 0)
+    {
+        this->bip8_errors = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_err_data_pack(const bcmolt_gpon_onu_err_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ERR_ID_BIP8_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->bip8_errors))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_err_data_get_packed_length(const bcmolt_gpon_onu_err_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ERR_ID_BIP8_ERRORS)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_err_data_unpack(bcmolt_gpon_onu_err_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ERR_ID_BIP8_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->bip8_errors))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_err_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ERR_ID_BIP8_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_err_data_bounds_check(const bcmolt_gpon_onu_err_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_err_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_invalid_dbru_report_data_set_default(bcmolt_gpon_onu_invalid_dbru_report_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_INVALID_DBRU_REPORT_ID_ALLOC_ID)) != 0)
+    {
+        this->alloc_id = (bcmolt_gpon_alloc_id) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_invalid_dbru_report_data_pack(const bcmolt_gpon_onu_invalid_dbru_report_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_INVALID_DBRU_REPORT_ID_ALLOC_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->alloc_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_invalid_dbru_report_data_get_packed_length(const bcmolt_gpon_onu_invalid_dbru_report_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_INVALID_DBRU_REPORT_ID_ALLOC_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_invalid_dbru_report_data_unpack(bcmolt_gpon_onu_invalid_dbru_report_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_INVALID_DBRU_REPORT_ID_ALLOC_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->alloc_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_invalid_dbru_report_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_INVALID_DBRU_REPORT_ID_ALLOC_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_invalid_dbru_report_data_bounds_check(const bcmolt_gpon_onu_invalid_dbru_report_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_invalid_dbru_report_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_INVALID_DBRU_REPORT_ID_ALLOC_ID)) != 0)
+    {
+        if (this->alloc_id > (bcmolt_gpon_alloc_id) 4095)
+        {
+            *failed_prop = BCMOLT_GPON_ONU_INVALID_DBRU_REPORT_ID_ALLOC_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_key_exchange_completed_data_set_default(bcmolt_gpon_onu_key_exchange_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_EXCHANGE_COMPLETED_ID_NEW_KEY)) != 0)
+    {
+        memset(this->new_key.bytes, 0, sizeof(this->new_key.bytes));
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_key_exchange_completed_data_pack(const bcmolt_gpon_onu_key_exchange_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_EXCHANGE_COMPLETED_ID_NEW_KEY)) != 0)
+    {
+        if (!bcmolt_aes_key_pack(&this->new_key, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_key_exchange_completed_data_get_packed_length(const bcmolt_gpon_onu_key_exchange_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_EXCHANGE_COMPLETED_ID_NEW_KEY)) != 0)
+    {
+        count += 16;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_key_exchange_completed_data_unpack(bcmolt_gpon_onu_key_exchange_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_EXCHANGE_COMPLETED_ID_NEW_KEY)) != 0)
+    {
+        if (!bcmolt_aes_key_unpack(&this->new_key, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_key_exchange_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_EXCHANGE_COMPLETED_ID_NEW_KEY)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 16))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_key_exchange_completed_data_bounds_check(const bcmolt_gpon_onu_key_exchange_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_key_exchange_completed_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_EXCHANGE_COMPLETED_ID_NEW_KEY)) != 0)
+    {
+        if (!bcmolt_aes_key_bounds_check(&this->new_key))
+        {
+            *failed_prop = BCMOLT_GPON_ONU_KEY_EXCHANGE_COMPLETED_ID_NEW_KEY;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_key_exchange_decrypt_required_data_set_default(bcmolt_gpon_onu_key_exchange_decrypt_required_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_EXCHANGE_DECRYPT_REQUIRED_ID_NEW_KEY)) != 0)
+    {
+        memset(this->new_key.bytes, 0, sizeof(this->new_key.bytes));
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_key_exchange_decrypt_required_data_pack(const bcmolt_gpon_onu_key_exchange_decrypt_required_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_EXCHANGE_DECRYPT_REQUIRED_ID_NEW_KEY)) != 0)
+    {
+        if (!bcmolt_aes_key_pack(&this->new_key, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_key_exchange_decrypt_required_data_get_packed_length(const bcmolt_gpon_onu_key_exchange_decrypt_required_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_EXCHANGE_DECRYPT_REQUIRED_ID_NEW_KEY)) != 0)
+    {
+        count += 16;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_key_exchange_decrypt_required_data_unpack(bcmolt_gpon_onu_key_exchange_decrypt_required_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_EXCHANGE_DECRYPT_REQUIRED_ID_NEW_KEY)) != 0)
+    {
+        if (!bcmolt_aes_key_unpack(&this->new_key, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_key_exchange_decrypt_required_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_EXCHANGE_DECRYPT_REQUIRED_ID_NEW_KEY)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 16))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_key_exchange_decrypt_required_data_bounds_check(const bcmolt_gpon_onu_key_exchange_decrypt_required_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_key_exchange_decrypt_required_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_EXCHANGE_DECRYPT_REQUIRED_ID_NEW_KEY)) != 0)
+    {
+        if (!bcmolt_aes_key_bounds_check(&this->new_key))
+        {
+            *failed_prop = BCMOLT_GPON_ONU_KEY_EXCHANGE_DECRYPT_REQUIRED_ID_NEW_KEY;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_key_exchange_key_mismatch_data_set_default(bcmolt_gpon_onu_key_exchange_key_mismatch_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_EXCHANGE_KEY_MISMATCH_ID_EXPECTED_KEY)) != 0)
+    {
+        memset(this->expected_key.bytes, 0, sizeof(this->expected_key.bytes));
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_EXCHANGE_KEY_MISMATCH_ID_RECEIVED_KEY)) != 0)
+    {
+        memset(this->received_key.bytes, 0, sizeof(this->received_key.bytes));
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_key_exchange_key_mismatch_data_pack(const bcmolt_gpon_onu_key_exchange_key_mismatch_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_EXCHANGE_KEY_MISMATCH_ID_EXPECTED_KEY)) != 0)
+    {
+        if (!bcmolt_aes_key_pack(&this->expected_key, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_EXCHANGE_KEY_MISMATCH_ID_RECEIVED_KEY)) != 0)
+    {
+        if (!bcmolt_aes_key_pack(&this->received_key, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_key_exchange_key_mismatch_data_get_packed_length(const bcmolt_gpon_onu_key_exchange_key_mismatch_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_EXCHANGE_KEY_MISMATCH_ID_EXPECTED_KEY)) != 0)
+    {
+        count += 16;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_EXCHANGE_KEY_MISMATCH_ID_RECEIVED_KEY)) != 0)
+    {
+        count += 16;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_key_exchange_key_mismatch_data_unpack(bcmolt_gpon_onu_key_exchange_key_mismatch_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_EXCHANGE_KEY_MISMATCH_ID_EXPECTED_KEY)) != 0)
+    {
+        if (!bcmolt_aes_key_unpack(&this->expected_key, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_EXCHANGE_KEY_MISMATCH_ID_RECEIVED_KEY)) != 0)
+    {
+        if (!bcmolt_aes_key_unpack(&this->received_key, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_key_exchange_key_mismatch_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_EXCHANGE_KEY_MISMATCH_ID_EXPECTED_KEY)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 16))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_EXCHANGE_KEY_MISMATCH_ID_RECEIVED_KEY)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 16))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_key_exchange_key_mismatch_data_bounds_check(const bcmolt_gpon_onu_key_exchange_key_mismatch_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_key_exchange_key_mismatch_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_EXCHANGE_KEY_MISMATCH_ID_EXPECTED_KEY)) != 0)
+    {
+        if (!bcmolt_aes_key_bounds_check(&this->expected_key))
+        {
+            *failed_prop = BCMOLT_GPON_ONU_KEY_EXCHANGE_KEY_MISMATCH_ID_EXPECTED_KEY;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_EXCHANGE_KEY_MISMATCH_ID_RECEIVED_KEY)) != 0)
+    {
+        if (!bcmolt_aes_key_bounds_check(&this->received_key))
+        {
+            *failed_prop = BCMOLT_GPON_ONU_KEY_EXCHANGE_KEY_MISMATCH_ID_RECEIVED_KEY;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_key_exchange_unconsecutive_index_data_set_default(bcmolt_gpon_onu_key_exchange_unconsecutive_index_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_EXCHANGE_UNCONSECUTIVE_INDEX_ID_EXPECTED_INDEX)) != 0)
+    {
+        this->expected_index = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_EXCHANGE_UNCONSECUTIVE_INDEX_ID_ACTUAL_INDEX)) != 0)
+    {
+        this->actual_index = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_key_exchange_unconsecutive_index_data_pack(const bcmolt_gpon_onu_key_exchange_unconsecutive_index_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_EXCHANGE_UNCONSECUTIVE_INDEX_ID_EXPECTED_INDEX)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->expected_index))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_EXCHANGE_UNCONSECUTIVE_INDEX_ID_ACTUAL_INDEX)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->actual_index))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_key_exchange_unconsecutive_index_data_get_packed_length(const bcmolt_gpon_onu_key_exchange_unconsecutive_index_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_EXCHANGE_UNCONSECUTIVE_INDEX_ID_EXPECTED_INDEX)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_EXCHANGE_UNCONSECUTIVE_INDEX_ID_ACTUAL_INDEX)) != 0)
+    {
+        count += 4;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_key_exchange_unconsecutive_index_data_unpack(bcmolt_gpon_onu_key_exchange_unconsecutive_index_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_EXCHANGE_UNCONSECUTIVE_INDEX_ID_EXPECTED_INDEX)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->expected_index))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_EXCHANGE_UNCONSECUTIVE_INDEX_ID_ACTUAL_INDEX)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->actual_index))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_key_exchange_unconsecutive_index_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_EXCHANGE_UNCONSECUTIVE_INDEX_ID_EXPECTED_INDEX)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_KEY_EXCHANGE_UNCONSECUTIVE_INDEX_ID_ACTUAL_INDEX)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_key_exchange_unconsecutive_index_data_bounds_check(const bcmolt_gpon_onu_key_exchange_unconsecutive_index_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_key_exchange_unconsecutive_index_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_loai_data_set_default(bcmolt_gpon_onu_loai_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_LOAI_ID_ALARM_STATUS)) != 0)
+    {
+        this->alarm_status = BCMOLT_STATUS_OFF;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_loai_data_pack(const bcmolt_gpon_onu_loai_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_LOAI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_pack(this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_loai_data_get_packed_length(const bcmolt_gpon_onu_loai_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_LOAI_ID_ALARM_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_loai_data_unpack(bcmolt_gpon_onu_loai_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_LOAI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_unpack(&this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_loai_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_LOAI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_loai_data_bounds_check(const bcmolt_gpon_onu_loai_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_loai_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_LOAI_ID_ALARM_STATUS)) != 0)
+    {
+        switch (this->alarm_status)
+        {
+            case BCMOLT_STATUS_OFF:
+                break;
+            case BCMOLT_STATUS_ON:
+                break;
+            case BCMOLT_STATUS_NO_CHANGE:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_ONU_LOAI_ID_ALARM_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_loki_data_set_default(bcmolt_gpon_onu_loki_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_LOKI_ID_ALARM_STATUS)) != 0)
+    {
+        this->alarm_status = BCMOLT_STATUS_OFF;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_loki_data_pack(const bcmolt_gpon_onu_loki_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_LOKI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_pack(this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_loki_data_get_packed_length(const bcmolt_gpon_onu_loki_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_LOKI_ID_ALARM_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_loki_data_unpack(bcmolt_gpon_onu_loki_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_LOKI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_unpack(&this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_loki_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_LOKI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_loki_data_bounds_check(const bcmolt_gpon_onu_loki_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_loki_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_LOKI_ID_ALARM_STATUS)) != 0)
+    {
+        switch (this->alarm_status)
+        {
+            case BCMOLT_STATUS_OFF:
+                break;
+            case BCMOLT_STATUS_ON:
+                break;
+            case BCMOLT_STATUS_NO_CHANGE:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_ONU_LOKI_ID_ALARM_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_memi_data_set_default(bcmolt_gpon_onu_memi_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_MEMI_ID_PLOAM_BUFFER)) != 0)
+    {
+        memset(this->ploam_buffer.arr, 0, sizeof(this->ploam_buffer.arr));
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_memi_data_pack(const bcmolt_gpon_onu_memi_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_MEMI_ID_PLOAM_BUFFER)) != 0)
+    {
+        if (!bcmolt_arr_u8_13_pack(&this->ploam_buffer, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_memi_data_get_packed_length(const bcmolt_gpon_onu_memi_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_MEMI_ID_PLOAM_BUFFER)) != 0)
+    {
+        count += 13;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_memi_data_unpack(bcmolt_gpon_onu_memi_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_MEMI_ID_PLOAM_BUFFER)) != 0)
+    {
+        if (!bcmolt_arr_u8_13_unpack(&this->ploam_buffer, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_memi_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_MEMI_ID_PLOAM_BUFFER)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 13))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_memi_data_bounds_check(const bcmolt_gpon_onu_memi_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_memi_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_MEMI_ID_PLOAM_BUFFER)) != 0)
+    {
+        if (!bcmolt_arr_u8_13_bounds_check(&this->ploam_buffer))
+        {
+            *failed_prop = BCMOLT_GPON_ONU_MEMI_ID_PLOAM_BUFFER;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_omci_port_id_configuration_completed_data_set_default(bcmolt_gpon_onu_omci_port_id_configuration_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_OMCI_PORT_ID_CONFIGURATION_COMPLETED_ID_GEM_PORT)) != 0)
+    {
+        this->gem_port = (bcmolt_gpon_gem_id) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_OMCI_PORT_ID_CONFIGURATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        this->status = BCMOLT_RESULT_SUCCESS;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_OMCI_PORT_ID_CONFIGURATION_COMPLETED_ID_OPERATION)) != 0)
+    {
+        this->operation = BCMOLT_OMCI_PORT_ID_OPERATION_CONFIGURE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_omci_port_id_configuration_completed_data_pack(const bcmolt_gpon_onu_omci_port_id_configuration_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_OMCI_PORT_ID_CONFIGURATION_COMPLETED_ID_GEM_PORT)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->gem_port))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_OMCI_PORT_ID_CONFIGURATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_result_pack(this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_OMCI_PORT_ID_CONFIGURATION_COMPLETED_ID_OPERATION)) != 0)
+    {
+        if (!bcmolt_omci_port_id_operation_pack(this->operation, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_omci_port_id_configuration_completed_data_get_packed_length(const bcmolt_gpon_onu_omci_port_id_configuration_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_OMCI_PORT_ID_CONFIGURATION_COMPLETED_ID_GEM_PORT)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_OMCI_PORT_ID_CONFIGURATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_OMCI_PORT_ID_CONFIGURATION_COMPLETED_ID_OPERATION)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_omci_port_id_configuration_completed_data_unpack(bcmolt_gpon_onu_omci_port_id_configuration_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_OMCI_PORT_ID_CONFIGURATION_COMPLETED_ID_GEM_PORT)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->gem_port))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_OMCI_PORT_ID_CONFIGURATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_result_unpack(&this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_OMCI_PORT_ID_CONFIGURATION_COMPLETED_ID_OPERATION)) != 0)
+    {
+        if (!bcmolt_omci_port_id_operation_unpack(&this->operation, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_omci_port_id_configuration_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_OMCI_PORT_ID_CONFIGURATION_COMPLETED_ID_GEM_PORT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_OMCI_PORT_ID_CONFIGURATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_OMCI_PORT_ID_CONFIGURATION_COMPLETED_ID_OPERATION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_omci_port_id_configuration_completed_data_bounds_check(const bcmolt_gpon_onu_omci_port_id_configuration_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_omci_port_id_configuration_completed_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_OMCI_PORT_ID_CONFIGURATION_COMPLETED_ID_GEM_PORT)) != 0)
+    {
+        if (this->gem_port > (bcmolt_gpon_gem_id) 4095)
+        {
+            *failed_prop = BCMOLT_GPON_ONU_OMCI_PORT_ID_CONFIGURATION_COMPLETED_ID_GEM_PORT;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_OMCI_PORT_ID_CONFIGURATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        switch (this->status)
+        {
+            case BCMOLT_RESULT_SUCCESS:
+                break;
+            case BCMOLT_RESULT_FAIL:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_ONU_OMCI_PORT_ID_CONFIGURATION_COMPLETED_ID_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_OMCI_PORT_ID_CONFIGURATION_COMPLETED_ID_OPERATION)) != 0)
+    {
+        switch (this->operation)
+        {
+            case BCMOLT_OMCI_PORT_ID_OPERATION_CONFIGURE:
+                break;
+            case BCMOLT_OMCI_PORT_ID_OPERATION_REMOVE:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_ONU_OMCI_PORT_ID_CONFIGURATION_COMPLETED_ID_OPERATION;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_onu_activation_completed_data_set_default(bcmolt_gpon_onu_onu_activation_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ONU_ACTIVATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        this->status = BCMOLT_RESULT_SUCCESS;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ONU_ACTIVATION_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        this->fail_reason = BCMOLT_ACTIVATION_FAIL_REASON_NONE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_onu_activation_completed_data_pack(const bcmolt_gpon_onu_onu_activation_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ONU_ACTIVATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_result_pack(this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ONU_ACTIVATION_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        if (!bcmolt_activation_fail_reason_pack(this->fail_reason, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_onu_activation_completed_data_get_packed_length(const bcmolt_gpon_onu_onu_activation_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ONU_ACTIVATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ONU_ACTIVATION_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_onu_activation_completed_data_unpack(bcmolt_gpon_onu_onu_activation_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ONU_ACTIVATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_result_unpack(&this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ONU_ACTIVATION_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        if (!bcmolt_activation_fail_reason_unpack(&this->fail_reason, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_onu_activation_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ONU_ACTIVATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ONU_ACTIVATION_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_onu_activation_completed_data_bounds_check(const bcmolt_gpon_onu_onu_activation_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_onu_activation_completed_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ONU_ACTIVATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        switch (this->status)
+        {
+            case BCMOLT_RESULT_SUCCESS:
+                break;
+            case BCMOLT_RESULT_FAIL:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_ONU_ONU_ACTIVATION_COMPLETED_ID_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ONU_ACTIVATION_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        switch (this->fail_reason)
+        {
+            case BCMOLT_ACTIVATION_FAIL_REASON_NONE:
+                break;
+            case BCMOLT_ACTIVATION_FAIL_REASON_RANGING:
+                break;
+            case BCMOLT_ACTIVATION_FAIL_REASON_PASSWORD_AUTHENTICATION:
+                break;
+            case BCMOLT_ACTIVATION_FAIL_REASON_LOS:
+                break;
+            case BCMOLT_ACTIVATION_FAIL_REASON_ONU_ALARM:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_ONU_ONU_ACTIVATION_COMPLETED_ID_FAIL_REASON;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_onu_activation_standby_completed_data_set_default(bcmolt_gpon_onu_onu_activation_standby_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ONU_ACTIVATION_STANDBY_COMPLETED_ID_RESULT)) != 0)
+    {
+        this->result = BCMOLT_RESULT_SUCCESS;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_onu_activation_standby_completed_data_pack(const bcmolt_gpon_onu_onu_activation_standby_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ONU_ACTIVATION_STANDBY_COMPLETED_ID_RESULT)) != 0)
+    {
+        if (!bcmolt_result_pack(this->result, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_onu_activation_standby_completed_data_get_packed_length(const bcmolt_gpon_onu_onu_activation_standby_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ONU_ACTIVATION_STANDBY_COMPLETED_ID_RESULT)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_onu_activation_standby_completed_data_unpack(bcmolt_gpon_onu_onu_activation_standby_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ONU_ACTIVATION_STANDBY_COMPLETED_ID_RESULT)) != 0)
+    {
+        if (!bcmolt_result_unpack(&this->result, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_onu_activation_standby_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ONU_ACTIVATION_STANDBY_COMPLETED_ID_RESULT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_onu_activation_standby_completed_data_bounds_check(const bcmolt_gpon_onu_onu_activation_standby_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_onu_activation_standby_completed_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ONU_ACTIVATION_STANDBY_COMPLETED_ID_RESULT)) != 0)
+    {
+        switch (this->result)
+        {
+            case BCMOLT_RESULT_SUCCESS:
+                break;
+            case BCMOLT_RESULT_FAIL:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_ONU_ONU_ACTIVATION_STANDBY_COMPLETED_ID_RESULT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_onu_alarm_data_set_default(bcmolt_gpon_onu_onu_alarm_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ONU_ALARM_ID_ONU_ALARM)) != 0)
+    {
+        this->onu_alarm.losi = BCMOLT_STATUS_OFF;
+        this->onu_alarm.lofi = BCMOLT_STATUS_OFF;
+        this->onu_alarm.loami = BCMOLT_STATUS_OFF;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_onu_alarm_data_pack(const bcmolt_gpon_onu_onu_alarm_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ONU_ALARM_ID_ONU_ALARM)) != 0)
+    {
+        if (!bcmolt_gpon_onu_alarms_pack(&this->onu_alarm, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_onu_alarm_data_get_packed_length(const bcmolt_gpon_onu_onu_alarm_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ONU_ALARM_ID_ONU_ALARM)) != 0)
+    {
+        count += 3;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_onu_alarm_data_unpack(bcmolt_gpon_onu_onu_alarm_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ONU_ALARM_ID_ONU_ALARM)) != 0)
+    {
+        if (!bcmolt_gpon_onu_alarms_unpack(&this->onu_alarm, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_onu_alarm_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ONU_ALARM_ID_ONU_ALARM)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 3))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_onu_alarm_data_bounds_check(const bcmolt_gpon_onu_onu_alarm_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_onu_alarm_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ONU_ALARM_ID_ONU_ALARM)) != 0)
+    {
+        if (!bcmolt_gpon_onu_alarms_bounds_check(&this->onu_alarm))
+        {
+            *failed_prop = BCMOLT_GPON_ONU_ONU_ALARM_ID_ONU_ALARM;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_onu_deactivation_completed_data_set_default(bcmolt_gpon_onu_onu_deactivation_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ONU_DEACTIVATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        this->status = BCMOLT_RESULT_SUCCESS;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_onu_deactivation_completed_data_pack(const bcmolt_gpon_onu_onu_deactivation_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ONU_DEACTIVATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_result_pack(this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_onu_deactivation_completed_data_get_packed_length(const bcmolt_gpon_onu_onu_deactivation_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ONU_DEACTIVATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_onu_deactivation_completed_data_unpack(bcmolt_gpon_onu_onu_deactivation_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ONU_DEACTIVATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_result_unpack(&this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_onu_deactivation_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ONU_DEACTIVATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_onu_deactivation_completed_data_bounds_check(const bcmolt_gpon_onu_onu_deactivation_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_onu_deactivation_completed_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ONU_DEACTIVATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        switch (this->status)
+        {
+            case BCMOLT_RESULT_SUCCESS:
+                break;
+            case BCMOLT_RESULT_FAIL:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_ONU_ONU_DEACTIVATION_COMPLETED_ID_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_onu_disable_completed_data_set_default(bcmolt_gpon_onu_onu_disable_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ONU_DISABLE_COMPLETED_ID_SERIAL_NUMBER)) != 0)
+    {
+        memset(this->serial_number.vendor_id, 0, sizeof(this->serial_number.vendor_id));
+        memset(this->serial_number.vendor_specific, 0, sizeof(this->serial_number.vendor_specific));
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_onu_disable_completed_data_pack(const bcmolt_gpon_onu_onu_disable_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ONU_DISABLE_COMPLETED_ID_SERIAL_NUMBER)) != 0)
+    {
+        if (!bcmolt_serial_number_pack(&this->serial_number, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_onu_disable_completed_data_get_packed_length(const bcmolt_gpon_onu_onu_disable_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ONU_DISABLE_COMPLETED_ID_SERIAL_NUMBER)) != 0)
+    {
+        count += 8;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_onu_disable_completed_data_unpack(bcmolt_gpon_onu_onu_disable_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ONU_DISABLE_COMPLETED_ID_SERIAL_NUMBER)) != 0)
+    {
+        if (!bcmolt_serial_number_unpack(&this->serial_number, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_onu_disable_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ONU_DISABLE_COMPLETED_ID_SERIAL_NUMBER)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_onu_disable_completed_data_bounds_check(const bcmolt_gpon_onu_onu_disable_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_onu_disable_completed_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ONU_DISABLE_COMPLETED_ID_SERIAL_NUMBER)) != 0)
+    {
+        if (!bcmolt_serial_number_bounds_check(&this->serial_number))
+        {
+            *failed_prop = BCMOLT_GPON_ONU_ONU_DISABLE_COMPLETED_ID_SERIAL_NUMBER;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_onu_enable_completed_data_set_default(bcmolt_gpon_onu_onu_enable_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ONU_ENABLE_COMPLETED_ID_SERIAL_NUMBER)) != 0)
+    {
+        memset(this->serial_number.vendor_id, 0, sizeof(this->serial_number.vendor_id));
+        memset(this->serial_number.vendor_specific, 0, sizeof(this->serial_number.vendor_specific));
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_onu_enable_completed_data_pack(const bcmolt_gpon_onu_onu_enable_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ONU_ENABLE_COMPLETED_ID_SERIAL_NUMBER)) != 0)
+    {
+        if (!bcmolt_serial_number_pack(&this->serial_number, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_onu_enable_completed_data_get_packed_length(const bcmolt_gpon_onu_onu_enable_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ONU_ENABLE_COMPLETED_ID_SERIAL_NUMBER)) != 0)
+    {
+        count += 8;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_onu_enable_completed_data_unpack(bcmolt_gpon_onu_onu_enable_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ONU_ENABLE_COMPLETED_ID_SERIAL_NUMBER)) != 0)
+    {
+        if (!bcmolt_serial_number_unpack(&this->serial_number, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_onu_enable_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ONU_ENABLE_COMPLETED_ID_SERIAL_NUMBER)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_onu_enable_completed_data_bounds_check(const bcmolt_gpon_onu_onu_enable_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_onu_enable_completed_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_ONU_ENABLE_COMPLETED_ID_SERIAL_NUMBER)) != 0)
+    {
+        if (!bcmolt_serial_number_bounds_check(&this->serial_number))
+        {
+            *failed_prop = BCMOLT_GPON_ONU_ONU_ENABLE_COMPLETED_ID_SERIAL_NUMBER;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_password_authentication_completed_data_set_default(bcmolt_gpon_onu_password_authentication_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_PASSWORD_AUTHENTICATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        this->status = BCMOLT_RESULT_SUCCESS;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_PASSWORD_AUTHENTICATION_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        this->fail_reason = BCMOLT_PASSWORD_AUTHENTICATION_FAIL_REASON_NONE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_PASSWORD_AUTHENTICATION_COMPLETED_ID_PASSWORD)) != 0)
+    {
+        memset(this->password.arr, 0, sizeof(this->password.arr));
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_password_authentication_completed_data_pack(const bcmolt_gpon_onu_password_authentication_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_PASSWORD_AUTHENTICATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_result_pack(this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_PASSWORD_AUTHENTICATION_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        if (!bcmolt_password_authentication_fail_reason_pack(this->fail_reason, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_PASSWORD_AUTHENTICATION_COMPLETED_ID_PASSWORD)) != 0)
+    {
+        if (!bcmolt_arr_u8_10_pack(&this->password, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_password_authentication_completed_data_get_packed_length(const bcmolt_gpon_onu_password_authentication_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_PASSWORD_AUTHENTICATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_PASSWORD_AUTHENTICATION_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_PASSWORD_AUTHENTICATION_COMPLETED_ID_PASSWORD)) != 0)
+    {
+        count += 10;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_password_authentication_completed_data_unpack(bcmolt_gpon_onu_password_authentication_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_PASSWORD_AUTHENTICATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_result_unpack(&this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_PASSWORD_AUTHENTICATION_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        if (!bcmolt_password_authentication_fail_reason_unpack(&this->fail_reason, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_PASSWORD_AUTHENTICATION_COMPLETED_ID_PASSWORD)) != 0)
+    {
+        if (!bcmolt_arr_u8_10_unpack(&this->password, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_password_authentication_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_PASSWORD_AUTHENTICATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_PASSWORD_AUTHENTICATION_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_PASSWORD_AUTHENTICATION_COMPLETED_ID_PASSWORD)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 10))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_password_authentication_completed_data_bounds_check(const bcmolt_gpon_onu_password_authentication_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_password_authentication_completed_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_PASSWORD_AUTHENTICATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        switch (this->status)
+        {
+            case BCMOLT_RESULT_SUCCESS:
+                break;
+            case BCMOLT_RESULT_FAIL:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_ONU_PASSWORD_AUTHENTICATION_COMPLETED_ID_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_PASSWORD_AUTHENTICATION_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        switch (this->fail_reason)
+        {
+            case BCMOLT_PASSWORD_AUTHENTICATION_FAIL_REASON_NONE:
+                break;
+            case BCMOLT_PASSWORD_AUTHENTICATION_FAIL_REASON_PASSWORD_INCONSISTENCY:
+                break;
+            case BCMOLT_PASSWORD_AUTHENTICATION_FAIL_REASON_PASSWORD_MISMATCH:
+                break;
+            case BCMOLT_PASSWORD_AUTHENTICATION_FAIL_REASON_PASSWORD_AUTHENTICATION_TIMEOUT:
+                break;
+            case BCMOLT_PASSWORD_AUTHENTICATION_FAIL_REASON_ONU_ALARM:
+                break;
+            case BCMOLT_PASSWORD_AUTHENTICATION_FAIL_REASON_LOS_EVENT:
+                break;
+            case BCMOLT_PASSWORD_AUTHENTICATION_FAIL_REASON_DISABLE_EVENT:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_ONU_PASSWORD_AUTHENTICATION_COMPLETED_ID_FAIL_REASON;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_PASSWORD_AUTHENTICATION_COMPLETED_ID_PASSWORD)) != 0)
+    {
+        if (!bcmolt_arr_u8_10_bounds_check(&this->password))
+        {
+            *failed_prop = BCMOLT_GPON_ONU_PASSWORD_AUTHENTICATION_COMPLETED_ID_PASSWORD;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_pee_data_set_default(bcmolt_gpon_onu_pee_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_PEE_ID_ALARM_STATUS)) != 0)
+    {
+        this->alarm_status = BCMOLT_STATUS_OFF;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_pee_data_pack(const bcmolt_gpon_onu_pee_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_PEE_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_pack(this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_pee_data_get_packed_length(const bcmolt_gpon_onu_pee_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_PEE_ID_ALARM_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_pee_data_unpack(bcmolt_gpon_onu_pee_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_PEE_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_unpack(&this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_pee_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_PEE_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_pee_data_bounds_check(const bcmolt_gpon_onu_pee_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_pee_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_PEE_ID_ALARM_STATUS)) != 0)
+    {
+        switch (this->alarm_status)
+        {
+            case BCMOLT_STATUS_OFF:
+                break;
+            case BCMOLT_STATUS_ON:
+                break;
+            case BCMOLT_STATUS_NO_CHANGE:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_ONU_PEE_ID_ALARM_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_possible_drift_data_set_default(bcmolt_gpon_onu_possible_drift_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_POSSIBLE_DRIFT_ID_ALARM_STATUS)) != 0)
+    {
+        this->alarm_status = BCMOLT_STATUS_OFF;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_POSSIBLE_DRIFT_ID_ESTIMATED_DRIFT)) != 0)
+    {
+        this->estimated_drift = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_possible_drift_data_pack(const bcmolt_gpon_onu_possible_drift_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_POSSIBLE_DRIFT_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_pack(this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_POSSIBLE_DRIFT_ID_ESTIMATED_DRIFT)) != 0)
+    {
+        if (!bcmolt_buf_write_s32(buf, this->estimated_drift))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_possible_drift_data_get_packed_length(const bcmolt_gpon_onu_possible_drift_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_POSSIBLE_DRIFT_ID_ALARM_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_POSSIBLE_DRIFT_ID_ESTIMATED_DRIFT)) != 0)
+    {
+        count += 4;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_possible_drift_data_unpack(bcmolt_gpon_onu_possible_drift_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_POSSIBLE_DRIFT_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_unpack(&this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_POSSIBLE_DRIFT_ID_ESTIMATED_DRIFT)) != 0)
+    {
+        if (!bcmolt_buf_read_s32(buf, &this->estimated_drift))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_possible_drift_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_POSSIBLE_DRIFT_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_POSSIBLE_DRIFT_ID_ESTIMATED_DRIFT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_possible_drift_data_bounds_check(const bcmolt_gpon_onu_possible_drift_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_possible_drift_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_POSSIBLE_DRIFT_ID_ALARM_STATUS)) != 0)
+    {
+        switch (this->alarm_status)
+        {
+            case BCMOLT_STATUS_OFF:
+                break;
+            case BCMOLT_STATUS_ON:
+                break;
+            case BCMOLT_STATUS_NO_CHANGE:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_ONU_POSSIBLE_DRIFT_ID_ALARM_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_power_management_state_change_data_set_default(bcmolt_gpon_onu_power_management_state_change_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_OLD_STATE)) != 0)
+    {
+        this->old_state = BCMOLT_ONU_STATE_NOT_CONFIGURED;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_NEW_STATE)) != 0)
+    {
+        this->new_state = BCMOLT_ONU_STATE_NOT_CONFIGURED;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_REASON)) != 0)
+    {
+        this->reason = BCMOLT_POWER_MANAGEMENT_TRANSITION_REASON_POWER_MANAGEMENT_ENABLED;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_power_management_state_change_data_pack(const bcmolt_gpon_onu_power_management_state_change_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_OLD_STATE)) != 0)
+    {
+        if (!bcmolt_onu_state_pack(this->old_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_NEW_STATE)) != 0)
+    {
+        if (!bcmolt_onu_state_pack(this->new_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_REASON)) != 0)
+    {
+        if (!bcmolt_power_management_transition_reason_pack(this->reason, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_power_management_state_change_data_get_packed_length(const bcmolt_gpon_onu_power_management_state_change_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_OLD_STATE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_NEW_STATE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_REASON)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_power_management_state_change_data_unpack(bcmolt_gpon_onu_power_management_state_change_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_OLD_STATE)) != 0)
+    {
+        if (!bcmolt_onu_state_unpack(&this->old_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_NEW_STATE)) != 0)
+    {
+        if (!bcmolt_onu_state_unpack(&this->new_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_REASON)) != 0)
+    {
+        if (!bcmolt_power_management_transition_reason_unpack(&this->reason, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_power_management_state_change_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_OLD_STATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_NEW_STATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_REASON)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_power_management_state_change_data_bounds_check(const bcmolt_gpon_onu_power_management_state_change_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_power_management_state_change_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_OLD_STATE)) != 0)
+    {
+        switch (this->old_state)
+        {
+            case BCMOLT_ONU_STATE_NOT_CONFIGURED:
+                break;
+            case BCMOLT_ONU_STATE_INACTIVE:
+                break;
+            case BCMOLT_ONU_STATE_ACTIVE:
+                break;
+            case BCMOLT_ONU_STATE_ACTIVE_STANDBY:
+                break;
+            case BCMOLT_ONU_STATE_DISABLED:
+                break;
+            case BCMOLT_ONU_STATE_AWAKE_FREE:
+                break;
+            case BCMOLT_ONU_STATE_PROCESSING:
+                break;
+            case BCMOLT_ONU_STATE_LOW_POWER_DOZE:
+                break;
+            case BCMOLT_ONU_STATE_LOW_POWER_SLEEP:
+                break;
+            case BCMOLT_ONU_STATE_LOW_POWER_WATCH:
+                break;
+            case BCMOLT_ONU_STATE_UNAWARE:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_OLD_STATE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_NEW_STATE)) != 0)
+    {
+        switch (this->new_state)
+        {
+            case BCMOLT_ONU_STATE_NOT_CONFIGURED:
+                break;
+            case BCMOLT_ONU_STATE_INACTIVE:
+                break;
+            case BCMOLT_ONU_STATE_ACTIVE:
+                break;
+            case BCMOLT_ONU_STATE_ACTIVE_STANDBY:
+                break;
+            case BCMOLT_ONU_STATE_DISABLED:
+                break;
+            case BCMOLT_ONU_STATE_AWAKE_FREE:
+                break;
+            case BCMOLT_ONU_STATE_PROCESSING:
+                break;
+            case BCMOLT_ONU_STATE_LOW_POWER_DOZE:
+                break;
+            case BCMOLT_ONU_STATE_LOW_POWER_SLEEP:
+                break;
+            case BCMOLT_ONU_STATE_LOW_POWER_WATCH:
+                break;
+            case BCMOLT_ONU_STATE_UNAWARE:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_NEW_STATE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_REASON)) != 0)
+    {
+        switch (this->reason)
+        {
+            case BCMOLT_POWER_MANAGEMENT_TRANSITION_REASON_POWER_MANAGEMENT_ENABLED:
+                break;
+            case BCMOLT_POWER_MANAGEMENT_TRANSITION_REASON_POWER_MANAGEMENT_DISABLED:
+                break;
+            case BCMOLT_POWER_MANAGEMENT_TRANSITION_REASON_SLEEP_REQUEST_AWAKE:
+                break;
+            case BCMOLT_POWER_MANAGEMENT_TRANSITION_REASON_SLEEP_REQUEST_DOZE:
+                break;
+            case BCMOLT_POWER_MANAGEMENT_TRANSITION_REASON_SLEEP_REQUEST_SLEEP:
+                break;
+            case BCMOLT_POWER_MANAGEMENT_TRANSITION_REASON_SLEEP_REQUEST_WATCH:
+                break;
+            case BCMOLT_POWER_MANAGEMENT_TRANSITION_REASON_TERI_EXPIRED:
+                break;
+            case BCMOLT_POWER_MANAGEMENT_TRANSITION_REASON_TALERTED_EXPIRED:
+                break;
+            case BCMOLT_POWER_MANAGEMENT_TRANSITION_REASON_ALARM:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_REASON;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_pst_data_set_default(bcmolt_gpon_onu_pst_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_PST_ID_LINK_NUMBER)) != 0)
+    {
+        this->link_number = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_PST_ID_K1)) != 0)
+    {
+        this->k1 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_PST_ID_K2)) != 0)
+    {
+        this->k2 = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_pst_data_pack(const bcmolt_gpon_onu_pst_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_PST_ID_LINK_NUMBER)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->link_number))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_PST_ID_K1)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->k1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_PST_ID_K2)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->k2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_pst_data_get_packed_length(const bcmolt_gpon_onu_pst_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_PST_ID_LINK_NUMBER)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_PST_ID_K1)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_PST_ID_K2)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_pst_data_unpack(bcmolt_gpon_onu_pst_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_PST_ID_LINK_NUMBER)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->link_number))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_PST_ID_K1)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->k1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_PST_ID_K2)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->k2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_pst_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_PST_ID_LINK_NUMBER)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_PST_ID_K1)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_PST_ID_K2)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_pst_data_bounds_check(const bcmolt_gpon_onu_pst_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_pst_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_ranging_completed_data_set_default(bcmolt_gpon_onu_ranging_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_RANGING_COMPLETED_ID_STATUS)) != 0)
+    {
+        this->status = BCMOLT_RESULT_SUCCESS;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_RANGING_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        this->fail_reason = BCMOLT_RANGING_FAIL_REASON_NONE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_RANGING_COMPLETED_ID_NUMBER_OF_PLOAMS)) != 0)
+    {
+        this->number_of_ploams = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_RANGING_COMPLETED_ID_EQD)) != 0)
+    {
+        this->eqd = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_RANGING_COMPLETED_ID_POWER_LEVEL)) != 0)
+    {
+        this->power_level = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_ranging_completed_data_pack(const bcmolt_gpon_onu_ranging_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_RANGING_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_result_pack(this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_RANGING_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        if (!bcmolt_ranging_fail_reason_pack(this->fail_reason, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_RANGING_COMPLETED_ID_NUMBER_OF_PLOAMS)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->number_of_ploams))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_RANGING_COMPLETED_ID_EQD)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->eqd))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_RANGING_COMPLETED_ID_POWER_LEVEL)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->power_level))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_ranging_completed_data_get_packed_length(const bcmolt_gpon_onu_ranging_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_RANGING_COMPLETED_ID_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_RANGING_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_RANGING_COMPLETED_ID_NUMBER_OF_PLOAMS)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_RANGING_COMPLETED_ID_EQD)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_RANGING_COMPLETED_ID_POWER_LEVEL)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_ranging_completed_data_unpack(bcmolt_gpon_onu_ranging_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_RANGING_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_result_unpack(&this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_RANGING_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        if (!bcmolt_ranging_fail_reason_unpack(&this->fail_reason, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_RANGING_COMPLETED_ID_NUMBER_OF_PLOAMS)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->number_of_ploams))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_RANGING_COMPLETED_ID_EQD)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->eqd))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_RANGING_COMPLETED_ID_POWER_LEVEL)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->power_level))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_ranging_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_RANGING_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_RANGING_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_RANGING_COMPLETED_ID_NUMBER_OF_PLOAMS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_RANGING_COMPLETED_ID_EQD)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_RANGING_COMPLETED_ID_POWER_LEVEL)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_ranging_completed_data_bounds_check(const bcmolt_gpon_onu_ranging_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_ranging_completed_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_RANGING_COMPLETED_ID_STATUS)) != 0)
+    {
+        switch (this->status)
+        {
+            case BCMOLT_RESULT_SUCCESS:
+                break;
+            case BCMOLT_RESULT_FAIL:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_ONU_RANGING_COMPLETED_ID_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_RANGING_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        switch (this->fail_reason)
+        {
+            case BCMOLT_RANGING_FAIL_REASON_NONE:
+                break;
+            case BCMOLT_RANGING_FAIL_REASON_RANGING_ACK_TIMEOUT:
+                break;
+            case BCMOLT_RANGING_FAIL_REASON_PLOAM_DATA_MISMATCH:
+                break;
+            case BCMOLT_RANGING_FAIL_REASON_PLOAM_TYPE_MISMATCH:
+                break;
+            case BCMOLT_RANGING_FAIL_REASON_PLOAM_ONU_ID_MISMATCH:
+                break;
+            case BCMOLT_RANGING_FAIL_REASON_DRIFT_EXCEEDED:
+                break;
+            case BCMOLT_RANGING_FAIL_REASON_NO_PLOAM_RECEIVED:
+                break;
+            case BCMOLT_RANGING_FAIL_REASON_LOS:
+                break;
+            case BCMOLT_RANGING_FAIL_REASON_ALARMS:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_ONU_RANGING_COMPLETED_ID_FAIL_REASON;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_rei_data_set_default(bcmolt_gpon_onu_rei_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_REI_ID_BIP8_ERRORS)) != 0)
+    {
+        this->bip8_errors = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_rei_data_pack(const bcmolt_gpon_onu_rei_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_REI_ID_BIP8_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->bip8_errors))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_rei_data_get_packed_length(const bcmolt_gpon_onu_rei_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_REI_ID_BIP8_ERRORS)) != 0)
+    {
+        count += 4;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_rei_data_unpack(bcmolt_gpon_onu_rei_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_REI_ID_BIP8_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->bip8_errors))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_rei_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_REI_ID_BIP8_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_rei_data_bounds_check(const bcmolt_gpon_onu_rei_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_rei_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_rssi_measurement_completed_data_set_default(bcmolt_gpon_onu_rssi_measurement_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_RSSI_MEASUREMENT_COMPLETED_ID_STATUS)) != 0)
+    {
+        this->status = BCMOLT_RESULT_SUCCESS;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_RSSI_MEASUREMENT_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        this->fail_reason = BCMOLT_RSSI_MEASUREMENT_FAIL_REASON_NONE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_rssi_measurement_completed_data_pack(const bcmolt_gpon_onu_rssi_measurement_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_RSSI_MEASUREMENT_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_result_pack(this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_RSSI_MEASUREMENT_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        if (!bcmolt_rssi_measurement_fail_reason_pack(this->fail_reason, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_rssi_measurement_completed_data_get_packed_length(const bcmolt_gpon_onu_rssi_measurement_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_RSSI_MEASUREMENT_COMPLETED_ID_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_RSSI_MEASUREMENT_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_rssi_measurement_completed_data_unpack(bcmolt_gpon_onu_rssi_measurement_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_RSSI_MEASUREMENT_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_result_unpack(&this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_RSSI_MEASUREMENT_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        if (!bcmolt_rssi_measurement_fail_reason_unpack(&this->fail_reason, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_rssi_measurement_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_RSSI_MEASUREMENT_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_RSSI_MEASUREMENT_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_rssi_measurement_completed_data_bounds_check(const bcmolt_gpon_onu_rssi_measurement_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_rssi_measurement_completed_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_RSSI_MEASUREMENT_COMPLETED_ID_STATUS)) != 0)
+    {
+        switch (this->status)
+        {
+            case BCMOLT_RESULT_SUCCESS:
+                break;
+            case BCMOLT_RESULT_FAIL:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_ONU_RSSI_MEASUREMENT_COMPLETED_ID_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_RSSI_MEASUREMENT_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        switch (this->fail_reason)
+        {
+            case BCMOLT_RSSI_MEASUREMENT_FAIL_REASON_NONE:
+                break;
+            case BCMOLT_RSSI_MEASUREMENT_FAIL_REASON_NO_DELIMITER:
+                break;
+            case BCMOLT_RSSI_MEASUREMENT_FAIL_REASON_NO_ACCESS:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_ONU_RSSI_MEASUREMENT_COMPLETED_ID_FAIL_REASON;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_sdi_data_set_default(bcmolt_gpon_onu_sdi_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_SDI_ID_ALARM_STATUS)) != 0)
+    {
+        this->alarm_status = BCMOLT_STATUS_OFF;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_SDI_ID_BER)) != 0)
+    {
+        this->ber = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_sdi_data_pack(const bcmolt_gpon_onu_sdi_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_SDI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_pack(this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_SDI_ID_BER)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->ber))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_sdi_data_get_packed_length(const bcmolt_gpon_onu_sdi_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_SDI_ID_ALARM_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_SDI_ID_BER)) != 0)
+    {
+        count += 4;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_sdi_data_unpack(bcmolt_gpon_onu_sdi_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_SDI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_unpack(&this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_SDI_ID_BER)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->ber))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_sdi_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_SDI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_SDI_ID_BER)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_sdi_data_bounds_check(const bcmolt_gpon_onu_sdi_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_sdi_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_SDI_ID_ALARM_STATUS)) != 0)
+    {
+        switch (this->alarm_status)
+        {
+            case BCMOLT_STATUS_OFF:
+                break;
+            case BCMOLT_STATUS_ON:
+                break;
+            case BCMOLT_STATUS_NO_CHANGE:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_ONU_SDI_ID_ALARM_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_sfi_data_set_default(bcmolt_gpon_onu_sfi_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_SFI_ID_ALARM_STATUS)) != 0)
+    {
+        this->alarm_status = BCMOLT_STATUS_OFF;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_SFI_ID_BER)) != 0)
+    {
+        this->ber = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_sfi_data_pack(const bcmolt_gpon_onu_sfi_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_SFI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_pack(this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_SFI_ID_BER)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->ber))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_sfi_data_get_packed_length(const bcmolt_gpon_onu_sfi_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_SFI_ID_ALARM_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_SFI_ID_BER)) != 0)
+    {
+        count += 4;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_sfi_data_unpack(bcmolt_gpon_onu_sfi_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_SFI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_unpack(&this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_SFI_ID_BER)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->ber))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_sfi_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_SFI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_SFI_ID_BER)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_sfi_data_bounds_check(const bcmolt_gpon_onu_sfi_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_sfi_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_SFI_ID_ALARM_STATUS)) != 0)
+    {
+        switch (this->alarm_status)
+        {
+            case BCMOLT_STATUS_OFF:
+                break;
+            case BCMOLT_STATUS_ON:
+                break;
+            case BCMOLT_STATUS_NO_CHANGE:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_ONU_SFI_ID_ALARM_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_stat_alarm_cleared_data_set_default(bcmolt_gpon_onu_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        this->stat = BCMOLT_GPON_ONU_STAT_ID_FEC_CODEWORDS;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_stat_alarm_cleared_data_pack(const bcmolt_gpon_onu_stat_alarm_cleared_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_gpon_onu_stat_id_pack(this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_stat_alarm_cleared_data_get_packed_length(const bcmolt_gpon_onu_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_stat_alarm_cleared_data_unpack(bcmolt_gpon_onu_stat_alarm_cleared_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_gpon_onu_stat_id_unpack(&this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_stat_alarm_cleared_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_stat_alarm_cleared_data_bounds_check(const bcmolt_gpon_onu_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_stat_alarm_cleared_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        switch (this->stat)
+        {
+            case BCMOLT_GPON_ONU_STAT_ID_FEC_CODEWORDS:
+                break;
+            case BCMOLT_GPON_ONU_STAT_ID_FEC_BYTES_CORRECTED:
+                break;
+            case BCMOLT_GPON_ONU_STAT_ID_FEC_CODEWORDS_CORRECTED:
+                break;
+            case BCMOLT_GPON_ONU_STAT_ID_FEC_CODEWORDS_UNCORRECTED:
+                break;
+            case BCMOLT_GPON_ONU_STAT_ID_BIP8_BYTES:
+                break;
+            case BCMOLT_GPON_ONU_STAT_ID_BIP8_ERRORS:
+                break;
+            case BCMOLT_GPON_ONU_STAT_ID_RX_PLOAMS_CRC_ERROR:
+                break;
+            case BCMOLT_GPON_ONU_STAT_ID_RX_PLOAMS_NON_IDLE:
+                break;
+            case BCMOLT_GPON_ONU_STAT_ID_POSITIVE_DRIFT:
+                break;
+            case BCMOLT_GPON_ONU_STAT_ID_NEGATIVE_DRIFT:
+                break;
+            case BCMOLT_GPON_ONU_STAT_ID_RX_OMCI:
+                break;
+            case BCMOLT_GPON_ONU_STAT_ID_RX_OMCI_PACKETS_CRC_ERROR:
+                break;
+            case BCMOLT_GPON_ONU_STAT_ID_BER_REPORTED:
+                break;
+            case BCMOLT_GPON_ONU_STAT_ID_UNRECEIVED_BURST:
+                break;
+            case BCMOLT_GPON_ONU_STAT_ID_LCDG_ERRORS:
+                break;
+            case BCMOLT_GPON_ONU_STAT_ID_RDI_ERRORS:
+                break;
+            case BCMOLT_GPON_ONU_STAT_ID_RX_BYTES:
+                break;
+            case BCMOLT_GPON_ONU_STAT_ID_RX_PACKETS:
+                break;
+            case BCMOLT_GPON_ONU_STAT_ID_TX_BYTES:
+                break;
+            case BCMOLT_GPON_ONU_STAT_ID_TX_PACKETS:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_ONU_STAT_ALARM_CLEARED_ID_STAT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_stat_alarm_raised_data_set_default(bcmolt_gpon_onu_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        this->stat = BCMOLT_GPON_ONU_STAT_ID_FEC_CODEWORDS;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_stat_alarm_raised_data_pack(const bcmolt_gpon_onu_stat_alarm_raised_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_gpon_onu_stat_id_pack(this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_stat_alarm_raised_data_get_packed_length(const bcmolt_gpon_onu_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_stat_alarm_raised_data_unpack(bcmolt_gpon_onu_stat_alarm_raised_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_gpon_onu_stat_id_unpack(&this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_stat_alarm_raised_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_stat_alarm_raised_data_bounds_check(const bcmolt_gpon_onu_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_stat_alarm_raised_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        switch (this->stat)
+        {
+            case BCMOLT_GPON_ONU_STAT_ID_FEC_CODEWORDS:
+                break;
+            case BCMOLT_GPON_ONU_STAT_ID_FEC_BYTES_CORRECTED:
+                break;
+            case BCMOLT_GPON_ONU_STAT_ID_FEC_CODEWORDS_CORRECTED:
+                break;
+            case BCMOLT_GPON_ONU_STAT_ID_FEC_CODEWORDS_UNCORRECTED:
+                break;
+            case BCMOLT_GPON_ONU_STAT_ID_BIP8_BYTES:
+                break;
+            case BCMOLT_GPON_ONU_STAT_ID_BIP8_ERRORS:
+                break;
+            case BCMOLT_GPON_ONU_STAT_ID_RX_PLOAMS_CRC_ERROR:
+                break;
+            case BCMOLT_GPON_ONU_STAT_ID_RX_PLOAMS_NON_IDLE:
+                break;
+            case BCMOLT_GPON_ONU_STAT_ID_POSITIVE_DRIFT:
+                break;
+            case BCMOLT_GPON_ONU_STAT_ID_NEGATIVE_DRIFT:
+                break;
+            case BCMOLT_GPON_ONU_STAT_ID_RX_OMCI:
+                break;
+            case BCMOLT_GPON_ONU_STAT_ID_RX_OMCI_PACKETS_CRC_ERROR:
+                break;
+            case BCMOLT_GPON_ONU_STAT_ID_BER_REPORTED:
+                break;
+            case BCMOLT_GPON_ONU_STAT_ID_UNRECEIVED_BURST:
+                break;
+            case BCMOLT_GPON_ONU_STAT_ID_LCDG_ERRORS:
+                break;
+            case BCMOLT_GPON_ONU_STAT_ID_RDI_ERRORS:
+                break;
+            case BCMOLT_GPON_ONU_STAT_ID_RX_BYTES:
+                break;
+            case BCMOLT_GPON_ONU_STAT_ID_RX_PACKETS:
+                break;
+            case BCMOLT_GPON_ONU_STAT_ID_TX_BYTES:
+                break;
+            case BCMOLT_GPON_ONU_STAT_ID_TX_PACKETS:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_ONU_STAT_ALARM_RAISED_ID_STAT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_sufi_data_set_default(bcmolt_gpon_onu_sufi_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_SUFI_ID_ALARM_STATUS)) != 0)
+    {
+        this->alarm_status = BCMOLT_STATUS_OFF;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_sufi_data_pack(const bcmolt_gpon_onu_sufi_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_SUFI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_pack(this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_sufi_data_get_packed_length(const bcmolt_gpon_onu_sufi_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_SUFI_ID_ALARM_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_sufi_data_unpack(bcmolt_gpon_onu_sufi_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_SUFI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_unpack(&this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_sufi_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_SUFI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_sufi_data_bounds_check(const bcmolt_gpon_onu_sufi_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_sufi_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_SUFI_ID_ALARM_STATUS)) != 0)
+    {
+        switch (this->alarm_status)
+        {
+            case BCMOLT_STATUS_OFF:
+                break;
+            case BCMOLT_STATUS_ON:
+                break;
+            case BCMOLT_STATUS_NO_CHANGE:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_ONU_SUFI_ID_ALARM_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_tiwi_data_set_default(bcmolt_gpon_onu_tiwi_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_TIWI_ID_ALARM_STATUS)) != 0)
+    {
+        this->alarm_status = BCMOLT_STATUS_OFF;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_TIWI_ID_DRIFT_VALUE)) != 0)
+    {
+        this->drift_value = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_tiwi_data_pack(const bcmolt_gpon_onu_tiwi_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_TIWI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_pack(this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_TIWI_ID_DRIFT_VALUE)) != 0)
+    {
+        if (!bcmolt_buf_write_s32(buf, this->drift_value))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_tiwi_data_get_packed_length(const bcmolt_gpon_onu_tiwi_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_TIWI_ID_ALARM_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_TIWI_ID_DRIFT_VALUE)) != 0)
+    {
+        count += 4;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_tiwi_data_unpack(bcmolt_gpon_onu_tiwi_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_TIWI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_unpack(&this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_TIWI_ID_DRIFT_VALUE)) != 0)
+    {
+        if (!bcmolt_buf_read_s32(buf, &this->drift_value))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_tiwi_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_TIWI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_TIWI_ID_DRIFT_VALUE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_tiwi_data_bounds_check(const bcmolt_gpon_onu_tiwi_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_tiwi_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_TIWI_ID_ALARM_STATUS)) != 0)
+    {
+        switch (this->alarm_status)
+        {
+            case BCMOLT_STATUS_OFF:
+                break;
+            case BCMOLT_STATUS_ON:
+                break;
+            case BCMOLT_STATUS_NO_CHANGE:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_ONU_TIWI_ID_ALARM_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_auto_cfg_data_set_default(bcmolt_gpon_onu_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_BER_INTERVAL_CONFIGURATION_COMPLETED)) != 0)
+    {
+        this->ber_interval_configuration_completed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_DFI)) != 0)
+    {
+        this->dfi = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_DGI)) != 0)
+    {
+        this->dgi = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_DOWI)) != 0)
+    {
+        this->dowi = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_ERR)) != 0)
+    {
+        this->err = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_INVALID_DBRU_REPORT)) != 0)
+    {
+        this->invalid_dbru_report = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_COMPLETED)) != 0)
+    {
+        this->key_exchange_completed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_CYCLE_SKIPPED)) != 0)
+    {
+        this->key_exchange_cycle_skipped = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_DECRYPT_REQUIRED)) != 0)
+    {
+        this->key_exchange_decrypt_required = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_KEY_MISMATCH)) != 0)
+    {
+        this->key_exchange_key_mismatch = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_KEY_REQUEST_TIMEOUT)) != 0)
+    {
+        this->key_exchange_key_request_timeout = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_UNCONSECUTIVE_INDEX)) != 0)
+    {
+        this->key_exchange_unconsecutive_index = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_LOAI)) != 0)
+    {
+        this->loai = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_LOKI)) != 0)
+    {
+        this->loki = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_MEMI)) != 0)
+    {
+        this->memi = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_OMCI_PORT_ID_CONFIGURATION_COMPLETED)) != 0)
+    {
+        this->omci_port_id_configuration_completed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_ONU_ACTIVATION_COMPLETED)) != 0)
+    {
+        this->onu_activation_completed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_ONU_ACTIVATION_STANDBY_COMPLETED)) != 0)
+    {
+        this->onu_activation_standby_completed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_ONU_ALARM)) != 0)
+    {
+        this->onu_alarm = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_ONU_DEACTIVATION_COMPLETED)) != 0)
+    {
+        this->onu_deactivation_completed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_ONU_DISABLE_COMPLETED)) != 0)
+    {
+        this->onu_disable_completed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_ONU_ENABLE_COMPLETED)) != 0)
+    {
+        this->onu_enable_completed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_OPTICAL_REFLECTION)) != 0)
+    {
+        this->optical_reflection = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_PASSWORD_AUTHENTICATION_COMPLETED)) != 0)
+    {
+        this->password_authentication_completed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_PEE)) != 0)
+    {
+        this->pee = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_POSSIBLE_DRIFT)) != 0)
+    {
+        this->possible_drift = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_POWER_MANAGEMENT_STATE_CHANGE)) != 0)
+    {
+        this->power_management_state_change = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_PST)) != 0)
+    {
+        this->pst = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_RANGING_COMPLETED)) != 0)
+    {
+        this->ranging_completed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_REI)) != 0)
+    {
+        this->rei = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_RSSI_MEASUREMENT_COMPLETED)) != 0)
+    {
+        this->rssi_measurement_completed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_SDI)) != 0)
+    {
+        this->sdi = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_SFI)) != 0)
+    {
+        this->sfi = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        this->stat_alarm_cleared = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        this->stat_alarm_raised = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_SUFI)) != 0)
+    {
+        this->sufi = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_TIWI)) != 0)
+    {
+        this->tiwi = BCMOS_FALSE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_auto_cfg_data_pack(const bcmolt_gpon_onu_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_BER_INTERVAL_CONFIGURATION_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->ber_interval_configuration_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_DFI)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->dfi))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_DGI)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->dgi))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_DOWI)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->dowi))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_ERR)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->err))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_INVALID_DBRU_REPORT)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->invalid_dbru_report))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->key_exchange_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_CYCLE_SKIPPED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->key_exchange_cycle_skipped))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_DECRYPT_REQUIRED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->key_exchange_decrypt_required))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_KEY_MISMATCH)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->key_exchange_key_mismatch))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_KEY_REQUEST_TIMEOUT)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->key_exchange_key_request_timeout))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_UNCONSECUTIVE_INDEX)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->key_exchange_unconsecutive_index))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_LOAI)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->loai))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_LOKI)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->loki))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_MEMI)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->memi))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_OMCI_PORT_ID_CONFIGURATION_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->omci_port_id_configuration_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_ONU_ACTIVATION_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->onu_activation_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_ONU_ACTIVATION_STANDBY_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->onu_activation_standby_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_ONU_ALARM)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->onu_alarm))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_ONU_DEACTIVATION_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->onu_deactivation_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_ONU_DISABLE_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->onu_disable_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_ONU_ENABLE_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->onu_enable_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_OPTICAL_REFLECTION)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->optical_reflection))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_PASSWORD_AUTHENTICATION_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->password_authentication_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_PEE)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->pee))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_POSSIBLE_DRIFT)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->possible_drift))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_POWER_MANAGEMENT_STATE_CHANGE)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->power_management_state_change))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_PST)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->pst))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_RANGING_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->ranging_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_REI)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->rei))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_RSSI_MEASUREMENT_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->rssi_measurement_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_SDI)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->sdi))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_SFI)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->sfi))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->stat_alarm_cleared))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->stat_alarm_raised))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_SUFI)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->sufi))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_TIWI)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->tiwi))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_auto_cfg_data_get_packed_length(const bcmolt_gpon_onu_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_BER_INTERVAL_CONFIGURATION_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_DFI)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_DGI)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_DOWI)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_ERR)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_INVALID_DBRU_REPORT)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_CYCLE_SKIPPED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_DECRYPT_REQUIRED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_KEY_MISMATCH)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_KEY_REQUEST_TIMEOUT)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_UNCONSECUTIVE_INDEX)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_LOAI)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_LOKI)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_MEMI)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_OMCI_PORT_ID_CONFIGURATION_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_ONU_ACTIVATION_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_ONU_ACTIVATION_STANDBY_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_ONU_ALARM)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_ONU_DEACTIVATION_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_ONU_DISABLE_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_ONU_ENABLE_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_OPTICAL_REFLECTION)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_PASSWORD_AUTHENTICATION_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_PEE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_POSSIBLE_DRIFT)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_POWER_MANAGEMENT_STATE_CHANGE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_PST)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_RANGING_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_REI)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_RSSI_MEASUREMENT_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_SDI)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_SFI)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_SUFI)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_TIWI)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_auto_cfg_data_unpack(bcmolt_gpon_onu_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_BER_INTERVAL_CONFIGURATION_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->ber_interval_configuration_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_DFI)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->dfi))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_DGI)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->dgi))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_DOWI)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->dowi))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_ERR)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->err))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_INVALID_DBRU_REPORT)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->invalid_dbru_report))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->key_exchange_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_CYCLE_SKIPPED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->key_exchange_cycle_skipped))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_DECRYPT_REQUIRED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->key_exchange_decrypt_required))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_KEY_MISMATCH)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->key_exchange_key_mismatch))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_KEY_REQUEST_TIMEOUT)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->key_exchange_key_request_timeout))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_UNCONSECUTIVE_INDEX)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->key_exchange_unconsecutive_index))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_LOAI)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->loai))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_LOKI)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->loki))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_MEMI)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->memi))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_OMCI_PORT_ID_CONFIGURATION_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->omci_port_id_configuration_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_ONU_ACTIVATION_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->onu_activation_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_ONU_ACTIVATION_STANDBY_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->onu_activation_standby_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_ONU_ALARM)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->onu_alarm))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_ONU_DEACTIVATION_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->onu_deactivation_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_ONU_DISABLE_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->onu_disable_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_ONU_ENABLE_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->onu_enable_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_OPTICAL_REFLECTION)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->optical_reflection))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_PASSWORD_AUTHENTICATION_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->password_authentication_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_PEE)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->pee))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_POSSIBLE_DRIFT)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->possible_drift))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_POWER_MANAGEMENT_STATE_CHANGE)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->power_management_state_change))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_PST)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->pst))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_RANGING_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->ranging_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_REI)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->rei))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_RSSI_MEASUREMENT_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->rssi_measurement_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_SDI)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->sdi))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_SFI)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->sfi))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->stat_alarm_cleared))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->stat_alarm_raised))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_SUFI)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->sufi))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_TIWI)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->tiwi))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_BER_INTERVAL_CONFIGURATION_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_DFI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_DGI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_DOWI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_ERR)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_INVALID_DBRU_REPORT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_CYCLE_SKIPPED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_DECRYPT_REQUIRED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_KEY_MISMATCH)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_KEY_REQUEST_TIMEOUT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_UNCONSECUTIVE_INDEX)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_LOAI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_LOKI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_MEMI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_OMCI_PORT_ID_CONFIGURATION_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_ONU_ACTIVATION_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_ONU_ACTIVATION_STANDBY_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_ONU_ALARM)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_ONU_DEACTIVATION_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_ONU_DISABLE_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_ONU_ENABLE_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_OPTICAL_REFLECTION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_PASSWORD_AUTHENTICATION_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_PEE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_POSSIBLE_DRIFT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_POWER_MANAGEMENT_STATE_CHANGE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_PST)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_RANGING_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_REI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_RSSI_MEASUREMENT_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_SDI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_SFI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_SUFI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_AUTO_CFG_ID_TIWI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_auto_cfg_data_bounds_check(const bcmolt_gpon_onu_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_auto_cfg_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_change_power_level_data_set_default(bcmolt_gpon_onu_change_power_level_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CHANGE_POWER_LEVEL_ID_POWER_LEVEL_ACTION)) != 0)
+    {
+        this->power_level_action = BCMOLT_ONU_POWER_LEVEL_INCREASE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_change_power_level_data_pack(const bcmolt_gpon_onu_change_power_level_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CHANGE_POWER_LEVEL_ID_POWER_LEVEL_ACTION)) != 0)
+    {
+        if (!bcmolt_onu_power_level_pack(this->power_level_action, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_change_power_level_data_get_packed_length(const bcmolt_gpon_onu_change_power_level_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CHANGE_POWER_LEVEL_ID_POWER_LEVEL_ACTION)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_change_power_level_data_unpack(bcmolt_gpon_onu_change_power_level_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CHANGE_POWER_LEVEL_ID_POWER_LEVEL_ACTION)) != 0)
+    {
+        if (!bcmolt_onu_power_level_unpack(&this->power_level_action, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_change_power_level_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CHANGE_POWER_LEVEL_ID_POWER_LEVEL_ACTION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_change_power_level_data_bounds_check(const bcmolt_gpon_onu_change_power_level_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_change_power_level_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CHANGE_POWER_LEVEL_ID_POWER_LEVEL_ACTION)) != 0)
+    {
+        switch (this->power_level_action)
+        {
+            case BCMOLT_ONU_POWER_LEVEL_INCREASE:
+                break;
+            case BCMOLT_ONU_POWER_LEVEL_DECREASE:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_ONU_CHANGE_POWER_LEVEL_ID_POWER_LEVEL_ACTION;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_set_onu_state_data_set_default(bcmolt_gpon_onu_set_onu_state_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_SET_ONU_STATE_ID_ONU_STATE)) != 0)
+    {
+        this->onu_state = BCMOLT_ONU_OPERATION_INACTIVE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_set_onu_state_data_pack(const bcmolt_gpon_onu_set_onu_state_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_SET_ONU_STATE_ID_ONU_STATE)) != 0)
+    {
+        if (!bcmolt_onu_operation_pack(this->onu_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_set_onu_state_data_get_packed_length(const bcmolt_gpon_onu_set_onu_state_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_SET_ONU_STATE_ID_ONU_STATE)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_set_onu_state_data_unpack(bcmolt_gpon_onu_set_onu_state_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_SET_ONU_STATE_ID_ONU_STATE)) != 0)
+    {
+        if (!bcmolt_onu_operation_unpack(&this->onu_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_set_onu_state_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_SET_ONU_STATE_ID_ONU_STATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_set_onu_state_data_bounds_check(const bcmolt_gpon_onu_set_onu_state_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_set_onu_state_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_SET_ONU_STATE_ID_ONU_STATE)) != 0)
+    {
+        switch (this->onu_state)
+        {
+            case BCMOLT_ONU_OPERATION_INACTIVE:
+                break;
+            case BCMOLT_ONU_OPERATION_ACTIVE:
+                break;
+            case BCMOLT_ONU_OPERATION_DISABLE:
+                break;
+            case BCMOLT_ONU_OPERATION_ENABLE:
+                break;
+            case BCMOLT_ONU_OPERATION_ACTIVE_STANDBY:
+                break;
+            case BCMOLT_ONU_OPERATION_AWAKE_FREE:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_ONU_SET_ONU_STATE_ID_ONU_STATE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_cpu_packets_data_set_default(bcmolt_gpon_onu_cpu_packets_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKETS_ID_PACKET_TYPE)) != 0)
+    {
+        this->packet_type = BCMOLT_PACKET_TYPE_CPU;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKETS_ID_CALC_CRC)) != 0)
+    {
+        this->calc_crc = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKETS_ID_NUMBER_OF_PACKETS)) != 0)
+    {
+        this->number_of_packets = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKETS_ID_PACKET_SIZE)) != 0)
+    {
+        this->packet_size = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKETS_ID_BUFFER)) != 0)
+    {
+        this->buffer.len = 0;
+        this->buffer.val = NULL;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_cpu_packets_data_pack(const bcmolt_gpon_onu_cpu_packets_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKETS_ID_PACKET_TYPE)) != 0)
+    {
+        if (!bcmolt_packet_type_pack(this->packet_type, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKETS_ID_CALC_CRC)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->calc_crc))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKETS_ID_NUMBER_OF_PACKETS)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->number_of_packets))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKETS_ID_PACKET_SIZE)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, this->packet_size))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKETS_ID_BUFFER)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_max_2048_pack(&this->buffer, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_cpu_packets_data_get_packed_length(const bcmolt_gpon_onu_cpu_packets_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKETS_ID_PACKET_TYPE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKETS_ID_CALC_CRC)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKETS_ID_NUMBER_OF_PACKETS)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKETS_ID_PACKET_SIZE)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKETS_ID_BUFFER)) != 0)
+    {
+        count += bcmolt_u8_list_u32_max_2048_get_packed_length(&this->buffer);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_cpu_packets_data_unpack(bcmolt_gpon_onu_cpu_packets_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKETS_ID_PACKET_TYPE)) != 0)
+    {
+        if (!bcmolt_packet_type_unpack(&this->packet_type, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKETS_ID_CALC_CRC)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->calc_crc))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKETS_ID_NUMBER_OF_PACKETS)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->number_of_packets))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKETS_ID_PACKET_SIZE)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, &this->packet_size))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKETS_ID_BUFFER)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_max_2048_unpack(&this->buffer, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_cpu_packets_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKETS_ID_PACKET_TYPE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKETS_ID_CALC_CRC)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKETS_ID_NUMBER_OF_PACKETS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKETS_ID_PACKET_SIZE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKETS_ID_BUFFER)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_max_2048_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_cpu_packets_data_bounds_check(const bcmolt_gpon_onu_cpu_packets_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_cpu_packets_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKETS_ID_PACKET_TYPE)) != 0)
+    {
+        switch (this->packet_type)
+        {
+            case BCMOLT_PACKET_TYPE_CPU:
+                break;
+            case BCMOLT_PACKET_TYPE_OMCI:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_ONU_CPU_PACKETS_ID_PACKET_TYPE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKETS_ID_NUMBER_OF_PACKETS)) != 0)
+    {
+        if (this->number_of_packets > 32)
+        {
+            *failed_prop = BCMOLT_GPON_ONU_CPU_PACKETS_ID_NUMBER_OF_PACKETS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKETS_ID_PACKET_SIZE)) != 0)
+    {
+        if (this->packet_size > 2000)
+        {
+            *failed_prop = BCMOLT_GPON_ONU_CPU_PACKETS_ID_PACKET_SIZE;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKETS_ID_BUFFER)) != 0)
+    {
+        if (this->buffer.len > 2048)
+        {
+            return BCMOS_FALSE;
+        }
+
+        if (!bcmolt_u8_list_u32_max_2048_bounds_check(&this->buffer))
+        {
+            *failed_prop = BCMOLT_GPON_ONU_CPU_PACKETS_ID_BUFFER;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_ploam_packet_data_set_default(bcmolt_gpon_onu_ploam_packet_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_PLOAM_PACKET_ID_PLOAM)) != 0)
+    {
+        memset(this->ploam.arr, 0, sizeof(this->ploam.arr));
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_ploam_packet_data_pack(const bcmolt_gpon_onu_ploam_packet_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_PLOAM_PACKET_ID_PLOAM)) != 0)
+    {
+        if (!bcmolt_arr_u8_12_pack(&this->ploam, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_ploam_packet_data_get_packed_length(const bcmolt_gpon_onu_ploam_packet_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_PLOAM_PACKET_ID_PLOAM)) != 0)
+    {
+        count += 12;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_ploam_packet_data_unpack(bcmolt_gpon_onu_ploam_packet_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_PLOAM_PACKET_ID_PLOAM)) != 0)
+    {
+        if (!bcmolt_arr_u8_12_unpack(&this->ploam, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_ploam_packet_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_PLOAM_PACKET_ID_PLOAM)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 12))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_ploam_packet_data_bounds_check(const bcmolt_gpon_onu_ploam_packet_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_ploam_packet_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_PLOAM_PACKET_ID_PLOAM)) != 0)
+    {
+        if (!bcmolt_arr_u8_12_bounds_check(&this->ploam))
+        {
+            *failed_prop = BCMOLT_GPON_ONU_PLOAM_PACKET_ID_PLOAM;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_cpu_packet_data_set_default(bcmolt_gpon_onu_cpu_packet_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKET_ID_PORT_ID)) != 0)
+    {
+        this->port_id = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKET_ID_CRC_OK)) != 0)
+    {
+        this->crc_ok = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKET_ID_PACKET_SIZE)) != 0)
+    {
+        this->packet_size = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKET_ID_BUFFER)) != 0)
+    {
+        this->buffer.len = 0;
+        this->buffer.val = NULL;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_cpu_packet_data_pack(const bcmolt_gpon_onu_cpu_packet_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKET_ID_PORT_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, this->port_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKET_ID_CRC_OK)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->crc_ok))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKET_ID_PACKET_SIZE)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->packet_size))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKET_ID_BUFFER)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_pack(&this->buffer, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_cpu_packet_data_get_packed_length(const bcmolt_gpon_onu_cpu_packet_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKET_ID_PORT_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKET_ID_CRC_OK)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKET_ID_PACKET_SIZE)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKET_ID_BUFFER)) != 0)
+    {
+        count += bcmolt_u8_list_u32_get_packed_length(&this->buffer);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_cpu_packet_data_unpack(bcmolt_gpon_onu_cpu_packet_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKET_ID_PORT_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, &this->port_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKET_ID_CRC_OK)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->crc_ok))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKET_ID_PACKET_SIZE)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->packet_size))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKET_ID_BUFFER)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_unpack(&this->buffer, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_cpu_packet_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKET_ID_PORT_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKET_ID_CRC_OK)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKET_ID_PACKET_SIZE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKET_ID_BUFFER)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_cpu_packet_data_bounds_check(const bcmolt_gpon_onu_cpu_packet_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_cpu_packet_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_CPU_PACKET_ID_BUFFER)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_bounds_check(&this->buffer))
+        {
+            *failed_prop = BCMOLT_GPON_ONU_CPU_PACKET_ID_BUFFER;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_onu_omci_packet_data_set_default(bcmolt_gpon_onu_omci_packet_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_OMCI_PACKET_ID_PORT_ID)) != 0)
+    {
+        this->port_id = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_OMCI_PACKET_ID_CRC_OK)) != 0)
+    {
+        this->crc_ok = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_OMCI_PACKET_ID_PACKET_SIZE)) != 0)
+    {
+        this->packet_size = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_OMCI_PACKET_ID_BUFFER)) != 0)
+    {
+        this->buffer.len = 0;
+        this->buffer.val = NULL;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_omci_packet_data_pack(const bcmolt_gpon_onu_omci_packet_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_OMCI_PACKET_ID_PORT_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, this->port_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_OMCI_PACKET_ID_CRC_OK)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->crc_ok))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_OMCI_PACKET_ID_PACKET_SIZE)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->packet_size))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_OMCI_PACKET_ID_BUFFER)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_pack(&this->buffer, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_onu_omci_packet_data_get_packed_length(const bcmolt_gpon_onu_omci_packet_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_OMCI_PACKET_ID_PORT_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_OMCI_PACKET_ID_CRC_OK)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_OMCI_PACKET_ID_PACKET_SIZE)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_OMCI_PACKET_ID_BUFFER)) != 0)
+    {
+        count += bcmolt_u8_list_u32_get_packed_length(&this->buffer);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_omci_packet_data_unpack(bcmolt_gpon_onu_omci_packet_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_OMCI_PACKET_ID_PORT_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, &this->port_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_OMCI_PACKET_ID_CRC_OK)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->crc_ok))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_OMCI_PACKET_ID_PACKET_SIZE)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->packet_size))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_OMCI_PACKET_ID_BUFFER)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_unpack(&this->buffer, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_omci_packet_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_OMCI_PACKET_ID_PORT_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_OMCI_PACKET_ID_CRC_OK)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_OMCI_PACKET_ID_PACKET_SIZE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_OMCI_PACKET_ID_BUFFER)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_onu_omci_packet_data_bounds_check(const bcmolt_gpon_onu_omci_packet_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_omci_packet_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_ONU_OMCI_PACKET_ID_BUFFER)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_bounds_check(&this->buffer))
+        {
+            *failed_prop = BCMOLT_GPON_ONU_OMCI_PACKET_ID_BUFFER;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_trx_key_set_default(bcmolt_gpon_trx_key *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_KEY_ID_PON_NI)) != 0)
+    {
+        this->pon_ni = (bcmolt_gpon_ni) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_trx_key_pack(const bcmolt_gpon_trx_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, (uint8_t) this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_trx_key_get_packed_length(const bcmolt_gpon_trx_key *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_KEY_ID_PON_NI)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_trx_key_unpack(bcmolt_gpon_trx_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, (uint8_t *) &this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_trx_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_trx_key_bounds_check(const bcmolt_gpon_trx_key *this, bcmolt_presence_mask fields_present, bcmolt_gpon_trx_key_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_KEY_ID_PON_NI)) != 0)
+    {
+        if (this->pon_ni > (bcmolt_gpon_ni) 15)
+        {
+            *failed_prop = BCMOLT_GPON_TRX_KEY_ID_PON_NI;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_gpon_trx_cfg_data_set_default(bcmolt_gpon_trx_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_TRANSCEIVER_TYPE)) != 0)
+    {
+        this->transceiver_type = BCMOLT_TRX_TYPE_LTE_3680_M;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_LA_CONFIGURATION)) != 0)
+    {
+        this->la_configuration.resync_control.start_pattern = 15;
+        this->la_configuration.resync_control.middle_pattern = 15;
+        this->la_configuration.resync_control.last_pattern = 15;
+        this->la_configuration.resync_control.middle_repetition = 0;
+        this->la_configuration.resync_control.location = 40;
+        this->la_configuration.ranging_resync_control.start_pattern = 15;
+        this->la_configuration.ranging_resync_control.middle_pattern = 15;
+        this->la_configuration.ranging_resync_control.last_pattern = 15;
+        this->la_configuration.ranging_resync_control.middle_repetition = 0;
+        this->la_configuration.ranging_resync_control.location = 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_BCDR)) != 0)
+    {
+        this->bcdr.resync_control.start_pattern = 15;
+        this->bcdr.resync_control.middle_pattern = 0;
+        this->bcdr.resync_control.last_pattern = 0;
+        this->bcdr.resync_control.middle_repetition = 0;
+        this->bcdr.resync_control.location = 34;
+        this->bcdr.ranging_resync_control.start_pattern = 15;
+        this->bcdr.ranging_resync_control.middle_pattern = 0;
+        this->bcdr.ranging_resync_control.last_pattern = 0;
+        this->bcdr.ranging_resync_control.middle_repetition = 0;
+        this->bcdr.ranging_resync_control.location = 7;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_LA_RANGING_AFTER_NO_ED_RESYNC)) != 0)
+    {
+        this->la_ranging_after_no_ed_resync.start_pattern = 0;
+        this->la_ranging_after_no_ed_resync.middle_pattern = 0;
+        this->la_ranging_after_no_ed_resync.last_pattern = 0;
+        this->la_ranging_after_no_ed_resync.middle_repetition = 0;
+        this->la_ranging_after_no_ed_resync.location = 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_BCDR_RANGING_AFTER_NO_ED_RESYNC)) != 0)
+    {
+        this->bcdr_ranging_after_no_ed_resync.start_pattern = 0;
+        this->bcdr_ranging_after_no_ed_resync.middle_pattern = 0;
+        this->bcdr_ranging_after_no_ed_resync.last_pattern = 0;
+        this->bcdr_ranging_after_no_ed_resync.middle_repetition = 0;
+        this->bcdr_ranging_after_no_ed_resync.location = 7;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_LA_RANGING_AFTER_ED_RESYNC)) != 0)
+    {
+        this->la_ranging_after_ed_resync.start_pattern = 0;
+        this->la_ranging_after_ed_resync.middle_pattern = 0;
+        this->la_ranging_after_ed_resync.last_pattern = 0;
+        this->la_ranging_after_ed_resync.middle_repetition = 0;
+        this->la_ranging_after_ed_resync.location = 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_BCDR_RANGING_AFTER_ED_RESYNC)) != 0)
+    {
+        this->bcdr_ranging_after_ed_resync.start_pattern = 15;
+        this->bcdr_ranging_after_ed_resync.middle_pattern = 0;
+        this->bcdr_ranging_after_ed_resync.last_pattern = 0;
+        this->bcdr_ranging_after_ed_resync.middle_repetition = 0;
+        this->bcdr_ranging_after_ed_resync.location = 7;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_LA_RESYNC_POLARITY)) != 0)
+    {
+        this->la_resync_polarity = BCMOLT_POLARITY_LOW;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_BCDR_RESYNC_POLARITY)) != 0)
+    {
+        this->bcdr_resync_polarity = BCMOLT_POLARITY_LOW;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_BCDR_RANGING_RESYNC_CONDITIONS)) != 0)
+    {
+        this->bcdr_ranging_resync_conditions.after_init = BCMOS_FALSE;
+        this->bcdr_ranging_resync_conditions.after_no_ed = BCMOS_FALSE;
+        this->bcdr_ranging_resync_conditions.after_ed = BCMOS_TRUE;
+        this->bcdr_ranging_resync_conditions.after_no_del = BCMOS_FALSE;
+        this->bcdr_ranging_resync_conditions.after_ranging_access = BCMOS_FALSE;
+        this->bcdr_ranging_resync_conditions.med_val = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_LA_RANGING_RESYNC_CONDITIONS)) != 0)
+    {
+        this->la_ranging_resync_conditions.after_init = BCMOS_TRUE;
+        this->la_ranging_resync_conditions.after_no_ed = BCMOS_FALSE;
+        this->la_ranging_resync_conditions.after_ed = BCMOS_FALSE;
+        this->la_ranging_resync_conditions.after_no_del = BCMOS_FALSE;
+        this->la_ranging_resync_conditions.after_ranging_access = BCMOS_TRUE;
+        this->la_ranging_resync_conditions.med_val = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_RX_CONFIGURATION)) != 0)
+    {
+        this->rx_configuration.wait_window_size = 0;
+        this->rx_configuration.ranging_access_window_size = 15;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_RANGING_CONTROL_STAGES_CONFIGURATION)) != 0)
+    {
+        this->ranging_control_stages_configuration.wait_state_1_window_size = 0;
+        this->ranging_control_stages_configuration.wait_state_2_window_size = 0;
+        this->ranging_control_stages_configuration.wait_after_resync_4 = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_ENERGY_DETECT)) != 0)
+    {
+        this->energy_detect.ranging_ed_source = BCMOLT_ENERGY_DETECT_SOURCE_TRX;
+        this->energy_detect.delimiter_ed_source = BCMOLT_ENERGY_DETECT_SOURCE_TRX;
+        this->energy_detect.minimum_threshold = 0;
+        this->energy_detect.maximum_threshold = 41;
+        this->energy_detect.ed_pattern = 170;
+        this->energy_detect.ed_pattern_size = 0;
+        this->energy_detect.window_size = 124;
+        this->energy_detect.inversion = BCMOS_FALSE;
+        this->energy_detect.no_ed_threshold = 127;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_END_OF_BURST_DATA_PATTERN)) != 0)
+    {
+        this->end_of_burst_data_pattern.start_pattern = 15;
+        this->end_of_burst_data_pattern.middle_pattern = 15;
+        this->end_of_burst_data_pattern.last_pattern = 15;
+        this->end_of_burst_data_pattern.middle_repetition = 0;
+        this->end_of_burst_data_pattern.location = 11;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_END_OF_BURST_RANGING_PATTERN)) != 0)
+    {
+        this->end_of_burst_ranging_pattern.start_pattern = 0;
+        this->end_of_burst_ranging_pattern.middle_pattern = 0;
+        this->end_of_burst_ranging_pattern.last_pattern = 0;
+        this->end_of_burst_ranging_pattern.middle_repetition = 0;
+        this->end_of_burst_ranging_pattern.location = 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_PREAMBLE)) != 0)
+    {
+        this->preamble.type_1_size = 0;
+        this->preamble.type_2_size = 0;
+        this->preamble.type_3_pre_ranging_size = 50;
+        this->preamble.type_3_post_ranging_size = 15;
+        this->preamble.type_3_pattern = 170;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_DELIMITER)) != 0)
+    {
+        this->delimiter.pattern[0] = 171;
+        this->delimiter.pattern[1] = 89;
+        this->delimiter.pattern[2] = 131;
+        this->delimiter.size = 3;
+        this->delimiter.window_size = 124;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_GUARD_BITS)) != 0)
+    {
+        this->guard_bits = 64;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_SERDES_CONFIGURATION)) != 0)
+    {
+        this->serdes_configuration.ranging_mode = BCMOLT_SERDES_RANGING_MODE_BCDR_RESET_MODE;
+        this->serdes_configuration.multi_ed_mode = BCMOS_FALSE;
+        this->serdes_configuration.burst_enable_start_offset = 0;
+        this->serdes_configuration.burst_enable_end_offset = 0;
+        this->serdes_configuration.ed_invertion = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_PLO_RANGING)) != 0)
+    {
+        this->plo_ranging = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_PLO_DATA)) != 0)
+    {
+        this->plo_data = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_RSSI_NORMAL_CONFIG)) != 0)
+    {
+        this->rssi_normal_config.location = 20;
+        this->rssi_normal_config.location_sign = BCMOLT_RSSI_LOCATION_SIGN_BEFORE;
+        this->rssi_normal_config.start_pattern = 15;
+        this->rssi_normal_config.middle_pattern = 15;
+        this->rssi_normal_config.last_pattern = 15;
+        this->rssi_normal_config.middle_repertition = 50;
+        this->rssi_normal_config.minimum_burst = 55;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_RANGING_RSSI_RESYNC_CONTROL)) != 0)
+    {
+        this->ranging_rssi_resync_control.after_no_ed = BCMOS_FALSE;
+        this->ranging_rssi_resync_control.after_ed = BCMOS_FALSE;
+        this->ranging_rssi_resync_control.after_reset_3 = BCMOS_FALSE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_trx_cfg_data_pack(const bcmolt_gpon_trx_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_TRANSCEIVER_TYPE)) != 0)
+    {
+        if (!bcmolt_trx_type_pack(this->transceiver_type, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_LA_CONFIGURATION)) != 0)
+    {
+        if (!bcmolt_la_resync_pattern_configuration_pack(&this->la_configuration, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_BCDR)) != 0)
+    {
+        if (!bcmolt_bcdr_resync_pattern_configuration_pack(&this->bcdr, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_LA_RANGING_AFTER_NO_ED_RESYNC)) != 0)
+    {
+        if (!bcmolt_resync_control_pack(&this->la_ranging_after_no_ed_resync, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_BCDR_RANGING_AFTER_NO_ED_RESYNC)) != 0)
+    {
+        if (!bcmolt_resync_control_pack(&this->bcdr_ranging_after_no_ed_resync, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_LA_RANGING_AFTER_ED_RESYNC)) != 0)
+    {
+        if (!bcmolt_resync_control_pack(&this->la_ranging_after_ed_resync, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_BCDR_RANGING_AFTER_ED_RESYNC)) != 0)
+    {
+        if (!bcmolt_resync_control_pack(&this->bcdr_ranging_after_ed_resync, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_LA_RESYNC_POLARITY)) != 0)
+    {
+        if (!bcmolt_polarity_pack(this->la_resync_polarity, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_BCDR_RESYNC_POLARITY)) != 0)
+    {
+        if (!bcmolt_polarity_pack(this->bcdr_resync_polarity, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_BCDR_RANGING_RESYNC_CONDITIONS)) != 0)
+    {
+        if (!bcmolt_ranging_resync_conditions_pack(&this->bcdr_ranging_resync_conditions, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_LA_RANGING_RESYNC_CONDITIONS)) != 0)
+    {
+        if (!bcmolt_ranging_resync_conditions_pack(&this->la_ranging_resync_conditions, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_RX_CONFIGURATION)) != 0)
+    {
+        if (!bcmolt_trx_rx_configuration_pack(&this->rx_configuration, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_RANGING_CONTROL_STAGES_CONFIGURATION)) != 0)
+    {
+        if (!bcmolt_ranging_control_configuration_pack(&this->ranging_control_stages_configuration, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_ENERGY_DETECT)) != 0)
+    {
+        if (!bcmolt_trx_energy_detect_pack(&this->energy_detect, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_END_OF_BURST_DATA_PATTERN)) != 0)
+    {
+        if (!bcmolt_resync_control_pack(&this->end_of_burst_data_pattern, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_END_OF_BURST_RANGING_PATTERN)) != 0)
+    {
+        if (!bcmolt_resync_control_pack(&this->end_of_burst_ranging_pattern, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_PREAMBLE)) != 0)
+    {
+        if (!bcmolt_trx_preamble_pack(&this->preamble, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_DELIMITER)) != 0)
+    {
+        if (!bcmolt_trx_delimiter_pack(&this->delimiter, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_GUARD_BITS)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->guard_bits))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_SERDES_CONFIGURATION)) != 0)
+    {
+        if (!bcmolt_serdes_configuration_pack(&this->serdes_configuration, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_PLO_RANGING)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->plo_ranging))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_PLO_DATA)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->plo_data))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_RSSI_NORMAL_CONFIG)) != 0)
+    {
+        if (!bcmolt_gpon_rssi_general_configuration_pack(&this->rssi_normal_config, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_RANGING_RSSI_RESYNC_CONTROL)) != 0)
+    {
+        if (!bcmolt_ranging_rssi_control_pack(&this->ranging_rssi_resync_control, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_gpon_trx_cfg_data_get_packed_length(const bcmolt_gpon_trx_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_TRANSCEIVER_TYPE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_LA_CONFIGURATION)) != 0)
+    {
+        count += 10;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_BCDR)) != 0)
+    {
+        count += 10;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_LA_RANGING_AFTER_NO_ED_RESYNC)) != 0)
+    {
+        count += 5;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_BCDR_RANGING_AFTER_NO_ED_RESYNC)) != 0)
+    {
+        count += 5;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_LA_RANGING_AFTER_ED_RESYNC)) != 0)
+    {
+        count += 5;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_BCDR_RANGING_AFTER_ED_RESYNC)) != 0)
+    {
+        count += 5;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_LA_RESYNC_POLARITY)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_BCDR_RESYNC_POLARITY)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_BCDR_RANGING_RESYNC_CONDITIONS)) != 0)
+    {
+        count += 7;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_LA_RANGING_RESYNC_CONDITIONS)) != 0)
+    {
+        count += 7;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_RX_CONFIGURATION)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_RANGING_CONTROL_STAGES_CONFIGURATION)) != 0)
+    {
+        count += 3;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_ENERGY_DETECT)) != 0)
+    {
+        count += 9;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_END_OF_BURST_DATA_PATTERN)) != 0)
+    {
+        count += 5;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_END_OF_BURST_RANGING_PATTERN)) != 0)
+    {
+        count += 5;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_PREAMBLE)) != 0)
+    {
+        count += 5;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_DELIMITER)) != 0)
+    {
+        count += 5;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_GUARD_BITS)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_SERDES_CONFIGURATION)) != 0)
+    {
+        count += 7;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_PLO_RANGING)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_PLO_DATA)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_RSSI_NORMAL_CONFIG)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_RANGING_RSSI_RESYNC_CONTROL)) != 0)
+    {
+        count += 3;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_trx_cfg_data_unpack(bcmolt_gpon_trx_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_TRANSCEIVER_TYPE)) != 0)
+    {
+        if (!bcmolt_trx_type_unpack(&this->transceiver_type, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_LA_CONFIGURATION)) != 0)
+    {
+        if (!bcmolt_la_resync_pattern_configuration_unpack(&this->la_configuration, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_BCDR)) != 0)
+    {
+        if (!bcmolt_bcdr_resync_pattern_configuration_unpack(&this->bcdr, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_LA_RANGING_AFTER_NO_ED_RESYNC)) != 0)
+    {
+        if (!bcmolt_resync_control_unpack(&this->la_ranging_after_no_ed_resync, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_BCDR_RANGING_AFTER_NO_ED_RESYNC)) != 0)
+    {
+        if (!bcmolt_resync_control_unpack(&this->bcdr_ranging_after_no_ed_resync, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_LA_RANGING_AFTER_ED_RESYNC)) != 0)
+    {
+        if (!bcmolt_resync_control_unpack(&this->la_ranging_after_ed_resync, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_BCDR_RANGING_AFTER_ED_RESYNC)) != 0)
+    {
+        if (!bcmolt_resync_control_unpack(&this->bcdr_ranging_after_ed_resync, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_LA_RESYNC_POLARITY)) != 0)
+    {
+        if (!bcmolt_polarity_unpack(&this->la_resync_polarity, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_BCDR_RESYNC_POLARITY)) != 0)
+    {
+        if (!bcmolt_polarity_unpack(&this->bcdr_resync_polarity, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_BCDR_RANGING_RESYNC_CONDITIONS)) != 0)
+    {
+        if (!bcmolt_ranging_resync_conditions_unpack(&this->bcdr_ranging_resync_conditions, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_LA_RANGING_RESYNC_CONDITIONS)) != 0)
+    {
+        if (!bcmolt_ranging_resync_conditions_unpack(&this->la_ranging_resync_conditions, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_RX_CONFIGURATION)) != 0)
+    {
+        if (!bcmolt_trx_rx_configuration_unpack(&this->rx_configuration, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_RANGING_CONTROL_STAGES_CONFIGURATION)) != 0)
+    {
+        if (!bcmolt_ranging_control_configuration_unpack(&this->ranging_control_stages_configuration, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_ENERGY_DETECT)) != 0)
+    {
+        if (!bcmolt_trx_energy_detect_unpack(&this->energy_detect, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_END_OF_BURST_DATA_PATTERN)) != 0)
+    {
+        if (!bcmolt_resync_control_unpack(&this->end_of_burst_data_pattern, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_END_OF_BURST_RANGING_PATTERN)) != 0)
+    {
+        if (!bcmolt_resync_control_unpack(&this->end_of_burst_ranging_pattern, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_PREAMBLE)) != 0)
+    {
+        if (!bcmolt_trx_preamble_unpack(&this->preamble, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_DELIMITER)) != 0)
+    {
+        if (!bcmolt_trx_delimiter_unpack(&this->delimiter, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_GUARD_BITS)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->guard_bits))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_SERDES_CONFIGURATION)) != 0)
+    {
+        if (!bcmolt_serdes_configuration_unpack(&this->serdes_configuration, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_PLO_RANGING)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->plo_ranging))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_PLO_DATA)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->plo_data))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_RSSI_NORMAL_CONFIG)) != 0)
+    {
+        if (!bcmolt_gpon_rssi_general_configuration_unpack(&this->rssi_normal_config, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_RANGING_RSSI_RESYNC_CONTROL)) != 0)
+    {
+        if (!bcmolt_ranging_rssi_control_unpack(&this->ranging_rssi_resync_control, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_trx_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_TRANSCEIVER_TYPE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_LA_CONFIGURATION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 10))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_BCDR)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 10))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_LA_RANGING_AFTER_NO_ED_RESYNC)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 5))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_BCDR_RANGING_AFTER_NO_ED_RESYNC)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 5))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_LA_RANGING_AFTER_ED_RESYNC)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 5))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_BCDR_RANGING_AFTER_ED_RESYNC)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 5))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_LA_RESYNC_POLARITY)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_BCDR_RESYNC_POLARITY)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_BCDR_RANGING_RESYNC_CONDITIONS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 7))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_LA_RANGING_RESYNC_CONDITIONS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 7))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_RX_CONFIGURATION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_RANGING_CONTROL_STAGES_CONFIGURATION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 3))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_ENERGY_DETECT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 9))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_END_OF_BURST_DATA_PATTERN)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 5))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_END_OF_BURST_RANGING_PATTERN)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 5))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_PREAMBLE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 5))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_DELIMITER)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 5))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_GUARD_BITS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_SERDES_CONFIGURATION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 7))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_PLO_RANGING)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_PLO_DATA)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_RSSI_NORMAL_CONFIG)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_RANGING_RSSI_RESYNC_CONTROL)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 3))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_gpon_trx_cfg_data_bounds_check(const bcmolt_gpon_trx_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_trx_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_TRANSCEIVER_TYPE)) != 0)
+    {
+        switch (this->transceiver_type)
+        {
+            case BCMOLT_TRX_TYPE_SPS_43_48_H_HP_CDE_SD_2013:
+                break;
+            case BCMOLT_TRX_TYPE_SOG_4321_PSGB:
+                break;
+            case BCMOLT_TRX_TYPE_LTE_3680_M:
+                break;
+            case BCMOLT_TRX_TYPE_SOURCE_PHOTONICS:
+                break;
+            case BCMOLT_TRX_TYPE_LTE_3680_P_TYPE_C_PLUS:
+                break;
+            case BCMOLT_TRX_TYPE_ANY:
+                break;
+            case BCMOLT_TRX_TYPE_ANY_RESET_GUARD:
+                break;
+            case BCMOLT_TRX_TYPE_ANY_RESET_PREAMBLE:
+                break;
+            case BCMOLT_TRX_TYPE_WTD_RTXM_167_526_CPLUS:
+                break;
+            case BCMOLT_TRX_TYPE_WTD_RTXM_167_522_BPLUS:
+                break;
+            case BCMOLT_TRX_TYPE_LTE_3680_P_BC:
+                break;
+            case BCMOLT_TRX_TYPE_SOGQ_4321_PSGB_C_PLUS:
+                break;
+            case BCMOLT_TRX_TYPE_WTD_RTXM167_521:
+                break;
+            case BCMOLT_TRX_TYPE_LTE3678:
+                break;
+            case BCMOLT_TRX_TYPE_SOGP_4321_PSGA:
+                break;
+            case BCMOLT_TRX_TYPE_GPON_GENERAL_1:
+                break;
+            case BCMOLT_TRX_TYPE_GPON_GENERAL_2:
+                break;
+            case BCMOLT_TRX_TYPE_GPON_GENERAL_3:
+                break;
+            case BCMOLT_TRX_TYPE_GPON_GENERAL_4:
+                break;
+            case BCMOLT_TRX_TYPE_GPON_GENERAL_5:
+                break;
+            case BCMOLT_TRX_TYPE_GPON_GENERAL_6:
+                break;
+            case BCMOLT_TRX_TYPE_GPON_GENERAL_7:
+                break;
+            case BCMOLT_TRX_TYPE_GPON_GENERAL_8:
+                break;
+            case BCMOLT_TRX_TYPE_GPON_GENERAL_9:
+                break;
+            case BCMOLT_TRX_TYPE_GPON_GENERAL_10:
+                break;
+            case BCMOLT_TRX_TYPE_GPON_GENERAL_11:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_TRX_CFG_ID_TRANSCEIVER_TYPE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_LA_CONFIGURATION)) != 0)
+    {
+        if (!bcmolt_la_resync_pattern_configuration_bounds_check(&this->la_configuration))
+        {
+            *failed_prop = BCMOLT_GPON_TRX_CFG_ID_LA_CONFIGURATION;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_BCDR)) != 0)
+    {
+        if (!bcmolt_bcdr_resync_pattern_configuration_bounds_check(&this->bcdr))
+        {
+            *failed_prop = BCMOLT_GPON_TRX_CFG_ID_BCDR;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_LA_RANGING_AFTER_NO_ED_RESYNC)) != 0)
+    {
+        if (!bcmolt_resync_control_bounds_check(&this->la_ranging_after_no_ed_resync))
+        {
+            *failed_prop = BCMOLT_GPON_TRX_CFG_ID_LA_RANGING_AFTER_NO_ED_RESYNC;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_BCDR_RANGING_AFTER_NO_ED_RESYNC)) != 0)
+    {
+        if (!bcmolt_resync_control_bounds_check(&this->bcdr_ranging_after_no_ed_resync))
+        {
+            *failed_prop = BCMOLT_GPON_TRX_CFG_ID_BCDR_RANGING_AFTER_NO_ED_RESYNC;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_LA_RANGING_AFTER_ED_RESYNC)) != 0)
+    {
+        if (!bcmolt_resync_control_bounds_check(&this->la_ranging_after_ed_resync))
+        {
+            *failed_prop = BCMOLT_GPON_TRX_CFG_ID_LA_RANGING_AFTER_ED_RESYNC;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_BCDR_RANGING_AFTER_ED_RESYNC)) != 0)
+    {
+        if (!bcmolt_resync_control_bounds_check(&this->bcdr_ranging_after_ed_resync))
+        {
+            *failed_prop = BCMOLT_GPON_TRX_CFG_ID_BCDR_RANGING_AFTER_ED_RESYNC;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_LA_RESYNC_POLARITY)) != 0)
+    {
+        switch (this->la_resync_polarity)
+        {
+            case BCMOLT_POLARITY_LOW:
+                break;
+            case BCMOLT_POLARITY_HIGH:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_TRX_CFG_ID_LA_RESYNC_POLARITY;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_BCDR_RESYNC_POLARITY)) != 0)
+    {
+        switch (this->bcdr_resync_polarity)
+        {
+            case BCMOLT_POLARITY_LOW:
+                break;
+            case BCMOLT_POLARITY_HIGH:
+                break;
+            default:
+                *failed_prop = BCMOLT_GPON_TRX_CFG_ID_BCDR_RESYNC_POLARITY;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_BCDR_RANGING_RESYNC_CONDITIONS)) != 0)
+    {
+        if (!bcmolt_ranging_resync_conditions_bounds_check(&this->bcdr_ranging_resync_conditions))
+        {
+            *failed_prop = BCMOLT_GPON_TRX_CFG_ID_BCDR_RANGING_RESYNC_CONDITIONS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_LA_RANGING_RESYNC_CONDITIONS)) != 0)
+    {
+        if (!bcmolt_ranging_resync_conditions_bounds_check(&this->la_ranging_resync_conditions))
+        {
+            *failed_prop = BCMOLT_GPON_TRX_CFG_ID_LA_RANGING_RESYNC_CONDITIONS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_RX_CONFIGURATION)) != 0)
+    {
+        if (!bcmolt_trx_rx_configuration_bounds_check(&this->rx_configuration))
+        {
+            *failed_prop = BCMOLT_GPON_TRX_CFG_ID_RX_CONFIGURATION;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_RANGING_CONTROL_STAGES_CONFIGURATION)) != 0)
+    {
+        if (!bcmolt_ranging_control_configuration_bounds_check(&this->ranging_control_stages_configuration))
+        {
+            *failed_prop = BCMOLT_GPON_TRX_CFG_ID_RANGING_CONTROL_STAGES_CONFIGURATION;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_ENERGY_DETECT)) != 0)
+    {
+        if (!bcmolt_trx_energy_detect_bounds_check(&this->energy_detect))
+        {
+            *failed_prop = BCMOLT_GPON_TRX_CFG_ID_ENERGY_DETECT;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_END_OF_BURST_DATA_PATTERN)) != 0)
+    {
+        if (!bcmolt_resync_control_bounds_check(&this->end_of_burst_data_pattern))
+        {
+            *failed_prop = BCMOLT_GPON_TRX_CFG_ID_END_OF_BURST_DATA_PATTERN;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_END_OF_BURST_RANGING_PATTERN)) != 0)
+    {
+        if (!bcmolt_resync_control_bounds_check(&this->end_of_burst_ranging_pattern))
+        {
+            *failed_prop = BCMOLT_GPON_TRX_CFG_ID_END_OF_BURST_RANGING_PATTERN;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_PREAMBLE)) != 0)
+    {
+        if (!bcmolt_trx_preamble_bounds_check(&this->preamble))
+        {
+            *failed_prop = BCMOLT_GPON_TRX_CFG_ID_PREAMBLE;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_DELIMITER)) != 0)
+    {
+        if (!bcmolt_trx_delimiter_bounds_check(&this->delimiter))
+        {
+            *failed_prop = BCMOLT_GPON_TRX_CFG_ID_DELIMITER;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_SERDES_CONFIGURATION)) != 0)
+    {
+        if (!bcmolt_serdes_configuration_bounds_check(&this->serdes_configuration))
+        {
+            *failed_prop = BCMOLT_GPON_TRX_CFG_ID_SERDES_CONFIGURATION;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_RSSI_NORMAL_CONFIG)) != 0)
+    {
+        if (!bcmolt_gpon_rssi_general_configuration_bounds_check(&this->rssi_normal_config))
+        {
+            *failed_prop = BCMOLT_GPON_TRX_CFG_ID_RSSI_NORMAL_CONFIG;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_GPON_TRX_CFG_ID_RANGING_RSSI_RESYNC_CONTROL)) != 0)
+    {
+        if (!bcmolt_ranging_rssi_control_bounds_check(&this->ranging_rssi_resync_control))
+        {
+            *failed_prop = BCMOLT_GPON_TRX_CFG_ID_RANGING_RSSI_RESYNC_CONTROL;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_log_entry_key_set_default(bcmolt_log_entry_key *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_KEY_ID_LOG_ID)) != 0)
+    {
+        this->log_id = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_KEY_ID_RESERVED)) != 0)
+    {
+        this->reserved = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_KEY_ID_NAME)) != 0)
+    {
+        memset(this->name.str, 0, 100);
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_entry_key_pack(const bcmolt_log_entry_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_KEY_ID_LOG_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->log_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_KEY_ID_RESERVED)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->reserved))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_KEY_ID_NAME)) != 0)
+    {
+        if (!bcmolt_str_100_pack(&this->name, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_log_entry_key_get_packed_length(const bcmolt_log_entry_key *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_KEY_ID_LOG_ID)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_KEY_ID_RESERVED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_KEY_ID_NAME)) != 0)
+    {
+        count += 100;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_entry_key_unpack(bcmolt_log_entry_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_KEY_ID_LOG_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->log_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_KEY_ID_RESERVED)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->reserved))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_KEY_ID_NAME)) != 0)
+    {
+        if (!bcmolt_str_100_unpack(&this->name, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_entry_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_KEY_ID_LOG_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_KEY_ID_RESERVED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_KEY_ID_NAME)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 100))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_entry_key_bounds_check(const bcmolt_log_entry_key *this, bcmolt_presence_mask fields_present, bcmolt_log_entry_key_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_KEY_ID_NAME)) != 0)
+    {
+        if (!bcmolt_str_100_bounds_check(&this->name))
+        {
+            *failed_prop = BCMOLT_LOG_ENTRY_KEY_ID_NAME;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_log_entry_cfg_data_set_default(bcmolt_log_entry_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_CFG_ID_DEFAULT_LOG_LEVEL)) != 0)
+    {
+        this->default_log_level = BCMOLT_LOG_LEVEL_NO_LOG;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_CFG_ID_DEFAULT_LOG_TYPE)) != 0)
+    {
+        this->default_log_type = BCMOLT_LOG_TYPE_NONE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_CFG_ID_LOG_LEVEL_PRINT)) != 0)
+    {
+        this->log_level_print = BCMOLT_LOG_LEVEL_NO_LOG;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_CFG_ID_LOG_LEVEL_SAVE)) != 0)
+    {
+        this->log_level_save = BCMOLT_LOG_LEVEL_NO_LOG;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_CFG_ID_LOG_TYPE)) != 0)
+    {
+        this->log_type = BCMOLT_LOG_TYPE_NONE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_CFG_ID_LOG_STYLE)) != 0)
+    {
+        this->log_style = BCMOLT_LOG_STYLE_NORMAL;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_CFG_ID_LOG_NAME)) != 0)
+    {
+        memset(this->log_name.str, 0, 100);
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_entry_cfg_data_pack(const bcmolt_log_entry_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_CFG_ID_DEFAULT_LOG_LEVEL)) != 0)
+    {
+        if (!bcmolt_log_level_pack(this->default_log_level, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_CFG_ID_DEFAULT_LOG_TYPE)) != 0)
+    {
+        if (!bcmolt_log_type_pack(this->default_log_type, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_CFG_ID_LOG_LEVEL_PRINT)) != 0)
+    {
+        if (!bcmolt_log_level_pack(this->log_level_print, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_CFG_ID_LOG_LEVEL_SAVE)) != 0)
+    {
+        if (!bcmolt_log_level_pack(this->log_level_save, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_CFG_ID_LOG_TYPE)) != 0)
+    {
+        if (!bcmolt_log_type_pack(this->log_type, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_CFG_ID_LOG_STYLE)) != 0)
+    {
+        if (!bcmolt_log_style_pack(this->log_style, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_CFG_ID_LOG_NAME)) != 0)
+    {
+        if (!bcmolt_str_100_pack(&this->log_name, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_log_entry_cfg_data_get_packed_length(const bcmolt_log_entry_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_CFG_ID_DEFAULT_LOG_LEVEL)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_CFG_ID_DEFAULT_LOG_TYPE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_CFG_ID_LOG_LEVEL_PRINT)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_CFG_ID_LOG_LEVEL_SAVE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_CFG_ID_LOG_TYPE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_CFG_ID_LOG_STYLE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_CFG_ID_LOG_NAME)) != 0)
+    {
+        count += 100;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_entry_cfg_data_unpack(bcmolt_log_entry_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_CFG_ID_DEFAULT_LOG_LEVEL)) != 0)
+    {
+        if (!bcmolt_log_level_unpack(&this->default_log_level, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_CFG_ID_DEFAULT_LOG_TYPE)) != 0)
+    {
+        if (!bcmolt_log_type_unpack(&this->default_log_type, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_CFG_ID_LOG_LEVEL_PRINT)) != 0)
+    {
+        if (!bcmolt_log_level_unpack(&this->log_level_print, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_CFG_ID_LOG_LEVEL_SAVE)) != 0)
+    {
+        if (!bcmolt_log_level_unpack(&this->log_level_save, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_CFG_ID_LOG_TYPE)) != 0)
+    {
+        if (!bcmolt_log_type_unpack(&this->log_type, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_CFG_ID_LOG_STYLE)) != 0)
+    {
+        if (!bcmolt_log_style_unpack(&this->log_style, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_CFG_ID_LOG_NAME)) != 0)
+    {
+        if (!bcmolt_str_100_unpack(&this->log_name, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_entry_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_CFG_ID_DEFAULT_LOG_LEVEL)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_CFG_ID_DEFAULT_LOG_TYPE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_CFG_ID_LOG_LEVEL_PRINT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_CFG_ID_LOG_LEVEL_SAVE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_CFG_ID_LOG_TYPE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_CFG_ID_LOG_STYLE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_CFG_ID_LOG_NAME)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 100))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_entry_cfg_data_bounds_check(const bcmolt_log_entry_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_log_entry_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_CFG_ID_DEFAULT_LOG_LEVEL)) != 0)
+    {
+        switch (this->default_log_level)
+        {
+            case BCMOLT_LOG_LEVEL_NO_LOG:
+                break;
+            case BCMOLT_LOG_LEVEL_FATAL:
+                break;
+            case BCMOLT_LOG_LEVEL_ERROR:
+                break;
+            case BCMOLT_LOG_LEVEL_WARNING:
+                break;
+            case BCMOLT_LOG_LEVEL_INFO:
+                break;
+            case BCMOLT_LOG_LEVEL_DEBUG:
+                break;
+            default:
+                *failed_prop = BCMOLT_LOG_ENTRY_CFG_ID_DEFAULT_LOG_LEVEL;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_CFG_ID_DEFAULT_LOG_TYPE)) != 0)
+    {
+        switch (this->default_log_type)
+        {
+            case BCMOLT_LOG_TYPE_NONE:
+                break;
+            case BCMOLT_LOG_TYPE_PRINT:
+                break;
+            case BCMOLT_LOG_TYPE_SAVE:
+                break;
+            case BCMOLT_LOG_TYPE_BOTH:
+                break;
+            default:
+                *failed_prop = BCMOLT_LOG_ENTRY_CFG_ID_DEFAULT_LOG_TYPE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_CFG_ID_LOG_LEVEL_PRINT)) != 0)
+    {
+        switch (this->log_level_print)
+        {
+            case BCMOLT_LOG_LEVEL_NO_LOG:
+                break;
+            case BCMOLT_LOG_LEVEL_FATAL:
+                break;
+            case BCMOLT_LOG_LEVEL_ERROR:
+                break;
+            case BCMOLT_LOG_LEVEL_WARNING:
+                break;
+            case BCMOLT_LOG_LEVEL_INFO:
+                break;
+            case BCMOLT_LOG_LEVEL_DEBUG:
+                break;
+            default:
+                *failed_prop = BCMOLT_LOG_ENTRY_CFG_ID_LOG_LEVEL_PRINT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_CFG_ID_LOG_LEVEL_SAVE)) != 0)
+    {
+        switch (this->log_level_save)
+        {
+            case BCMOLT_LOG_LEVEL_NO_LOG:
+                break;
+            case BCMOLT_LOG_LEVEL_FATAL:
+                break;
+            case BCMOLT_LOG_LEVEL_ERROR:
+                break;
+            case BCMOLT_LOG_LEVEL_WARNING:
+                break;
+            case BCMOLT_LOG_LEVEL_INFO:
+                break;
+            case BCMOLT_LOG_LEVEL_DEBUG:
+                break;
+            default:
+                *failed_prop = BCMOLT_LOG_ENTRY_CFG_ID_LOG_LEVEL_SAVE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_CFG_ID_LOG_TYPE)) != 0)
+    {
+        switch (this->log_type)
+        {
+            case BCMOLT_LOG_TYPE_NONE:
+                break;
+            case BCMOLT_LOG_TYPE_PRINT:
+                break;
+            case BCMOLT_LOG_TYPE_SAVE:
+                break;
+            case BCMOLT_LOG_TYPE_BOTH:
+                break;
+            default:
+                *failed_prop = BCMOLT_LOG_ENTRY_CFG_ID_LOG_TYPE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_CFG_ID_LOG_STYLE)) != 0)
+    {
+        switch (this->log_style)
+        {
+            case BCMOLT_LOG_STYLE_NORMAL:
+                break;
+            case BCMOLT_LOG_STYLE_BOLD:
+                break;
+            case BCMOLT_LOG_STYLE_UNDERLINE:
+                break;
+            case BCMOLT_LOG_STYLE_BLINK:
+                break;
+            case BCMOLT_LOG_STYLE_REVERSE_VIDEO:
+                break;
+            default:
+                *failed_prop = BCMOLT_LOG_ENTRY_CFG_ID_LOG_STYLE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_CFG_ID_LOG_NAME)) != 0)
+    {
+        if (!bcmolt_str_100_bounds_check(&this->log_name))
+        {
+            *failed_prop = BCMOLT_LOG_ENTRY_CFG_ID_LOG_NAME;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_log_entry_stat_data_set_default(bcmolt_log_entry_stat_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_STAT_ID_MSG_COUNT)) != 0)
+    {
+        memset(this->msg_count.arr, 0, sizeof(this->msg_count.arr));
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_STAT_ID_LOST_MSG_COUNT)) != 0)
+    {
+        this->lost_msg_count = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_entry_stat_data_pack(const bcmolt_log_entry_stat_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_STAT_ID_MSG_COUNT)) != 0)
+    {
+        if (!bcmolt_arr_u32_6_pack(&this->msg_count, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_STAT_ID_LOST_MSG_COUNT)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->lost_msg_count))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_log_entry_stat_data_get_packed_length(const bcmolt_log_entry_stat_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_STAT_ID_MSG_COUNT)) != 0)
+    {
+        count += 24;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_STAT_ID_LOST_MSG_COUNT)) != 0)
+    {
+        count += 4;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_entry_stat_data_unpack(bcmolt_log_entry_stat_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_STAT_ID_MSG_COUNT)) != 0)
+    {
+        if (!bcmolt_arr_u32_6_unpack(&this->msg_count, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_STAT_ID_LOST_MSG_COUNT)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->lost_msg_count))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_entry_stat_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_STAT_ID_MSG_COUNT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 24))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_STAT_ID_LOST_MSG_COUNT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_entry_stat_data_bounds_check(const bcmolt_log_entry_stat_data *this, bcmolt_presence_mask fields_present, bcmolt_log_entry_stat_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_STAT_ID_MSG_COUNT)) != 0)
+    {
+        if (!bcmolt_arr_u32_6_bounds_check(&this->msg_count))
+        {
+            *failed_prop = BCMOLT_LOG_ENTRY_STAT_ID_MSG_COUNT;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_log_entry_stat_cfg_data_set_default(bcmolt_log_entry_stat_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_STAT_CFG_ID_CFG)) != 0)
+    {
+        this->cfg.trigger.type = BCMOLT_STAT_CONDITION_TYPE_NONE;
+        this->cfg.soak.active_soak_time = 0;
+        this->cfg.soak.clear_soak_time = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_entry_stat_cfg_data_pack(const bcmolt_log_entry_stat_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_pack(&this->cfg, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_log_entry_stat_cfg_data_get_packed_length(const bcmolt_log_entry_stat_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_STAT_CFG_ID_CFG)) != 0)
+    {
+        count += bcmolt_stat_alarm_config_get_packed_length(&this->cfg);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_entry_stat_cfg_data_unpack(bcmolt_log_entry_stat_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_unpack(&this->cfg, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_entry_stat_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_entry_stat_cfg_data_bounds_check(const bcmolt_log_entry_stat_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_log_entry_stat_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_bounds_check(&this->cfg))
+        {
+            *failed_prop = BCMOLT_LOG_ENTRY_STAT_CFG_ID_CFG;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_log_entry_stat_alarm_cleared_data_set_default(bcmolt_log_entry_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        this->stat = BCMOLT_LOG_ENTRY_STAT_ID_MSG_COUNT;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_entry_stat_alarm_cleared_data_pack(const bcmolt_log_entry_stat_alarm_cleared_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_log_entry_stat_id_pack(this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_log_entry_stat_alarm_cleared_data_get_packed_length(const bcmolt_log_entry_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_entry_stat_alarm_cleared_data_unpack(bcmolt_log_entry_stat_alarm_cleared_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_log_entry_stat_id_unpack(&this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_entry_stat_alarm_cleared_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_entry_stat_alarm_cleared_data_bounds_check(const bcmolt_log_entry_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present, bcmolt_log_entry_stat_alarm_cleared_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        switch (this->stat)
+        {
+            case BCMOLT_LOG_ENTRY_STAT_ID_MSG_COUNT:
+                break;
+            case BCMOLT_LOG_ENTRY_STAT_ID_LOST_MSG_COUNT:
+                break;
+            default:
+                *failed_prop = BCMOLT_LOG_ENTRY_STAT_ALARM_CLEARED_ID_STAT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_log_entry_stat_alarm_raised_data_set_default(bcmolt_log_entry_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        this->stat = BCMOLT_LOG_ENTRY_STAT_ID_MSG_COUNT;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_entry_stat_alarm_raised_data_pack(const bcmolt_log_entry_stat_alarm_raised_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_log_entry_stat_id_pack(this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_log_entry_stat_alarm_raised_data_get_packed_length(const bcmolt_log_entry_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_entry_stat_alarm_raised_data_unpack(bcmolt_log_entry_stat_alarm_raised_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_log_entry_stat_id_unpack(&this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_entry_stat_alarm_raised_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_entry_stat_alarm_raised_data_bounds_check(const bcmolt_log_entry_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present, bcmolt_log_entry_stat_alarm_raised_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        switch (this->stat)
+        {
+            case BCMOLT_LOG_ENTRY_STAT_ID_MSG_COUNT:
+                break;
+            case BCMOLT_LOG_ENTRY_STAT_ID_LOST_MSG_COUNT:
+                break;
+            default:
+                *failed_prop = BCMOLT_LOG_ENTRY_STAT_ALARM_RAISED_ID_STAT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_log_entry_auto_cfg_data_set_default(bcmolt_log_entry_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        this->stat_alarm_cleared = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        this->stat_alarm_raised = BCMOS_FALSE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_entry_auto_cfg_data_pack(const bcmolt_log_entry_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->stat_alarm_cleared))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->stat_alarm_raised))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_log_entry_auto_cfg_data_get_packed_length(const bcmolt_log_entry_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_entry_auto_cfg_data_unpack(bcmolt_log_entry_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->stat_alarm_cleared))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->stat_alarm_raised))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_entry_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOG_ENTRY_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_log_entry_auto_cfg_data_bounds_check(const bcmolt_log_entry_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_log_entry_auto_cfg_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_logger_key_set_default(bcmolt_logger_key *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_KEY_ID_RESERVED)) != 0)
+    {
+        this->reserved = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_KEY_ID_FILE_ID)) != 0)
+    {
+        this->file_id = BCMOLT_LOG_FILE_ID_SRAM;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_logger_key_pack(const bcmolt_logger_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_KEY_ID_RESERVED)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->reserved))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_KEY_ID_FILE_ID)) != 0)
+    {
+        if (!bcmolt_log_file_id_pack(this->file_id, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_logger_key_get_packed_length(const bcmolt_logger_key *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_KEY_ID_RESERVED)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_KEY_ID_FILE_ID)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_logger_key_unpack(bcmolt_logger_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_KEY_ID_RESERVED)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->reserved))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_KEY_ID_FILE_ID)) != 0)
+    {
+        if (!bcmolt_log_file_id_unpack(&this->file_id, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_logger_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_KEY_ID_RESERVED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_KEY_ID_FILE_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_logger_key_bounds_check(const bcmolt_logger_key *this, bcmolt_presence_mask fields_present, bcmolt_logger_key_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_KEY_ID_FILE_ID)) != 0)
+    {
+        switch (this->file_id)
+        {
+            case BCMOLT_LOG_FILE_ID_SRAM:
+                break;
+            case BCMOLT_LOG_FILE_ID_DDR:
+                break;
+            default:
+                *failed_prop = BCMOLT_LOGGER_KEY_ID_FILE_ID;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_logger_cfg_data_set_default(bcmolt_logger_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_CFG_ID_BUFFER)) != 0)
+    {
+        memset(this->buffer.buff, 0, 2048);
+        this->buffer.msg_to_read = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_CFG_ID_WRAP_AROUND)) != 0)
+    {
+        this->wrap_around = BCMOS_TRUE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_CFG_ID_CLEAR_AFTER_READ)) != 0)
+    {
+        this->clear_after_read = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_CFG_ID_ENABLE_LOG)) != 0)
+    {
+        this->enable_log = BCMOS_TRUE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_CFG_ID_LOG_NAMES)) != 0)
+    {
+        memset(this->log_names.str, 0, 1000);
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_logger_cfg_data_pack(const bcmolt_logger_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_CFG_ID_BUFFER)) != 0)
+    {
+        if (!bcmolt_log_buffer_pack(&this->buffer, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_CFG_ID_WRAP_AROUND)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->wrap_around))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_CFG_ID_CLEAR_AFTER_READ)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->clear_after_read))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_CFG_ID_ENABLE_LOG)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->enable_log))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_CFG_ID_LOG_NAMES)) != 0)
+    {
+        if (!bcmolt_str_1000_pack(&this->log_names, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_logger_cfg_data_get_packed_length(const bcmolt_logger_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_CFG_ID_BUFFER)) != 0)
+    {
+        count += 2052;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_CFG_ID_WRAP_AROUND)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_CFG_ID_CLEAR_AFTER_READ)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_CFG_ID_ENABLE_LOG)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_CFG_ID_LOG_NAMES)) != 0)
+    {
+        count += 1000;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_logger_cfg_data_unpack(bcmolt_logger_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_CFG_ID_BUFFER)) != 0)
+    {
+        if (!bcmolt_log_buffer_unpack(&this->buffer, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_CFG_ID_WRAP_AROUND)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->wrap_around))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_CFG_ID_CLEAR_AFTER_READ)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->clear_after_read))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_CFG_ID_ENABLE_LOG)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->enable_log))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_CFG_ID_LOG_NAMES)) != 0)
+    {
+        if (!bcmolt_str_1000_unpack(&this->log_names, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_logger_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_CFG_ID_BUFFER)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2052))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_CFG_ID_WRAP_AROUND)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_CFG_ID_CLEAR_AFTER_READ)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_CFG_ID_ENABLE_LOG)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_CFG_ID_LOG_NAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1000))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_logger_cfg_data_bounds_check(const bcmolt_logger_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_logger_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_CFG_ID_BUFFER)) != 0)
+    {
+        if (!bcmolt_log_buffer_bounds_check(&this->buffer))
+        {
+            *failed_prop = BCMOLT_LOGGER_CFG_ID_BUFFER;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_CFG_ID_LOG_NAMES)) != 0)
+    {
+        if (!bcmolt_str_1000_bounds_check(&this->log_names))
+        {
+            *failed_prop = BCMOLT_LOGGER_CFG_ID_LOG_NAMES;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_logger_stat_data_set_default(bcmolt_logger_stat_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_STAT_ID_LINES_IN_LOG)) != 0)
+    {
+        this->lines_in_log = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_logger_stat_data_pack(const bcmolt_logger_stat_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_STAT_ID_LINES_IN_LOG)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->lines_in_log))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_logger_stat_data_get_packed_length(const bcmolt_logger_stat_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_STAT_ID_LINES_IN_LOG)) != 0)
+    {
+        count += 4;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_logger_stat_data_unpack(bcmolt_logger_stat_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_STAT_ID_LINES_IN_LOG)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->lines_in_log))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_logger_stat_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_STAT_ID_LINES_IN_LOG)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_logger_stat_data_bounds_check(const bcmolt_logger_stat_data *this, bcmolt_presence_mask fields_present, bcmolt_logger_stat_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_logger_stat_cfg_data_set_default(bcmolt_logger_stat_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_STAT_CFG_ID_CFG)) != 0)
+    {
+        this->cfg.trigger.type = BCMOLT_STAT_CONDITION_TYPE_NONE;
+        this->cfg.soak.active_soak_time = 0;
+        this->cfg.soak.clear_soak_time = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_logger_stat_cfg_data_pack(const bcmolt_logger_stat_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_pack(&this->cfg, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_logger_stat_cfg_data_get_packed_length(const bcmolt_logger_stat_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_STAT_CFG_ID_CFG)) != 0)
+    {
+        count += bcmolt_stat_alarm_config_get_packed_length(&this->cfg);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_logger_stat_cfg_data_unpack(bcmolt_logger_stat_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_unpack(&this->cfg, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_logger_stat_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_logger_stat_cfg_data_bounds_check(const bcmolt_logger_stat_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_logger_stat_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_bounds_check(&this->cfg))
+        {
+            *failed_prop = BCMOLT_LOGGER_STAT_CFG_ID_CFG;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_logger_stat_alarm_cleared_data_set_default(bcmolt_logger_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        this->stat = BCMOLT_LOGGER_STAT_ID_LINES_IN_LOG;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_logger_stat_alarm_cleared_data_pack(const bcmolt_logger_stat_alarm_cleared_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_logger_stat_id_pack(this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_logger_stat_alarm_cleared_data_get_packed_length(const bcmolt_logger_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_logger_stat_alarm_cleared_data_unpack(bcmolt_logger_stat_alarm_cleared_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_logger_stat_id_unpack(&this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_logger_stat_alarm_cleared_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_logger_stat_alarm_cleared_data_bounds_check(const bcmolt_logger_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present, bcmolt_logger_stat_alarm_cleared_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        switch (this->stat)
+        {
+            case BCMOLT_LOGGER_STAT_ID_LINES_IN_LOG:
+                break;
+            default:
+                *failed_prop = BCMOLT_LOGGER_STAT_ALARM_CLEARED_ID_STAT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_logger_stat_alarm_raised_data_set_default(bcmolt_logger_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        this->stat = BCMOLT_LOGGER_STAT_ID_LINES_IN_LOG;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_logger_stat_alarm_raised_data_pack(const bcmolt_logger_stat_alarm_raised_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_logger_stat_id_pack(this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_logger_stat_alarm_raised_data_get_packed_length(const bcmolt_logger_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_logger_stat_alarm_raised_data_unpack(bcmolt_logger_stat_alarm_raised_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_logger_stat_id_unpack(&this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_logger_stat_alarm_raised_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_logger_stat_alarm_raised_data_bounds_check(const bcmolt_logger_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present, bcmolt_logger_stat_alarm_raised_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        switch (this->stat)
+        {
+            case BCMOLT_LOGGER_STAT_ID_LINES_IN_LOG:
+                break;
+            default:
+                *failed_prop = BCMOLT_LOGGER_STAT_ALARM_RAISED_ID_STAT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_logger_auto_cfg_data_set_default(bcmolt_logger_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        this->stat_alarm_cleared = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        this->stat_alarm_raised = BCMOS_FALSE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_logger_auto_cfg_data_pack(const bcmolt_logger_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->stat_alarm_cleared))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->stat_alarm_raised))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_logger_auto_cfg_data_get_packed_length(const bcmolt_logger_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_logger_auto_cfg_data_unpack(bcmolt_logger_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->stat_alarm_cleared))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->stat_alarm_raised))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_logger_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_LOGGER_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_logger_auto_cfg_data_bounds_check(const bcmolt_logger_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_logger_auto_cfg_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_nni_key_set_default(bcmolt_nni_key *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_KEY_ID_PON_NI)) != 0)
+    {
+        this->pon_ni = (bcmolt_pon_ni) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_key_pack(const bcmolt_nni_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, (uint8_t) this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_nni_key_get_packed_length(const bcmolt_nni_key *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_NNI_KEY_ID_PON_NI)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_key_unpack(bcmolt_nni_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, (uint8_t *) &this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_key_bounds_check(const bcmolt_nni_key *this, bcmolt_presence_mask fields_present, bcmolt_nni_key_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_KEY_ID_PON_NI)) != 0)
+    {
+        if (this->pon_ni > (bcmolt_pon_ni) 15)
+        {
+            *failed_prop = BCMOLT_NNI_KEY_ID_PON_NI;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_nni_cfg_data_set_default(bcmolt_nni_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_REMOTE_LOOPBACK)) != 0)
+    {
+        this->remote_loopback = BCMOLT_CONTROL_STATE_DISABLE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_LINE_LOOPBACK)) != 0)
+    {
+        this->line_loopback = BCMOLT_CONTROL_STATE_DISABLE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_MAC_ADDRESS)) != 0)
+    {
+        bcmos_mac_address_init(&this->mac_address);
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_NNI_STATUS)) != 0)
+    {
+        this->nni_status.link_status = BCMOLT_TRIVALENT_FALSE;
+        this->nni_status.signal_detected = BCMOLT_TRIVALENT_FALSE;
+        this->nni_status.pmd_locked = BCMOLT_TRIVALENT_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_NNI_BACKUP_STATUS)) != 0)
+    {
+        this->nni_backup_status.link_status = BCMOLT_TRIVALENT_FALSE;
+        this->nni_backup_status.signal_detected = BCMOLT_TRIVALENT_FALSE;
+        this->nni_backup_status.pmd_locked = BCMOLT_TRIVALENT_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_ACTIVE_NNI)) != 0)
+    {
+        this->active_nni = BCMOLT_NNI_CONNECTION_PRIMARY;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_NNI_STATUS_POLLING_INTERVAL_MS)) != 0)
+    {
+        this->nni_status_polling_interval_ms = 50;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_AUTOSWITCH)) != 0)
+    {
+        this->autoswitch = BCMOS_TRUE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_FLOW_CONTROL)) != 0)
+    {
+        this->flow_control = BCMOLT_CONTROL_STATE_ENABLE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_cfg_data_pack(const bcmolt_nni_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_REMOTE_LOOPBACK)) != 0)
+    {
+        if (!bcmolt_control_state_pack(this->remote_loopback, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_LINE_LOOPBACK)) != 0)
+    {
+        if (!bcmolt_control_state_pack(this->line_loopback, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_MAC_ADDRESS)) != 0)
+    {
+        if (!bcmolt_buf_write_mac_address(buf, this->mac_address))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_NNI_STATUS)) != 0)
+    {
+        if (!bcmolt_nni_link_status_pack(&this->nni_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_NNI_BACKUP_STATUS)) != 0)
+    {
+        if (!bcmolt_nni_link_status_pack(&this->nni_backup_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_ACTIVE_NNI)) != 0)
+    {
+        if (!bcmolt_nni_connection_pack(this->active_nni, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_NNI_STATUS_POLLING_INTERVAL_MS)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->nni_status_polling_interval_ms))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_AUTOSWITCH)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->autoswitch))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_FLOW_CONTROL)) != 0)
+    {
+        if (!bcmolt_control_state_pack(this->flow_control, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_nni_cfg_data_get_packed_length(const bcmolt_nni_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_REMOTE_LOOPBACK)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_LINE_LOOPBACK)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_MAC_ADDRESS)) != 0)
+    {
+        count += 6;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_NNI_STATUS)) != 0)
+    {
+        count += 3;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_NNI_BACKUP_STATUS)) != 0)
+    {
+        count += 3;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_ACTIVE_NNI)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_NNI_STATUS_POLLING_INTERVAL_MS)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_AUTOSWITCH)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_FLOW_CONTROL)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_cfg_data_unpack(bcmolt_nni_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_REMOTE_LOOPBACK)) != 0)
+    {
+        if (!bcmolt_control_state_unpack(&this->remote_loopback, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_LINE_LOOPBACK)) != 0)
+    {
+        if (!bcmolt_control_state_unpack(&this->line_loopback, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_MAC_ADDRESS)) != 0)
+    {
+        if (!bcmolt_buf_read_mac_address(buf, &this->mac_address))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_NNI_STATUS)) != 0)
+    {
+        if (!bcmolt_nni_link_status_unpack(&this->nni_status, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_NNI_BACKUP_STATUS)) != 0)
+    {
+        if (!bcmolt_nni_link_status_unpack(&this->nni_backup_status, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_ACTIVE_NNI)) != 0)
+    {
+        if (!bcmolt_nni_connection_unpack(&this->active_nni, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_NNI_STATUS_POLLING_INTERVAL_MS)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->nni_status_polling_interval_ms))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_AUTOSWITCH)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->autoswitch))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_FLOW_CONTROL)) != 0)
+    {
+        if (!bcmolt_control_state_unpack(&this->flow_control, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_REMOTE_LOOPBACK)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_LINE_LOOPBACK)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_MAC_ADDRESS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 6))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_NNI_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 3))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_NNI_BACKUP_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 3))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_ACTIVE_NNI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_NNI_STATUS_POLLING_INTERVAL_MS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_AUTOSWITCH)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_FLOW_CONTROL)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_cfg_data_bounds_check(const bcmolt_nni_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_nni_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_REMOTE_LOOPBACK)) != 0)
+    {
+        switch (this->remote_loopback)
+        {
+            case BCMOLT_CONTROL_STATE_DISABLE:
+                break;
+            case BCMOLT_CONTROL_STATE_ENABLE:
+                break;
+            default:
+                *failed_prop = BCMOLT_NNI_CFG_ID_REMOTE_LOOPBACK;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_LINE_LOOPBACK)) != 0)
+    {
+        switch (this->line_loopback)
+        {
+            case BCMOLT_CONTROL_STATE_DISABLE:
+                break;
+            case BCMOLT_CONTROL_STATE_ENABLE:
+                break;
+            default:
+                *failed_prop = BCMOLT_NNI_CFG_ID_LINE_LOOPBACK;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_NNI_STATUS)) != 0)
+    {
+        if (!bcmolt_nni_link_status_bounds_check(&this->nni_status))
+        {
+            *failed_prop = BCMOLT_NNI_CFG_ID_NNI_STATUS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_NNI_BACKUP_STATUS)) != 0)
+    {
+        if (!bcmolt_nni_link_status_bounds_check(&this->nni_backup_status))
+        {
+            *failed_prop = BCMOLT_NNI_CFG_ID_NNI_BACKUP_STATUS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_ACTIVE_NNI)) != 0)
+    {
+        switch (this->active_nni)
+        {
+            case BCMOLT_NNI_CONNECTION_PRIMARY:
+                break;
+            case BCMOLT_NNI_CONNECTION_BACKUP:
+                break;
+            default:
+                *failed_prop = BCMOLT_NNI_CFG_ID_ACTIVE_NNI;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_NNI_STATUS_POLLING_INTERVAL_MS)) != 0)
+    {
+        if (this->nni_status_polling_interval_ms > 3600000UL)
+        {
+            *failed_prop = BCMOLT_NNI_CFG_ID_NNI_STATUS_POLLING_INTERVAL_MS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_CFG_ID_FLOW_CONTROL)) != 0)
+    {
+        switch (this->flow_control)
+        {
+            case BCMOLT_CONTROL_STATE_DISABLE:
+                break;
+            case BCMOLT_CONTROL_STATE_ENABLE:
+                break;
+            default:
+                *failed_prop = BCMOLT_NNI_CFG_ID_FLOW_CONTROL;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_nni_stat_data_set_default(bcmolt_nni_stat_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_64)) != 0)
+    {
+        this->rx_frames_64 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_65_127)) != 0)
+    {
+        this->rx_frames_65_127 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_128_255)) != 0)
+    {
+        this->rx_frames_128_255 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_256_511)) != 0)
+    {
+        this->rx_frames_256_511 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_512_1023)) != 0)
+    {
+        this->rx_frames_512_1023 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_1024_1518)) != 0)
+    {
+        this->rx_frames_1024_1518 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_1519_2047)) != 0)
+    {
+        this->rx_frames_1519_2047 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_2048_4095)) != 0)
+    {
+        this->rx_frames_2048_4095 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_4096_9216)) != 0)
+    {
+        this->rx_frames_4096_9216 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_9217_16383)) != 0)
+    {
+        this->rx_frames_9217_16383 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES)) != 0)
+    {
+        this->rx_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_BYTES)) != 0)
+    {
+        this->rx_bytes = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_GOOD_FRAMES)) != 0)
+    {
+        this->rx_good_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_UNICAST_FRAMES)) != 0)
+    {
+        this->rx_unicast_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_MULTICAST_FRAMES)) != 0)
+    {
+        this->rx_multicast_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_BROADCAST_FRAMES)) != 0)
+    {
+        this->rx_broadcast_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FCS_ERRORS)) != 0)
+    {
+        this->rx_fcs_errors = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_CONTROL_FRAMES)) != 0)
+    {
+        this->rx_control_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_PAUSE_FRAMES)) != 0)
+    {
+        this->rx_pause_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_PFC_FRAMES)) != 0)
+    {
+        this->rx_pfc_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_UNSUPPORTED_OPCODE)) != 0)
+    {
+        this->rx_unsupported_opcode = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_UNSUPPORTED_DA)) != 0)
+    {
+        this->rx_unsupported_da = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_ALIGNMENT_ERRORS)) != 0)
+    {
+        this->rx_alignment_errors = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_LENGTH_OUT_OF_RANGE)) != 0)
+    {
+        this->rx_length_out_of_range = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_CODE_ERRORS)) != 0)
+    {
+        this->rx_code_errors = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_OVERSIZED_FRAMES)) != 0)
+    {
+        this->rx_oversized_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_JABBER_FRAMES)) != 0)
+    {
+        this->rx_jabber_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_MTU_CHECK_ERRORS)) != 0)
+    {
+        this->rx_mtu_check_errors = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_PROMISCUOUS_FRAMES)) != 0)
+    {
+        this->rx_promiscuous_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_VLAN_FRAMES)) != 0)
+    {
+        this->rx_vlan_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_DOUBLE_VLAN_FRAMES)) != 0)
+    {
+        this->rx_double_vlan_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_TRUNCATED_FRAMES)) != 0)
+    {
+        this->rx_truncated_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_UNDERSIZE_FRAMES)) != 0)
+    {
+        this->rx_undersize_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAGMENTED_FRAMES)) != 0)
+    {
+        this->rx_fragmented_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_RUNT_FRAMES)) != 0)
+    {
+        this->rx_runt_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_64)) != 0)
+    {
+        this->tx_frames_64 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_65_127)) != 0)
+    {
+        this->tx_frames_65_127 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_128_255)) != 0)
+    {
+        this->tx_frames_128_255 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_256_511)) != 0)
+    {
+        this->tx_frames_256_511 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_512_1023)) != 0)
+    {
+        this->tx_frames_512_1023 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_1024_1518)) != 0)
+    {
+        this->tx_frames_1024_1518 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_1519_2047)) != 0)
+    {
+        this->tx_frames_1519_2047 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_2048_4095)) != 0)
+    {
+        this->tx_frames_2048_4095 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_4096_9216)) != 0)
+    {
+        this->tx_frames_4096_9216 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_9217_16383)) != 0)
+    {
+        this->tx_frames_9217_16383 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES)) != 0)
+    {
+        this->tx_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_BYTES)) != 0)
+    {
+        this->tx_bytes = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_GOOD_FRAMES)) != 0)
+    {
+        this->tx_good_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_UNICAST_FRAMES)) != 0)
+    {
+        this->tx_unicast_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_MULTICAST_FRAMES)) != 0)
+    {
+        this->tx_multicast_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_BROADCAST_FRAMES)) != 0)
+    {
+        this->tx_broadcast_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_PAUSE_FRAMES)) != 0)
+    {
+        this->tx_pause_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_PFC_FRAMES)) != 0)
+    {
+        this->tx_pfc_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_JABBER_FRAMES)) != 0)
+    {
+        this->tx_jabber_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FCS_ERRORS)) != 0)
+    {
+        this->tx_fcs_errors = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_CONTROL_FRAMES)) != 0)
+    {
+        this->tx_control_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_OVERSIZE_FRAMES)) != 0)
+    {
+        this->tx_oversize_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAGMENTED_FRAMES)) != 0)
+    {
+        this->tx_fragmented_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_ERROR_FRAMES)) != 0)
+    {
+        this->tx_error_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_VLAN_FRAMES)) != 0)
+    {
+        this->tx_vlan_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_DOUBLE_VLAN_FRAMES)) != 0)
+    {
+        this->tx_double_vlan_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_RUNT_FRAMES)) != 0)
+    {
+        this->tx_runt_frames = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_UNDERRUN_FRAMES)) != 0)
+    {
+        this->tx_underrun_frames = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_stat_data_pack(const bcmolt_nni_stat_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_64)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_frames_64))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_65_127)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_frames_65_127))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_128_255)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_frames_128_255))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_256_511)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_frames_256_511))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_512_1023)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_frames_512_1023))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_1024_1518)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_frames_1024_1518))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_1519_2047)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_frames_1519_2047))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_2048_4095)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_frames_2048_4095))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_4096_9216)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_frames_4096_9216))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_9217_16383)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_frames_9217_16383))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_GOOD_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_good_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_UNICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_unicast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_MULTICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_multicast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_BROADCAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_broadcast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FCS_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_fcs_errors))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_CONTROL_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_control_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_PAUSE_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_pause_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_PFC_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_pfc_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_UNSUPPORTED_OPCODE)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_unsupported_opcode))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_UNSUPPORTED_DA)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_unsupported_da))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_ALIGNMENT_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_alignment_errors))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_LENGTH_OUT_OF_RANGE)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_length_out_of_range))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_CODE_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_code_errors))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_OVERSIZED_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_oversized_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_JABBER_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_jabber_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_MTU_CHECK_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_mtu_check_errors))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_PROMISCUOUS_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_promiscuous_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_VLAN_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_vlan_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_DOUBLE_VLAN_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_double_vlan_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_TRUNCATED_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_truncated_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_UNDERSIZE_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_undersize_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAGMENTED_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_fragmented_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_RUNT_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_runt_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_64)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_frames_64))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_65_127)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_frames_65_127))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_128_255)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_frames_128_255))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_256_511)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_frames_256_511))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_512_1023)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_frames_512_1023))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_1024_1518)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_frames_1024_1518))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_1519_2047)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_frames_1519_2047))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_2048_4095)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_frames_2048_4095))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_4096_9216)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_frames_4096_9216))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_9217_16383)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_frames_9217_16383))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_GOOD_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_good_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_UNICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_unicast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_MULTICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_multicast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_BROADCAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_broadcast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_PAUSE_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_pause_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_PFC_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_pfc_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_JABBER_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_jabber_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FCS_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_fcs_errors))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_CONTROL_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_control_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_OVERSIZE_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_oversize_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAGMENTED_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_fragmented_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_ERROR_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_error_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_VLAN_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_vlan_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_DOUBLE_VLAN_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_double_vlan_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_RUNT_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_runt_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_UNDERRUN_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_underrun_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_nni_stat_data_get_packed_length(const bcmolt_nni_stat_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_64)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_65_127)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_128_255)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_256_511)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_512_1023)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_1024_1518)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_1519_2047)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_2048_4095)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_4096_9216)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_9217_16383)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_BYTES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_GOOD_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_UNICAST_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_MULTICAST_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_BROADCAST_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FCS_ERRORS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_CONTROL_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_PAUSE_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_PFC_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_UNSUPPORTED_OPCODE)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_UNSUPPORTED_DA)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_ALIGNMENT_ERRORS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_LENGTH_OUT_OF_RANGE)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_CODE_ERRORS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_OVERSIZED_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_JABBER_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_MTU_CHECK_ERRORS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_PROMISCUOUS_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_VLAN_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_DOUBLE_VLAN_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_TRUNCATED_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_UNDERSIZE_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAGMENTED_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_RUNT_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_64)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_65_127)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_128_255)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_256_511)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_512_1023)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_1024_1518)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_1519_2047)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_2048_4095)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_4096_9216)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_9217_16383)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_BYTES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_GOOD_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_UNICAST_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_MULTICAST_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_BROADCAST_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_PAUSE_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_PFC_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_JABBER_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FCS_ERRORS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_CONTROL_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_OVERSIZE_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAGMENTED_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_ERROR_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_VLAN_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_DOUBLE_VLAN_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_RUNT_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_UNDERRUN_FRAMES)) != 0)
+    {
+        count += 8;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_stat_data_unpack(bcmolt_nni_stat_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_64)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_frames_64))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_65_127)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_frames_65_127))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_128_255)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_frames_128_255))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_256_511)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_frames_256_511))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_512_1023)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_frames_512_1023))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_1024_1518)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_frames_1024_1518))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_1519_2047)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_frames_1519_2047))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_2048_4095)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_frames_2048_4095))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_4096_9216)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_frames_4096_9216))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_9217_16383)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_frames_9217_16383))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_GOOD_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_good_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_UNICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_unicast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_MULTICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_multicast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_BROADCAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_broadcast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FCS_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_fcs_errors))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_CONTROL_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_control_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_PAUSE_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_pause_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_PFC_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_pfc_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_UNSUPPORTED_OPCODE)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_unsupported_opcode))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_UNSUPPORTED_DA)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_unsupported_da))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_ALIGNMENT_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_alignment_errors))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_LENGTH_OUT_OF_RANGE)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_length_out_of_range))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_CODE_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_code_errors))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_OVERSIZED_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_oversized_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_JABBER_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_jabber_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_MTU_CHECK_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_mtu_check_errors))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_PROMISCUOUS_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_promiscuous_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_VLAN_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_vlan_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_DOUBLE_VLAN_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_double_vlan_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_TRUNCATED_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_truncated_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_UNDERSIZE_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_undersize_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAGMENTED_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_fragmented_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_RUNT_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_runt_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_64)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_frames_64))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_65_127)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_frames_65_127))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_128_255)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_frames_128_255))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_256_511)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_frames_256_511))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_512_1023)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_frames_512_1023))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_1024_1518)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_frames_1024_1518))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_1519_2047)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_frames_1519_2047))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_2048_4095)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_frames_2048_4095))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_4096_9216)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_frames_4096_9216))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_9217_16383)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_frames_9217_16383))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_GOOD_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_good_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_UNICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_unicast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_MULTICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_multicast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_BROADCAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_broadcast_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_PAUSE_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_pause_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_PFC_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_pfc_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_JABBER_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_jabber_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FCS_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_fcs_errors))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_CONTROL_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_control_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_OVERSIZE_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_oversize_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAGMENTED_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_fragmented_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_ERROR_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_error_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_VLAN_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_vlan_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_DOUBLE_VLAN_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_double_vlan_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_RUNT_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_runt_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_UNDERRUN_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_underrun_frames))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_stat_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_64)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_65_127)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_128_255)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_256_511)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_512_1023)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_1024_1518)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_1519_2047)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_2048_4095)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_4096_9216)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES_9217_16383)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_GOOD_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_UNICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_MULTICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_BROADCAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FCS_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_CONTROL_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_PAUSE_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_PFC_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_UNSUPPORTED_OPCODE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_UNSUPPORTED_DA)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_ALIGNMENT_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_LENGTH_OUT_OF_RANGE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_CODE_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_OVERSIZED_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_JABBER_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_MTU_CHECK_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_PROMISCUOUS_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_VLAN_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_DOUBLE_VLAN_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_TRUNCATED_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_UNDERSIZE_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_FRAGMENTED_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_RX_RUNT_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_64)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_65_127)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_128_255)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_256_511)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_512_1023)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_1024_1518)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_1519_2047)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_2048_4095)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_4096_9216)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES_9217_16383)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_GOOD_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_UNICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_MULTICAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_BROADCAST_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_PAUSE_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_PFC_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_JABBER_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FCS_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_CONTROL_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_OVERSIZE_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_FRAGMENTED_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_ERROR_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_VLAN_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_DOUBLE_VLAN_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_RUNT_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ID_TX_UNDERRUN_FRAMES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_stat_data_bounds_check(const bcmolt_nni_stat_data *this, bcmolt_presence_mask fields_present, bcmolt_nni_stat_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_nni_stat_cfg_data_set_default(bcmolt_nni_stat_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_CFG_ID_CFG)) != 0)
+    {
+        this->cfg.trigger.type = BCMOLT_STAT_CONDITION_TYPE_NONE;
+        this->cfg.soak.active_soak_time = 0;
+        this->cfg.soak.clear_soak_time = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_stat_cfg_data_pack(const bcmolt_nni_stat_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_pack(&this->cfg, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_nni_stat_cfg_data_get_packed_length(const bcmolt_nni_stat_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_CFG_ID_CFG)) != 0)
+    {
+        count += bcmolt_stat_alarm_config_get_packed_length(&this->cfg);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_stat_cfg_data_unpack(bcmolt_nni_stat_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_unpack(&this->cfg, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_stat_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_stat_cfg_data_bounds_check(const bcmolt_nni_stat_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_nni_stat_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_bounds_check(&this->cfg))
+        {
+            *failed_prop = BCMOLT_NNI_STAT_CFG_ID_CFG;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_nni_stat_alarm_cleared_data_set_default(bcmolt_nni_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        this->stat = BCMOLT_NNI_STAT_ID_RX_FRAMES_64;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_stat_alarm_cleared_data_pack(const bcmolt_nni_stat_alarm_cleared_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_nni_stat_id_pack(this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_nni_stat_alarm_cleared_data_get_packed_length(const bcmolt_nni_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_stat_alarm_cleared_data_unpack(bcmolt_nni_stat_alarm_cleared_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_nni_stat_id_unpack(&this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_stat_alarm_cleared_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_stat_alarm_cleared_data_bounds_check(const bcmolt_nni_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present, bcmolt_nni_stat_alarm_cleared_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        switch (this->stat)
+        {
+            case BCMOLT_NNI_STAT_ID_RX_FRAMES_64:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_FRAMES_65_127:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_FRAMES_128_255:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_FRAMES_256_511:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_FRAMES_512_1023:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_FRAMES_1024_1518:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_FRAMES_1519_2047:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_FRAMES_2048_4095:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_FRAMES_4096_9216:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_FRAMES_9217_16383:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_BYTES:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_GOOD_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_UNICAST_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_MULTICAST_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_BROADCAST_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_FCS_ERRORS:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_CONTROL_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_PAUSE_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_PFC_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_UNSUPPORTED_OPCODE:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_UNSUPPORTED_DA:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_ALIGNMENT_ERRORS:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_LENGTH_OUT_OF_RANGE:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_CODE_ERRORS:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_OVERSIZED_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_JABBER_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_MTU_CHECK_ERRORS:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_PROMISCUOUS_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_VLAN_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_DOUBLE_VLAN_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_TRUNCATED_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_UNDERSIZE_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_FRAGMENTED_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_RUNT_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_FRAMES_64:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_FRAMES_65_127:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_FRAMES_128_255:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_FRAMES_256_511:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_FRAMES_512_1023:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_FRAMES_1024_1518:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_FRAMES_1519_2047:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_FRAMES_2048_4095:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_FRAMES_4096_9216:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_FRAMES_9217_16383:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_BYTES:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_GOOD_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_UNICAST_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_MULTICAST_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_BROADCAST_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_PAUSE_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_PFC_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_JABBER_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_FCS_ERRORS:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_CONTROL_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_OVERSIZE_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_FRAGMENTED_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_ERROR_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_VLAN_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_DOUBLE_VLAN_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_RUNT_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_UNDERRUN_FRAMES:
+                break;
+            default:
+                *failed_prop = BCMOLT_NNI_STAT_ALARM_CLEARED_ID_STAT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_nni_stat_alarm_raised_data_set_default(bcmolt_nni_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        this->stat = BCMOLT_NNI_STAT_ID_RX_FRAMES_64;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_stat_alarm_raised_data_pack(const bcmolt_nni_stat_alarm_raised_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_nni_stat_id_pack(this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_nni_stat_alarm_raised_data_get_packed_length(const bcmolt_nni_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_stat_alarm_raised_data_unpack(bcmolt_nni_stat_alarm_raised_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_nni_stat_id_unpack(&this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_stat_alarm_raised_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_stat_alarm_raised_data_bounds_check(const bcmolt_nni_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present, bcmolt_nni_stat_alarm_raised_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        switch (this->stat)
+        {
+            case BCMOLT_NNI_STAT_ID_RX_FRAMES_64:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_FRAMES_65_127:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_FRAMES_128_255:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_FRAMES_256_511:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_FRAMES_512_1023:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_FRAMES_1024_1518:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_FRAMES_1519_2047:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_FRAMES_2048_4095:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_FRAMES_4096_9216:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_FRAMES_9217_16383:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_BYTES:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_GOOD_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_UNICAST_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_MULTICAST_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_BROADCAST_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_FCS_ERRORS:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_CONTROL_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_PAUSE_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_PFC_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_UNSUPPORTED_OPCODE:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_UNSUPPORTED_DA:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_ALIGNMENT_ERRORS:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_LENGTH_OUT_OF_RANGE:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_CODE_ERRORS:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_OVERSIZED_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_JABBER_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_MTU_CHECK_ERRORS:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_PROMISCUOUS_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_VLAN_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_DOUBLE_VLAN_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_TRUNCATED_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_UNDERSIZE_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_FRAGMENTED_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_RX_RUNT_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_FRAMES_64:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_FRAMES_65_127:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_FRAMES_128_255:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_FRAMES_256_511:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_FRAMES_512_1023:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_FRAMES_1024_1518:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_FRAMES_1519_2047:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_FRAMES_2048_4095:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_FRAMES_4096_9216:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_FRAMES_9217_16383:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_BYTES:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_GOOD_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_UNICAST_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_MULTICAST_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_BROADCAST_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_PAUSE_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_PFC_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_JABBER_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_FCS_ERRORS:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_CONTROL_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_OVERSIZE_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_FRAGMENTED_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_ERROR_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_VLAN_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_DOUBLE_VLAN_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_RUNT_FRAMES:
+                break;
+            case BCMOLT_NNI_STAT_ID_TX_UNDERRUN_FRAMES:
+                break;
+            default:
+                *failed_prop = BCMOLT_NNI_STAT_ALARM_RAISED_ID_STAT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_nni_status_changed_data_set_default(bcmolt_nni_status_changed_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_STATUS_CHANGED_ID_NEW_STATUS)) != 0)
+    {
+        this->new_status = BCMOLT_STATUS_OFF;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STATUS_CHANGED_ID_LINK)) != 0)
+    {
+        this->link = BCMOLT_NNI_CONNECTION_PRIMARY;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STATUS_CHANGED_ID_PREVIOUS_ACTIVE)) != 0)
+    {
+        this->previous_active = BCMOLT_NNI_CONNECTION_PRIMARY;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STATUS_CHANGED_ID_NEW_ACTIVE)) != 0)
+    {
+        this->new_active = BCMOLT_NNI_CONNECTION_PRIMARY;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_status_changed_data_pack(const bcmolt_nni_status_changed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_STATUS_CHANGED_ID_NEW_STATUS)) != 0)
+    {
+        if (!bcmolt_status_pack(this->new_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STATUS_CHANGED_ID_LINK)) != 0)
+    {
+        if (!bcmolt_nni_connection_pack(this->link, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STATUS_CHANGED_ID_PREVIOUS_ACTIVE)) != 0)
+    {
+        if (!bcmolt_nni_connection_pack(this->previous_active, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STATUS_CHANGED_ID_NEW_ACTIVE)) != 0)
+    {
+        if (!bcmolt_nni_connection_pack(this->new_active, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_nni_status_changed_data_get_packed_length(const bcmolt_nni_status_changed_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_NNI_STATUS_CHANGED_ID_NEW_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STATUS_CHANGED_ID_LINK)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STATUS_CHANGED_ID_PREVIOUS_ACTIVE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STATUS_CHANGED_ID_NEW_ACTIVE)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_status_changed_data_unpack(bcmolt_nni_status_changed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_STATUS_CHANGED_ID_NEW_STATUS)) != 0)
+    {
+        if (!bcmolt_status_unpack(&this->new_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STATUS_CHANGED_ID_LINK)) != 0)
+    {
+        if (!bcmolt_nni_connection_unpack(&this->link, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STATUS_CHANGED_ID_PREVIOUS_ACTIVE)) != 0)
+    {
+        if (!bcmolt_nni_connection_unpack(&this->previous_active, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STATUS_CHANGED_ID_NEW_ACTIVE)) != 0)
+    {
+        if (!bcmolt_nni_connection_unpack(&this->new_active, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_status_changed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_STATUS_CHANGED_ID_NEW_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STATUS_CHANGED_ID_LINK)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STATUS_CHANGED_ID_PREVIOUS_ACTIVE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STATUS_CHANGED_ID_NEW_ACTIVE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_status_changed_data_bounds_check(const bcmolt_nni_status_changed_data *this, bcmolt_presence_mask fields_present, bcmolt_nni_status_changed_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_STATUS_CHANGED_ID_NEW_STATUS)) != 0)
+    {
+        switch (this->new_status)
+        {
+            case BCMOLT_STATUS_OFF:
+                break;
+            case BCMOLT_STATUS_ON:
+                break;
+            case BCMOLT_STATUS_NO_CHANGE:
+                break;
+            default:
+                *failed_prop = BCMOLT_NNI_STATUS_CHANGED_ID_NEW_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STATUS_CHANGED_ID_LINK)) != 0)
+    {
+        switch (this->link)
+        {
+            case BCMOLT_NNI_CONNECTION_PRIMARY:
+                break;
+            case BCMOLT_NNI_CONNECTION_BACKUP:
+                break;
+            default:
+                *failed_prop = BCMOLT_NNI_STATUS_CHANGED_ID_LINK;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STATUS_CHANGED_ID_PREVIOUS_ACTIVE)) != 0)
+    {
+        switch (this->previous_active)
+        {
+            case BCMOLT_NNI_CONNECTION_PRIMARY:
+                break;
+            case BCMOLT_NNI_CONNECTION_BACKUP:
+                break;
+            default:
+                *failed_prop = BCMOLT_NNI_STATUS_CHANGED_ID_PREVIOUS_ACTIVE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_STATUS_CHANGED_ID_NEW_ACTIVE)) != 0)
+    {
+        switch (this->new_active)
+        {
+            case BCMOLT_NNI_CONNECTION_PRIMARY:
+                break;
+            case BCMOLT_NNI_CONNECTION_BACKUP:
+                break;
+            default:
+                *failed_prop = BCMOLT_NNI_STATUS_CHANGED_ID_NEW_ACTIVE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_nni_auto_cfg_data_set_default(bcmolt_nni_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        this->stat_alarm_cleared = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        this->stat_alarm_raised = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_AUTO_CFG_ID_STATUS_CHANGED)) != 0)
+    {
+        this->status_changed = BCMOS_FALSE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_auto_cfg_data_pack(const bcmolt_nni_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->stat_alarm_cleared))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->stat_alarm_raised))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_AUTO_CFG_ID_STATUS_CHANGED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->status_changed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_nni_auto_cfg_data_get_packed_length(const bcmolt_nni_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_NNI_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_AUTO_CFG_ID_STATUS_CHANGED)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_auto_cfg_data_unpack(bcmolt_nni_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->stat_alarm_cleared))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->stat_alarm_raised))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_AUTO_CFG_ID_STATUS_CHANGED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->status_changed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_AUTO_CFG_ID_STATUS_CHANGED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_auto_cfg_data_bounds_check(const bcmolt_nni_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_nni_auto_cfg_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_nni_serdes_key_set_default(bcmolt_nni_serdes_key *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_KEY_ID_PON_NI)) != 0)
+    {
+        this->pon_ni = (bcmolt_pon_ni) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_KEY_ID_INSTANCE)) != 0)
+    {
+        this->instance = BCMOLT_SERDES_INSTANCE_INSTANCE_0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_serdes_key_pack(const bcmolt_nni_serdes_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, (uint8_t) this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_KEY_ID_INSTANCE)) != 0)
+    {
+        if (!bcmolt_serdes_instance_pack(this->instance, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_nni_serdes_key_get_packed_length(const bcmolt_nni_serdes_key *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_KEY_ID_PON_NI)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_KEY_ID_INSTANCE)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_serdes_key_unpack(bcmolt_nni_serdes_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, (uint8_t *) &this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_KEY_ID_INSTANCE)) != 0)
+    {
+        if (!bcmolt_serdes_instance_unpack(&this->instance, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_serdes_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_KEY_ID_INSTANCE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_serdes_key_bounds_check(const bcmolt_nni_serdes_key *this, bcmolt_presence_mask fields_present, bcmolt_nni_serdes_key_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_KEY_ID_PON_NI)) != 0)
+    {
+        if (this->pon_ni > (bcmolt_pon_ni) 15)
+        {
+            *failed_prop = BCMOLT_NNI_SERDES_KEY_ID_PON_NI;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_KEY_ID_INSTANCE)) != 0)
+    {
+        switch (this->instance)
+        {
+            case BCMOLT_SERDES_INSTANCE_INSTANCE_0:
+                break;
+            case BCMOLT_SERDES_INSTANCE_INSTANCE_1:
+                break;
+            default:
+                *failed_prop = BCMOLT_NNI_SERDES_KEY_ID_INSTANCE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_nni_serdes_cfg_data_set_default(bcmolt_nni_serdes_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_VGA)) != 0)
+    {
+        this->rx_vga = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_PF)) != 0)
+    {
+        this->rx_pf = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_LFPF)) != 0)
+    {
+        this->rx_lfpf = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_DFE1)) != 0)
+    {
+        this->rx_dfe1 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_DFE2)) != 0)
+    {
+        this->rx_dfe2 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_DFE3)) != 0)
+    {
+        this->rx_dfe3 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_DFE4)) != 0)
+    {
+        this->rx_dfe4 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_DFE5)) != 0)
+    {
+        this->rx_dfe5 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_TX_PRE)) != 0)
+    {
+        this->tx_pre = 12;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_TX_MAIN)) != 0)
+    {
+        this->tx_main = 102;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_TX_POST1)) != 0)
+    {
+        this->tx_post1 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_TX_POST2)) != 0)
+    {
+        this->tx_post2 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_TX_POST3)) != 0)
+    {
+        this->tx_post3 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_TX_AMP)) != 0)
+    {
+        this->tx_amp = 12;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_serdes_cfg_data_pack(const bcmolt_nni_serdes_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_VGA)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->rx_vga))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_PF)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->rx_pf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_LFPF)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->rx_lfpf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_DFE1)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->rx_dfe1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_DFE2)) != 0)
+    {
+        if (!bcmolt_buf_write_s8(buf, this->rx_dfe2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_DFE3)) != 0)
+    {
+        if (!bcmolt_buf_write_s8(buf, this->rx_dfe3))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_DFE4)) != 0)
+    {
+        if (!bcmolt_buf_write_s8(buf, this->rx_dfe4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_DFE5)) != 0)
+    {
+        if (!bcmolt_buf_write_s8(buf, this->rx_dfe5))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_TX_PRE)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->tx_pre))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_TX_MAIN)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->tx_main))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_TX_POST1)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->tx_post1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_TX_POST2)) != 0)
+    {
+        if (!bcmolt_buf_write_s8(buf, this->tx_post2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_TX_POST3)) != 0)
+    {
+        if (!bcmolt_buf_write_s8(buf, this->tx_post3))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_TX_AMP)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->tx_amp))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_nni_serdes_cfg_data_get_packed_length(const bcmolt_nni_serdes_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_VGA)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_PF)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_LFPF)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_DFE1)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_DFE2)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_DFE3)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_DFE4)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_DFE5)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_TX_PRE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_TX_MAIN)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_TX_POST1)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_TX_POST2)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_TX_POST3)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_TX_AMP)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_serdes_cfg_data_unpack(bcmolt_nni_serdes_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_VGA)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->rx_vga))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_PF)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->rx_pf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_LFPF)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->rx_lfpf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_DFE1)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->rx_dfe1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_DFE2)) != 0)
+    {
+        if (!bcmolt_buf_read_s8(buf, &this->rx_dfe2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_DFE3)) != 0)
+    {
+        if (!bcmolt_buf_read_s8(buf, &this->rx_dfe3))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_DFE4)) != 0)
+    {
+        if (!bcmolt_buf_read_s8(buf, &this->rx_dfe4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_DFE5)) != 0)
+    {
+        if (!bcmolt_buf_read_s8(buf, &this->rx_dfe5))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_TX_PRE)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->tx_pre))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_TX_MAIN)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->tx_main))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_TX_POST1)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->tx_post1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_TX_POST2)) != 0)
+    {
+        if (!bcmolt_buf_read_s8(buf, &this->tx_post2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_TX_POST3)) != 0)
+    {
+        if (!bcmolt_buf_read_s8(buf, &this->tx_post3))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_TX_AMP)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->tx_amp))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_serdes_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_VGA)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_PF)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_LFPF)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_DFE1)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_DFE2)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_DFE3)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_DFE4)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_DFE5)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_TX_PRE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_TX_MAIN)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_TX_POST1)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_TX_POST2)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_TX_POST3)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_TX_AMP)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_nni_serdes_cfg_data_bounds_check(const bcmolt_nni_serdes_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_nni_serdes_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_VGA)) != 0)
+    {
+        if (this->rx_vga > 45)
+        {
+            *failed_prop = BCMOLT_NNI_SERDES_CFG_ID_RX_VGA;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_PF)) != 0)
+    {
+        if (this->rx_pf > 15)
+        {
+            *failed_prop = BCMOLT_NNI_SERDES_CFG_ID_RX_PF;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_LFPF)) != 0)
+    {
+        if (this->rx_lfpf > 7)
+        {
+            *failed_prop = BCMOLT_NNI_SERDES_CFG_ID_RX_LFPF;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_DFE1)) != 0)
+    {
+        if (this->rx_dfe1 > 63)
+        {
+            *failed_prop = BCMOLT_NNI_SERDES_CFG_ID_RX_DFE1;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_DFE2)) != 0)
+    {
+        if (this->rx_dfe2 < -31)
+        {
+            *failed_prop = BCMOLT_NNI_SERDES_CFG_ID_RX_DFE2;
+            return BCMOS_FALSE;
+        }
+
+        if (this->rx_dfe2 > 31)
+        {
+            *failed_prop = BCMOLT_NNI_SERDES_CFG_ID_RX_DFE2;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_DFE3)) != 0)
+    {
+        if (this->rx_dfe3 < -31)
+        {
+            *failed_prop = BCMOLT_NNI_SERDES_CFG_ID_RX_DFE3;
+            return BCMOS_FALSE;
+        }
+
+        if (this->rx_dfe3 > 31)
+        {
+            *failed_prop = BCMOLT_NNI_SERDES_CFG_ID_RX_DFE3;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_DFE4)) != 0)
+    {
+        if (this->rx_dfe4 < -15)
+        {
+            *failed_prop = BCMOLT_NNI_SERDES_CFG_ID_RX_DFE4;
+            return BCMOS_FALSE;
+        }
+
+        if (this->rx_dfe4 > 15)
+        {
+            *failed_prop = BCMOLT_NNI_SERDES_CFG_ID_RX_DFE4;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_RX_DFE5)) != 0)
+    {
+        if (this->rx_dfe5 < -15)
+        {
+            *failed_prop = BCMOLT_NNI_SERDES_CFG_ID_RX_DFE5;
+            return BCMOS_FALSE;
+        }
+
+        if (this->rx_dfe5 > 15)
+        {
+            *failed_prop = BCMOLT_NNI_SERDES_CFG_ID_RX_DFE5;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_TX_PRE)) != 0)
+    {
+        if (this->tx_pre > 31)
+        {
+            *failed_prop = BCMOLT_NNI_SERDES_CFG_ID_TX_PRE;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_TX_MAIN)) != 0)
+    {
+        if (this->tx_main > 112)
+        {
+            *failed_prop = BCMOLT_NNI_SERDES_CFG_ID_TX_MAIN;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_TX_POST1)) != 0)
+    {
+        if (this->tx_post1 > 63)
+        {
+            *failed_prop = BCMOLT_NNI_SERDES_CFG_ID_TX_POST1;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_TX_POST2)) != 0)
+    {
+        if (this->tx_post2 < -15)
+        {
+            *failed_prop = BCMOLT_NNI_SERDES_CFG_ID_TX_POST2;
+            return BCMOS_FALSE;
+        }
+
+        if (this->tx_post2 > 15)
+        {
+            *failed_prop = BCMOLT_NNI_SERDES_CFG_ID_TX_POST2;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_TX_POST3)) != 0)
+    {
+        if (this->tx_post3 < -7)
+        {
+            *failed_prop = BCMOLT_NNI_SERDES_CFG_ID_TX_POST3;
+            return BCMOS_FALSE;
+        }
+
+        if (this->tx_post3 > 7)
+        {
+            *failed_prop = BCMOLT_NNI_SERDES_CFG_ID_TX_POST3;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_NNI_SERDES_CFG_ID_TX_AMP)) != 0)
+    {
+        if (this->tx_amp > 15)
+        {
+            *failed_prop = BCMOLT_NNI_SERDES_CFG_ID_TX_AMP;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_software_error_key_set_default(bcmolt_software_error_key *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_SOFTWARE_ERROR_KEY_ID_RESERVED)) != 0)
+    {
+        this->reserved = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_SOFTWARE_ERROR_KEY_ID_IDX)) != 0)
+    {
+        this->idx = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_software_error_key_pack(const bcmolt_software_error_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_SOFTWARE_ERROR_KEY_ID_RESERVED)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->reserved))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_SOFTWARE_ERROR_KEY_ID_IDX)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->idx))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_software_error_key_get_packed_length(const bcmolt_software_error_key *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_SOFTWARE_ERROR_KEY_ID_RESERVED)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_SOFTWARE_ERROR_KEY_ID_IDX)) != 0)
+    {
+        count += 4;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_software_error_key_unpack(bcmolt_software_error_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_SOFTWARE_ERROR_KEY_ID_RESERVED)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->reserved))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_SOFTWARE_ERROR_KEY_ID_IDX)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->idx))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_software_error_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_SOFTWARE_ERROR_KEY_ID_RESERVED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_SOFTWARE_ERROR_KEY_ID_IDX)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_software_error_key_bounds_check(const bcmolt_software_error_key *this, bcmolt_presence_mask fields_present, bcmolt_software_error_key_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_software_error_cfg_data_set_default(bcmolt_software_error_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_SOFTWARE_ERROR_CFG_ID_ENTRY)) != 0)
+    {
+        this->entry.first_error_time_us = 0;
+        this->entry.last_error_time_us = 0;
+        this->entry.line_number = 0;
+        this->entry.error_counter = 0;
+        this->entry.instance = 0;
+        memset(this->entry.filename, 0, 64);
+        memset(this->entry.task_name, 0, 64);
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_software_error_cfg_data_pack(const bcmolt_software_error_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_SOFTWARE_ERROR_CFG_ID_ENTRY)) != 0)
+    {
+        if (!bcmolt_sw_error_pack(&this->entry, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_software_error_cfg_data_get_packed_length(const bcmolt_software_error_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_SOFTWARE_ERROR_CFG_ID_ENTRY)) != 0)
+    {
+        count += 156;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_software_error_cfg_data_unpack(bcmolt_software_error_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_SOFTWARE_ERROR_CFG_ID_ENTRY)) != 0)
+    {
+        if (!bcmolt_sw_error_unpack(&this->entry, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_software_error_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_SOFTWARE_ERROR_CFG_ID_ENTRY)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 156))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_software_error_cfg_data_bounds_check(const bcmolt_software_error_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_software_error_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_SOFTWARE_ERROR_CFG_ID_ENTRY)) != 0)
+    {
+        if (!bcmolt_sw_error_bounds_check(&this->entry))
+        {
+            *failed_prop = BCMOLT_SOFTWARE_ERROR_CFG_ID_ENTRY;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_trx_calibration_key_set_default(bcmolt_trx_calibration_key *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_KEY_ID_RESERVED)) != 0)
+    {
+        this->reserved = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_calibration_key_pack(const bcmolt_trx_calibration_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_KEY_ID_RESERVED)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->reserved))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_trx_calibration_key_get_packed_length(const bcmolt_trx_calibration_key *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_KEY_ID_RESERVED)) != 0)
+    {
+        count += 4;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_calibration_key_unpack(bcmolt_trx_calibration_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_KEY_ID_RESERVED)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->reserved))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_calibration_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_KEY_ID_RESERVED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_calibration_key_bounds_check(const bcmolt_trx_calibration_key *this, bcmolt_presence_mask fields_present, bcmolt_trx_calibration_key_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_trx_calibration_capture_window_and_statistic_completed_data_set_default(bcmolt_trx_calibration_capture_window_and_statistic_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_DATA_WINDOW)) != 0)
+    {
+        this->data_window.len = 0;
+        this->data_window.val = NULL;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_STROBE_WINDOW)) != 0)
+    {
+        this->strobe_window.len = 0;
+        this->strobe_window.val = NULL;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_RISE_MIN_MIN)) != 0)
+    {
+        this->edge_rise_min_min = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_RISE_MIN_MAX)) != 0)
+    {
+        this->edge_rise_min_max = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_RISE_MAX_MIN)) != 0)
+    {
+        this->edge_rise_max_min = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_RISE_MAX_MAX)) != 0)
+    {
+        this->edge_rise_max_max = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_FALL_MIN_MIN)) != 0)
+    {
+        this->edge_fall_min_min = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_FALL_MIN_MAX)) != 0)
+    {
+        this->edge_fall_min_max = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_FALL_MAX_MIN)) != 0)
+    {
+        this->edge_fall_max_min = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_FALL_MAX_MAX)) != 0)
+    {
+        this->edge_fall_max_max = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_RESULT)) != 0)
+    {
+        this->result = BCMOLT_RESULT_SUCCESS;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_calibration_capture_window_and_statistic_completed_data_pack(const bcmolt_trx_calibration_capture_window_and_statistic_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_DATA_WINDOW)) != 0)
+    {
+        if (!bcmolt_u32_list_u32_max_500_hex_pack(&this->data_window, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_STROBE_WINDOW)) != 0)
+    {
+        if (!bcmolt_u32_list_u32_max_500_hex_pack(&this->strobe_window, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_RISE_MIN_MIN)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->edge_rise_min_min))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_RISE_MIN_MAX)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->edge_rise_min_max))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_RISE_MAX_MIN)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->edge_rise_max_min))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_RISE_MAX_MAX)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->edge_rise_max_max))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_FALL_MIN_MIN)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->edge_fall_min_min))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_FALL_MIN_MAX)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->edge_fall_min_max))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_FALL_MAX_MIN)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->edge_fall_max_min))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_FALL_MAX_MAX)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->edge_fall_max_max))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_RESULT)) != 0)
+    {
+        if (!bcmolt_result_pack(this->result, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_trx_calibration_capture_window_and_statistic_completed_data_get_packed_length(const bcmolt_trx_calibration_capture_window_and_statistic_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_DATA_WINDOW)) != 0)
+    {
+        count += bcmolt_u32_list_u32_max_500_hex_get_packed_length(&this->data_window);
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_STROBE_WINDOW)) != 0)
+    {
+        count += bcmolt_u32_list_u32_max_500_hex_get_packed_length(&this->strobe_window);
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_RISE_MIN_MIN)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_RISE_MIN_MAX)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_RISE_MAX_MIN)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_RISE_MAX_MAX)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_FALL_MIN_MIN)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_FALL_MIN_MAX)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_FALL_MAX_MIN)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_FALL_MAX_MAX)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_RESULT)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_calibration_capture_window_and_statistic_completed_data_unpack(bcmolt_trx_calibration_capture_window_and_statistic_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_DATA_WINDOW)) != 0)
+    {
+        if (!bcmolt_u32_list_u32_max_500_hex_unpack(&this->data_window, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_STROBE_WINDOW)) != 0)
+    {
+        if (!bcmolt_u32_list_u32_max_500_hex_unpack(&this->strobe_window, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_RISE_MIN_MIN)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->edge_rise_min_min))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_RISE_MIN_MAX)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->edge_rise_min_max))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_RISE_MAX_MIN)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->edge_rise_max_min))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_RISE_MAX_MAX)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->edge_rise_max_max))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_FALL_MIN_MIN)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->edge_fall_min_min))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_FALL_MIN_MAX)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->edge_fall_min_max))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_FALL_MAX_MIN)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->edge_fall_max_min))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_FALL_MAX_MAX)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->edge_fall_max_max))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_RESULT)) != 0)
+    {
+        if (!bcmolt_result_unpack(&this->result, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_calibration_capture_window_and_statistic_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_DATA_WINDOW)) != 0)
+    {
+        if (!bcmolt_u32_list_u32_max_500_hex_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_STROBE_WINDOW)) != 0)
+    {
+        if (!bcmolt_u32_list_u32_max_500_hex_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_RISE_MIN_MIN)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_RISE_MIN_MAX)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_RISE_MAX_MIN)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_RISE_MAX_MAX)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_FALL_MIN_MIN)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_FALL_MIN_MAX)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_FALL_MAX_MIN)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_EDGE_FALL_MAX_MAX)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_RESULT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_calibration_capture_window_and_statistic_completed_data_bounds_check(const bcmolt_trx_calibration_capture_window_and_statistic_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_trx_calibration_capture_window_and_statistic_completed_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_DATA_WINDOW)) != 0)
+    {
+        if (this->data_window.len < 2)
+        {
+            return BCMOS_FALSE;
+        }
+
+        if (this->data_window.len > 500)
+        {
+            return BCMOS_FALSE;
+        }
+
+        if (!bcmolt_u32_list_u32_max_500_hex_bounds_check(&this->data_window))
+        {
+            *failed_prop = BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_DATA_WINDOW;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_STROBE_WINDOW)) != 0)
+    {
+        if (this->strobe_window.len < 2)
+        {
+            return BCMOS_FALSE;
+        }
+
+        if (this->strobe_window.len > 500)
+        {
+            return BCMOS_FALSE;
+        }
+
+        if (!bcmolt_u32_list_u32_max_500_hex_bounds_check(&this->strobe_window))
+        {
+            *failed_prop = BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_STROBE_WINDOW;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_RESULT)) != 0)
+    {
+        switch (this->result)
+        {
+            case BCMOLT_RESULT_SUCCESS:
+                break;
+            case BCMOLT_RESULT_FAIL:
+                break;
+            default:
+                *failed_prop = BCMOLT_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED_ID_RESULT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_trx_calibration_auto_cfg_data_set_default(bcmolt_trx_calibration_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_AUTO_CFG_ID_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED)) != 0)
+    {
+        this->capture_window_and_statistic_completed = BCMOS_FALSE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_calibration_auto_cfg_data_pack(const bcmolt_trx_calibration_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_AUTO_CFG_ID_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->capture_window_and_statistic_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_trx_calibration_auto_cfg_data_get_packed_length(const bcmolt_trx_calibration_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_AUTO_CFG_ID_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_calibration_auto_cfg_data_unpack(bcmolt_trx_calibration_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_AUTO_CFG_ID_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->capture_window_and_statistic_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_calibration_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_AUTO_CFG_ID_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_calibration_auto_cfg_data_bounds_check(const bcmolt_trx_calibration_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_trx_calibration_auto_cfg_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_trx_calibration_start_capture_window_data_set_default(bcmolt_trx_calibration_start_capture_window_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_PON_NI)) != 0)
+    {
+        this->pon_ni = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_TRIGGER)) != 0)
+    {
+        this->trigger = BCMOLT_TRX_CALIBRATION_TRIGGER_EPON_STAT;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_STROBE)) != 0)
+    {
+        this->strobe = BCMOLT_CAPTURE_STROBE_SIGNAL_GPON_BCDR_RESET;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_WINDOW_MODE)) != 0)
+    {
+        this->window_mode = BCMOLT_TRX_CALIBRATION_WINDOW_MODE_RANGING;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_ONU_ID)) != 0)
+    {
+        this->onu_id = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_TRIGGER_POSITION)) != 0)
+    {
+        this->trigger_position = BCMOLT_TRX_CALIBRATION_TRIGGER_POSITION_RISING;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_STOP_DUE_TO_CORRUPT_STROBE)) != 0)
+    {
+        this->stop_due_to_corrupt_strobe = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_START_OFFSET)) != 0)
+    {
+        this->start_offset = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_END_OFFSET)) != 0)
+    {
+        this->end_offset = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_NUMBER_OF_CYCLES)) != 0)
+    {
+        this->number_of_cycles = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_calibration_start_capture_window_data_pack(const bcmolt_trx_calibration_start_capture_window_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_TRIGGER)) != 0)
+    {
+        if (!bcmolt_trx_calibration_trigger_pack(this->trigger, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_STROBE)) != 0)
+    {
+        if (!bcmolt_capture_strobe_signal_pack(this->strobe, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_WINDOW_MODE)) != 0)
+    {
+        if (!bcmolt_trx_calibration_window_mode_pack(this->window_mode, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, this->onu_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_TRIGGER_POSITION)) != 0)
+    {
+        if (!bcmolt_trx_calibration_trigger_position_pack(this->trigger_position, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_STOP_DUE_TO_CORRUPT_STROBE)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->stop_due_to_corrupt_strobe))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_START_OFFSET)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, this->start_offset))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_END_OFFSET)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, this->end_offset))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_NUMBER_OF_CYCLES)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->number_of_cycles))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_trx_calibration_start_capture_window_data_get_packed_length(const bcmolt_trx_calibration_start_capture_window_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_PON_NI)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_TRIGGER)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_STROBE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_WINDOW_MODE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_ONU_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_TRIGGER_POSITION)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_STOP_DUE_TO_CORRUPT_STROBE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_START_OFFSET)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_END_OFFSET)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_NUMBER_OF_CYCLES)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_calibration_start_capture_window_data_unpack(bcmolt_trx_calibration_start_capture_window_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_TRIGGER)) != 0)
+    {
+        if (!bcmolt_trx_calibration_trigger_unpack(&this->trigger, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_STROBE)) != 0)
+    {
+        if (!bcmolt_capture_strobe_signal_unpack(&this->strobe, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_WINDOW_MODE)) != 0)
+    {
+        if (!bcmolt_trx_calibration_window_mode_unpack(&this->window_mode, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, &this->onu_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_TRIGGER_POSITION)) != 0)
+    {
+        if (!bcmolt_trx_calibration_trigger_position_unpack(&this->trigger_position, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_STOP_DUE_TO_CORRUPT_STROBE)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->stop_due_to_corrupt_strobe))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_START_OFFSET)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, &this->start_offset))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_END_OFFSET)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, &this->end_offset))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_NUMBER_OF_CYCLES)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->number_of_cycles))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_calibration_start_capture_window_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_TRIGGER)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_STROBE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_WINDOW_MODE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_TRIGGER_POSITION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_STOP_DUE_TO_CORRUPT_STROBE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_START_OFFSET)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_END_OFFSET)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_NUMBER_OF_CYCLES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_calibration_start_capture_window_data_bounds_check(const bcmolt_trx_calibration_start_capture_window_data *this, bcmolt_presence_mask fields_present, bcmolt_trx_calibration_start_capture_window_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_TRIGGER)) != 0)
+    {
+        switch (this->trigger)
+        {
+            case BCMOLT_TRX_CALIBRATION_TRIGGER_EPON_STAT:
+                break;
+            case BCMOLT_TRX_CALIBRATION_TRIGGER_GPON_BCDR_RESET:
+                break;
+            case BCMOLT_TRX_CALIBRATION_TRIGGER_GPON_TRX_RESET:
+                break;
+            case BCMOLT_TRX_CALIBRATION_TRIGGER_GPON_TRX_ED:
+                break;
+            case BCMOLT_TRX_CALIBRATION_TRIGGER_GPON_RSSI:
+                break;
+            case BCMOLT_TRX_CALIBRATION_TRIGGER_GPON_EOB:
+                break;
+            case BCMOLT_TRX_CALIBRATION_TRIGGER_GPON_RANGING:
+                break;
+            case BCMOLT_TRX_CALIBRATION_TRIGGER_SERDES_BURST_EN:
+                break;
+            default:
+                *failed_prop = BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_TRIGGER;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_STROBE)) != 0)
+    {
+        switch (this->strobe)
+        {
+            case BCMOLT_CAPTURE_STROBE_SIGNAL_GPON_BCDR_RESET:
+                break;
+            case BCMOLT_CAPTURE_STROBE_SIGNAL_GPON_TRX_ED:
+                break;
+            case BCMOLT_CAPTURE_STROBE_SIGNAL_GPON_RSSI:
+                break;
+            case BCMOLT_CAPTURE_STROBE_SIGNAL_GPON_EOB:
+                break;
+            case BCMOLT_CAPTURE_STROBE_SIGNAL_SERDES_BURST_EN:
+                break;
+            case BCMOLT_CAPTURE_STROBE_SIGNAL_SERDES_RX_LOCK:
+                break;
+            default:
+                *failed_prop = BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_STROBE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_WINDOW_MODE)) != 0)
+    {
+        switch (this->window_mode)
+        {
+            case BCMOLT_TRX_CALIBRATION_WINDOW_MODE_RANGING:
+                break;
+            case BCMOLT_TRX_CALIBRATION_WINDOW_MODE_NON_RANGING:
+                break;
+            case BCMOLT_TRX_CALIBRATION_WINDOW_MODE_BOTH:
+                break;
+            default:
+                *failed_prop = BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_WINDOW_MODE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_TRIGGER_POSITION)) != 0)
+    {
+        switch (this->trigger_position)
+        {
+            case BCMOLT_TRX_CALIBRATION_TRIGGER_POSITION_RISING:
+                break;
+            case BCMOLT_TRX_CALIBRATION_TRIGGER_POSITION_FALLING:
+                break;
+            default:
+                *failed_prop = BCMOLT_TRX_CALIBRATION_START_CAPTURE_WINDOW_ID_TRIGGER_POSITION;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_trx_calibration_stop_capture_window_data_set_default(bcmolt_trx_calibration_stop_capture_window_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_STOP_CAPTURE_WINDOW_ID_PON_NI)) != 0)
+    {
+        this->pon_ni = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_calibration_stop_capture_window_data_pack(const bcmolt_trx_calibration_stop_capture_window_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_STOP_CAPTURE_WINDOW_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_trx_calibration_stop_capture_window_data_get_packed_length(const bcmolt_trx_calibration_stop_capture_window_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_STOP_CAPTURE_WINDOW_ID_PON_NI)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_calibration_stop_capture_window_data_unpack(bcmolt_trx_calibration_stop_capture_window_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_STOP_CAPTURE_WINDOW_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_calibration_stop_capture_window_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_TRX_CALIBRATION_STOP_CAPTURE_WINDOW_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_trx_calibration_stop_capture_window_data_bounds_check(const bcmolt_trx_calibration_stop_capture_window_data *this, bcmolt_presence_mask fields_present, bcmolt_trx_calibration_stop_capture_window_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_alloc_key_set_default(bcmolt_xgpon_alloc_key *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_KEY_ID_PON_NI)) != 0)
+    {
+        this->pon_ni = (bcmolt_xgpon_ni) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_KEY_ID_ALLOC_ID)) != 0)
+    {
+        this->alloc_id = (bcmolt_xgpon_alloc_id) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_key_pack(const bcmolt_xgpon_alloc_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, (uint8_t) this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_KEY_ID_ALLOC_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->alloc_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_alloc_key_get_packed_length(const bcmolt_xgpon_alloc_key *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_KEY_ID_PON_NI)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_KEY_ID_ALLOC_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_key_unpack(bcmolt_xgpon_alloc_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, (uint8_t *) &this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_KEY_ID_ALLOC_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->alloc_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_KEY_ID_ALLOC_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_key_bounds_check(const bcmolt_xgpon_alloc_key *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_alloc_key_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_KEY_ID_PON_NI)) != 0)
+    {
+        if (this->pon_ni > (bcmolt_xgpon_ni) 7)
+        {
+            *failed_prop = BCMOLT_XGPON_ALLOC_KEY_ID_PON_NI;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_KEY_ID_ALLOC_ID)) != 0)
+    {
+        if (this->alloc_id > (bcmolt_xgpon_alloc_id) 16383)
+        {
+            *failed_prop = BCMOLT_XGPON_ALLOC_KEY_ID_ALLOC_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_alloc_cfg_data_set_default(bcmolt_xgpon_alloc_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_CFG_ID_STATE)) != 0)
+    {
+        this->state = BCMOLT_ALLOC_STATE_NOT_CONFIGURED;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_CFG_ID_SLA)) != 0)
+    {
+        this->sla.cbr_rt_bw = 0;
+        this->sla.cbr_nrt_bw = 0;
+        this->sla.guaranteed_bw = 0;
+        this->sla.maximum_bw = 0;
+        this->sla.additional_bw_eligibility = BCMOLT_ADDITIONAL_BW_ELIGIBILITY_NONE;
+        this->sla.cbr_rt_compensation = BCMOS_FALSE;
+        this->sla.cbr_rt_ap_index = 0;
+        this->sla.cbr_nrt_ap_index = 0;
+        this->sla.alloc_type = BCMOLT_ALLOC_TYPE_NONE;
+        this->sla.weight = 0;
+        this->sla.priority = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_CFG_ID_ONU_ID)) != 0)
+    {
+        this->onu_id = (bcmolt_xgpon_onu_id) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_CFG_ID_COLLECT_STATS)) != 0)
+    {
+        this->collect_stats = BCMOS_FALSE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_cfg_data_pack(const bcmolt_xgpon_alloc_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_CFG_ID_STATE)) != 0)
+    {
+        if (!bcmolt_alloc_state_pack(this->state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_CFG_ID_SLA)) != 0)
+    {
+        if (!bcmolt_pon_alloc_sla_pack(&this->sla, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_CFG_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->onu_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_CFG_ID_COLLECT_STATS)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->collect_stats))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_alloc_cfg_data_get_packed_length(const bcmolt_xgpon_alloc_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_CFG_ID_STATE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_CFG_ID_SLA)) != 0)
+    {
+        count += 23;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_CFG_ID_ONU_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_CFG_ID_COLLECT_STATS)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_cfg_data_unpack(bcmolt_xgpon_alloc_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_CFG_ID_STATE)) != 0)
+    {
+        if (!bcmolt_alloc_state_unpack(&this->state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_CFG_ID_SLA)) != 0)
+    {
+        if (!bcmolt_pon_alloc_sla_unpack(&this->sla, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_CFG_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->onu_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_CFG_ID_COLLECT_STATS)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->collect_stats))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_CFG_ID_STATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_CFG_ID_SLA)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 23))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_CFG_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_CFG_ID_COLLECT_STATS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_cfg_data_bounds_check(const bcmolt_xgpon_alloc_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_alloc_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_CFG_ID_STATE)) != 0)
+    {
+        switch (this->state)
+        {
+            case BCMOLT_ALLOC_STATE_NOT_CONFIGURED:
+                break;
+            case BCMOLT_ALLOC_STATE_INACTIVE:
+                break;
+            case BCMOLT_ALLOC_STATE_PROCESSING:
+                break;
+            case BCMOLT_ALLOC_STATE_ACTIVE:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ALLOC_CFG_ID_STATE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_CFG_ID_SLA)) != 0)
+    {
+        if (!bcmolt_pon_alloc_sla_bounds_check(&this->sla))
+        {
+            *failed_prop = BCMOLT_XGPON_ALLOC_CFG_ID_SLA;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_CFG_ID_ONU_ID)) != 0)
+    {
+        if (this->onu_id > (bcmolt_xgpon_onu_id) 511)
+        {
+            *failed_prop = BCMOLT_XGPON_ALLOC_CFG_ID_ONU_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_alloc_stat_data_set_default(bcmolt_xgpon_alloc_stat_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_STAT_ID_RX_BYTES)) != 0)
+    {
+        this->rx_bytes = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_stat_data_pack(const bcmolt_xgpon_alloc_stat_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_STAT_ID_RX_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_alloc_stat_data_get_packed_length(const bcmolt_xgpon_alloc_stat_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_STAT_ID_RX_BYTES)) != 0)
+    {
+        count += 8;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_stat_data_unpack(bcmolt_xgpon_alloc_stat_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_STAT_ID_RX_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_stat_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_STAT_ID_RX_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_stat_data_bounds_check(const bcmolt_xgpon_alloc_stat_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_alloc_stat_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_alloc_stat_cfg_data_set_default(bcmolt_xgpon_alloc_stat_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_STAT_CFG_ID_CFG)) != 0)
+    {
+        this->cfg.trigger.type = BCMOLT_STAT_CONDITION_TYPE_NONE;
+        this->cfg.soak.active_soak_time = 0;
+        this->cfg.soak.clear_soak_time = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_stat_cfg_data_pack(const bcmolt_xgpon_alloc_stat_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_pack(&this->cfg, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_alloc_stat_cfg_data_get_packed_length(const bcmolt_xgpon_alloc_stat_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_STAT_CFG_ID_CFG)) != 0)
+    {
+        count += bcmolt_stat_alarm_config_get_packed_length(&this->cfg);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_stat_cfg_data_unpack(bcmolt_xgpon_alloc_stat_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_unpack(&this->cfg, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_stat_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_stat_cfg_data_bounds_check(const bcmolt_xgpon_alloc_stat_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_alloc_stat_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_bounds_check(&this->cfg))
+        {
+            *failed_prop = BCMOLT_XGPON_ALLOC_STAT_CFG_ID_CFG;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_alloc_configuration_completed_data_set_default(bcmolt_xgpon_alloc_configuration_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_CONFIGURATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        this->status = BCMOLT_RESULT_SUCCESS;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_CONFIGURATION_COMPLETED_ID_NEW_STATE)) != 0)
+    {
+        this->new_state = BCMOLT_ALLOC_STATE_NOT_CONFIGURED;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_configuration_completed_data_pack(const bcmolt_xgpon_alloc_configuration_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_CONFIGURATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_result_pack(this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_CONFIGURATION_COMPLETED_ID_NEW_STATE)) != 0)
+    {
+        if (!bcmolt_alloc_state_pack(this->new_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_alloc_configuration_completed_data_get_packed_length(const bcmolt_xgpon_alloc_configuration_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_CONFIGURATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_CONFIGURATION_COMPLETED_ID_NEW_STATE)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_configuration_completed_data_unpack(bcmolt_xgpon_alloc_configuration_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_CONFIGURATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_result_unpack(&this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_CONFIGURATION_COMPLETED_ID_NEW_STATE)) != 0)
+    {
+        if (!bcmolt_alloc_state_unpack(&this->new_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_configuration_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_CONFIGURATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_CONFIGURATION_COMPLETED_ID_NEW_STATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_configuration_completed_data_bounds_check(const bcmolt_xgpon_alloc_configuration_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_alloc_configuration_completed_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_CONFIGURATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        switch (this->status)
+        {
+            case BCMOLT_RESULT_SUCCESS:
+                break;
+            case BCMOLT_RESULT_FAIL:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ALLOC_CONFIGURATION_COMPLETED_ID_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_CONFIGURATION_COMPLETED_ID_NEW_STATE)) != 0)
+    {
+        switch (this->new_state)
+        {
+            case BCMOLT_ALLOC_STATE_NOT_CONFIGURED:
+                break;
+            case BCMOLT_ALLOC_STATE_INACTIVE:
+                break;
+            case BCMOLT_ALLOC_STATE_PROCESSING:
+                break;
+            case BCMOLT_ALLOC_STATE_ACTIVE:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ALLOC_CONFIGURATION_COMPLETED_ID_NEW_STATE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_alloc_get_alloc_stats_completed_data_set_default(bcmolt_xgpon_alloc_get_alloc_stats_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_STATUS)) != 0)
+    {
+        this->status = BCMOLT_RESULT_SUCCESS;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_AVERAGE_NSR_USED)) != 0)
+    {
+        this->average_nsr_used = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_AVERAGE_NSR_ALLOCATED)) != 0)
+    {
+        this->average_nsr_allocated = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_AVERAGE_SR_REPORT)) != 0)
+    {
+        this->average_sr_report = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_get_alloc_stats_completed_data_pack(const bcmolt_xgpon_alloc_get_alloc_stats_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_result_pack(this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_AVERAGE_NSR_USED)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->average_nsr_used))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_AVERAGE_NSR_ALLOCATED)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->average_nsr_allocated))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_AVERAGE_SR_REPORT)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->average_sr_report))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_alloc_get_alloc_stats_completed_data_get_packed_length(const bcmolt_xgpon_alloc_get_alloc_stats_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_AVERAGE_NSR_USED)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_AVERAGE_NSR_ALLOCATED)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_AVERAGE_SR_REPORT)) != 0)
+    {
+        count += 4;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_get_alloc_stats_completed_data_unpack(bcmolt_xgpon_alloc_get_alloc_stats_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_result_unpack(&this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_AVERAGE_NSR_USED)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->average_nsr_used))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_AVERAGE_NSR_ALLOCATED)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->average_nsr_allocated))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_AVERAGE_SR_REPORT)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->average_sr_report))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_get_alloc_stats_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_AVERAGE_NSR_USED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_AVERAGE_NSR_ALLOCATED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_AVERAGE_SR_REPORT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_get_alloc_stats_completed_data_bounds_check(const bcmolt_xgpon_alloc_get_alloc_stats_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_alloc_get_alloc_stats_completed_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_STATUS)) != 0)
+    {
+        switch (this->status)
+        {
+            case BCMOLT_RESULT_SUCCESS:
+                break;
+            case BCMOLT_RESULT_FAIL:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ALLOC_GET_ALLOC_STATS_COMPLETED_ID_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_alloc_stat_alarm_cleared_data_set_default(bcmolt_xgpon_alloc_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        this->stat = BCMOLT_XGPON_ALLOC_STAT_ID_RX_BYTES;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_stat_alarm_cleared_data_pack(const bcmolt_xgpon_alloc_stat_alarm_cleared_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_xgpon_alloc_stat_id_pack(this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_alloc_stat_alarm_cleared_data_get_packed_length(const bcmolt_xgpon_alloc_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_stat_alarm_cleared_data_unpack(bcmolt_xgpon_alloc_stat_alarm_cleared_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_xgpon_alloc_stat_id_unpack(&this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_stat_alarm_cleared_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_stat_alarm_cleared_data_bounds_check(const bcmolt_xgpon_alloc_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_alloc_stat_alarm_cleared_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        switch (this->stat)
+        {
+            case BCMOLT_XGPON_ALLOC_STAT_ID_RX_BYTES:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ALLOC_STAT_ALARM_CLEARED_ID_STAT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_alloc_stat_alarm_raised_data_set_default(bcmolt_xgpon_alloc_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        this->stat = BCMOLT_XGPON_ALLOC_STAT_ID_RX_BYTES;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_stat_alarm_raised_data_pack(const bcmolt_xgpon_alloc_stat_alarm_raised_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_xgpon_alloc_stat_id_pack(this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_alloc_stat_alarm_raised_data_get_packed_length(const bcmolt_xgpon_alloc_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_stat_alarm_raised_data_unpack(bcmolt_xgpon_alloc_stat_alarm_raised_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_xgpon_alloc_stat_id_unpack(&this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_stat_alarm_raised_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_stat_alarm_raised_data_bounds_check(const bcmolt_xgpon_alloc_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_alloc_stat_alarm_raised_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        switch (this->stat)
+        {
+            case BCMOLT_XGPON_ALLOC_STAT_ID_RX_BYTES:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ALLOC_STAT_ALARM_RAISED_ID_STAT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_alloc_auto_cfg_data_set_default(bcmolt_xgpon_alloc_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_AUTO_CFG_ID_CONFIGURATION_COMPLETED)) != 0)
+    {
+        this->configuration_completed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_AUTO_CFG_ID_GET_ALLOC_STATS_COMPLETED)) != 0)
+    {
+        this->get_alloc_stats_completed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        this->stat_alarm_cleared = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        this->stat_alarm_raised = BCMOS_FALSE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_auto_cfg_data_pack(const bcmolt_xgpon_alloc_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_AUTO_CFG_ID_CONFIGURATION_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->configuration_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_AUTO_CFG_ID_GET_ALLOC_STATS_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->get_alloc_stats_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->stat_alarm_cleared))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->stat_alarm_raised))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_alloc_auto_cfg_data_get_packed_length(const bcmolt_xgpon_alloc_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_AUTO_CFG_ID_CONFIGURATION_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_AUTO_CFG_ID_GET_ALLOC_STATS_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_auto_cfg_data_unpack(bcmolt_xgpon_alloc_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_AUTO_CFG_ID_CONFIGURATION_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->configuration_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_AUTO_CFG_ID_GET_ALLOC_STATS_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->get_alloc_stats_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->stat_alarm_cleared))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->stat_alarm_raised))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_AUTO_CFG_ID_CONFIGURATION_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_AUTO_CFG_ID_GET_ALLOC_STATS_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_auto_cfg_data_bounds_check(const bcmolt_xgpon_alloc_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_alloc_auto_cfg_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_alloc_get_stats_data_set_default(bcmolt_xgpon_alloc_get_stats_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_GET_STATS_ID_NUM_OF_CYCLES)) != 0)
+    {
+        this->num_of_cycles = 1;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_get_stats_data_pack(const bcmolt_xgpon_alloc_get_stats_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_GET_STATS_ID_NUM_OF_CYCLES)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->num_of_cycles))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_alloc_get_stats_data_get_packed_length(const bcmolt_xgpon_alloc_get_stats_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_GET_STATS_ID_NUM_OF_CYCLES)) != 0)
+    {
+        count += 4;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_get_stats_data_unpack(bcmolt_xgpon_alloc_get_stats_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_GET_STATS_ID_NUM_OF_CYCLES)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->num_of_cycles))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_get_stats_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_GET_STATS_ID_NUM_OF_CYCLES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_get_stats_data_bounds_check(const bcmolt_xgpon_alloc_get_stats_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_alloc_get_stats_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_GET_STATS_ID_NUM_OF_CYCLES)) != 0)
+    {
+        if (this->num_of_cycles < 1)
+        {
+            *failed_prop = BCMOLT_XGPON_ALLOC_GET_STATS_ID_NUM_OF_CYCLES;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_alloc_set_state_data_set_default(bcmolt_xgpon_alloc_set_state_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_SET_STATE_ID_STATE)) != 0)
+    {
+        this->state = BCMOLT_ALLOC_OPERATION_ACTIVATE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_set_state_data_pack(const bcmolt_xgpon_alloc_set_state_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_SET_STATE_ID_STATE)) != 0)
+    {
+        if (!bcmolt_alloc_operation_pack(this->state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_alloc_set_state_data_get_packed_length(const bcmolt_xgpon_alloc_set_state_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_SET_STATE_ID_STATE)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_set_state_data_unpack(bcmolt_xgpon_alloc_set_state_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_SET_STATE_ID_STATE)) != 0)
+    {
+        if (!bcmolt_alloc_operation_unpack(&this->state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_set_state_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_SET_STATE_ID_STATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_alloc_set_state_data_bounds_check(const bcmolt_xgpon_alloc_set_state_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_alloc_set_state_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ALLOC_SET_STATE_ID_STATE)) != 0)
+    {
+        switch (this->state)
+        {
+            case BCMOLT_ALLOC_OPERATION_ACTIVATE:
+                break;
+            case BCMOLT_ALLOC_OPERATION_DEACTIVATE:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ALLOC_SET_STATE_ID_STATE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_gem_port_key_set_default(bcmolt_xgpon_gem_port_key *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_KEY_ID_PON_NI)) != 0)
+    {
+        this->pon_ni = (bcmolt_xgpon_ni) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_KEY_ID_GEM_PORT_ID)) != 0)
+    {
+        this->gem_port_id = (bcmolt_xgpon_gem_id) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_key_pack(const bcmolt_xgpon_gem_port_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, (uint8_t) this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_KEY_ID_GEM_PORT_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->gem_port_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_gem_port_key_get_packed_length(const bcmolt_xgpon_gem_port_key *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_KEY_ID_PON_NI)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_KEY_ID_GEM_PORT_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_key_unpack(bcmolt_xgpon_gem_port_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, (uint8_t *) &this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_KEY_ID_GEM_PORT_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->gem_port_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_KEY_ID_GEM_PORT_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_key_bounds_check(const bcmolt_xgpon_gem_port_key *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_gem_port_key_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_KEY_ID_PON_NI)) != 0)
+    {
+        if (this->pon_ni > (bcmolt_xgpon_ni) 7)
+        {
+            *failed_prop = BCMOLT_XGPON_GEM_PORT_KEY_ID_PON_NI;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_KEY_ID_GEM_PORT_ID)) != 0)
+    {
+        if (this->gem_port_id > (bcmolt_xgpon_gem_id) 65533U)
+        {
+            *failed_prop = BCMOLT_XGPON_GEM_PORT_KEY_ID_GEM_PORT_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_gem_port_cfg_data_set_default(bcmolt_xgpon_gem_port_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_CFG_ID_CONFIGURATION)) != 0)
+    {
+        this->configuration.direction = BCMOLT_GEM_PORT_DIRECTION_DOWNSTREAM;
+        this->configuration.type = BCMOLT_GEM_PORT_TYPE_UNICAST;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_CFG_ID_ONU_ID)) != 0)
+    {
+        this->onu_id = (bcmolt_xgpon_onu_id) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_CFG_ID_GEM_PORT_STATE)) != 0)
+    {
+        this->gem_port_state = BCMOLT_XGPON_GEM_PORT_STATE_NOT_CONFIGURED;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_CFG_ID_ENCRYPTION_MODE)) != 0)
+    {
+        this->encryption_mode = BCMOLT_CONTROL_STATE_DISABLE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_CFG_ID_UPSTREAM_DESTINATION_QUEUE)) != 0)
+    {
+        this->upstream_destination_queue = BCMOLT_US_GEM_PORT_DESTINATION_DATA;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_CFG_ID_CONTROL)) != 0)
+    {
+        this->control = BCMOLT_CONTROL_STATE_DISABLE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_cfg_data_pack(const bcmolt_xgpon_gem_port_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_CFG_ID_CONFIGURATION)) != 0)
+    {
+        if (!bcmolt_gem_port_configuration_pack(&this->configuration, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_CFG_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->onu_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_CFG_ID_GEM_PORT_STATE)) != 0)
+    {
+        if (!bcmolt_xgpon_gem_port_state_pack(this->gem_port_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_CFG_ID_ENCRYPTION_MODE)) != 0)
+    {
+        if (!bcmolt_control_state_pack(this->encryption_mode, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_CFG_ID_UPSTREAM_DESTINATION_QUEUE)) != 0)
+    {
+        if (!bcmolt_us_gem_port_destination_pack(this->upstream_destination_queue, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_CFG_ID_CONTROL)) != 0)
+    {
+        if (!bcmolt_control_state_pack(this->control, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_gem_port_cfg_data_get_packed_length(const bcmolt_xgpon_gem_port_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_CFG_ID_CONFIGURATION)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_CFG_ID_ONU_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_CFG_ID_GEM_PORT_STATE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_CFG_ID_ENCRYPTION_MODE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_CFG_ID_UPSTREAM_DESTINATION_QUEUE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_CFG_ID_CONTROL)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_cfg_data_unpack(bcmolt_xgpon_gem_port_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_CFG_ID_CONFIGURATION)) != 0)
+    {
+        if (!bcmolt_gem_port_configuration_unpack(&this->configuration, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_CFG_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->onu_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_CFG_ID_GEM_PORT_STATE)) != 0)
+    {
+        if (!bcmolt_xgpon_gem_port_state_unpack(&this->gem_port_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_CFG_ID_ENCRYPTION_MODE)) != 0)
+    {
+        if (!bcmolt_control_state_unpack(&this->encryption_mode, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_CFG_ID_UPSTREAM_DESTINATION_QUEUE)) != 0)
+    {
+        if (!bcmolt_us_gem_port_destination_unpack(&this->upstream_destination_queue, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_CFG_ID_CONTROL)) != 0)
+    {
+        if (!bcmolt_control_state_unpack(&this->control, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_CFG_ID_CONFIGURATION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_CFG_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_CFG_ID_GEM_PORT_STATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_CFG_ID_ENCRYPTION_MODE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_CFG_ID_UPSTREAM_DESTINATION_QUEUE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_CFG_ID_CONTROL)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_cfg_data_bounds_check(const bcmolt_xgpon_gem_port_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_gem_port_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_CFG_ID_CONFIGURATION)) != 0)
+    {
+        if (!bcmolt_gem_port_configuration_bounds_check(&this->configuration))
+        {
+            *failed_prop = BCMOLT_XGPON_GEM_PORT_CFG_ID_CONFIGURATION;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_CFG_ID_ONU_ID)) != 0)
+    {
+        if (this->onu_id > (bcmolt_xgpon_onu_id) 511)
+        {
+            *failed_prop = BCMOLT_XGPON_GEM_PORT_CFG_ID_ONU_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_CFG_ID_GEM_PORT_STATE)) != 0)
+    {
+        switch (this->gem_port_state)
+        {
+            case BCMOLT_XGPON_GEM_PORT_STATE_NOT_CONFIGURED:
+                break;
+            case BCMOLT_XGPON_GEM_PORT_STATE_INACTIVE:
+                break;
+            case BCMOLT_XGPON_GEM_PORT_STATE_ACTIVE:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_GEM_PORT_CFG_ID_GEM_PORT_STATE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_CFG_ID_ENCRYPTION_MODE)) != 0)
+    {
+        switch (this->encryption_mode)
+        {
+            case BCMOLT_CONTROL_STATE_DISABLE:
+                break;
+            case BCMOLT_CONTROL_STATE_ENABLE:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_GEM_PORT_CFG_ID_ENCRYPTION_MODE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_CFG_ID_UPSTREAM_DESTINATION_QUEUE)) != 0)
+    {
+        switch (this->upstream_destination_queue)
+        {
+            case BCMOLT_US_GEM_PORT_DESTINATION_DATA:
+                break;
+            case BCMOLT_US_GEM_PORT_DESTINATION_CPU:
+                break;
+            case BCMOLT_US_GEM_PORT_DESTINATION_OMCI:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_GEM_PORT_CFG_ID_UPSTREAM_DESTINATION_QUEUE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_CFG_ID_CONTROL)) != 0)
+    {
+        switch (this->control)
+        {
+            case BCMOLT_CONTROL_STATE_DISABLE:
+                break;
+            case BCMOLT_CONTROL_STATE_ENABLE:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_GEM_PORT_CFG_ID_CONTROL;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_gem_port_stat_data_set_default(bcmolt_xgpon_gem_port_stat_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_STAT_ID_TX_BYTES)) != 0)
+    {
+        this->tx_bytes = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_STAT_ID_TX_PACKETS)) != 0)
+    {
+        this->tx_packets = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_STAT_ID_RX_PACKETS)) != 0)
+    {
+        this->rx_packets = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_STAT_ID_RX_BYTES)) != 0)
+    {
+        this->rx_bytes = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_stat_data_pack(const bcmolt_xgpon_gem_port_stat_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_STAT_ID_TX_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_STAT_ID_TX_PACKETS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_packets))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_STAT_ID_RX_PACKETS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_packets))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_STAT_ID_RX_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_gem_port_stat_data_get_packed_length(const bcmolt_xgpon_gem_port_stat_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_STAT_ID_TX_BYTES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_STAT_ID_TX_PACKETS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_STAT_ID_RX_PACKETS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_STAT_ID_RX_BYTES)) != 0)
+    {
+        count += 8;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_stat_data_unpack(bcmolt_xgpon_gem_port_stat_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_STAT_ID_TX_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_STAT_ID_TX_PACKETS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_packets))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_STAT_ID_RX_PACKETS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_packets))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_STAT_ID_RX_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_stat_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_STAT_ID_TX_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_STAT_ID_TX_PACKETS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_STAT_ID_RX_PACKETS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_STAT_ID_RX_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_stat_data_bounds_check(const bcmolt_xgpon_gem_port_stat_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_gem_port_stat_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_gem_port_stat_cfg_data_set_default(bcmolt_xgpon_gem_port_stat_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_STAT_CFG_ID_CFG)) != 0)
+    {
+        this->cfg.trigger.type = BCMOLT_STAT_CONDITION_TYPE_NONE;
+        this->cfg.soak.active_soak_time = 0;
+        this->cfg.soak.clear_soak_time = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_stat_cfg_data_pack(const bcmolt_xgpon_gem_port_stat_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_pack(&this->cfg, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_gem_port_stat_cfg_data_get_packed_length(const bcmolt_xgpon_gem_port_stat_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_STAT_CFG_ID_CFG)) != 0)
+    {
+        count += bcmolt_stat_alarm_config_get_packed_length(&this->cfg);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_stat_cfg_data_unpack(bcmolt_xgpon_gem_port_stat_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_unpack(&this->cfg, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_stat_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_stat_cfg_data_bounds_check(const bcmolt_xgpon_gem_port_stat_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_gem_port_stat_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_bounds_check(&this->cfg))
+        {
+            *failed_prop = BCMOLT_XGPON_GEM_PORT_STAT_CFG_ID_CFG;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_gem_port_stat_alarm_cleared_data_set_default(bcmolt_xgpon_gem_port_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        this->stat = BCMOLT_XGPON_GEM_PORT_STAT_ID_TX_BYTES;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_stat_alarm_cleared_data_pack(const bcmolt_xgpon_gem_port_stat_alarm_cleared_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_xgpon_gem_port_stat_id_pack(this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_gem_port_stat_alarm_cleared_data_get_packed_length(const bcmolt_xgpon_gem_port_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_stat_alarm_cleared_data_unpack(bcmolt_xgpon_gem_port_stat_alarm_cleared_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_xgpon_gem_port_stat_id_unpack(&this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_stat_alarm_cleared_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_stat_alarm_cleared_data_bounds_check(const bcmolt_xgpon_gem_port_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_gem_port_stat_alarm_cleared_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        switch (this->stat)
+        {
+            case BCMOLT_XGPON_GEM_PORT_STAT_ID_TX_BYTES:
+                break;
+            case BCMOLT_XGPON_GEM_PORT_STAT_ID_TX_PACKETS:
+                break;
+            case BCMOLT_XGPON_GEM_PORT_STAT_ID_RX_PACKETS:
+                break;
+            case BCMOLT_XGPON_GEM_PORT_STAT_ID_RX_BYTES:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_GEM_PORT_STAT_ALARM_CLEARED_ID_STAT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_gem_port_stat_alarm_raised_data_set_default(bcmolt_xgpon_gem_port_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        this->stat = BCMOLT_XGPON_GEM_PORT_STAT_ID_TX_BYTES;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_stat_alarm_raised_data_pack(const bcmolt_xgpon_gem_port_stat_alarm_raised_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_xgpon_gem_port_stat_id_pack(this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_gem_port_stat_alarm_raised_data_get_packed_length(const bcmolt_xgpon_gem_port_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_stat_alarm_raised_data_unpack(bcmolt_xgpon_gem_port_stat_alarm_raised_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_xgpon_gem_port_stat_id_unpack(&this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_stat_alarm_raised_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_stat_alarm_raised_data_bounds_check(const bcmolt_xgpon_gem_port_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_gem_port_stat_alarm_raised_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        switch (this->stat)
+        {
+            case BCMOLT_XGPON_GEM_PORT_STAT_ID_TX_BYTES:
+                break;
+            case BCMOLT_XGPON_GEM_PORT_STAT_ID_TX_PACKETS:
+                break;
+            case BCMOLT_XGPON_GEM_PORT_STAT_ID_RX_PACKETS:
+                break;
+            case BCMOLT_XGPON_GEM_PORT_STAT_ID_RX_BYTES:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_GEM_PORT_STAT_ALARM_RAISED_ID_STAT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_gem_port_auto_cfg_data_set_default(bcmolt_xgpon_gem_port_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        this->stat_alarm_cleared = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        this->stat_alarm_raised = BCMOS_FALSE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_auto_cfg_data_pack(const bcmolt_xgpon_gem_port_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->stat_alarm_cleared))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->stat_alarm_raised))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_gem_port_auto_cfg_data_get_packed_length(const bcmolt_xgpon_gem_port_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_auto_cfg_data_unpack(bcmolt_xgpon_gem_port_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->stat_alarm_cleared))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->stat_alarm_raised))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_GEM_PORT_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_gem_port_auto_cfg_data_bounds_check(const bcmolt_xgpon_gem_port_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_gem_port_auto_cfg_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_iwf_key_set_default(bcmolt_xgpon_iwf_key *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_IWF_KEY_ID_PON_NI)) != 0)
+    {
+        this->pon_ni = (bcmolt_xgpon_ni) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_iwf_key_pack(const bcmolt_xgpon_iwf_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_IWF_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, (uint8_t) this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_iwf_key_get_packed_length(const bcmolt_xgpon_iwf_key *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_IWF_KEY_ID_PON_NI)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_iwf_key_unpack(bcmolt_xgpon_iwf_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_IWF_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, (uint8_t *) &this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_iwf_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_IWF_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_iwf_key_bounds_check(const bcmolt_xgpon_iwf_key *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_iwf_key_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_IWF_KEY_ID_PON_NI)) != 0)
+    {
+        if (this->pon_ni > (bcmolt_xgpon_ni) 7)
+        {
+            *failed_prop = BCMOLT_XGPON_IWF_KEY_ID_PON_NI;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_iwf_cfg_data_set_default(bcmolt_xgpon_iwf_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_IWF_CFG_ID_US_OTAG_DIRECT_TPID)) != 0)
+    {
+        this->us_otag_direct_tpid = 33024U;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_IWF_CFG_ID_DS_TPID)) != 0)
+    {
+        this->ds_tpid.arr[0] = 33024U;
+        this->ds_tpid.arr[1] = 34984U;
+        this->ds_tpid.arr[2] = 37120U;
+        this->ds_tpid.arr[3] = 37376U;
+        this->ds_tpid.arr[4] = 33024U;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_iwf_cfg_data_pack(const bcmolt_xgpon_iwf_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_IWF_CFG_ID_US_OTAG_DIRECT_TPID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, this->us_otag_direct_tpid))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_IWF_CFG_ID_DS_TPID)) != 0)
+    {
+        if (!bcmolt_arr_u16_5_hex_pack(&this->ds_tpid, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_iwf_cfg_data_get_packed_length(const bcmolt_xgpon_iwf_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_IWF_CFG_ID_US_OTAG_DIRECT_TPID)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_IWF_CFG_ID_DS_TPID)) != 0)
+    {
+        count += 10;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_iwf_cfg_data_unpack(bcmolt_xgpon_iwf_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_IWF_CFG_ID_US_OTAG_DIRECT_TPID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, &this->us_otag_direct_tpid))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_IWF_CFG_ID_DS_TPID)) != 0)
+    {
+        if (!bcmolt_arr_u16_5_hex_unpack(&this->ds_tpid, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_iwf_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_IWF_CFG_ID_US_OTAG_DIRECT_TPID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_IWF_CFG_ID_DS_TPID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 10))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_iwf_cfg_data_bounds_check(const bcmolt_xgpon_iwf_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_iwf_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_IWF_CFG_ID_DS_TPID)) != 0)
+    {
+        if (!bcmolt_arr_u16_5_hex_bounds_check(&this->ds_tpid))
+        {
+            *failed_prop = BCMOLT_XGPON_IWF_CFG_ID_DS_TPID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_ni_key_set_default(bcmolt_xgpon_ni_key *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_KEY_ID_PON_NI)) != 0)
+    {
+        this->pon_ni = (bcmolt_xgpon_ni) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_key_pack(const bcmolt_xgpon_ni_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, (uint8_t) this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_ni_key_get_packed_length(const bcmolt_xgpon_ni_key *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_KEY_ID_PON_NI)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_key_unpack(bcmolt_xgpon_ni_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, (uint8_t *) &this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_key_bounds_check(const bcmolt_xgpon_ni_key *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_key_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_KEY_ID_PON_NI)) != 0)
+    {
+        if (this->pon_ni > (bcmolt_xgpon_ni) 7)
+        {
+            *failed_prop = BCMOLT_XGPON_NI_KEY_ID_PON_NI;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_ni_cfg_data_set_default(bcmolt_xgpon_ni_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_HW_PON_ID)) != 0)
+    {
+        this->hw_pon_id.pon_id_1 = 0;
+        this->hw_pon_id.pon_id_2 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_AVAILABLE_BANDWIDTH)) != 0)
+    {
+        this->available_bandwidth.cbr_bw = 0;
+        this->available_bandwidth.total_bw = 0;
+        this->available_bandwidth.next_onu_total_bw = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_NUMBER_OF_ACTIVE_ONUS)) != 0)
+    {
+        this->number_of_active_onus = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PON_STATUS)) != 0)
+    {
+        this->pon_status.state = BCMOLT_PON_STATE_INACTIVE;
+        this->pon_status.los_status = BCMOLT_STATUS_OFF;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PON_DISTANCE)) != 0)
+    {
+        this->pon_distance.max_log_distance = 20;
+        this->pon_distance.max_diff_reach = 20;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_RANGING_WINDOW_SIZE)) != 0)
+    {
+        this->ranging_window_size = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_EQD_CYCLES_NUMBER)) != 0)
+    {
+        this->eqd_cycles_number = 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_DRIFT_CONTROL)) != 0)
+    {
+        this->drift_control.drift_interval = 1000;
+        this->drift_control.drift_limit = 8;
+        this->drift_control.transmission_control_limit = 16;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_LOS_ALARM_THRESHOLD)) != 0)
+    {
+        this->los_alarm_threshold = 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_LOS_INITIAL_VALUE)) != 0)
+    {
+        this->los_initial_value = BCMOLT_STATUS_OFF;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_ONU_ALARMS_THRESHOLDS)) != 0)
+    {
+        this->onu_alarms_thresholds.losi = 4;
+        this->onu_alarms_thresholds.lobi = 4;
+        this->onu_alarms_thresholds.looci = 3;
+        this->onu_alarms_thresholds.lopci = 3;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_BER_MONITOR)) != 0)
+    {
+        this->ber_monitor.us_ber_interval = 5000;
+        this->ber_monitor.sf_threshold = 3;
+        this->ber_monitor.sd_threshold = 5;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_ONU_ACTIVATION)) != 0)
+    {
+        this->onu_activation.key_exchange = BCMOLT_CONTROL_STATE_DISABLE;
+        this->onu_activation.fail_due_to_regis_auto_fail = BCMOLT_CONTROL_STATE_ENABLE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_SN_ACQUISITION)) != 0)
+    {
+        this->sn_acquisition.interval = 1000;
+        this->sn_acquisition.control = BCMOLT_CONTROL_STATE_DISABLE;
+        this->sn_acquisition.onu_post_discovery_mode = BCMOLT_ONU_POST_DISCOVERY_MODE_NONE;
+        this->sn_acquisition.burst_profile = (bcmolt_burst_profile_index) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_KEY_EXCHANGE)) != 0)
+    {
+        this->key_exchange.interval = 10000;
+        this->key_exchange.control = BCMOLT_CONTROL_STATE_DISABLE;
+        this->key_exchange.encrypted_ports_only = BCMOLT_CONTROL_STATE_DISABLE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PROTECTION_SWITCHING)) != 0)
+    {
+        this->protection_switching.timeout = 100;
+        this->protection_switching.gpio_pin = BCMOLT_GPIO_PIN_UNCONFIGURED;
+        this->protection_switching.fast_ranging = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PROTECTION_SWITCHING_DEBUG)) != 0)
+    {
+        this->protection_switching_debug.data_map_delay_ms = 0;
+        this->protection_switching_debug.rerange_send_ranging_time = BCMOS_FALSE;
+        this->protection_switching_debug.rerange_send_ranging_time_delay = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_CBR_RT_ALLOCATION_PROFILE)) != 0)
+    {
+        this->cbr_rt_allocation_profile.ma_7 = 64;
+        this->cbr_rt_allocation_profile.ma_3 = 256;
+        this->cbr_rt_allocation_profile.ma_1 = 512;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_CBR_NRT_ALLOCATION_PROFILE)) != 0)
+    {
+        this->cbr_nrt_allocation_profile.arr[0] = 4096;
+        this->cbr_nrt_allocation_profile.arr[1] = 8192;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_POWER_MANAGEMENT)) != 0)
+    {
+        this->power_management.ilowpower = 1600;
+        this->power_management.iaware = 160;
+        this->power_management.itransinit = 80;
+        this->power_management.itxinit = 40;
+        this->power_management.irxoff = 1600;
+        this->power_management.low_power_clobi = 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_ROGUE_ONU_DETECTION_PROCESS)) != 0)
+    {
+        this->rogue_onu_detection_process.control = BCMOLT_CONTROL_STATE_DISABLE;
+        this->rogue_onu_detection_process.detection_algorithm.algorithm_type = BCMOLT_ROGUE_DETECTION_ALGORITHM_TYPE_EARLY_ROGUE_DETECTION;
+        this->rogue_onu_detection_process.detection_algorithm.u.early_rogue_detection.measurement_type = BCMOLT_ROGUE_DETECTION_WINDOW_SILENT_WINDOW;
+        this->rogue_onu_detection_process.detection_algorithm.u.early_rogue_detection.interval = 10000;
+        this->rogue_onu_detection_process.detection_algorithm.u.early_rogue_detection.second_ranging_window = BCMOS_FALSE;
+        this->rogue_onu_detection_process.detection_algorithm.u.early_rogue_detection.alloc_type_to_scan = BCMOLT_ALLOC_TYPE_TO_SCAN_ALL;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PERIODIC_STANDBY_PON_MONITORING)) != 0)
+    {
+        this->periodic_standby_pon_monitoring.interval = 5000;
+        this->periodic_standby_pon_monitoring.control = BCMOLT_CONTROL_STATE_DISABLE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_DBA_MODE)) != 0)
+    {
+        this->dba_mode = BCMOLT_DBA_MODE_NORMAL;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PLOAM_HANDLING)) != 0)
+    {
+        this->ploam_handling.ack_timeout = 2000;
+        this->ploam_handling.retrans_ranging_time = 0;
+        this->ploam_handling.retrans_assign_alloc_id = 0;
+        this->ploam_handling.retrans_key_control = 0;
+        this->ploam_handling.retrans_request_registration = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_MIN_DATA_ALLOC_ID)) != 0)
+    {
+        this->min_data_alloc_id = (bcmolt_xgpon_alloc_id) 1024;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_MIN_DATA_GEM_PORT_ID)) != 0)
+    {
+        this->min_data_gem_port_id = (bcmolt_xgpon_gem_id) 1024;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_MULTICAST_KEY)) != 0)
+    {
+        memset(this->multicast_key.key.bytes, 0, sizeof(this->multicast_key.key.bytes));
+        this->multicast_key.key_control = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PRBS_CHECKER)) != 0)
+    {
+        this->prbs_checker.polynom = BCMOLT_PRBS_POLYNOMIAL_PRBS_7;
+        this->prbs_checker.mode = BCMOLT_PRBS_CHECKER_MODE_SELF_SYNC;
+        this->prbs_checker.data_invert = BCMOS_FALSE;
+        this->prbs_checker.control = BCMOLT_CONTROL_STATE_DISABLE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PRBS_GENERATOR)) != 0)
+    {
+        this->prbs_generator.polynom = BCMOLT_PRBS_POLYNOMIAL_PRBS_7;
+        this->prbs_generator.error_insert = BCMOS_FALSE;
+        this->prbs_generator.invert = BCMOS_FALSE;
+        this->prbs_generator.control = BCMOLT_CONTROL_STATE_DISABLE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PRBS_STATUS)) != 0)
+    {
+        this->prbs_status.lock_state = BCMOLT_PRBS_LOCK_STATE_UNLOCKED;
+        this->prbs_status.error_counts = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_AUTOMATIC_ONU_DEACTIVATION)) != 0)
+    {
+        this->automatic_onu_deactivation.los = BCMOS_FALSE;
+        this->automatic_onu_deactivation.onu_alarms = BCMOS_FALSE;
+        this->automatic_onu_deactivation.tiwi = BCMOS_FALSE;
+        this->automatic_onu_deactivation.ack_timeout = BCMOS_FALSE;
+        this->automatic_onu_deactivation.sfi = BCMOS_FALSE;
+        this->automatic_onu_deactivation.loki = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_US_BANDWIDTH_LIMIT)) != 0)
+    {
+        this->us_bandwidth_limit = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_ALL_ONUS)) != 0)
+    {
+        this->all_onus.len = 0;
+        this->all_onus.val = NULL;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_ALL_MCAST_GEM_PORTS)) != 0)
+    {
+        this->all_mcast_gem_ports.len = 0;
+        this->all_mcast_gem_ports.val = NULL;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_DEBUG)) != 0)
+    {
+        this->debug.increase_available_cbr_bw = BCMOS_FALSE;
+        this->debug.inter_burst_gap_in_bytes = 512;
+        this->debug.number_of_gem_ports_per_onu = 64;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_ONU_UPGRADE_PARAMS)) != 0)
+    {
+        this->onu_upgrade_params.response_timeout_ms = 1000;
+        this->onu_upgrade_params.max_retry_count = 23;
+        this->onu_upgrade_params.omci_format = BCMOLT_OMCI_DEVICE_ID_EXTENDED;
+        this->onu_upgrade_params.window_size = 32;
+        this->onu_upgrade_params.activate_commit = BCMOS_FALSE;
+        this->onu_upgrade_params.delay_for_commit_ms = 40000UL;
+        this->onu_upgrade_params.max_activation_attempts = 23;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_DS_FEC_MODE)) != 0)
+    {
+        this->ds_fec_mode = BCMOLT_CONTROL_STATE_ENABLE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_DBA_TYPE)) != 0)
+    {
+        this->dba_type = BCMOLT_DBA_TYPE_INTERNAL;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_ONU_TUNING)) != 0)
+    {
+        this->onu_tuning.tsource = 1000;
+        this->onu_tuning.ttarget = 1000;
+        this->onu_tuning.request_registration_required = BCMOS_TRUE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_cfg_data_pack(const bcmolt_xgpon_ni_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_HW_PON_ID)) != 0)
+    {
+        if (!bcmolt_hw_pon_id_pack(&this->hw_pon_id, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_AVAILABLE_BANDWIDTH)) != 0)
+    {
+        if (!bcmolt_pon_available_bandwidth_pack(&this->available_bandwidth, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_NUMBER_OF_ACTIVE_ONUS)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, this->number_of_active_onus))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PON_STATUS)) != 0)
+    {
+        if (!bcmolt_pon_status_pack(&this->pon_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PON_DISTANCE)) != 0)
+    {
+        if (!bcmolt_pon_distance_pack(&this->pon_distance, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_RANGING_WINDOW_SIZE)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->ranging_window_size))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_EQD_CYCLES_NUMBER)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->eqd_cycles_number))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_DRIFT_CONTROL)) != 0)
+    {
+        if (!bcmolt_pon_drift_control_pack(&this->drift_control, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_LOS_ALARM_THRESHOLD)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->los_alarm_threshold))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_LOS_INITIAL_VALUE)) != 0)
+    {
+        if (!bcmolt_status_pack(this->los_initial_value, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_ONU_ALARMS_THRESHOLDS)) != 0)
+    {
+        if (!bcmolt_xgpon_onu_alarms_thresholds_pack(&this->onu_alarms_thresholds, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_BER_MONITOR)) != 0)
+    {
+        if (!bcmolt_ber_monitor_params_pack(&this->ber_monitor, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_ONU_ACTIVATION)) != 0)
+    {
+        if (!bcmolt_xgpon_onu_activation_pack(&this->onu_activation, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_SN_ACQUISITION)) != 0)
+    {
+        if (!bcmolt_xgpon_sn_acquisition_pack(&this->sn_acquisition, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_KEY_EXCHANGE)) != 0)
+    {
+        if (!bcmolt_xgpon_key_exchange_pack(&this->key_exchange, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PROTECTION_SWITCHING)) != 0)
+    {
+        if (!bcmolt_xgpon_protection_switching_pack(&this->protection_switching, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PROTECTION_SWITCHING_DEBUG)) != 0)
+    {
+        if (!bcmolt_xgpon_protection_switching_debug_pack(&this->protection_switching_debug, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_CBR_RT_ALLOCATION_PROFILE)) != 0)
+    {
+        if (!bcmolt_cbr_rt_allocation_profile_pack(&this->cbr_rt_allocation_profile, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_CBR_NRT_ALLOCATION_PROFILE)) != 0)
+    {
+        if (!bcmolt_arr_u16_2_pack(&this->cbr_nrt_allocation_profile, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_POWER_MANAGEMENT)) != 0)
+    {
+        if (!bcmolt_onu_power_management_configuration_pack(&this->power_management, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_ROGUE_ONU_DETECTION_PROCESS)) != 0)
+    {
+        if (!bcmolt_rogue_onu_detection_process_pack(&this->rogue_onu_detection_process, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PERIODIC_STANDBY_PON_MONITORING)) != 0)
+    {
+        if (!bcmolt_periodic_standby_pon_monitoring_pack(&this->periodic_standby_pon_monitoring, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_DBA_MODE)) != 0)
+    {
+        if (!bcmolt_dba_mode_pack(this->dba_mode, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PLOAM_HANDLING)) != 0)
+    {
+        if (!bcmolt_xgpon_ploam_handling_pack(&this->ploam_handling, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_MIN_DATA_ALLOC_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->min_data_alloc_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_MIN_DATA_GEM_PORT_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->min_data_gem_port_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_MULTICAST_KEY)) != 0)
+    {
+        if (!bcmolt_xgpon_multicast_key_pack(&this->multicast_key, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PRBS_CHECKER)) != 0)
+    {
+        if (!bcmolt_prbs_checker_config_pack(&this->prbs_checker, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PRBS_GENERATOR)) != 0)
+    {
+        if (!bcmolt_prbs_generator_config_pack(&this->prbs_generator, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PRBS_STATUS)) != 0)
+    {
+        if (!bcmolt_prbs_status_pack(&this->prbs_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_AUTOMATIC_ONU_DEACTIVATION)) != 0)
+    {
+        if (!bcmolt_automatic_onu_deactivation_pack(&this->automatic_onu_deactivation, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_US_BANDWIDTH_LIMIT)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->us_bandwidth_limit))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_ALL_ONUS)) != 0)
+    {
+        if (!bcmolt_xgpon_onu_with_state_list_u16_max_510_pack(&this->all_onus, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_ALL_MCAST_GEM_PORTS)) != 0)
+    {
+        if (!bcmolt_xgpon_gem_port_with_state_list_u16_max_128_pack(&this->all_mcast_gem_ports, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_DEBUG)) != 0)
+    {
+        if (!bcmolt_xgpon_ni_debug_pack(&this->debug, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_ONU_UPGRADE_PARAMS)) != 0)
+    {
+        if (!bcmolt_gpon_onu_upgrade_params_pack(&this->onu_upgrade_params, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_DS_FEC_MODE)) != 0)
+    {
+        if (!bcmolt_control_state_pack(this->ds_fec_mode, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_DBA_TYPE)) != 0)
+    {
+        if (!bcmolt_dba_type_pack(this->dba_type, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_ONU_TUNING)) != 0)
+    {
+        if (!bcmolt_onu_tuning_configuration_pack(&this->onu_tuning, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_ni_cfg_data_get_packed_length(const bcmolt_xgpon_ni_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_HW_PON_ID)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_AVAILABLE_BANDWIDTH)) != 0)
+    {
+        count += 12;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_NUMBER_OF_ACTIVE_ONUS)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PON_STATUS)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PON_DISTANCE)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_RANGING_WINDOW_SIZE)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_EQD_CYCLES_NUMBER)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_DRIFT_CONTROL)) != 0)
+    {
+        count += 6;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_LOS_ALARM_THRESHOLD)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_LOS_INITIAL_VALUE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_ONU_ALARMS_THRESHOLDS)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_BER_MONITOR)) != 0)
+    {
+        count += 6;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_ONU_ACTIVATION)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_SN_ACQUISITION)) != 0)
+    {
+        count += 7;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_KEY_EXCHANGE)) != 0)
+    {
+        count += 6;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PROTECTION_SWITCHING)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PROTECTION_SWITCHING_DEBUG)) != 0)
+    {
+        count += 5;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_CBR_RT_ALLOCATION_PROFILE)) != 0)
+    {
+        count += 6;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_CBR_NRT_ALLOCATION_PROFILE)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_POWER_MANAGEMENT)) != 0)
+    {
+        count += 18;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_ROGUE_ONU_DETECTION_PROCESS)) != 0)
+    {
+        count += bcmolt_rogue_onu_detection_process_get_packed_length(&this->rogue_onu_detection_process);
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PERIODIC_STANDBY_PON_MONITORING)) != 0)
+    {
+        count += 5;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_DBA_MODE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PLOAM_HANDLING)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_MIN_DATA_ALLOC_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_MIN_DATA_GEM_PORT_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_MULTICAST_KEY)) != 0)
+    {
+        count += 17;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PRBS_CHECKER)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PRBS_GENERATOR)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PRBS_STATUS)) != 0)
+    {
+        count += 5;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_AUTOMATIC_ONU_DEACTIVATION)) != 0)
+    {
+        count += 6;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_US_BANDWIDTH_LIMIT)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_ALL_ONUS)) != 0)
+    {
+        count += bcmolt_xgpon_onu_with_state_list_u16_max_510_get_packed_length(&this->all_onus);
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_ALL_MCAST_GEM_PORTS)) != 0)
+    {
+        count += bcmolt_xgpon_gem_port_with_state_list_u16_max_128_get_packed_length(&this->all_mcast_gem_ports);
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_DEBUG)) != 0)
+    {
+        count += 5;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_ONU_UPGRADE_PARAMS)) != 0)
+    {
+        count += 14;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_DS_FEC_MODE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_DBA_TYPE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_ONU_TUNING)) != 0)
+    {
+        count += 9;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_cfg_data_unpack(bcmolt_xgpon_ni_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_HW_PON_ID)) != 0)
+    {
+        if (!bcmolt_hw_pon_id_unpack(&this->hw_pon_id, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_AVAILABLE_BANDWIDTH)) != 0)
+    {
+        if (!bcmolt_pon_available_bandwidth_unpack(&this->available_bandwidth, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_NUMBER_OF_ACTIVE_ONUS)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, &this->number_of_active_onus))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PON_STATUS)) != 0)
+    {
+        if (!bcmolt_pon_status_unpack(&this->pon_status, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PON_DISTANCE)) != 0)
+    {
+        if (!bcmolt_pon_distance_unpack(&this->pon_distance, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_RANGING_WINDOW_SIZE)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->ranging_window_size))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_EQD_CYCLES_NUMBER)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->eqd_cycles_number))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_DRIFT_CONTROL)) != 0)
+    {
+        if (!bcmolt_pon_drift_control_unpack(&this->drift_control, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_LOS_ALARM_THRESHOLD)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->los_alarm_threshold))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_LOS_INITIAL_VALUE)) != 0)
+    {
+        if (!bcmolt_status_unpack(&this->los_initial_value, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_ONU_ALARMS_THRESHOLDS)) != 0)
+    {
+        if (!bcmolt_xgpon_onu_alarms_thresholds_unpack(&this->onu_alarms_thresholds, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_BER_MONITOR)) != 0)
+    {
+        if (!bcmolt_ber_monitor_params_unpack(&this->ber_monitor, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_ONU_ACTIVATION)) != 0)
+    {
+        if (!bcmolt_xgpon_onu_activation_unpack(&this->onu_activation, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_SN_ACQUISITION)) != 0)
+    {
+        if (!bcmolt_xgpon_sn_acquisition_unpack(&this->sn_acquisition, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_KEY_EXCHANGE)) != 0)
+    {
+        if (!bcmolt_xgpon_key_exchange_unpack(&this->key_exchange, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PROTECTION_SWITCHING)) != 0)
+    {
+        if (!bcmolt_xgpon_protection_switching_unpack(&this->protection_switching, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PROTECTION_SWITCHING_DEBUG)) != 0)
+    {
+        if (!bcmolt_xgpon_protection_switching_debug_unpack(&this->protection_switching_debug, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_CBR_RT_ALLOCATION_PROFILE)) != 0)
+    {
+        if (!bcmolt_cbr_rt_allocation_profile_unpack(&this->cbr_rt_allocation_profile, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_CBR_NRT_ALLOCATION_PROFILE)) != 0)
+    {
+        if (!bcmolt_arr_u16_2_unpack(&this->cbr_nrt_allocation_profile, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_POWER_MANAGEMENT)) != 0)
+    {
+        if (!bcmolt_onu_power_management_configuration_unpack(&this->power_management, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_ROGUE_ONU_DETECTION_PROCESS)) != 0)
+    {
+        if (!bcmolt_rogue_onu_detection_process_unpack(&this->rogue_onu_detection_process, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PERIODIC_STANDBY_PON_MONITORING)) != 0)
+    {
+        if (!bcmolt_periodic_standby_pon_monitoring_unpack(&this->periodic_standby_pon_monitoring, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_DBA_MODE)) != 0)
+    {
+        if (!bcmolt_dba_mode_unpack(&this->dba_mode, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PLOAM_HANDLING)) != 0)
+    {
+        if (!bcmolt_xgpon_ploam_handling_unpack(&this->ploam_handling, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_MIN_DATA_ALLOC_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->min_data_alloc_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_MIN_DATA_GEM_PORT_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->min_data_gem_port_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_MULTICAST_KEY)) != 0)
+    {
+        if (!bcmolt_xgpon_multicast_key_unpack(&this->multicast_key, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PRBS_CHECKER)) != 0)
+    {
+        if (!bcmolt_prbs_checker_config_unpack(&this->prbs_checker, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PRBS_GENERATOR)) != 0)
+    {
+        if (!bcmolt_prbs_generator_config_unpack(&this->prbs_generator, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PRBS_STATUS)) != 0)
+    {
+        if (!bcmolt_prbs_status_unpack(&this->prbs_status, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_AUTOMATIC_ONU_DEACTIVATION)) != 0)
+    {
+        if (!bcmolt_automatic_onu_deactivation_unpack(&this->automatic_onu_deactivation, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_US_BANDWIDTH_LIMIT)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->us_bandwidth_limit))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_ALL_ONUS)) != 0)
+    {
+        if (!bcmolt_xgpon_onu_with_state_list_u16_max_510_unpack(&this->all_onus, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_ALL_MCAST_GEM_PORTS)) != 0)
+    {
+        if (!bcmolt_xgpon_gem_port_with_state_list_u16_max_128_unpack(&this->all_mcast_gem_ports, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_DEBUG)) != 0)
+    {
+        if (!bcmolt_xgpon_ni_debug_unpack(&this->debug, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_ONU_UPGRADE_PARAMS)) != 0)
+    {
+        if (!bcmolt_gpon_onu_upgrade_params_unpack(&this->onu_upgrade_params, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_DS_FEC_MODE)) != 0)
+    {
+        if (!bcmolt_control_state_unpack(&this->ds_fec_mode, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_DBA_TYPE)) != 0)
+    {
+        if (!bcmolt_dba_type_unpack(&this->dba_type, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_ONU_TUNING)) != 0)
+    {
+        if (!bcmolt_onu_tuning_configuration_unpack(&this->onu_tuning, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_HW_PON_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_AVAILABLE_BANDWIDTH)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 12))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_NUMBER_OF_ACTIVE_ONUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PON_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PON_DISTANCE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_RANGING_WINDOW_SIZE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_EQD_CYCLES_NUMBER)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_DRIFT_CONTROL)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 6))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_LOS_ALARM_THRESHOLD)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_LOS_INITIAL_VALUE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_ONU_ALARMS_THRESHOLDS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_BER_MONITOR)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 6))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_ONU_ACTIVATION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_SN_ACQUISITION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 7))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_KEY_EXCHANGE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 6))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PROTECTION_SWITCHING)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PROTECTION_SWITCHING_DEBUG)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 5))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_CBR_RT_ALLOCATION_PROFILE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 6))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_CBR_NRT_ALLOCATION_PROFILE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_POWER_MANAGEMENT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 18))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_ROGUE_ONU_DETECTION_PROCESS)) != 0)
+    {
+        if (!bcmolt_rogue_onu_detection_process_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PERIODIC_STANDBY_PON_MONITORING)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 5))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_DBA_MODE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PLOAM_HANDLING)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_MIN_DATA_ALLOC_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_MIN_DATA_GEM_PORT_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_MULTICAST_KEY)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 17))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PRBS_CHECKER)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PRBS_GENERATOR)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PRBS_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 5))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_AUTOMATIC_ONU_DEACTIVATION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 6))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_US_BANDWIDTH_LIMIT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_ALL_ONUS)) != 0)
+    {
+        if (!bcmolt_xgpon_onu_with_state_list_u16_max_510_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_ALL_MCAST_GEM_PORTS)) != 0)
+    {
+        if (!bcmolt_xgpon_gem_port_with_state_list_u16_max_128_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_DEBUG)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 5))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_ONU_UPGRADE_PARAMS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 14))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_DS_FEC_MODE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_DBA_TYPE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_ONU_TUNING)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 9))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_cfg_data_bounds_check(const bcmolt_xgpon_ni_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_HW_PON_ID)) != 0)
+    {
+        if (!bcmolt_hw_pon_id_bounds_check(&this->hw_pon_id))
+        {
+            *failed_prop = BCMOLT_XGPON_NI_CFG_ID_HW_PON_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_AVAILABLE_BANDWIDTH)) != 0)
+    {
+        if (!bcmolt_pon_available_bandwidth_bounds_check(&this->available_bandwidth))
+        {
+            *failed_prop = BCMOLT_XGPON_NI_CFG_ID_AVAILABLE_BANDWIDTH;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PON_STATUS)) != 0)
+    {
+        if (!bcmolt_pon_status_bounds_check(&this->pon_status))
+        {
+            *failed_prop = BCMOLT_XGPON_NI_CFG_ID_PON_STATUS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PON_DISTANCE)) != 0)
+    {
+        if (!bcmolt_pon_distance_bounds_check(&this->pon_distance))
+        {
+            *failed_prop = BCMOLT_XGPON_NI_CFG_ID_PON_DISTANCE;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_EQD_CYCLES_NUMBER)) != 0)
+    {
+        if (this->eqd_cycles_number > 255)
+        {
+            *failed_prop = BCMOLT_XGPON_NI_CFG_ID_EQD_CYCLES_NUMBER;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_DRIFT_CONTROL)) != 0)
+    {
+        if (!bcmolt_pon_drift_control_bounds_check(&this->drift_control))
+        {
+            *failed_prop = BCMOLT_XGPON_NI_CFG_ID_DRIFT_CONTROL;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_LOS_INITIAL_VALUE)) != 0)
+    {
+        switch (this->los_initial_value)
+        {
+            case BCMOLT_STATUS_OFF:
+                break;
+            case BCMOLT_STATUS_ON:
+                break;
+            case BCMOLT_STATUS_NO_CHANGE:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_NI_CFG_ID_LOS_INITIAL_VALUE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_ONU_ALARMS_THRESHOLDS)) != 0)
+    {
+        if (!bcmolt_xgpon_onu_alarms_thresholds_bounds_check(&this->onu_alarms_thresholds))
+        {
+            *failed_prop = BCMOLT_XGPON_NI_CFG_ID_ONU_ALARMS_THRESHOLDS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_BER_MONITOR)) != 0)
+    {
+        if (!bcmolt_ber_monitor_params_bounds_check(&this->ber_monitor))
+        {
+            *failed_prop = BCMOLT_XGPON_NI_CFG_ID_BER_MONITOR;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_ONU_ACTIVATION)) != 0)
+    {
+        if (!bcmolt_xgpon_onu_activation_bounds_check(&this->onu_activation))
+        {
+            *failed_prop = BCMOLT_XGPON_NI_CFG_ID_ONU_ACTIVATION;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_SN_ACQUISITION)) != 0)
+    {
+        if (!bcmolt_xgpon_sn_acquisition_bounds_check(&this->sn_acquisition))
+        {
+            *failed_prop = BCMOLT_XGPON_NI_CFG_ID_SN_ACQUISITION;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_KEY_EXCHANGE)) != 0)
+    {
+        if (!bcmolt_xgpon_key_exchange_bounds_check(&this->key_exchange))
+        {
+            *failed_prop = BCMOLT_XGPON_NI_CFG_ID_KEY_EXCHANGE;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PROTECTION_SWITCHING)) != 0)
+    {
+        if (!bcmolt_xgpon_protection_switching_bounds_check(&this->protection_switching))
+        {
+            *failed_prop = BCMOLT_XGPON_NI_CFG_ID_PROTECTION_SWITCHING;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PROTECTION_SWITCHING_DEBUG)) != 0)
+    {
+        if (!bcmolt_xgpon_protection_switching_debug_bounds_check(&this->protection_switching_debug))
+        {
+            *failed_prop = BCMOLT_XGPON_NI_CFG_ID_PROTECTION_SWITCHING_DEBUG;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_CBR_RT_ALLOCATION_PROFILE)) != 0)
+    {
+        if (!bcmolt_cbr_rt_allocation_profile_bounds_check(&this->cbr_rt_allocation_profile))
+        {
+            *failed_prop = BCMOLT_XGPON_NI_CFG_ID_CBR_RT_ALLOCATION_PROFILE;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_CBR_NRT_ALLOCATION_PROFILE)) != 0)
+    {
+        if (!bcmolt_arr_u16_2_bounds_check(&this->cbr_nrt_allocation_profile))
+        {
+            *failed_prop = BCMOLT_XGPON_NI_CFG_ID_CBR_NRT_ALLOCATION_PROFILE;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_POWER_MANAGEMENT)) != 0)
+    {
+        if (!bcmolt_onu_power_management_configuration_bounds_check(&this->power_management))
+        {
+            *failed_prop = BCMOLT_XGPON_NI_CFG_ID_POWER_MANAGEMENT;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_ROGUE_ONU_DETECTION_PROCESS)) != 0)
+    {
+        if (!bcmolt_rogue_onu_detection_process_bounds_check(&this->rogue_onu_detection_process))
+        {
+            *failed_prop = BCMOLT_XGPON_NI_CFG_ID_ROGUE_ONU_DETECTION_PROCESS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PERIODIC_STANDBY_PON_MONITORING)) != 0)
+    {
+        if (!bcmolt_periodic_standby_pon_monitoring_bounds_check(&this->periodic_standby_pon_monitoring))
+        {
+            *failed_prop = BCMOLT_XGPON_NI_CFG_ID_PERIODIC_STANDBY_PON_MONITORING;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_DBA_MODE)) != 0)
+    {
+        switch (this->dba_mode)
+        {
+            case BCMOLT_DBA_MODE_NORMAL:
+                break;
+            case BCMOLT_DBA_MODE_EXTENDED:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_NI_CFG_ID_DBA_MODE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PLOAM_HANDLING)) != 0)
+    {
+        if (!bcmolt_xgpon_ploam_handling_bounds_check(&this->ploam_handling))
+        {
+            *failed_prop = BCMOLT_XGPON_NI_CFG_ID_PLOAM_HANDLING;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_MIN_DATA_ALLOC_ID)) != 0)
+    {
+        if (this->min_data_alloc_id < (bcmolt_xgpon_alloc_id) 1024)
+        {
+            *failed_prop = BCMOLT_XGPON_NI_CFG_ID_MIN_DATA_ALLOC_ID;
+            return BCMOS_FALSE;
+        }
+
+        if (this->min_data_alloc_id > (bcmolt_xgpon_alloc_id) 14591)
+        {
+            *failed_prop = BCMOLT_XGPON_NI_CFG_ID_MIN_DATA_ALLOC_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_MIN_DATA_GEM_PORT_ID)) != 0)
+    {
+        if (this->min_data_gem_port_id < (bcmolt_xgpon_gem_id) 1024)
+        {
+            *failed_prop = BCMOLT_XGPON_NI_CFG_ID_MIN_DATA_GEM_PORT_ID;
+            return BCMOS_FALSE;
+        }
+
+        if (this->min_data_gem_port_id > (bcmolt_xgpon_gem_id) 57598U)
+        {
+            *failed_prop = BCMOLT_XGPON_NI_CFG_ID_MIN_DATA_GEM_PORT_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_MULTICAST_KEY)) != 0)
+    {
+        if (!bcmolt_xgpon_multicast_key_bounds_check(&this->multicast_key))
+        {
+            *failed_prop = BCMOLT_XGPON_NI_CFG_ID_MULTICAST_KEY;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PRBS_CHECKER)) != 0)
+    {
+        if (!bcmolt_prbs_checker_config_bounds_check(&this->prbs_checker))
+        {
+            *failed_prop = BCMOLT_XGPON_NI_CFG_ID_PRBS_CHECKER;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PRBS_GENERATOR)) != 0)
+    {
+        if (!bcmolt_prbs_generator_config_bounds_check(&this->prbs_generator))
+        {
+            *failed_prop = BCMOLT_XGPON_NI_CFG_ID_PRBS_GENERATOR;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_PRBS_STATUS)) != 0)
+    {
+        if (!bcmolt_prbs_status_bounds_check(&this->prbs_status))
+        {
+            *failed_prop = BCMOLT_XGPON_NI_CFG_ID_PRBS_STATUS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_AUTOMATIC_ONU_DEACTIVATION)) != 0)
+    {
+        if (!bcmolt_automatic_onu_deactivation_bounds_check(&this->automatic_onu_deactivation))
+        {
+            *failed_prop = BCMOLT_XGPON_NI_CFG_ID_AUTOMATIC_ONU_DEACTIVATION;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_ALL_ONUS)) != 0)
+    {
+        if (this->all_onus.len > 510)
+        {
+            return BCMOS_FALSE;
+        }
+
+        if (!bcmolt_xgpon_onu_with_state_list_u16_max_510_bounds_check(&this->all_onus))
+        {
+            *failed_prop = BCMOLT_XGPON_NI_CFG_ID_ALL_ONUS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_ALL_MCAST_GEM_PORTS)) != 0)
+    {
+        if (this->all_mcast_gem_ports.len > 128)
+        {
+            return BCMOS_FALSE;
+        }
+
+        if (!bcmolt_xgpon_gem_port_with_state_list_u16_max_128_bounds_check(&this->all_mcast_gem_ports))
+        {
+            *failed_prop = BCMOLT_XGPON_NI_CFG_ID_ALL_MCAST_GEM_PORTS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_DEBUG)) != 0)
+    {
+        if (!bcmolt_xgpon_ni_debug_bounds_check(&this->debug))
+        {
+            *failed_prop = BCMOLT_XGPON_NI_CFG_ID_DEBUG;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_ONU_UPGRADE_PARAMS)) != 0)
+    {
+        if (!bcmolt_gpon_onu_upgrade_params_bounds_check(&this->onu_upgrade_params))
+        {
+            *failed_prop = BCMOLT_XGPON_NI_CFG_ID_ONU_UPGRADE_PARAMS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_DS_FEC_MODE)) != 0)
+    {
+        switch (this->ds_fec_mode)
+        {
+            case BCMOLT_CONTROL_STATE_DISABLE:
+                break;
+            case BCMOLT_CONTROL_STATE_ENABLE:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_NI_CFG_ID_DS_FEC_MODE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_DBA_TYPE)) != 0)
+    {
+        switch (this->dba_type)
+        {
+            case BCMOLT_DBA_TYPE_INTERNAL:
+                break;
+            case BCMOLT_DBA_TYPE_PARTIAL_EXTERNAL:
+                break;
+            case BCMOLT_DBA_TYPE_EXTERNAL:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_NI_CFG_ID_DBA_TYPE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CFG_ID_ONU_TUNING)) != 0)
+    {
+        if (!bcmolt_onu_tuning_configuration_bounds_check(&this->onu_tuning))
+        {
+            *failed_prop = BCMOLT_XGPON_NI_CFG_ID_ONU_TUNING;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_ni_stat_data_set_default(bcmolt_xgpon_ni_stat_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_FEC_CODEWORDS)) != 0)
+    {
+        this->fec_codewords = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_BIP32_BYTES)) != 0)
+    {
+        this->bip32_bytes = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_BIP32_ERRORS)) != 0)
+    {
+        this->bip32_errors = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_XGTC_HEADERS)) != 0)
+    {
+        this->rx_xgtc_headers = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_XGTC_CORRECTED)) != 0)
+    {
+        this->rx_xgtc_corrected = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_XGTC_UNCORRECTED)) != 0)
+    {
+        this->rx_xgtc_uncorrected = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_XGEM)) != 0)
+    {
+        this->rx_xgem = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_XGEM_DROPPED)) != 0)
+    {
+        this->rx_xgem_dropped = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_XGEM_IDLE)) != 0)
+    {
+        this->rx_xgem_idle = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_XGEM_CORRECTED)) != 0)
+    {
+        this->rx_xgem_corrected = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_CRC_ERROR)) != 0)
+    {
+        this->rx_crc_error = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_FRAGMENT_ERROR)) != 0)
+    {
+        this->rx_fragment_error = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_PACKETS_DROPPED)) != 0)
+    {
+        this->rx_packets_dropped = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_DROPPED_TOO_SHORT)) != 0)
+    {
+        this->rx_dropped_too_short = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_DROPPED_TOO_LONG)) != 0)
+    {
+        this->rx_dropped_too_long = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_KEY_ERROR)) != 0)
+    {
+        this->rx_key_error = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_TX_PLOAMS)) != 0)
+    {
+        this->tx_ploams = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_PLOAMS_DROPPED)) != 0)
+    {
+        this->rx_ploams_dropped = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_ALLOCATIONS_VALID)) != 0)
+    {
+        this->rx_allocations_valid = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_ALLOCATIONS_INVALID)) != 0)
+    {
+        this->rx_allocations_invalid = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_ALLOCATIONS_DISABLED)) != 0)
+    {
+        this->rx_allocations_disabled = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_PLOAMS)) != 0)
+    {
+        this->rx_ploams = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_PLOAMS_NON_IDLE)) != 0)
+    {
+        this->rx_ploams_non_idle = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_PLOAMS_ERROR)) != 0)
+    {
+        this->rx_ploams_error = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_CPU)) != 0)
+    {
+        this->rx_cpu = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_OMCI)) != 0)
+    {
+        this->rx_omci = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_OMCI_PACKETS_CRC_ERROR)) != 0)
+    {
+        this->rx_omci_packets_crc_error = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_TX_PACKETS)) != 0)
+    {
+        this->tx_packets = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_TX_XGEM)) != 0)
+    {
+        this->tx_xgem = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_TX_CPU)) != 0)
+    {
+        this->tx_cpu = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_TX_OMCI)) != 0)
+    {
+        this->tx_omci = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_TX_CPU_OMCI_PACKETS_DROPPED)) != 0)
+    {
+        this->tx_cpu_omci_packets_dropped = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_TX_DROPPED_ILLEGAL_LENGTH)) != 0)
+    {
+        this->tx_dropped_illegal_length = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_TX_DROPPED_TPID_MISS)) != 0)
+    {
+        this->tx_dropped_tpid_miss = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_TX_DROPPED_VID_MISS)) != 0)
+    {
+        this->tx_dropped_vid_miss = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_stat_data_pack(const bcmolt_xgpon_ni_stat_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_FEC_CODEWORDS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->fec_codewords))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_BIP32_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->bip32_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_BIP32_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->bip32_errors))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_XGTC_HEADERS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_xgtc_headers))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_XGTC_CORRECTED)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_xgtc_corrected))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_XGTC_UNCORRECTED)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_xgtc_uncorrected))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_XGEM)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_xgem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_XGEM_DROPPED)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_xgem_dropped))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_XGEM_IDLE)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_xgem_idle))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_XGEM_CORRECTED)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_xgem_corrected))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_CRC_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_crc_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_FRAGMENT_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_fragment_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_PACKETS_DROPPED)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_packets_dropped))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_DROPPED_TOO_SHORT)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_dropped_too_short))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_DROPPED_TOO_LONG)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_dropped_too_long))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_KEY_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_key_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_TX_PLOAMS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_ploams))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_PLOAMS_DROPPED)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_ploams_dropped))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_ALLOCATIONS_VALID)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_allocations_valid))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_ALLOCATIONS_INVALID)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_allocations_invalid))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_ALLOCATIONS_DISABLED)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_allocations_disabled))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_PLOAMS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_ploams))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_PLOAMS_NON_IDLE)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_ploams_non_idle))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_PLOAMS_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_ploams_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_CPU)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_cpu))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_OMCI)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_omci))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_OMCI_PACKETS_CRC_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_omci_packets_crc_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_TX_PACKETS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_packets))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_TX_XGEM)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_xgem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_TX_CPU)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_cpu))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_TX_OMCI)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_omci))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_TX_CPU_OMCI_PACKETS_DROPPED)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->tx_cpu_omci_packets_dropped))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_TX_DROPPED_ILLEGAL_LENGTH)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_dropped_illegal_length))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_TX_DROPPED_TPID_MISS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_dropped_tpid_miss))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_TX_DROPPED_VID_MISS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_dropped_vid_miss))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_ni_stat_data_get_packed_length(const bcmolt_xgpon_ni_stat_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_FEC_CODEWORDS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_BIP32_BYTES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_BIP32_ERRORS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_XGTC_HEADERS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_XGTC_CORRECTED)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_XGTC_UNCORRECTED)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_XGEM)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_XGEM_DROPPED)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_XGEM_IDLE)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_XGEM_CORRECTED)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_CRC_ERROR)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_FRAGMENT_ERROR)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_PACKETS_DROPPED)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_DROPPED_TOO_SHORT)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_DROPPED_TOO_LONG)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_KEY_ERROR)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_TX_PLOAMS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_PLOAMS_DROPPED)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_ALLOCATIONS_VALID)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_ALLOCATIONS_INVALID)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_ALLOCATIONS_DISABLED)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_PLOAMS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_PLOAMS_NON_IDLE)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_PLOAMS_ERROR)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_CPU)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_OMCI)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_OMCI_PACKETS_CRC_ERROR)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_TX_PACKETS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_TX_XGEM)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_TX_CPU)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_TX_OMCI)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_TX_CPU_OMCI_PACKETS_DROPPED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_TX_DROPPED_ILLEGAL_LENGTH)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_TX_DROPPED_TPID_MISS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_TX_DROPPED_VID_MISS)) != 0)
+    {
+        count += 8;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_stat_data_unpack(bcmolt_xgpon_ni_stat_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_FEC_CODEWORDS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->fec_codewords))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_BIP32_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->bip32_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_BIP32_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->bip32_errors))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_XGTC_HEADERS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_xgtc_headers))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_XGTC_CORRECTED)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_xgtc_corrected))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_XGTC_UNCORRECTED)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_xgtc_uncorrected))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_XGEM)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_xgem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_XGEM_DROPPED)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_xgem_dropped))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_XGEM_IDLE)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_xgem_idle))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_XGEM_CORRECTED)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_xgem_corrected))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_CRC_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_crc_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_FRAGMENT_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_fragment_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_PACKETS_DROPPED)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_packets_dropped))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_DROPPED_TOO_SHORT)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_dropped_too_short))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_DROPPED_TOO_LONG)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_dropped_too_long))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_KEY_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_key_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_TX_PLOAMS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_ploams))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_PLOAMS_DROPPED)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_ploams_dropped))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_ALLOCATIONS_VALID)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_allocations_valid))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_ALLOCATIONS_INVALID)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_allocations_invalid))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_ALLOCATIONS_DISABLED)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_allocations_disabled))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_PLOAMS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_ploams))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_PLOAMS_NON_IDLE)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_ploams_non_idle))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_PLOAMS_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_ploams_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_CPU)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_cpu))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_OMCI)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_omci))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_OMCI_PACKETS_CRC_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_omci_packets_crc_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_TX_PACKETS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_packets))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_TX_XGEM)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_xgem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_TX_CPU)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_cpu))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_TX_OMCI)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_omci))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_TX_CPU_OMCI_PACKETS_DROPPED)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->tx_cpu_omci_packets_dropped))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_TX_DROPPED_ILLEGAL_LENGTH)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_dropped_illegal_length))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_TX_DROPPED_TPID_MISS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_dropped_tpid_miss))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_TX_DROPPED_VID_MISS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_dropped_vid_miss))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_stat_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_FEC_CODEWORDS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_BIP32_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_BIP32_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_XGTC_HEADERS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_XGTC_CORRECTED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_XGTC_UNCORRECTED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_XGEM)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_XGEM_DROPPED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_XGEM_IDLE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_XGEM_CORRECTED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_CRC_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_FRAGMENT_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_PACKETS_DROPPED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_DROPPED_TOO_SHORT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_DROPPED_TOO_LONG)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_KEY_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_TX_PLOAMS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_PLOAMS_DROPPED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_ALLOCATIONS_VALID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_ALLOCATIONS_INVALID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_ALLOCATIONS_DISABLED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_PLOAMS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_PLOAMS_NON_IDLE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_PLOAMS_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_CPU)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_OMCI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_RX_OMCI_PACKETS_CRC_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_TX_PACKETS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_TX_XGEM)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_TX_CPU)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_TX_OMCI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_TX_CPU_OMCI_PACKETS_DROPPED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_TX_DROPPED_ILLEGAL_LENGTH)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_TX_DROPPED_TPID_MISS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ID_TX_DROPPED_VID_MISS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_stat_data_bounds_check(const bcmolt_xgpon_ni_stat_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_stat_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_ni_stat_cfg_data_set_default(bcmolt_xgpon_ni_stat_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_CFG_ID_CFG)) != 0)
+    {
+        this->cfg.trigger.type = BCMOLT_STAT_CONDITION_TYPE_NONE;
+        this->cfg.soak.active_soak_time = 0;
+        this->cfg.soak.clear_soak_time = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_stat_cfg_data_pack(const bcmolt_xgpon_ni_stat_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_pack(&this->cfg, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_ni_stat_cfg_data_get_packed_length(const bcmolt_xgpon_ni_stat_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_CFG_ID_CFG)) != 0)
+    {
+        count += bcmolt_stat_alarm_config_get_packed_length(&this->cfg);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_stat_cfg_data_unpack(bcmolt_xgpon_ni_stat_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_unpack(&this->cfg, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_stat_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_stat_cfg_data_bounds_check(const bcmolt_xgpon_ni_stat_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_stat_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_bounds_check(&this->cfg))
+        {
+            *failed_prop = BCMOLT_XGPON_NI_STAT_CFG_ID_CFG;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_ni_cpu_packets_failure_data_set_default(bcmolt_xgpon_ni_cpu_packets_failure_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CPU_PACKETS_FAILURE_ID_ERROR)) != 0)
+    {
+        this->error = BCMOLT_PACKET_INJECTION_ERROR_GEM_PORT_NOT_ACTIVE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CPU_PACKETS_FAILURE_ID_GEM_PORT_ID)) != 0)
+    {
+        this->gem_port_id = (bcmolt_xgpon_gem_id) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_cpu_packets_failure_data_pack(const bcmolt_xgpon_ni_cpu_packets_failure_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CPU_PACKETS_FAILURE_ID_ERROR)) != 0)
+    {
+        if (!bcmolt_packet_injection_error_pack(this->error, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CPU_PACKETS_FAILURE_ID_GEM_PORT_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->gem_port_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_ni_cpu_packets_failure_data_get_packed_length(const bcmolt_xgpon_ni_cpu_packets_failure_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CPU_PACKETS_FAILURE_ID_ERROR)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CPU_PACKETS_FAILURE_ID_GEM_PORT_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_cpu_packets_failure_data_unpack(bcmolt_xgpon_ni_cpu_packets_failure_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CPU_PACKETS_FAILURE_ID_ERROR)) != 0)
+    {
+        if (!bcmolt_packet_injection_error_unpack(&this->error, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CPU_PACKETS_FAILURE_ID_GEM_PORT_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->gem_port_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_cpu_packets_failure_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CPU_PACKETS_FAILURE_ID_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CPU_PACKETS_FAILURE_ID_GEM_PORT_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_cpu_packets_failure_data_bounds_check(const bcmolt_xgpon_ni_cpu_packets_failure_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_cpu_packets_failure_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CPU_PACKETS_FAILURE_ID_ERROR)) != 0)
+    {
+        switch (this->error)
+        {
+            case BCMOLT_PACKET_INJECTION_ERROR_GEM_PORT_NOT_ACTIVE:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_NI_CPU_PACKETS_FAILURE_ID_ERROR;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CPU_PACKETS_FAILURE_ID_GEM_PORT_ID)) != 0)
+    {
+        if (this->gem_port_id > (bcmolt_xgpon_gem_id) 65533U)
+        {
+            *failed_prop = BCMOLT_XGPON_NI_CPU_PACKETS_FAILURE_ID_GEM_PORT_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_ni_los_data_set_default(bcmolt_xgpon_ni_los_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_LOS_ID_STATUS)) != 0)
+    {
+        this->status = BCMOLT_STATUS_OFF;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_los_data_pack(const bcmolt_xgpon_ni_los_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_LOS_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_status_pack(this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_ni_los_data_get_packed_length(const bcmolt_xgpon_ni_los_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_LOS_ID_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_los_data_unpack(bcmolt_xgpon_ni_los_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_LOS_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_status_unpack(&this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_los_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_LOS_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_los_data_bounds_check(const bcmolt_xgpon_ni_los_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_los_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_LOS_ID_STATUS)) != 0)
+    {
+        switch (this->status)
+        {
+            case BCMOLT_STATUS_OFF:
+                break;
+            case BCMOLT_STATUS_ON:
+                break;
+            case BCMOLT_STATUS_NO_CHANGE:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_NI_LOS_ID_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_ni_onu_discovered_data_set_default(bcmolt_xgpon_ni_onu_discovered_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_SERIAL_NUMBER)) != 0)
+    {
+        memset(this->serial_number.vendor_id, 0, sizeof(this->serial_number.vendor_id));
+        memset(this->serial_number.vendor_specific, 0, sizeof(this->serial_number.vendor_specific));
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_RANGING_TIME)) != 0)
+    {
+        this->ranging_time = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_ONU_ID)) != 0)
+    {
+        this->onu_id = (bcmolt_xgpon_onu_id) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_UPSTREAM_LINE_RATE_CAPABILITIES)) != 0)
+    {
+        this->upstream_line_rate_capabilities = BCMOLT_UPSTREAM_LINE_RATE_CAPABILITIES_RATE_2_P_5_G;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_CURRENT_DOWNSTREAM_PON_ID)) != 0)
+    {
+        this->current_downstream_pon_id = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_CURRENT_UPSTREAM_PON_ID)) != 0)
+    {
+        this->current_upstream_pon_id = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_CALIBRATION_RECORD)) != 0)
+    {
+        memset(this->calibration_record.arr, 0, sizeof(this->calibration_record.arr));
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_TUNING_GRANULARITY)) != 0)
+    {
+        this->tuning_granularity = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_STEP_TUNING_TIME)) != 0)
+    {
+        this->step_tuning_time = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_ATTENUATION)) != 0)
+    {
+        this->attenuation = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_POWER_LEVELLING_CAPABILITIES)) != 0)
+    {
+        this->power_levelling_capabilities = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_onu_discovered_data_pack(const bcmolt_xgpon_ni_onu_discovered_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_SERIAL_NUMBER)) != 0)
+    {
+        if (!bcmolt_serial_number_pack(&this->serial_number, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_RANGING_TIME)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->ranging_time))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->onu_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_UPSTREAM_LINE_RATE_CAPABILITIES)) != 0)
+    {
+        if (!bcmolt_upstream_line_rate_capabilities_pack(this->upstream_line_rate_capabilities, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_CURRENT_DOWNSTREAM_PON_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->current_downstream_pon_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_CURRENT_UPSTREAM_PON_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->current_upstream_pon_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_CALIBRATION_RECORD)) != 0)
+    {
+        if (!bcmolt_arr_calibration_record_8_pack(&this->calibration_record, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_TUNING_GRANULARITY)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->tuning_granularity))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_STEP_TUNING_TIME)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->step_tuning_time))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_ATTENUATION)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->attenuation))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_POWER_LEVELLING_CAPABILITIES)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->power_levelling_capabilities))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_ni_onu_discovered_data_get_packed_length(const bcmolt_xgpon_ni_onu_discovered_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_SERIAL_NUMBER)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_RANGING_TIME)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_ONU_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_UPSTREAM_LINE_RATE_CAPABILITIES)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_CURRENT_DOWNSTREAM_PON_ID)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_CURRENT_UPSTREAM_PON_ID)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_CALIBRATION_RECORD)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_TUNING_GRANULARITY)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_STEP_TUNING_TIME)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_ATTENUATION)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_POWER_LEVELLING_CAPABILITIES)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_onu_discovered_data_unpack(bcmolt_xgpon_ni_onu_discovered_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_SERIAL_NUMBER)) != 0)
+    {
+        if (!bcmolt_serial_number_unpack(&this->serial_number, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_RANGING_TIME)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->ranging_time))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->onu_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_UPSTREAM_LINE_RATE_CAPABILITIES)) != 0)
+    {
+        if (!bcmolt_upstream_line_rate_capabilities_unpack(&this->upstream_line_rate_capabilities, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_CURRENT_DOWNSTREAM_PON_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->current_downstream_pon_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_CURRENT_UPSTREAM_PON_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->current_upstream_pon_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_CALIBRATION_RECORD)) != 0)
+    {
+        if (!bcmolt_arr_calibration_record_8_unpack(&this->calibration_record, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_TUNING_GRANULARITY)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->tuning_granularity))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_STEP_TUNING_TIME)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->step_tuning_time))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_ATTENUATION)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->attenuation))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_POWER_LEVELLING_CAPABILITIES)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->power_levelling_capabilities))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_onu_discovered_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_SERIAL_NUMBER)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_RANGING_TIME)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_UPSTREAM_LINE_RATE_CAPABILITIES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_CURRENT_DOWNSTREAM_PON_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_CURRENT_UPSTREAM_PON_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_CALIBRATION_RECORD)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_TUNING_GRANULARITY)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_STEP_TUNING_TIME)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_ATTENUATION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_POWER_LEVELLING_CAPABILITIES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_onu_discovered_data_bounds_check(const bcmolt_xgpon_ni_onu_discovered_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_onu_discovered_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_SERIAL_NUMBER)) != 0)
+    {
+        if (!bcmolt_serial_number_bounds_check(&this->serial_number))
+        {
+            *failed_prop = BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_SERIAL_NUMBER;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_ONU_ID)) != 0)
+    {
+        if (this->onu_id > (bcmolt_xgpon_onu_id) 511)
+        {
+            *failed_prop = BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_ONU_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_UPSTREAM_LINE_RATE_CAPABILITIES)) != 0)
+    {
+        switch (this->upstream_line_rate_capabilities)
+        {
+            case BCMOLT_UPSTREAM_LINE_RATE_CAPABILITIES_RATE_2_P_5_G:
+                break;
+            case BCMOLT_UPSTREAM_LINE_RATE_CAPABILITIES_RATE_10_G:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_UPSTREAM_LINE_RATE_CAPABILITIES;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_CALIBRATION_RECORD)) != 0)
+    {
+        if (!bcmolt_arr_calibration_record_8_bounds_check(&this->calibration_record))
+        {
+            *failed_prop = BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_CALIBRATION_RECORD;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_ATTENUATION)) != 0)
+    {
+        if (this->attenuation > 7)
+        {
+            *failed_prop = BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_ATTENUATION;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_POWER_LEVELLING_CAPABILITIES)) != 0)
+    {
+        if (this->power_levelling_capabilities > 127)
+        {
+            *failed_prop = BCMOLT_XGPON_NI_ONU_DISCOVERED_ID_POWER_LEVELLING_CAPABILITIES;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_ni_onu_upgrade_complete_data_set_default(bcmolt_xgpon_ni_onu_upgrade_complete_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_UPGRADE_COMPLETE_ID_STATUS)) != 0)
+    {
+        this->status = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_UPGRADE_COMPLETE_ID_LIST_OF_FAILED_ENTITIES)) != 0)
+    {
+        this->list_of_failed_entities.len = 0;
+        this->list_of_failed_entities.val = NULL;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_onu_upgrade_complete_data_pack(const bcmolt_xgpon_ni_onu_upgrade_complete_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_UPGRADE_COMPLETE_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->status))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_UPGRADE_COMPLETE_ID_LIST_OF_FAILED_ENTITIES)) != 0)
+    {
+        if (!bcmolt_gpon_onu_upgrade_status_list_u32_pack(&this->list_of_failed_entities, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_ni_onu_upgrade_complete_data_get_packed_length(const bcmolt_xgpon_ni_onu_upgrade_complete_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_UPGRADE_COMPLETE_ID_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_UPGRADE_COMPLETE_ID_LIST_OF_FAILED_ENTITIES)) != 0)
+    {
+        count += bcmolt_gpon_onu_upgrade_status_list_u32_get_packed_length(&this->list_of_failed_entities);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_onu_upgrade_complete_data_unpack(bcmolt_xgpon_ni_onu_upgrade_complete_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_UPGRADE_COMPLETE_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->status))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_UPGRADE_COMPLETE_ID_LIST_OF_FAILED_ENTITIES)) != 0)
+    {
+        if (!bcmolt_gpon_onu_upgrade_status_list_u32_unpack(&this->list_of_failed_entities, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_onu_upgrade_complete_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_UPGRADE_COMPLETE_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_UPGRADE_COMPLETE_ID_LIST_OF_FAILED_ENTITIES)) != 0)
+    {
+        if (!bcmolt_gpon_onu_upgrade_status_list_u32_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_onu_upgrade_complete_data_bounds_check(const bcmolt_xgpon_ni_onu_upgrade_complete_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_onu_upgrade_complete_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ONU_UPGRADE_COMPLETE_ID_LIST_OF_FAILED_ENTITIES)) != 0)
+    {
+        if (!bcmolt_gpon_onu_upgrade_status_list_u32_bounds_check(&this->list_of_failed_entities))
+        {
+            *failed_prop = BCMOLT_XGPON_NI_ONU_UPGRADE_COMPLETE_ID_LIST_OF_FAILED_ENTITIES;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_ni_protection_switching_onus_ranged_data_set_default(bcmolt_xgpon_ni_protection_switching_onus_ranged_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_PROTECTION_SWITCHING_ONUS_RANGED_ID_ONUS)) != 0)
+    {
+        this->onus.len = 0;
+        this->onus.val = NULL;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_protection_switching_onus_ranged_data_pack(const bcmolt_xgpon_ni_protection_switching_onus_ranged_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_PROTECTION_SWITCHING_ONUS_RANGED_ID_ONUS)) != 0)
+    {
+        if (!bcmolt_xgpon_onu_eqd_list_u32_pack(&this->onus, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_ni_protection_switching_onus_ranged_data_get_packed_length(const bcmolt_xgpon_ni_protection_switching_onus_ranged_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_PROTECTION_SWITCHING_ONUS_RANGED_ID_ONUS)) != 0)
+    {
+        count += bcmolt_xgpon_onu_eqd_list_u32_get_packed_length(&this->onus);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_protection_switching_onus_ranged_data_unpack(bcmolt_xgpon_ni_protection_switching_onus_ranged_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_PROTECTION_SWITCHING_ONUS_RANGED_ID_ONUS)) != 0)
+    {
+        if (!bcmolt_xgpon_onu_eqd_list_u32_unpack(&this->onus, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_protection_switching_onus_ranged_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_PROTECTION_SWITCHING_ONUS_RANGED_ID_ONUS)) != 0)
+    {
+        if (!bcmolt_xgpon_onu_eqd_list_u32_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_protection_switching_onus_ranged_data_bounds_check(const bcmolt_xgpon_ni_protection_switching_onus_ranged_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_protection_switching_onus_ranged_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_PROTECTION_SWITCHING_ONUS_RANGED_ID_ONUS)) != 0)
+    {
+        if (!bcmolt_xgpon_onu_eqd_list_u32_bounds_check(&this->onus))
+        {
+            *failed_prop = BCMOLT_XGPON_NI_PROTECTION_SWITCHING_ONUS_RANGED_ID_ONUS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_ni_protection_switching_switchover_completed_data_set_default(bcmolt_xgpon_ni_protection_switching_switchover_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED_ID_RESULT)) != 0)
+    {
+        this->result = BCMOLT_RESULT_SUCCESS;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_protection_switching_switchover_completed_data_pack(const bcmolt_xgpon_ni_protection_switching_switchover_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED_ID_RESULT)) != 0)
+    {
+        if (!bcmolt_result_pack(this->result, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_ni_protection_switching_switchover_completed_data_get_packed_length(const bcmolt_xgpon_ni_protection_switching_switchover_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED_ID_RESULT)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_protection_switching_switchover_completed_data_unpack(bcmolt_xgpon_ni_protection_switching_switchover_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED_ID_RESULT)) != 0)
+    {
+        if (!bcmolt_result_unpack(&this->result, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_protection_switching_switchover_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED_ID_RESULT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_protection_switching_switchover_completed_data_bounds_check(const bcmolt_xgpon_ni_protection_switching_switchover_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_protection_switching_switchover_completed_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED_ID_RESULT)) != 0)
+    {
+        switch (this->result)
+        {
+            case BCMOLT_RESULT_SUCCESS:
+                break;
+            case BCMOLT_RESULT_FAIL:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_NI_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED_ID_RESULT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_ni_protection_switching_traffic_resume_data_set_default(bcmolt_xgpon_ni_protection_switching_traffic_resume_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_PROTECTION_SWITCHING_TRAFFIC_RESUME_ID_RESULT)) != 0)
+    {
+        this->result = BCMOLT_TRAFFIC_RESUME_RESULT_SUCCESS;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_protection_switching_traffic_resume_data_pack(const bcmolt_xgpon_ni_protection_switching_traffic_resume_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_PROTECTION_SWITCHING_TRAFFIC_RESUME_ID_RESULT)) != 0)
+    {
+        if (!bcmolt_traffic_resume_result_pack(this->result, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_ni_protection_switching_traffic_resume_data_get_packed_length(const bcmolt_xgpon_ni_protection_switching_traffic_resume_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_PROTECTION_SWITCHING_TRAFFIC_RESUME_ID_RESULT)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_protection_switching_traffic_resume_data_unpack(bcmolt_xgpon_ni_protection_switching_traffic_resume_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_PROTECTION_SWITCHING_TRAFFIC_RESUME_ID_RESULT)) != 0)
+    {
+        if (!bcmolt_traffic_resume_result_unpack(&this->result, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_protection_switching_traffic_resume_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_PROTECTION_SWITCHING_TRAFFIC_RESUME_ID_RESULT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_protection_switching_traffic_resume_data_bounds_check(const bcmolt_xgpon_ni_protection_switching_traffic_resume_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_protection_switching_traffic_resume_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_PROTECTION_SWITCHING_TRAFFIC_RESUME_ID_RESULT)) != 0)
+    {
+        switch (this->result)
+        {
+            case BCMOLT_TRAFFIC_RESUME_RESULT_SUCCESS:
+                break;
+            case BCMOLT_TRAFFIC_RESUME_RESULT_FAILURE:
+                break;
+            case BCMOLT_TRAFFIC_RESUME_RESULT_SUSPECTED_LOS:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_NI_PROTECTION_SWITCHING_TRAFFIC_RESUME_ID_RESULT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_ni_rogue_detection_completed_data_set_default(bcmolt_xgpon_ni_rogue_detection_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_WINDOW_TYPE)) != 0)
+    {
+        this->window_type = BCMOLT_ROGUE_DETECTION_WINDOW_SILENT_WINDOW;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_MEASUREMENT_STATUS)) != 0)
+    {
+        this->measurement_status = BCMOLT_ROGUE_MEASUREMENT_RESULT_RSSI_COMPLETE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_ALLOC_ID)) != 0)
+    {
+        this->alloc_id = (bcmolt_xgpon_alloc_id) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_ONU_ID)) != 0)
+    {
+        this->onu_id = (bcmolt_xgpon_onu_id) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_IS_DELINEATION)) != 0)
+    {
+        this->is_delineation = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_IS_ED)) != 0)
+    {
+        this->is_ed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_RX_DATA)) != 0)
+    {
+        this->rx_data.len = 0;
+        this->rx_data.val = NULL;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_PLOAM_RECEIVED_ONU_ID)) != 0)
+    {
+        this->ploam_received_onu_id = (bcmolt_xgpon_onu_id) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_PLOAM_RECEIVED_MIC_ERROR)) != 0)
+    {
+        this->ploam_received_mic_error = BCMOS_FALSE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_rogue_detection_completed_data_pack(const bcmolt_xgpon_ni_rogue_detection_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_WINDOW_TYPE)) != 0)
+    {
+        if (!bcmolt_rogue_detection_window_pack(this->window_type, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_MEASUREMENT_STATUS)) != 0)
+    {
+        if (!bcmolt_rogue_measurement_result_pack(this->measurement_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_ALLOC_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->alloc_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->onu_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_IS_DELINEATION)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->is_delineation))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_IS_ED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->is_ed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_RX_DATA)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_pack(&this->rx_data, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_PLOAM_RECEIVED_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->ploam_received_onu_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_PLOAM_RECEIVED_MIC_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->ploam_received_mic_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_ni_rogue_detection_completed_data_get_packed_length(const bcmolt_xgpon_ni_rogue_detection_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_WINDOW_TYPE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_MEASUREMENT_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_ALLOC_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_ONU_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_IS_DELINEATION)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_IS_ED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_RX_DATA)) != 0)
+    {
+        count += bcmolt_u8_list_u32_get_packed_length(&this->rx_data);
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_PLOAM_RECEIVED_ONU_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_PLOAM_RECEIVED_MIC_ERROR)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_rogue_detection_completed_data_unpack(bcmolt_xgpon_ni_rogue_detection_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_WINDOW_TYPE)) != 0)
+    {
+        if (!bcmolt_rogue_detection_window_unpack(&this->window_type, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_MEASUREMENT_STATUS)) != 0)
+    {
+        if (!bcmolt_rogue_measurement_result_unpack(&this->measurement_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_ALLOC_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->alloc_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->onu_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_IS_DELINEATION)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->is_delineation))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_IS_ED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->is_ed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_RX_DATA)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_unpack(&this->rx_data, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_PLOAM_RECEIVED_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->ploam_received_onu_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_PLOAM_RECEIVED_MIC_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->ploam_received_mic_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_rogue_detection_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_WINDOW_TYPE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_MEASUREMENT_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_ALLOC_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_IS_DELINEATION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_IS_ED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_RX_DATA)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_PLOAM_RECEIVED_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_PLOAM_RECEIVED_MIC_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_rogue_detection_completed_data_bounds_check(const bcmolt_xgpon_ni_rogue_detection_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_rogue_detection_completed_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_WINDOW_TYPE)) != 0)
+    {
+        switch (this->window_type)
+        {
+            case BCMOLT_ROGUE_DETECTION_WINDOW_SILENT_WINDOW:
+                break;
+            case BCMOLT_ROGUE_DETECTION_WINDOW_CUT_OFF_WINDOW:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_WINDOW_TYPE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_MEASUREMENT_STATUS)) != 0)
+    {
+        switch (this->measurement_status)
+        {
+            case BCMOLT_ROGUE_MEASUREMENT_RESULT_RSSI_COMPLETE:
+                break;
+            case BCMOLT_ROGUE_MEASUREMENT_RESULT_NOT_PERFORMED:
+                break;
+            case BCMOLT_ROGUE_MEASUREMENT_RESULT_ROGUE_CYCLE_STOP:
+                break;
+            case BCMOLT_ROGUE_MEASUREMENT_RESULT_RSSI_ERROR:
+                break;
+            case BCMOLT_ROGUE_MEASUREMENT_RESULT_RSSI_NOT_COMPLETE:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_MEASUREMENT_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_ALLOC_ID)) != 0)
+    {
+        if (this->alloc_id > (bcmolt_xgpon_alloc_id) 16383)
+        {
+            *failed_prop = BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_ALLOC_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_ONU_ID)) != 0)
+    {
+        if (this->onu_id > (bcmolt_xgpon_onu_id) 511)
+        {
+            *failed_prop = BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_ONU_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_RX_DATA)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_bounds_check(&this->rx_data))
+        {
+            *failed_prop = BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_RX_DATA;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_PLOAM_RECEIVED_ONU_ID)) != 0)
+    {
+        if (this->ploam_received_onu_id > (bcmolt_xgpon_onu_id) 511)
+        {
+            *failed_prop = BCMOLT_XGPON_NI_ROGUE_DETECTION_COMPLETED_ID_PLOAM_RECEIVED_ONU_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_data_set_default(bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STANDBY_PON_MONITORING_CYCLE_COMPLETED_ID_NUMBER_OF_DETECTED_DELIMITER)) != 0)
+    {
+        this->number_of_detected_delimiter = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STANDBY_PON_MONITORING_CYCLE_COMPLETED_ID_ENERGY_DETECT_SIGNAL)) != 0)
+    {
+        this->energy_detect_signal = BCMOLT_STATUS_OFF;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_data_pack(const bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STANDBY_PON_MONITORING_CYCLE_COMPLETED_ID_NUMBER_OF_DETECTED_DELIMITER)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->number_of_detected_delimiter))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STANDBY_PON_MONITORING_CYCLE_COMPLETED_ID_ENERGY_DETECT_SIGNAL)) != 0)
+    {
+        if (!bcmolt_status_pack(this->energy_detect_signal, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_data_get_packed_length(const bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STANDBY_PON_MONITORING_CYCLE_COMPLETED_ID_NUMBER_OF_DETECTED_DELIMITER)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STANDBY_PON_MONITORING_CYCLE_COMPLETED_ID_ENERGY_DETECT_SIGNAL)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_data_unpack(bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STANDBY_PON_MONITORING_CYCLE_COMPLETED_ID_NUMBER_OF_DETECTED_DELIMITER)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->number_of_detected_delimiter))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STANDBY_PON_MONITORING_CYCLE_COMPLETED_ID_ENERGY_DETECT_SIGNAL)) != 0)
+    {
+        if (!bcmolt_status_unpack(&this->energy_detect_signal, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STANDBY_PON_MONITORING_CYCLE_COMPLETED_ID_NUMBER_OF_DETECTED_DELIMITER)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STANDBY_PON_MONITORING_CYCLE_COMPLETED_ID_ENERGY_DETECT_SIGNAL)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_data_bounds_check(const bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STANDBY_PON_MONITORING_CYCLE_COMPLETED_ID_ENERGY_DETECT_SIGNAL)) != 0)
+    {
+        switch (this->energy_detect_signal)
+        {
+            case BCMOLT_STATUS_OFF:
+                break;
+            case BCMOLT_STATUS_ON:
+                break;
+            case BCMOLT_STATUS_NO_CHANGE:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_NI_STANDBY_PON_MONITORING_CYCLE_COMPLETED_ID_ENERGY_DETECT_SIGNAL;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_ni_stat_alarm_cleared_data_set_default(bcmolt_xgpon_ni_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        this->stat = BCMOLT_XGPON_NI_STAT_ID_FEC_CODEWORDS;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_stat_alarm_cleared_data_pack(const bcmolt_xgpon_ni_stat_alarm_cleared_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_xgpon_ni_stat_id_pack(this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_ni_stat_alarm_cleared_data_get_packed_length(const bcmolt_xgpon_ni_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_stat_alarm_cleared_data_unpack(bcmolt_xgpon_ni_stat_alarm_cleared_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_xgpon_ni_stat_id_unpack(&this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_stat_alarm_cleared_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_stat_alarm_cleared_data_bounds_check(const bcmolt_xgpon_ni_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_stat_alarm_cleared_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        switch (this->stat)
+        {
+            case BCMOLT_XGPON_NI_STAT_ID_FEC_CODEWORDS:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_BIP32_BYTES:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_BIP32_ERRORS:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_XGTC_HEADERS:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_XGTC_CORRECTED:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_XGTC_UNCORRECTED:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_XGEM:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_XGEM_DROPPED:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_XGEM_IDLE:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_XGEM_CORRECTED:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_CRC_ERROR:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_FRAGMENT_ERROR:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_PACKETS_DROPPED:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_DROPPED_TOO_SHORT:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_DROPPED_TOO_LONG:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_KEY_ERROR:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_TX_PLOAMS:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_PLOAMS_DROPPED:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_ALLOCATIONS_VALID:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_ALLOCATIONS_INVALID:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_ALLOCATIONS_DISABLED:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_PLOAMS:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_PLOAMS_NON_IDLE:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_PLOAMS_ERROR:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_CPU:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_OMCI:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_OMCI_PACKETS_CRC_ERROR:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_TX_PACKETS:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_TX_XGEM:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_TX_CPU:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_TX_OMCI:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_TX_CPU_OMCI_PACKETS_DROPPED:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_TX_DROPPED_ILLEGAL_LENGTH:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_TX_DROPPED_TPID_MISS:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_TX_DROPPED_VID_MISS:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_NI_STAT_ALARM_CLEARED_ID_STAT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_ni_stat_alarm_raised_data_set_default(bcmolt_xgpon_ni_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        this->stat = BCMOLT_XGPON_NI_STAT_ID_FEC_CODEWORDS;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_stat_alarm_raised_data_pack(const bcmolt_xgpon_ni_stat_alarm_raised_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_xgpon_ni_stat_id_pack(this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_ni_stat_alarm_raised_data_get_packed_length(const bcmolt_xgpon_ni_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_stat_alarm_raised_data_unpack(bcmolt_xgpon_ni_stat_alarm_raised_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_xgpon_ni_stat_id_unpack(&this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_stat_alarm_raised_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_stat_alarm_raised_data_bounds_check(const bcmolt_xgpon_ni_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_stat_alarm_raised_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        switch (this->stat)
+        {
+            case BCMOLT_XGPON_NI_STAT_ID_FEC_CODEWORDS:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_BIP32_BYTES:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_BIP32_ERRORS:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_XGTC_HEADERS:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_XGTC_CORRECTED:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_XGTC_UNCORRECTED:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_XGEM:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_XGEM_DROPPED:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_XGEM_IDLE:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_XGEM_CORRECTED:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_CRC_ERROR:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_FRAGMENT_ERROR:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_PACKETS_DROPPED:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_DROPPED_TOO_SHORT:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_DROPPED_TOO_LONG:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_KEY_ERROR:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_TX_PLOAMS:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_PLOAMS_DROPPED:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_ALLOCATIONS_VALID:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_ALLOCATIONS_INVALID:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_ALLOCATIONS_DISABLED:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_PLOAMS:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_PLOAMS_NON_IDLE:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_PLOAMS_ERROR:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_CPU:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_OMCI:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_RX_OMCI_PACKETS_CRC_ERROR:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_TX_PACKETS:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_TX_XGEM:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_TX_CPU:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_TX_OMCI:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_TX_CPU_OMCI_PACKETS_DROPPED:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_TX_DROPPED_ILLEGAL_LENGTH:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_TX_DROPPED_TPID_MISS:
+                break;
+            case BCMOLT_XGPON_NI_STAT_ID_TX_DROPPED_VID_MISS:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_NI_STAT_ALARM_RAISED_ID_STAT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_ni_state_change_completed_data_set_default(bcmolt_xgpon_ni_state_change_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STATE_CHANGE_COMPLETED_ID_RESULT)) != 0)
+    {
+        this->result = BCMOLT_RESULT_SUCCESS;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STATE_CHANGE_COMPLETED_ID_PREVIOUS_STATE)) != 0)
+    {
+        this->previous_state = BCMOLT_PON_STATE_INACTIVE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STATE_CHANGE_COMPLETED_ID_NEW_STATE)) != 0)
+    {
+        this->new_state = BCMOLT_PON_STATE_INACTIVE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_state_change_completed_data_pack(const bcmolt_xgpon_ni_state_change_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STATE_CHANGE_COMPLETED_ID_RESULT)) != 0)
+    {
+        if (!bcmolt_result_pack(this->result, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STATE_CHANGE_COMPLETED_ID_PREVIOUS_STATE)) != 0)
+    {
+        if (!bcmolt_pon_state_pack(this->previous_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STATE_CHANGE_COMPLETED_ID_NEW_STATE)) != 0)
+    {
+        if (!bcmolt_pon_state_pack(this->new_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_ni_state_change_completed_data_get_packed_length(const bcmolt_xgpon_ni_state_change_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STATE_CHANGE_COMPLETED_ID_RESULT)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STATE_CHANGE_COMPLETED_ID_PREVIOUS_STATE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STATE_CHANGE_COMPLETED_ID_NEW_STATE)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_state_change_completed_data_unpack(bcmolt_xgpon_ni_state_change_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STATE_CHANGE_COMPLETED_ID_RESULT)) != 0)
+    {
+        if (!bcmolt_result_unpack(&this->result, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STATE_CHANGE_COMPLETED_ID_PREVIOUS_STATE)) != 0)
+    {
+        if (!bcmolt_pon_state_unpack(&this->previous_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STATE_CHANGE_COMPLETED_ID_NEW_STATE)) != 0)
+    {
+        if (!bcmolt_pon_state_unpack(&this->new_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_state_change_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STATE_CHANGE_COMPLETED_ID_RESULT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STATE_CHANGE_COMPLETED_ID_PREVIOUS_STATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STATE_CHANGE_COMPLETED_ID_NEW_STATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_state_change_completed_data_bounds_check(const bcmolt_xgpon_ni_state_change_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_state_change_completed_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STATE_CHANGE_COMPLETED_ID_RESULT)) != 0)
+    {
+        switch (this->result)
+        {
+            case BCMOLT_RESULT_SUCCESS:
+                break;
+            case BCMOLT_RESULT_FAIL:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_NI_STATE_CHANGE_COMPLETED_ID_RESULT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STATE_CHANGE_COMPLETED_ID_PREVIOUS_STATE)) != 0)
+    {
+        switch (this->previous_state)
+        {
+            case BCMOLT_PON_STATE_INACTIVE:
+                break;
+            case BCMOLT_PON_STATE_PROCESSING:
+                break;
+            case BCMOLT_PON_STATE_ACTIVE_WORKING:
+                break;
+            case BCMOLT_PON_STATE_ACTIVE_STANDBY:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_NI_STATE_CHANGE_COMPLETED_ID_PREVIOUS_STATE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_STATE_CHANGE_COMPLETED_ID_NEW_STATE)) != 0)
+    {
+        switch (this->new_state)
+        {
+            case BCMOLT_PON_STATE_INACTIVE:
+                break;
+            case BCMOLT_PON_STATE_PROCESSING:
+                break;
+            case BCMOLT_PON_STATE_ACTIVE_WORKING:
+                break;
+            case BCMOLT_PON_STATE_ACTIVE_STANDBY:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_NI_STATE_CHANGE_COMPLETED_ID_NEW_STATE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_ni_tod_request_completed_data_set_default(bcmolt_xgpon_ni_tod_request_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_TOD_REQUEST_COMPLETED_ID_TOD_STRING)) != 0)
+    {
+        memset(this->tod_string.str, 0, 64);
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_TOD_REQUEST_COMPLETED_ID_SFC)) != 0)
+    {
+        this->sfc = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_TOD_REQUEST_COMPLETED_ID_RTC_OFFSET_SEC)) != 0)
+    {
+        this->rtc_offset_sec = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_TOD_REQUEST_COMPLETED_ID_RTC_OFFSET_NSEC)) != 0)
+    {
+        this->rtc_offset_nsec = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_TOD_REQUEST_COMPLETED_ID_STATUS)) != 0)
+    {
+        this->status = BCMOLT_RESULT_SUCCESS;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_tod_request_completed_data_pack(const bcmolt_xgpon_ni_tod_request_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_TOD_REQUEST_COMPLETED_ID_TOD_STRING)) != 0)
+    {
+        if (!bcmolt_str_64_pack(&this->tod_string, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_TOD_REQUEST_COMPLETED_ID_SFC)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->sfc))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_TOD_REQUEST_COMPLETED_ID_RTC_OFFSET_SEC)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rtc_offset_sec))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_TOD_REQUEST_COMPLETED_ID_RTC_OFFSET_NSEC)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->rtc_offset_nsec))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_TOD_REQUEST_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_result_pack(this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_ni_tod_request_completed_data_get_packed_length(const bcmolt_xgpon_ni_tod_request_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_TOD_REQUEST_COMPLETED_ID_TOD_STRING)) != 0)
+    {
+        count += 64;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_TOD_REQUEST_COMPLETED_ID_SFC)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_TOD_REQUEST_COMPLETED_ID_RTC_OFFSET_SEC)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_TOD_REQUEST_COMPLETED_ID_RTC_OFFSET_NSEC)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_TOD_REQUEST_COMPLETED_ID_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_tod_request_completed_data_unpack(bcmolt_xgpon_ni_tod_request_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_TOD_REQUEST_COMPLETED_ID_TOD_STRING)) != 0)
+    {
+        if (!bcmolt_str_64_unpack(&this->tod_string, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_TOD_REQUEST_COMPLETED_ID_SFC)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->sfc))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_TOD_REQUEST_COMPLETED_ID_RTC_OFFSET_SEC)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rtc_offset_sec))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_TOD_REQUEST_COMPLETED_ID_RTC_OFFSET_NSEC)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->rtc_offset_nsec))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_TOD_REQUEST_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_result_unpack(&this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_tod_request_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_TOD_REQUEST_COMPLETED_ID_TOD_STRING)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 64))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_TOD_REQUEST_COMPLETED_ID_SFC)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_TOD_REQUEST_COMPLETED_ID_RTC_OFFSET_SEC)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_TOD_REQUEST_COMPLETED_ID_RTC_OFFSET_NSEC)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_TOD_REQUEST_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_tod_request_completed_data_bounds_check(const bcmolt_xgpon_ni_tod_request_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_tod_request_completed_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_TOD_REQUEST_COMPLETED_ID_TOD_STRING)) != 0)
+    {
+        if (!bcmolt_str_64_bounds_check(&this->tod_string))
+        {
+            *failed_prop = BCMOLT_XGPON_NI_TOD_REQUEST_COMPLETED_ID_TOD_STRING;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_TOD_REQUEST_COMPLETED_ID_STATUS)) != 0)
+    {
+        switch (this->status)
+        {
+            case BCMOLT_RESULT_SUCCESS:
+                break;
+            case BCMOLT_RESULT_FAIL:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_NI_TOD_REQUEST_COMPLETED_ID_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_ni_auto_cfg_data_set_default(bcmolt_xgpon_ni_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_ACTIVATE_ALL_ONUS_COMPLETED)) != 0)
+    {
+        this->activate_all_onus_completed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_CPU_PACKETS_FAILURE)) != 0)
+    {
+        this->cpu_packets_failure = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_DEACTIVATE_ALL_ONUS_COMPLETED)) != 0)
+    {
+        this->deactivate_all_onus_completed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_DISABLE_ALL_ONUS_COMPLETED)) != 0)
+    {
+        this->disable_all_onus_completed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_ENABLE_ALL_ONUS_COMPLETED)) != 0)
+    {
+        this->enable_all_onus_completed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_LOS)) != 0)
+    {
+        this->los = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_ONU_DISCOVERED)) != 0)
+    {
+        this->onu_discovered = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_ONU_UPGRADE_COMPLETE)) != 0)
+    {
+        this->onu_upgrade_complete = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_PROTECTION_SWITCHING_ONUS_RANGED)) != 0)
+    {
+        this->protection_switching_onus_ranged = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED)) != 0)
+    {
+        this->protection_switching_switchover_completed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_PROTECTION_SWITCHING_TRAFFIC_RESUME)) != 0)
+    {
+        this->protection_switching_traffic_resume = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_ROGUE_DETECTION_COMPLETED)) != 0)
+    {
+        this->rogue_detection_completed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_ROGUE_ONU_SPECIAL_MAP_CYCLE_START)) != 0)
+    {
+        this->rogue_onu_special_map_cycle_start = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_SERIAL_NUMBER_ACQUISITION_CYCLE_START)) != 0)
+    {
+        this->serial_number_acquisition_cycle_start = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_STANDBY_PON_MONITORING_CYCLE_COMPLETED)) != 0)
+    {
+        this->standby_pon_monitoring_cycle_completed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        this->stat_alarm_cleared = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        this->stat_alarm_raised = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_STATE_CHANGE_COMPLETED)) != 0)
+    {
+        this->state_change_completed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_TOD_REQUEST_COMPLETED)) != 0)
+    {
+        this->tod_request_completed = BCMOS_FALSE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_auto_cfg_data_pack(const bcmolt_xgpon_ni_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_ACTIVATE_ALL_ONUS_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->activate_all_onus_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_CPU_PACKETS_FAILURE)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->cpu_packets_failure))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_DEACTIVATE_ALL_ONUS_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->deactivate_all_onus_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_DISABLE_ALL_ONUS_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->disable_all_onus_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_ENABLE_ALL_ONUS_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->enable_all_onus_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_LOS)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->los))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_ONU_DISCOVERED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->onu_discovered))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_ONU_UPGRADE_COMPLETE)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->onu_upgrade_complete))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_PROTECTION_SWITCHING_ONUS_RANGED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->protection_switching_onus_ranged))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->protection_switching_switchover_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_PROTECTION_SWITCHING_TRAFFIC_RESUME)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->protection_switching_traffic_resume))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_ROGUE_DETECTION_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->rogue_detection_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_ROGUE_ONU_SPECIAL_MAP_CYCLE_START)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->rogue_onu_special_map_cycle_start))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_SERIAL_NUMBER_ACQUISITION_CYCLE_START)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->serial_number_acquisition_cycle_start))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_STANDBY_PON_MONITORING_CYCLE_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->standby_pon_monitoring_cycle_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->stat_alarm_cleared))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->stat_alarm_raised))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_STATE_CHANGE_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->state_change_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_TOD_REQUEST_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->tod_request_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_ni_auto_cfg_data_get_packed_length(const bcmolt_xgpon_ni_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_ACTIVATE_ALL_ONUS_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_CPU_PACKETS_FAILURE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_DEACTIVATE_ALL_ONUS_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_DISABLE_ALL_ONUS_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_ENABLE_ALL_ONUS_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_LOS)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_ONU_DISCOVERED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_ONU_UPGRADE_COMPLETE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_PROTECTION_SWITCHING_ONUS_RANGED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_PROTECTION_SWITCHING_TRAFFIC_RESUME)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_ROGUE_DETECTION_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_ROGUE_ONU_SPECIAL_MAP_CYCLE_START)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_SERIAL_NUMBER_ACQUISITION_CYCLE_START)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_STANDBY_PON_MONITORING_CYCLE_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_STATE_CHANGE_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_TOD_REQUEST_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_auto_cfg_data_unpack(bcmolt_xgpon_ni_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_ACTIVATE_ALL_ONUS_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->activate_all_onus_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_CPU_PACKETS_FAILURE)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->cpu_packets_failure))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_DEACTIVATE_ALL_ONUS_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->deactivate_all_onus_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_DISABLE_ALL_ONUS_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->disable_all_onus_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_ENABLE_ALL_ONUS_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->enable_all_onus_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_LOS)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->los))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_ONU_DISCOVERED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->onu_discovered))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_ONU_UPGRADE_COMPLETE)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->onu_upgrade_complete))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_PROTECTION_SWITCHING_ONUS_RANGED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->protection_switching_onus_ranged))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->protection_switching_switchover_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_PROTECTION_SWITCHING_TRAFFIC_RESUME)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->protection_switching_traffic_resume))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_ROGUE_DETECTION_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->rogue_detection_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_ROGUE_ONU_SPECIAL_MAP_CYCLE_START)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->rogue_onu_special_map_cycle_start))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_SERIAL_NUMBER_ACQUISITION_CYCLE_START)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->serial_number_acquisition_cycle_start))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_STANDBY_PON_MONITORING_CYCLE_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->standby_pon_monitoring_cycle_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->stat_alarm_cleared))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->stat_alarm_raised))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_STATE_CHANGE_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->state_change_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_TOD_REQUEST_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->tod_request_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_ACTIVATE_ALL_ONUS_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_CPU_PACKETS_FAILURE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_DEACTIVATE_ALL_ONUS_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_DISABLE_ALL_ONUS_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_ENABLE_ALL_ONUS_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_LOS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_ONU_DISCOVERED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_ONU_UPGRADE_COMPLETE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_PROTECTION_SWITCHING_ONUS_RANGED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_PROTECTION_SWITCHING_TRAFFIC_RESUME)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_ROGUE_DETECTION_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_ROGUE_ONU_SPECIAL_MAP_CYCLE_START)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_SERIAL_NUMBER_ACQUISITION_CYCLE_START)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_STANDBY_PON_MONITORING_CYCLE_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_STATE_CHANGE_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_AUTO_CFG_ID_TOD_REQUEST_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_auto_cfg_data_bounds_check(const bcmolt_xgpon_ni_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_auto_cfg_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_ni_adjust_tx_wavelength_data_set_default(bcmolt_xgpon_ni_adjust_tx_wavelength_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ADJUST_TX_WAVELENGTH_ID_SERIAL_NUMBER)) != 0)
+    {
+        memset(this->serial_number.vendor_id, 0, sizeof(this->serial_number.vendor_id));
+        memset(this->serial_number.vendor_specific, 0, sizeof(this->serial_number.vendor_specific));
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ADJUST_TX_WAVELENGTH_ID_FREQENCY_ADJUSTMENT_DIRECTION)) != 0)
+    {
+        this->freqency_adjustment_direction = BCMOLT_FREQUENCY_ADJUSTMENT_DIRECTION_LOWER;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ADJUST_TX_WAVELENGTH_ID_FREQUENCY_ADJUSTMENT_SIZE)) != 0)
+    {
+        this->frequency_adjustment_size = 1;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_adjust_tx_wavelength_data_pack(const bcmolt_xgpon_ni_adjust_tx_wavelength_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ADJUST_TX_WAVELENGTH_ID_SERIAL_NUMBER)) != 0)
+    {
+        if (!bcmolt_serial_number_pack(&this->serial_number, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ADJUST_TX_WAVELENGTH_ID_FREQENCY_ADJUSTMENT_DIRECTION)) != 0)
+    {
+        if (!bcmolt_frequency_adjustment_direction_pack(this->freqency_adjustment_direction, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ADJUST_TX_WAVELENGTH_ID_FREQUENCY_ADJUSTMENT_SIZE)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->frequency_adjustment_size))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_ni_adjust_tx_wavelength_data_get_packed_length(const bcmolt_xgpon_ni_adjust_tx_wavelength_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ADJUST_TX_WAVELENGTH_ID_SERIAL_NUMBER)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ADJUST_TX_WAVELENGTH_ID_FREQENCY_ADJUSTMENT_DIRECTION)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ADJUST_TX_WAVELENGTH_ID_FREQUENCY_ADJUSTMENT_SIZE)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_adjust_tx_wavelength_data_unpack(bcmolt_xgpon_ni_adjust_tx_wavelength_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ADJUST_TX_WAVELENGTH_ID_SERIAL_NUMBER)) != 0)
+    {
+        if (!bcmolt_serial_number_unpack(&this->serial_number, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ADJUST_TX_WAVELENGTH_ID_FREQENCY_ADJUSTMENT_DIRECTION)) != 0)
+    {
+        if (!bcmolt_frequency_adjustment_direction_unpack(&this->freqency_adjustment_direction, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ADJUST_TX_WAVELENGTH_ID_FREQUENCY_ADJUSTMENT_SIZE)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->frequency_adjustment_size))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_adjust_tx_wavelength_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ADJUST_TX_WAVELENGTH_ID_SERIAL_NUMBER)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ADJUST_TX_WAVELENGTH_ID_FREQENCY_ADJUSTMENT_DIRECTION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ADJUST_TX_WAVELENGTH_ID_FREQUENCY_ADJUSTMENT_SIZE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_adjust_tx_wavelength_data_bounds_check(const bcmolt_xgpon_ni_adjust_tx_wavelength_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_adjust_tx_wavelength_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ADJUST_TX_WAVELENGTH_ID_SERIAL_NUMBER)) != 0)
+    {
+        if (!bcmolt_serial_number_bounds_check(&this->serial_number))
+        {
+            *failed_prop = BCMOLT_XGPON_NI_ADJUST_TX_WAVELENGTH_ID_SERIAL_NUMBER;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ADJUST_TX_WAVELENGTH_ID_FREQENCY_ADJUSTMENT_DIRECTION)) != 0)
+    {
+        switch (this->freqency_adjustment_direction)
+        {
+            case BCMOLT_FREQUENCY_ADJUSTMENT_DIRECTION_LOWER:
+                break;
+            case BCMOLT_FREQUENCY_ADJUSTMENT_DIRECTION_HIGHER:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_NI_ADJUST_TX_WAVELENGTH_ID_FREQENCY_ADJUSTMENT_DIRECTION;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ADJUST_TX_WAVELENGTH_ID_FREQUENCY_ADJUSTMENT_SIZE)) != 0)
+    {
+        if (this->frequency_adjustment_size > 10)
+        {
+            *failed_prop = BCMOLT_XGPON_NI_ADJUST_TX_WAVELENGTH_ID_FREQUENCY_ADJUSTMENT_SIZE;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_ni_disable_serial_number_data_set_default(bcmolt_xgpon_ni_disable_serial_number_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_DISABLE_SERIAL_NUMBER_ID_CONTROL)) != 0)
+    {
+        this->control = BCMOLT_DISABLE_SERIAL_NUMBER_CONTROL_UNICAST_DISABLE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_DISABLE_SERIAL_NUMBER_ID_SERIAL_NUMBER)) != 0)
+    {
+        memset(this->serial_number.vendor_id, 0, sizeof(this->serial_number.vendor_id));
+        memset(this->serial_number.vendor_specific, 0, sizeof(this->serial_number.vendor_specific));
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_disable_serial_number_data_pack(const bcmolt_xgpon_ni_disable_serial_number_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_DISABLE_SERIAL_NUMBER_ID_CONTROL)) != 0)
+    {
+        if (!bcmolt_disable_serial_number_control_pack(this->control, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_DISABLE_SERIAL_NUMBER_ID_SERIAL_NUMBER)) != 0)
+    {
+        if (!bcmolt_serial_number_pack(&this->serial_number, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_ni_disable_serial_number_data_get_packed_length(const bcmolt_xgpon_ni_disable_serial_number_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_DISABLE_SERIAL_NUMBER_ID_CONTROL)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_DISABLE_SERIAL_NUMBER_ID_SERIAL_NUMBER)) != 0)
+    {
+        count += 8;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_disable_serial_number_data_unpack(bcmolt_xgpon_ni_disable_serial_number_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_DISABLE_SERIAL_NUMBER_ID_CONTROL)) != 0)
+    {
+        if (!bcmolt_disable_serial_number_control_unpack(&this->control, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_DISABLE_SERIAL_NUMBER_ID_SERIAL_NUMBER)) != 0)
+    {
+        if (!bcmolt_serial_number_unpack(&this->serial_number, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_disable_serial_number_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_DISABLE_SERIAL_NUMBER_ID_CONTROL)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_DISABLE_SERIAL_NUMBER_ID_SERIAL_NUMBER)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_disable_serial_number_data_bounds_check(const bcmolt_xgpon_ni_disable_serial_number_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_disable_serial_number_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_DISABLE_SERIAL_NUMBER_ID_CONTROL)) != 0)
+    {
+        switch (this->control)
+        {
+            case BCMOLT_DISABLE_SERIAL_NUMBER_CONTROL_UNICAST_DISABLE:
+                break;
+            case BCMOLT_DISABLE_SERIAL_NUMBER_CONTROL_UNICAST_ENABLE:
+                break;
+            case BCMOLT_DISABLE_SERIAL_NUMBER_CONTROL_BROADCAST_ENABLE:
+                break;
+            case BCMOLT_DISABLE_SERIAL_NUMBER_CONTROL_BROADCAST_DISABLE:
+                break;
+            case BCMOLT_DISABLE_SERIAL_NUMBER_CONTROL_DISABLE_DISCOVERY:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_NI_DISABLE_SERIAL_NUMBER_ID_CONTROL;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_DISABLE_SERIAL_NUMBER_ID_SERIAL_NUMBER)) != 0)
+    {
+        if (!bcmolt_serial_number_bounds_check(&this->serial_number))
+        {
+            *failed_prop = BCMOLT_XGPON_NI_DISABLE_SERIAL_NUMBER_ID_SERIAL_NUMBER;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_ni_rogue_detection_window_data_set_default(bcmolt_xgpon_ni_rogue_detection_window_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_WINDOW_ID_WINDOW_TYPE)) != 0)
+    {
+        this->window_type = BCMOLT_ROGUE_DETECTION_WINDOW_SILENT_WINDOW;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_WINDOW_ID_ALLOC_ID)) != 0)
+    {
+        this->alloc_id = (bcmolt_xgpon_alloc_id) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_WINDOW_ID_ONU_ID)) != 0)
+    {
+        this->onu_id = (bcmolt_xgpon_onu_id) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_WINDOW_ID_SECOND_RANGING_WINDOW)) != 0)
+    {
+        this->second_ranging_window = BCMOS_FALSE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_rogue_detection_window_data_pack(const bcmolt_xgpon_ni_rogue_detection_window_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_WINDOW_ID_WINDOW_TYPE)) != 0)
+    {
+        if (!bcmolt_rogue_detection_window_pack(this->window_type, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_WINDOW_ID_ALLOC_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->alloc_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_WINDOW_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->onu_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_WINDOW_ID_SECOND_RANGING_WINDOW)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->second_ranging_window))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_ni_rogue_detection_window_data_get_packed_length(const bcmolt_xgpon_ni_rogue_detection_window_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_WINDOW_ID_WINDOW_TYPE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_WINDOW_ID_ALLOC_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_WINDOW_ID_ONU_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_WINDOW_ID_SECOND_RANGING_WINDOW)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_rogue_detection_window_data_unpack(bcmolt_xgpon_ni_rogue_detection_window_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_WINDOW_ID_WINDOW_TYPE)) != 0)
+    {
+        if (!bcmolt_rogue_detection_window_unpack(&this->window_type, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_WINDOW_ID_ALLOC_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->alloc_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_WINDOW_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->onu_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_WINDOW_ID_SECOND_RANGING_WINDOW)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->second_ranging_window))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_rogue_detection_window_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_WINDOW_ID_WINDOW_TYPE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_WINDOW_ID_ALLOC_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_WINDOW_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_WINDOW_ID_SECOND_RANGING_WINDOW)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_rogue_detection_window_data_bounds_check(const bcmolt_xgpon_ni_rogue_detection_window_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_rogue_detection_window_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_WINDOW_ID_WINDOW_TYPE)) != 0)
+    {
+        switch (this->window_type)
+        {
+            case BCMOLT_ROGUE_DETECTION_WINDOW_SILENT_WINDOW:
+                break;
+            case BCMOLT_ROGUE_DETECTION_WINDOW_CUT_OFF_WINDOW:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_NI_ROGUE_DETECTION_WINDOW_ID_WINDOW_TYPE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_WINDOW_ID_ALLOC_ID)) != 0)
+    {
+        if (this->alloc_id > (bcmolt_xgpon_alloc_id) 16383)
+        {
+            *failed_prop = BCMOLT_XGPON_NI_ROGUE_DETECTION_WINDOW_ID_ALLOC_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_ROGUE_DETECTION_WINDOW_ID_ONU_ID)) != 0)
+    {
+        if (this->onu_id > (bcmolt_xgpon_onu_id) 511)
+        {
+            *failed_prop = BCMOLT_XGPON_NI_ROGUE_DETECTION_WINDOW_ID_ONU_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_ni_run_special_bw_map_data_set_default(bcmolt_xgpon_ni_run_special_bw_map_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_RUN_SPECIAL_BW_MAP_ID_NUMBER_OF_CYCLE)) != 0)
+    {
+        this->number_of_cycle = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_RUN_SPECIAL_BW_MAP_ID_ALLOCATION_NUMBER)) != 0)
+    {
+        this->allocation_number = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_RUN_SPECIAL_BW_MAP_ID_BW_MAP_ARRAY)) != 0)
+    {
+        this->bw_map_array = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_run_special_bw_map_data_pack(const bcmolt_xgpon_ni_run_special_bw_map_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_RUN_SPECIAL_BW_MAP_ID_NUMBER_OF_CYCLE)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->number_of_cycle))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_RUN_SPECIAL_BW_MAP_ID_ALLOCATION_NUMBER)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->allocation_number))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_RUN_SPECIAL_BW_MAP_ID_BW_MAP_ARRAY)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->bw_map_array))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_ni_run_special_bw_map_data_get_packed_length(const bcmolt_xgpon_ni_run_special_bw_map_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_RUN_SPECIAL_BW_MAP_ID_NUMBER_OF_CYCLE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_RUN_SPECIAL_BW_MAP_ID_ALLOCATION_NUMBER)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_RUN_SPECIAL_BW_MAP_ID_BW_MAP_ARRAY)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_run_special_bw_map_data_unpack(bcmolt_xgpon_ni_run_special_bw_map_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_RUN_SPECIAL_BW_MAP_ID_NUMBER_OF_CYCLE)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->number_of_cycle))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_RUN_SPECIAL_BW_MAP_ID_ALLOCATION_NUMBER)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->allocation_number))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_RUN_SPECIAL_BW_MAP_ID_BW_MAP_ARRAY)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->bw_map_array))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_run_special_bw_map_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_RUN_SPECIAL_BW_MAP_ID_NUMBER_OF_CYCLE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_RUN_SPECIAL_BW_MAP_ID_ALLOCATION_NUMBER)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_RUN_SPECIAL_BW_MAP_ID_BW_MAP_ARRAY)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_run_special_bw_map_data_bounds_check(const bcmolt_xgpon_ni_run_special_bw_map_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_run_special_bw_map_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_ni_set_onu_state_data_set_default(bcmolt_xgpon_ni_set_onu_state_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_SET_ONU_STATE_ID_ONU_STATE)) != 0)
+    {
+        this->onu_state = BCMOLT_ONU_OPERATION_INACTIVE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_set_onu_state_data_pack(const bcmolt_xgpon_ni_set_onu_state_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_SET_ONU_STATE_ID_ONU_STATE)) != 0)
+    {
+        if (!bcmolt_onu_operation_pack(this->onu_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_ni_set_onu_state_data_get_packed_length(const bcmolt_xgpon_ni_set_onu_state_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_SET_ONU_STATE_ID_ONU_STATE)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_set_onu_state_data_unpack(bcmolt_xgpon_ni_set_onu_state_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_SET_ONU_STATE_ID_ONU_STATE)) != 0)
+    {
+        if (!bcmolt_onu_operation_unpack(&this->onu_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_set_onu_state_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_SET_ONU_STATE_ID_ONU_STATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_set_onu_state_data_bounds_check(const bcmolt_xgpon_ni_set_onu_state_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_set_onu_state_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_SET_ONU_STATE_ID_ONU_STATE)) != 0)
+    {
+        switch (this->onu_state)
+        {
+            case BCMOLT_ONU_OPERATION_INACTIVE:
+                break;
+            case BCMOLT_ONU_OPERATION_ACTIVE:
+                break;
+            case BCMOLT_ONU_OPERATION_DISABLE:
+                break;
+            case BCMOLT_ONU_OPERATION_ENABLE:
+                break;
+            case BCMOLT_ONU_OPERATION_ACTIVE_STANDBY:
+                break;
+            case BCMOLT_ONU_OPERATION_AWAKE_FREE:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_NI_SET_ONU_STATE_ID_ONU_STATE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_ni_set_pon_state_data_set_default(bcmolt_xgpon_ni_set_pon_state_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_SET_PON_STATE_ID_PON_STATE)) != 0)
+    {
+        this->pon_state = BCMOLT_PON_OPERATION_INACTIVE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_set_pon_state_data_pack(const bcmolt_xgpon_ni_set_pon_state_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_SET_PON_STATE_ID_PON_STATE)) != 0)
+    {
+        if (!bcmolt_pon_operation_pack(this->pon_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_ni_set_pon_state_data_get_packed_length(const bcmolt_xgpon_ni_set_pon_state_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_SET_PON_STATE_ID_PON_STATE)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_set_pon_state_data_unpack(bcmolt_xgpon_ni_set_pon_state_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_SET_PON_STATE_ID_PON_STATE)) != 0)
+    {
+        if (!bcmolt_pon_operation_unpack(&this->pon_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_set_pon_state_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_SET_PON_STATE_ID_PON_STATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_set_pon_state_data_bounds_check(const bcmolt_xgpon_ni_set_pon_state_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_set_pon_state_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_SET_PON_STATE_ID_PON_STATE)) != 0)
+    {
+        switch (this->pon_state)
+        {
+            case BCMOLT_PON_OPERATION_INACTIVE:
+                break;
+            case BCMOLT_PON_OPERATION_ACTIVE_WORKING:
+                break;
+            case BCMOLT_PON_OPERATION_ACTIVE_STANDBY:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_NI_SET_PON_STATE_ID_PON_STATE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_ni_start_onu_upgrade_data_set_default(bcmolt_xgpon_ni_start_onu_upgrade_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_START_ONU_UPGRADE_ID_LIST_OF_ONU_IDS)) != 0)
+    {
+        this->list_of_onu_ids.len = 0;
+        this->list_of_onu_ids.val = NULL;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_start_onu_upgrade_data_pack(const bcmolt_xgpon_ni_start_onu_upgrade_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_START_ONU_UPGRADE_ID_LIST_OF_ONU_IDS)) != 0)
+    {
+        if (!bcmolt_pon_onu_id_list_u32_pack(&this->list_of_onu_ids, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_ni_start_onu_upgrade_data_get_packed_length(const bcmolt_xgpon_ni_start_onu_upgrade_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_START_ONU_UPGRADE_ID_LIST_OF_ONU_IDS)) != 0)
+    {
+        count += bcmolt_pon_onu_id_list_u32_get_packed_length(&this->list_of_onu_ids);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_start_onu_upgrade_data_unpack(bcmolt_xgpon_ni_start_onu_upgrade_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_START_ONU_UPGRADE_ID_LIST_OF_ONU_IDS)) != 0)
+    {
+        if (!bcmolt_pon_onu_id_list_u32_unpack(&this->list_of_onu_ids, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_start_onu_upgrade_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_START_ONU_UPGRADE_ID_LIST_OF_ONU_IDS)) != 0)
+    {
+        if (!bcmolt_pon_onu_id_list_u32_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_start_onu_upgrade_data_bounds_check(const bcmolt_xgpon_ni_start_onu_upgrade_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_start_onu_upgrade_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_START_ONU_UPGRADE_ID_LIST_OF_ONU_IDS)) != 0)
+    {
+        if (!bcmolt_pon_onu_id_list_u32_bounds_check(&this->list_of_onu_ids))
+        {
+            *failed_prop = BCMOLT_XGPON_NI_START_ONU_UPGRADE_ID_LIST_OF_ONU_IDS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_ni_broadcast_ploam_packet_data_set_default(bcmolt_xgpon_ni_broadcast_ploam_packet_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_BROADCAST_PLOAM_PACKET_ID_PLOAM)) != 0)
+    {
+        memset(this->ploam.arr, 0, sizeof(this->ploam.arr));
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_broadcast_ploam_packet_data_pack(const bcmolt_xgpon_ni_broadcast_ploam_packet_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_BROADCAST_PLOAM_PACKET_ID_PLOAM)) != 0)
+    {
+        if (!bcmolt_arr_u8_40_pack(&this->ploam, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_ni_broadcast_ploam_packet_data_get_packed_length(const bcmolt_xgpon_ni_broadcast_ploam_packet_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_BROADCAST_PLOAM_PACKET_ID_PLOAM)) != 0)
+    {
+        count += 40;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_broadcast_ploam_packet_data_unpack(bcmolt_xgpon_ni_broadcast_ploam_packet_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_BROADCAST_PLOAM_PACKET_ID_PLOAM)) != 0)
+    {
+        if (!bcmolt_arr_u8_40_unpack(&this->ploam, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_broadcast_ploam_packet_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_BROADCAST_PLOAM_PACKET_ID_PLOAM)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 40))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_broadcast_ploam_packet_data_bounds_check(const bcmolt_xgpon_ni_broadcast_ploam_packet_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_broadcast_ploam_packet_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_BROADCAST_PLOAM_PACKET_ID_PLOAM)) != 0)
+    {
+        if (!bcmolt_arr_u8_40_bounds_check(&this->ploam))
+        {
+            *failed_prop = BCMOLT_XGPON_NI_BROADCAST_PLOAM_PACKET_ID_PLOAM;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_ni_cpu_packets_data_set_default(bcmolt_xgpon_ni_cpu_packets_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CPU_PACKETS_ID_PACKET_TYPE)) != 0)
+    {
+        this->packet_type = BCMOLT_PACKET_TYPE_CPU;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CPU_PACKETS_ID_CALC_CRC)) != 0)
+    {
+        this->calc_crc = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CPU_PACKETS_ID_GEM_PORT_LIST)) != 0)
+    {
+        this->gem_port_list.len = 0;
+        this->gem_port_list.val = NULL;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CPU_PACKETS_ID_BUFFER)) != 0)
+    {
+        this->buffer.len = 0;
+        this->buffer.val = NULL;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_cpu_packets_data_pack(const bcmolt_xgpon_ni_cpu_packets_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CPU_PACKETS_ID_PACKET_TYPE)) != 0)
+    {
+        if (!bcmolt_packet_type_pack(this->packet_type, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CPU_PACKETS_ID_CALC_CRC)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->calc_crc))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CPU_PACKETS_ID_GEM_PORT_LIST)) != 0)
+    {
+        if (!bcmolt_xgpon_gem_id_list_u8_max_16_pack(&this->gem_port_list, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CPU_PACKETS_ID_BUFFER)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_max_2048_pack(&this->buffer, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_ni_cpu_packets_data_get_packed_length(const bcmolt_xgpon_ni_cpu_packets_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CPU_PACKETS_ID_PACKET_TYPE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CPU_PACKETS_ID_CALC_CRC)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CPU_PACKETS_ID_GEM_PORT_LIST)) != 0)
+    {
+        count += bcmolt_xgpon_gem_id_list_u8_max_16_get_packed_length(&this->gem_port_list);
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CPU_PACKETS_ID_BUFFER)) != 0)
+    {
+        count += bcmolt_u8_list_u32_max_2048_get_packed_length(&this->buffer);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_cpu_packets_data_unpack(bcmolt_xgpon_ni_cpu_packets_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CPU_PACKETS_ID_PACKET_TYPE)) != 0)
+    {
+        if (!bcmolt_packet_type_unpack(&this->packet_type, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CPU_PACKETS_ID_CALC_CRC)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->calc_crc))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CPU_PACKETS_ID_GEM_PORT_LIST)) != 0)
+    {
+        if (!bcmolt_xgpon_gem_id_list_u8_max_16_unpack(&this->gem_port_list, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CPU_PACKETS_ID_BUFFER)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_max_2048_unpack(&this->buffer, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_cpu_packets_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CPU_PACKETS_ID_PACKET_TYPE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CPU_PACKETS_ID_CALC_CRC)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CPU_PACKETS_ID_GEM_PORT_LIST)) != 0)
+    {
+        if (!bcmolt_xgpon_gem_id_list_u8_max_16_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CPU_PACKETS_ID_BUFFER)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_max_2048_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_ni_cpu_packets_data_bounds_check(const bcmolt_xgpon_ni_cpu_packets_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_cpu_packets_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CPU_PACKETS_ID_PACKET_TYPE)) != 0)
+    {
+        switch (this->packet_type)
+        {
+            case BCMOLT_PACKET_TYPE_CPU:
+                break;
+            case BCMOLT_PACKET_TYPE_OMCI:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_NI_CPU_PACKETS_ID_PACKET_TYPE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CPU_PACKETS_ID_GEM_PORT_LIST)) != 0)
+    {
+        if (this->gem_port_list.len > 16)
+        {
+            return BCMOS_FALSE;
+        }
+
+        if (!bcmolt_xgpon_gem_id_list_u8_max_16_bounds_check(&this->gem_port_list))
+        {
+            *failed_prop = BCMOLT_XGPON_NI_CPU_PACKETS_ID_GEM_PORT_LIST;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_NI_CPU_PACKETS_ID_BUFFER)) != 0)
+    {
+        if (this->buffer.len > 2048)
+        {
+            return BCMOS_FALSE;
+        }
+
+        if (!bcmolt_u8_list_u32_max_2048_bounds_check(&this->buffer))
+        {
+            *failed_prop = BCMOLT_XGPON_NI_CPU_PACKETS_ID_BUFFER;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_key_set_default(bcmolt_xgpon_onu_key *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_KEY_ID_PON_NI)) != 0)
+    {
+        this->pon_ni = (bcmolt_xgpon_ni) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_KEY_ID_ONU_ID)) != 0)
+    {
+        this->onu_id = (bcmolt_xgpon_onu_id) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_key_pack(const bcmolt_xgpon_onu_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, (uint8_t) this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_KEY_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->onu_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_key_get_packed_length(const bcmolt_xgpon_onu_key *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_KEY_ID_PON_NI)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_KEY_ID_ONU_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_key_unpack(bcmolt_xgpon_onu_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, (uint8_t *) &this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_KEY_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->onu_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_KEY_ID_ONU_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_key_bounds_check(const bcmolt_xgpon_onu_key *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_key_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_KEY_ID_PON_NI)) != 0)
+    {
+        if (this->pon_ni > (bcmolt_xgpon_ni) 7)
+        {
+            *failed_prop = BCMOLT_XGPON_ONU_KEY_ID_PON_NI;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_KEY_ID_ONU_ID)) != 0)
+    {
+        if (this->onu_id > (bcmolt_xgpon_onu_id) 511)
+        {
+            *failed_prop = BCMOLT_XGPON_ONU_KEY_ID_ONU_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_cfg_data_set_default(bcmolt_xgpon_onu_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_ONU_STATE)) != 0)
+    {
+        this->onu_state = BCMOLT_ONU_STATE_NOT_CONFIGURED;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_ONU_OLD_STATE)) != 0)
+    {
+        this->onu_old_state = BCMOLT_ONU_STATE_NOT_CONFIGURED;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_ALARM_STATE)) != 0)
+    {
+        this->alarm_state.losi = BCMOLT_STATUS_OFF;
+        this->alarm_state.lobi = BCMOLT_STATUS_OFF;
+        this->alarm_state.lopci = BCMOLT_STATUS_OFF;
+        this->alarm_state.lopci_mic_error = BCMOLT_STATUS_OFF;
+        this->alarm_state.looci = BCMOLT_STATUS_OFF;
+        this->alarm_state.tiwi = BCMOLT_STATUS_OFF;
+        this->alarm_state.dowi = BCMOLT_STATUS_OFF;
+        this->alarm_state.sufi = BCMOLT_STATUS_OFF;
+        this->alarm_state.sfi = BCMOLT_STATUS_OFF;
+        this->alarm_state.sdi = BCMOLT_STATUS_OFF;
+        this->alarm_state.dfi = BCMOLT_STATUS_OFF;
+        this->alarm_state.dgi = BCMOLT_STATUS_OFF;
+        this->alarm_state.pqsi = BCMOLT_STATUS_OFF;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_REGISTRATION_ENCRYPTION_KEYS)) != 0)
+    {
+        memset(this->registration_encryption_keys.ploam_ik.bytes, 0, sizeof(this->registration_encryption_keys.ploam_ik.bytes));
+        memset(this->registration_encryption_keys.omci_ik.bytes, 0, sizeof(this->registration_encryption_keys.omci_ik.bytes));
+        memset(this->registration_encryption_keys.omci_k1.bytes, 0, sizeof(this->registration_encryption_keys.omci_k1.bytes));
+        memset(this->registration_encryption_keys.omci_k2.bytes, 0, sizeof(this->registration_encryption_keys.omci_k2.bytes));
+        memset(this->registration_encryption_keys.kek.bytes, 0, sizeof(this->registration_encryption_keys.kek.bytes));
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_CURRENT_ENCRYPTION_KEY)) != 0)
+    {
+        memset(this->current_encryption_key.encryption_key.bytes, 0, sizeof(this->current_encryption_key.encryption_key.bytes));
+        this->current_encryption_key.key_index = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_SERIAL_NUMBER)) != 0)
+    {
+        memset(this->serial_number.vendor_id, 0, sizeof(this->serial_number.vendor_id));
+        memset(this->serial_number.vendor_specific, 0, sizeof(this->serial_number.vendor_specific));
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_REGISTRATION_ID)) != 0)
+    {
+        memset(this->registration_id.arr, 0, sizeof(this->registration_id.arr));
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_REGISTRATION_ID_AUTO_LEARNING)) != 0)
+    {
+        this->registration_id_auto_learning = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_RANGING_BURST_PROFILE)) != 0)
+    {
+        this->ranging_burst_profile = (bcmolt_burst_profile_index) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_DATA_BURST_PROFILE)) != 0)
+    {
+        this->data_burst_profile = (bcmolt_burst_profile_index) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_RANGING_TIME)) != 0)
+    {
+        this->ranging_time = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_DISABLED_AFTER_DISCOVERY)) != 0)
+    {
+        this->disabled_after_discovery = BCMOLT_STATUS_OFF;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_DEACTIVATION_REASON)) != 0)
+    {
+        this->deactivation_reason = BCMOLT_DEACTIVATION_REASON_NONE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_ALL_GEM_PORTS)) != 0)
+    {
+        this->all_gem_ports.len = 0;
+        this->all_gem_ports.val = NULL;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_ALL_ALLOCS)) != 0)
+    {
+        this->all_allocs.len = 0;
+        this->all_allocs.val = NULL;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_EXTENDED_GUARD_TIME)) != 0)
+    {
+        this->extended_guard_time.additional_preburst_guard_time = 0;
+        this->extended_guard_time.additional_postburst_guard_time = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_US_LINE_RATE)) != 0)
+    {
+        this->us_line_rate = BCMOLT_UPSTREAM_LINE_RATE_CAPABILITIES_RATE_2_P_5_G;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_CALIBRATION_RECORD)) != 0)
+    {
+        memset(this->calibration_record.arr, 0, sizeof(this->calibration_record.arr));
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_TUNING_GRANULARITY)) != 0)
+    {
+        this->tuning_granularity = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_STEP_TUNING_TIME)) != 0)
+    {
+        this->step_tuning_time = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_POWER_LEVELLING_CAPABILITIES)) != 0)
+    {
+        this->power_levelling_capabilities = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_REQUEST_REGISTRATION_STATUS)) != 0)
+    {
+        this->request_registration_status.request_registration_state = BCMOLT_CONTROL_STATE_DISABLE;
+        this->request_registration_status.sma_flag = BCMOS_FALSE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_cfg_data_pack(const bcmolt_xgpon_onu_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_ONU_STATE)) != 0)
+    {
+        if (!bcmolt_onu_state_pack(this->onu_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_ONU_OLD_STATE)) != 0)
+    {
+        if (!bcmolt_onu_state_pack(this->onu_old_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_ALARM_STATE)) != 0)
+    {
+        if (!bcmolt_xgpon_onu_alarm_state_pack(&this->alarm_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_REGISTRATION_ENCRYPTION_KEYS)) != 0)
+    {
+        if (!bcmolt_xgpon_onu_registration_keys_pack(&this->registration_encryption_keys, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_CURRENT_ENCRYPTION_KEY)) != 0)
+    {
+        if (!bcmolt_xgpon_onu_aes_key_pack(&this->current_encryption_key, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_SERIAL_NUMBER)) != 0)
+    {
+        if (!bcmolt_serial_number_pack(&this->serial_number, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_REGISTRATION_ID)) != 0)
+    {
+        if (!bcmolt_arr_u8_36_pack(&this->registration_id, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_REGISTRATION_ID_AUTO_LEARNING)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->registration_id_auto_learning))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_RANGING_BURST_PROFILE)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, (uint8_t) this->ranging_burst_profile))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_DATA_BURST_PROFILE)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, (uint8_t) this->data_burst_profile))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_RANGING_TIME)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->ranging_time))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_DISABLED_AFTER_DISCOVERY)) != 0)
+    {
+        if (!bcmolt_status_pack(this->disabled_after_discovery, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_DEACTIVATION_REASON)) != 0)
+    {
+        if (!bcmolt_deactivation_reason_pack(this->deactivation_reason, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_ALL_GEM_PORTS)) != 0)
+    {
+        if (!bcmolt_xgpon_gem_port_with_state_list_u16_max_256_pack(&this->all_gem_ports, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_ALL_ALLOCS)) != 0)
+    {
+        if (!bcmolt_xgpon_alloc_with_state_list_u16_max_32_pack(&this->all_allocs, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_EXTENDED_GUARD_TIME)) != 0)
+    {
+        if (!bcmolt_extended_guard_time_pack(&this->extended_guard_time, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_US_LINE_RATE)) != 0)
+    {
+        if (!bcmolt_upstream_line_rate_capabilities_pack(this->us_line_rate, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_CALIBRATION_RECORD)) != 0)
+    {
+        if (!bcmolt_arr_calibration_record_8_pack(&this->calibration_record, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_TUNING_GRANULARITY)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->tuning_granularity))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_STEP_TUNING_TIME)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->step_tuning_time))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_POWER_LEVELLING_CAPABILITIES)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->power_levelling_capabilities))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_REQUEST_REGISTRATION_STATUS)) != 0)
+    {
+        if (!bcmolt_request_registration_status_pack(&this->request_registration_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_cfg_data_get_packed_length(const bcmolt_xgpon_onu_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_ONU_STATE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_ONU_OLD_STATE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_ALARM_STATE)) != 0)
+    {
+        count += 13;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_REGISTRATION_ENCRYPTION_KEYS)) != 0)
+    {
+        count += 80;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_CURRENT_ENCRYPTION_KEY)) != 0)
+    {
+        count += 17;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_SERIAL_NUMBER)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_REGISTRATION_ID)) != 0)
+    {
+        count += 36;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_REGISTRATION_ID_AUTO_LEARNING)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_RANGING_BURST_PROFILE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_DATA_BURST_PROFILE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_RANGING_TIME)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_DISABLED_AFTER_DISCOVERY)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_DEACTIVATION_REASON)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_ALL_GEM_PORTS)) != 0)
+    {
+        count += bcmolt_xgpon_gem_port_with_state_list_u16_max_256_get_packed_length(&this->all_gem_ports);
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_ALL_ALLOCS)) != 0)
+    {
+        count += bcmolt_xgpon_alloc_with_state_list_u16_max_32_get_packed_length(&this->all_allocs);
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_EXTENDED_GUARD_TIME)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_US_LINE_RATE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_CALIBRATION_RECORD)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_TUNING_GRANULARITY)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_STEP_TUNING_TIME)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_POWER_LEVELLING_CAPABILITIES)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_REQUEST_REGISTRATION_STATUS)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_cfg_data_unpack(bcmolt_xgpon_onu_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_ONU_STATE)) != 0)
+    {
+        if (!bcmolt_onu_state_unpack(&this->onu_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_ONU_OLD_STATE)) != 0)
+    {
+        if (!bcmolt_onu_state_unpack(&this->onu_old_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_ALARM_STATE)) != 0)
+    {
+        if (!bcmolt_xgpon_onu_alarm_state_unpack(&this->alarm_state, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_REGISTRATION_ENCRYPTION_KEYS)) != 0)
+    {
+        if (!bcmolt_xgpon_onu_registration_keys_unpack(&this->registration_encryption_keys, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_CURRENT_ENCRYPTION_KEY)) != 0)
+    {
+        if (!bcmolt_xgpon_onu_aes_key_unpack(&this->current_encryption_key, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_SERIAL_NUMBER)) != 0)
+    {
+        if (!bcmolt_serial_number_unpack(&this->serial_number, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_REGISTRATION_ID)) != 0)
+    {
+        if (!bcmolt_arr_u8_36_unpack(&this->registration_id, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_REGISTRATION_ID_AUTO_LEARNING)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->registration_id_auto_learning))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_RANGING_BURST_PROFILE)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, (uint8_t *) &this->ranging_burst_profile))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_DATA_BURST_PROFILE)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, (uint8_t *) &this->data_burst_profile))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_RANGING_TIME)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->ranging_time))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_DISABLED_AFTER_DISCOVERY)) != 0)
+    {
+        if (!bcmolt_status_unpack(&this->disabled_after_discovery, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_DEACTIVATION_REASON)) != 0)
+    {
+        if (!bcmolt_deactivation_reason_unpack(&this->deactivation_reason, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_ALL_GEM_PORTS)) != 0)
+    {
+        if (!bcmolt_xgpon_gem_port_with_state_list_u16_max_256_unpack(&this->all_gem_ports, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_ALL_ALLOCS)) != 0)
+    {
+        if (!bcmolt_xgpon_alloc_with_state_list_u16_max_32_unpack(&this->all_allocs, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_EXTENDED_GUARD_TIME)) != 0)
+    {
+        if (!bcmolt_extended_guard_time_unpack(&this->extended_guard_time, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_US_LINE_RATE)) != 0)
+    {
+        if (!bcmolt_upstream_line_rate_capabilities_unpack(&this->us_line_rate, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_CALIBRATION_RECORD)) != 0)
+    {
+        if (!bcmolt_arr_calibration_record_8_unpack(&this->calibration_record, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_TUNING_GRANULARITY)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->tuning_granularity))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_STEP_TUNING_TIME)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->step_tuning_time))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_POWER_LEVELLING_CAPABILITIES)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->power_levelling_capabilities))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_REQUEST_REGISTRATION_STATUS)) != 0)
+    {
+        if (!bcmolt_request_registration_status_unpack(&this->request_registration_status, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_ONU_STATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_ONU_OLD_STATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_ALARM_STATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 13))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_REGISTRATION_ENCRYPTION_KEYS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 80))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_CURRENT_ENCRYPTION_KEY)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 17))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_SERIAL_NUMBER)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_REGISTRATION_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 36))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_REGISTRATION_ID_AUTO_LEARNING)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_RANGING_BURST_PROFILE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_DATA_BURST_PROFILE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_RANGING_TIME)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_DISABLED_AFTER_DISCOVERY)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_DEACTIVATION_REASON)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_ALL_GEM_PORTS)) != 0)
+    {
+        if (!bcmolt_xgpon_gem_port_with_state_list_u16_max_256_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_ALL_ALLOCS)) != 0)
+    {
+        if (!bcmolt_xgpon_alloc_with_state_list_u16_max_32_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_EXTENDED_GUARD_TIME)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_US_LINE_RATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_CALIBRATION_RECORD)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_TUNING_GRANULARITY)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_STEP_TUNING_TIME)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_POWER_LEVELLING_CAPABILITIES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_REQUEST_REGISTRATION_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_cfg_data_bounds_check(const bcmolt_xgpon_onu_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_ONU_STATE)) != 0)
+    {
+        switch (this->onu_state)
+        {
+            case BCMOLT_ONU_STATE_NOT_CONFIGURED:
+                break;
+            case BCMOLT_ONU_STATE_INACTIVE:
+                break;
+            case BCMOLT_ONU_STATE_ACTIVE:
+                break;
+            case BCMOLT_ONU_STATE_ACTIVE_STANDBY:
+                break;
+            case BCMOLT_ONU_STATE_DISABLED:
+                break;
+            case BCMOLT_ONU_STATE_AWAKE_FREE:
+                break;
+            case BCMOLT_ONU_STATE_PROCESSING:
+                break;
+            case BCMOLT_ONU_STATE_LOW_POWER_DOZE:
+                break;
+            case BCMOLT_ONU_STATE_LOW_POWER_SLEEP:
+                break;
+            case BCMOLT_ONU_STATE_LOW_POWER_WATCH:
+                break;
+            case BCMOLT_ONU_STATE_UNAWARE:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ONU_CFG_ID_ONU_STATE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_ONU_OLD_STATE)) != 0)
+    {
+        switch (this->onu_old_state)
+        {
+            case BCMOLT_ONU_STATE_NOT_CONFIGURED:
+                break;
+            case BCMOLT_ONU_STATE_INACTIVE:
+                break;
+            case BCMOLT_ONU_STATE_ACTIVE:
+                break;
+            case BCMOLT_ONU_STATE_ACTIVE_STANDBY:
+                break;
+            case BCMOLT_ONU_STATE_DISABLED:
+                break;
+            case BCMOLT_ONU_STATE_AWAKE_FREE:
+                break;
+            case BCMOLT_ONU_STATE_PROCESSING:
+                break;
+            case BCMOLT_ONU_STATE_LOW_POWER_DOZE:
+                break;
+            case BCMOLT_ONU_STATE_LOW_POWER_SLEEP:
+                break;
+            case BCMOLT_ONU_STATE_LOW_POWER_WATCH:
+                break;
+            case BCMOLT_ONU_STATE_UNAWARE:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ONU_CFG_ID_ONU_OLD_STATE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_ALARM_STATE)) != 0)
+    {
+        if (!bcmolt_xgpon_onu_alarm_state_bounds_check(&this->alarm_state))
+        {
+            *failed_prop = BCMOLT_XGPON_ONU_CFG_ID_ALARM_STATE;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_REGISTRATION_ENCRYPTION_KEYS)) != 0)
+    {
+        if (!bcmolt_xgpon_onu_registration_keys_bounds_check(&this->registration_encryption_keys))
+        {
+            *failed_prop = BCMOLT_XGPON_ONU_CFG_ID_REGISTRATION_ENCRYPTION_KEYS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_CURRENT_ENCRYPTION_KEY)) != 0)
+    {
+        if (!bcmolt_xgpon_onu_aes_key_bounds_check(&this->current_encryption_key))
+        {
+            *failed_prop = BCMOLT_XGPON_ONU_CFG_ID_CURRENT_ENCRYPTION_KEY;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_SERIAL_NUMBER)) != 0)
+    {
+        if (!bcmolt_serial_number_bounds_check(&this->serial_number))
+        {
+            *failed_prop = BCMOLT_XGPON_ONU_CFG_ID_SERIAL_NUMBER;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_REGISTRATION_ID)) != 0)
+    {
+        if (!bcmolt_arr_u8_36_bounds_check(&this->registration_id))
+        {
+            *failed_prop = BCMOLT_XGPON_ONU_CFG_ID_REGISTRATION_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_RANGING_BURST_PROFILE)) != 0)
+    {
+        if (this->ranging_burst_profile > (bcmolt_burst_profile_index) 3)
+        {
+            *failed_prop = BCMOLT_XGPON_ONU_CFG_ID_RANGING_BURST_PROFILE;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_DATA_BURST_PROFILE)) != 0)
+    {
+        if (this->data_burst_profile > (bcmolt_burst_profile_index) 3)
+        {
+            *failed_prop = BCMOLT_XGPON_ONU_CFG_ID_DATA_BURST_PROFILE;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_DISABLED_AFTER_DISCOVERY)) != 0)
+    {
+        switch (this->disabled_after_discovery)
+        {
+            case BCMOLT_STATUS_OFF:
+                break;
+            case BCMOLT_STATUS_ON:
+                break;
+            case BCMOLT_STATUS_NO_CHANGE:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ONU_CFG_ID_DISABLED_AFTER_DISCOVERY;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_DEACTIVATION_REASON)) != 0)
+    {
+        switch (this->deactivation_reason)
+        {
+            case BCMOLT_DEACTIVATION_REASON_NONE:
+                break;
+            case BCMOLT_DEACTIVATION_REASON_DEACTIVATION:
+                break;
+            case BCMOLT_DEACTIVATION_REASON_ACK_TIMEOUT:
+                break;
+            case BCMOLT_DEACTIVATION_REASON_SFI:
+                break;
+            case BCMOLT_DEACTIVATION_REASON_TIWI:
+                break;
+            case BCMOLT_DEACTIVATION_REASON_PASSWORD_AUTHENTICATION:
+                break;
+            case BCMOLT_DEACTIVATION_REASON_ONU_ALARM:
+                break;
+            case BCMOLT_DEACTIVATION_REASON_LOS:
+                break;
+            case BCMOLT_DEACTIVATION_REASON_LOKI:
+                break;
+            case BCMOLT_DEACTIVATION_REASON_RERANGE_FAILURE:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ONU_CFG_ID_DEACTIVATION_REASON;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_ALL_GEM_PORTS)) != 0)
+    {
+        if (this->all_gem_ports.len > 256)
+        {
+            return BCMOS_FALSE;
+        }
+
+        if (!bcmolt_xgpon_gem_port_with_state_list_u16_max_256_bounds_check(&this->all_gem_ports))
+        {
+            *failed_prop = BCMOLT_XGPON_ONU_CFG_ID_ALL_GEM_PORTS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_ALL_ALLOCS)) != 0)
+    {
+        if (this->all_allocs.len > 32)
+        {
+            return BCMOS_FALSE;
+        }
+
+        if (!bcmolt_xgpon_alloc_with_state_list_u16_max_32_bounds_check(&this->all_allocs))
+        {
+            *failed_prop = BCMOLT_XGPON_ONU_CFG_ID_ALL_ALLOCS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_EXTENDED_GUARD_TIME)) != 0)
+    {
+        if (!bcmolt_extended_guard_time_bounds_check(&this->extended_guard_time))
+        {
+            *failed_prop = BCMOLT_XGPON_ONU_CFG_ID_EXTENDED_GUARD_TIME;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_US_LINE_RATE)) != 0)
+    {
+        switch (this->us_line_rate)
+        {
+            case BCMOLT_UPSTREAM_LINE_RATE_CAPABILITIES_RATE_2_P_5_G:
+                break;
+            case BCMOLT_UPSTREAM_LINE_RATE_CAPABILITIES_RATE_10_G:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ONU_CFG_ID_US_LINE_RATE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_CALIBRATION_RECORD)) != 0)
+    {
+        if (!bcmolt_arr_calibration_record_8_bounds_check(&this->calibration_record))
+        {
+            *failed_prop = BCMOLT_XGPON_ONU_CFG_ID_CALIBRATION_RECORD;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CFG_ID_REQUEST_REGISTRATION_STATUS)) != 0)
+    {
+        if (!bcmolt_request_registration_status_bounds_check(&this->request_registration_status))
+        {
+            *failed_prop = BCMOLT_XGPON_ONU_CFG_ID_REQUEST_REGISTRATION_STATUS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_stat_data_set_default(bcmolt_xgpon_onu_stat_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_POSITIVE_DRIFT)) != 0)
+    {
+        this->positive_drift = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_NEGATIVE_DRIFT)) != 0)
+    {
+        this->negative_drift = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_DELIMITER_MISS_DETECTION)) != 0)
+    {
+        this->delimiter_miss_detection = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_BIP32_ERRORS)) != 0)
+    {
+        this->bip32_errors = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_RX_WORDS)) != 0)
+    {
+        this->rx_words = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_FEC_CORRECTED_SYMBOLS)) != 0)
+    {
+        this->fec_corrected_symbols = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_FEC_CORRECTED_CODEWORDS)) != 0)
+    {
+        this->fec_corrected_codewords = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_FEC_UNCORRECTABLE_CODEWORDS)) != 0)
+    {
+        this->fec_uncorrectable_codewords = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_FEC_CODEWORDS)) != 0)
+    {
+        this->fec_codewords = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_FEC_CORRECTED_BITS)) != 0)
+    {
+        this->fec_corrected_bits = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_XGEM_KEY_ERRORS)) != 0)
+    {
+        this->xgem_key_errors = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_XGEM_LOSS)) != 0)
+    {
+        this->xgem_loss = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_RX_PLOAMS_MIC_ERROR)) != 0)
+    {
+        this->rx_ploams_mic_error = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_RX_PLOAMS_NON_IDLE)) != 0)
+    {
+        this->rx_ploams_non_idle = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_RX_OMCI)) != 0)
+    {
+        this->rx_omci = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_RX_OMCI_PACKETS_CRC_ERROR)) != 0)
+    {
+        this->rx_omci_packets_crc_error = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_RX_BYTES)) != 0)
+    {
+        this->rx_bytes = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_RX_PACKETS)) != 0)
+    {
+        this->rx_packets = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_TX_BYTES)) != 0)
+    {
+        this->tx_bytes = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_TX_PACKETS)) != 0)
+    {
+        this->tx_packets = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_stat_data_pack(const bcmolt_xgpon_onu_stat_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_POSITIVE_DRIFT)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->positive_drift))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_NEGATIVE_DRIFT)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->negative_drift))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_DELIMITER_MISS_DETECTION)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->delimiter_miss_detection))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_BIP32_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->bip32_errors))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_RX_WORDS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_words))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_FEC_CORRECTED_SYMBOLS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->fec_corrected_symbols))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_FEC_CORRECTED_CODEWORDS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->fec_corrected_codewords))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_FEC_UNCORRECTABLE_CODEWORDS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->fec_uncorrectable_codewords))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_FEC_CODEWORDS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->fec_codewords))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_FEC_CORRECTED_BITS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->fec_corrected_bits))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_XGEM_KEY_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->xgem_key_errors))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_XGEM_LOSS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->xgem_loss))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_RX_PLOAMS_MIC_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_ploams_mic_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_RX_PLOAMS_NON_IDLE)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_ploams_non_idle))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_RX_OMCI)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_omci))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_RX_OMCI_PACKETS_CRC_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_omci_packets_crc_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_RX_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_RX_PACKETS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->rx_packets))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_TX_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_TX_PACKETS)) != 0)
+    {
+        if (!bcmolt_buf_write_u64(buf, this->tx_packets))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_stat_data_get_packed_length(const bcmolt_xgpon_onu_stat_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_POSITIVE_DRIFT)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_NEGATIVE_DRIFT)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_DELIMITER_MISS_DETECTION)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_BIP32_ERRORS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_RX_WORDS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_FEC_CORRECTED_SYMBOLS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_FEC_CORRECTED_CODEWORDS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_FEC_UNCORRECTABLE_CODEWORDS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_FEC_CODEWORDS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_FEC_CORRECTED_BITS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_XGEM_KEY_ERRORS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_XGEM_LOSS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_RX_PLOAMS_MIC_ERROR)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_RX_PLOAMS_NON_IDLE)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_RX_OMCI)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_RX_OMCI_PACKETS_CRC_ERROR)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_RX_BYTES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_RX_PACKETS)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_TX_BYTES)) != 0)
+    {
+        count += 8;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_TX_PACKETS)) != 0)
+    {
+        count += 8;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_stat_data_unpack(bcmolt_xgpon_onu_stat_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_POSITIVE_DRIFT)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->positive_drift))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_NEGATIVE_DRIFT)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->negative_drift))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_DELIMITER_MISS_DETECTION)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->delimiter_miss_detection))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_BIP32_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->bip32_errors))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_RX_WORDS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_words))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_FEC_CORRECTED_SYMBOLS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->fec_corrected_symbols))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_FEC_CORRECTED_CODEWORDS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->fec_corrected_codewords))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_FEC_UNCORRECTABLE_CODEWORDS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->fec_uncorrectable_codewords))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_FEC_CODEWORDS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->fec_codewords))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_FEC_CORRECTED_BITS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->fec_corrected_bits))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_XGEM_KEY_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->xgem_key_errors))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_XGEM_LOSS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->xgem_loss))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_RX_PLOAMS_MIC_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_ploams_mic_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_RX_PLOAMS_NON_IDLE)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_ploams_non_idle))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_RX_OMCI)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_omci))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_RX_OMCI_PACKETS_CRC_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_omci_packets_crc_error))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_RX_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_RX_PACKETS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->rx_packets))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_TX_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_bytes))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_TX_PACKETS)) != 0)
+    {
+        if (!bcmolt_buf_read_u64(buf, &this->tx_packets))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_stat_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_POSITIVE_DRIFT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_NEGATIVE_DRIFT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_DELIMITER_MISS_DETECTION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_BIP32_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_RX_WORDS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_FEC_CORRECTED_SYMBOLS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_FEC_CORRECTED_CODEWORDS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_FEC_UNCORRECTABLE_CODEWORDS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_FEC_CODEWORDS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_FEC_CORRECTED_BITS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_XGEM_KEY_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_XGEM_LOSS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_RX_PLOAMS_MIC_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_RX_PLOAMS_NON_IDLE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_RX_OMCI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_RX_OMCI_PACKETS_CRC_ERROR)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_RX_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_RX_PACKETS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_TX_BYTES)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ID_TX_PACKETS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_stat_data_bounds_check(const bcmolt_xgpon_onu_stat_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_stat_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_stat_cfg_data_set_default(bcmolt_xgpon_onu_stat_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_CFG_ID_CFG)) != 0)
+    {
+        this->cfg.trigger.type = BCMOLT_STAT_CONDITION_TYPE_NONE;
+        this->cfg.soak.active_soak_time = 0;
+        this->cfg.soak.clear_soak_time = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_stat_cfg_data_pack(const bcmolt_xgpon_onu_stat_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_pack(&this->cfg, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_stat_cfg_data_get_packed_length(const bcmolt_xgpon_onu_stat_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_CFG_ID_CFG)) != 0)
+    {
+        count += bcmolt_stat_alarm_config_get_packed_length(&this->cfg);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_stat_cfg_data_unpack(bcmolt_xgpon_onu_stat_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_unpack(&this->cfg, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_stat_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_stat_cfg_data_bounds_check(const bcmolt_xgpon_onu_stat_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_stat_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_CFG_ID_CFG)) != 0)
+    {
+        if (!bcmolt_stat_alarm_config_bounds_check(&this->cfg))
+        {
+            *failed_prop = BCMOLT_XGPON_ONU_STAT_CFG_ID_CFG;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_dfi_data_set_default(bcmolt_xgpon_onu_dfi_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_DFI_ID_ALARM_STATUS)) != 0)
+    {
+        this->alarm_status = BCMOLT_STATUS_OFF;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_dfi_data_pack(const bcmolt_xgpon_onu_dfi_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_DFI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_pack(this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_dfi_data_get_packed_length(const bcmolt_xgpon_onu_dfi_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_DFI_ID_ALARM_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_dfi_data_unpack(bcmolt_xgpon_onu_dfi_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_DFI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_unpack(&this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_dfi_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_DFI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_dfi_data_bounds_check(const bcmolt_xgpon_onu_dfi_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_dfi_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_DFI_ID_ALARM_STATUS)) != 0)
+    {
+        switch (this->alarm_status)
+        {
+            case BCMOLT_STATUS_OFF:
+                break;
+            case BCMOLT_STATUS_ON:
+                break;
+            case BCMOLT_STATUS_NO_CHANGE:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ONU_DFI_ID_ALARM_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_dgi_data_set_default(bcmolt_xgpon_onu_dgi_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_DGI_ID_ALARM_STATUS)) != 0)
+    {
+        this->alarm_status = BCMOLT_STATUS_OFF;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_dgi_data_pack(const bcmolt_xgpon_onu_dgi_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_DGI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_pack(this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_dgi_data_get_packed_length(const bcmolt_xgpon_onu_dgi_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_DGI_ID_ALARM_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_dgi_data_unpack(bcmolt_xgpon_onu_dgi_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_DGI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_unpack(&this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_dgi_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_DGI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_dgi_data_bounds_check(const bcmolt_xgpon_onu_dgi_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_dgi_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_DGI_ID_ALARM_STATUS)) != 0)
+    {
+        switch (this->alarm_status)
+        {
+            case BCMOLT_STATUS_OFF:
+                break;
+            case BCMOLT_STATUS_ON:
+                break;
+            case BCMOLT_STATUS_NO_CHANGE:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ONU_DGI_ID_ALARM_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_dowi_data_set_default(bcmolt_xgpon_onu_dowi_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_DOWI_ID_ALARM_STATUS)) != 0)
+    {
+        this->alarm_status = BCMOLT_STATUS_OFF;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_DOWI_ID_DRIFT_VALUE)) != 0)
+    {
+        this->drift_value = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_DOWI_ID_NEW_EQD)) != 0)
+    {
+        this->new_eqd = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_dowi_data_pack(const bcmolt_xgpon_onu_dowi_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_DOWI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_pack(this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_DOWI_ID_DRIFT_VALUE)) != 0)
+    {
+        if (!bcmolt_buf_write_s32(buf, this->drift_value))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_DOWI_ID_NEW_EQD)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->new_eqd))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_dowi_data_get_packed_length(const bcmolt_xgpon_onu_dowi_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_DOWI_ID_ALARM_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_DOWI_ID_DRIFT_VALUE)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_DOWI_ID_NEW_EQD)) != 0)
+    {
+        count += 4;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_dowi_data_unpack(bcmolt_xgpon_onu_dowi_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_DOWI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_unpack(&this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_DOWI_ID_DRIFT_VALUE)) != 0)
+    {
+        if (!bcmolt_buf_read_s32(buf, &this->drift_value))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_DOWI_ID_NEW_EQD)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->new_eqd))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_dowi_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_DOWI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_DOWI_ID_DRIFT_VALUE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_DOWI_ID_NEW_EQD)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_dowi_data_bounds_check(const bcmolt_xgpon_onu_dowi_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_dowi_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_DOWI_ID_ALARM_STATUS)) != 0)
+    {
+        switch (this->alarm_status)
+        {
+            case BCMOLT_STATUS_OFF:
+                break;
+            case BCMOLT_STATUS_ON:
+                break;
+            case BCMOLT_STATUS_NO_CHANGE:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ONU_DOWI_ID_ALARM_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_invalid_dbru_report_data_set_default(bcmolt_xgpon_onu_invalid_dbru_report_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_INVALID_DBRU_REPORT_ID_ALLOC_ID)) != 0)
+    {
+        this->alloc_id = (bcmolt_xgpon_alloc_id) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_invalid_dbru_report_data_pack(const bcmolt_xgpon_onu_invalid_dbru_report_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_INVALID_DBRU_REPORT_ID_ALLOC_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, (uint16_t) this->alloc_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_invalid_dbru_report_data_get_packed_length(const bcmolt_xgpon_onu_invalid_dbru_report_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_INVALID_DBRU_REPORT_ID_ALLOC_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_invalid_dbru_report_data_unpack(bcmolt_xgpon_onu_invalid_dbru_report_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_INVALID_DBRU_REPORT_ID_ALLOC_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, (uint16_t *) &this->alloc_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_invalid_dbru_report_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_INVALID_DBRU_REPORT_ID_ALLOC_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_invalid_dbru_report_data_bounds_check(const bcmolt_xgpon_onu_invalid_dbru_report_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_invalid_dbru_report_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_INVALID_DBRU_REPORT_ID_ALLOC_ID)) != 0)
+    {
+        if (this->alloc_id > (bcmolt_xgpon_alloc_id) 16383)
+        {
+            *failed_prop = BCMOLT_XGPON_ONU_INVALID_DBRU_REPORT_ID_ALLOC_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_key_exchange_completed_data_set_default(bcmolt_xgpon_onu_key_exchange_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_KEY_EXCHANGE_COMPLETED_ID_NEW_KEY)) != 0)
+    {
+        memset(this->new_key.encryption_key.bytes, 0, sizeof(this->new_key.encryption_key.bytes));
+        this->new_key.key_index = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_key_exchange_completed_data_pack(const bcmolt_xgpon_onu_key_exchange_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_KEY_EXCHANGE_COMPLETED_ID_NEW_KEY)) != 0)
+    {
+        if (!bcmolt_xgpon_onu_aes_key_pack(&this->new_key, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_key_exchange_completed_data_get_packed_length(const bcmolt_xgpon_onu_key_exchange_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_KEY_EXCHANGE_COMPLETED_ID_NEW_KEY)) != 0)
+    {
+        count += 17;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_key_exchange_completed_data_unpack(bcmolt_xgpon_onu_key_exchange_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_KEY_EXCHANGE_COMPLETED_ID_NEW_KEY)) != 0)
+    {
+        if (!bcmolt_xgpon_onu_aes_key_unpack(&this->new_key, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_key_exchange_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_KEY_EXCHANGE_COMPLETED_ID_NEW_KEY)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 17))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_key_exchange_completed_data_bounds_check(const bcmolt_xgpon_onu_key_exchange_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_key_exchange_completed_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_KEY_EXCHANGE_COMPLETED_ID_NEW_KEY)) != 0)
+    {
+        if (!bcmolt_xgpon_onu_aes_key_bounds_check(&this->new_key))
+        {
+            *failed_prop = BCMOLT_XGPON_ONU_KEY_EXCHANGE_COMPLETED_ID_NEW_KEY;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_key_exchange_key_mismatch_data_set_default(bcmolt_xgpon_onu_key_exchange_key_mismatch_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_KEY_EXCHANGE_KEY_MISMATCH_ID_EXPECTED_KEY)) != 0)
+    {
+        memset(this->expected_key.bytes, 0, sizeof(this->expected_key.bytes));
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_KEY_EXCHANGE_KEY_MISMATCH_ID_RECEIVED_KEY)) != 0)
+    {
+        memset(this->received_key.bytes, 0, sizeof(this->received_key.bytes));
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_key_exchange_key_mismatch_data_pack(const bcmolt_xgpon_onu_key_exchange_key_mismatch_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_KEY_EXCHANGE_KEY_MISMATCH_ID_EXPECTED_KEY)) != 0)
+    {
+        if (!bcmolt_aes_key_pack(&this->expected_key, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_KEY_EXCHANGE_KEY_MISMATCH_ID_RECEIVED_KEY)) != 0)
+    {
+        if (!bcmolt_aes_key_pack(&this->received_key, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_key_exchange_key_mismatch_data_get_packed_length(const bcmolt_xgpon_onu_key_exchange_key_mismatch_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_KEY_EXCHANGE_KEY_MISMATCH_ID_EXPECTED_KEY)) != 0)
+    {
+        count += 16;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_KEY_EXCHANGE_KEY_MISMATCH_ID_RECEIVED_KEY)) != 0)
+    {
+        count += 16;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_key_exchange_key_mismatch_data_unpack(bcmolt_xgpon_onu_key_exchange_key_mismatch_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_KEY_EXCHANGE_KEY_MISMATCH_ID_EXPECTED_KEY)) != 0)
+    {
+        if (!bcmolt_aes_key_unpack(&this->expected_key, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_KEY_EXCHANGE_KEY_MISMATCH_ID_RECEIVED_KEY)) != 0)
+    {
+        if (!bcmolt_aes_key_unpack(&this->received_key, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_key_exchange_key_mismatch_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_KEY_EXCHANGE_KEY_MISMATCH_ID_EXPECTED_KEY)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 16))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_KEY_EXCHANGE_KEY_MISMATCH_ID_RECEIVED_KEY)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 16))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_key_exchange_key_mismatch_data_bounds_check(const bcmolt_xgpon_onu_key_exchange_key_mismatch_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_key_exchange_key_mismatch_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_KEY_EXCHANGE_KEY_MISMATCH_ID_EXPECTED_KEY)) != 0)
+    {
+        if (!bcmolt_aes_key_bounds_check(&this->expected_key))
+        {
+            *failed_prop = BCMOLT_XGPON_ONU_KEY_EXCHANGE_KEY_MISMATCH_ID_EXPECTED_KEY;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_KEY_EXCHANGE_KEY_MISMATCH_ID_RECEIVED_KEY)) != 0)
+    {
+        if (!bcmolt_aes_key_bounds_check(&this->received_key))
+        {
+            *failed_prop = BCMOLT_XGPON_ONU_KEY_EXCHANGE_KEY_MISMATCH_ID_RECEIVED_KEY;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_looci_data_set_default(bcmolt_xgpon_onu_looci_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_LOOCI_ID_ALARM_STATUS)) != 0)
+    {
+        this->alarm_status = BCMOLT_STATUS_OFF;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_looci_data_pack(const bcmolt_xgpon_onu_looci_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_LOOCI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_pack(this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_looci_data_get_packed_length(const bcmolt_xgpon_onu_looci_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_LOOCI_ID_ALARM_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_looci_data_unpack(bcmolt_xgpon_onu_looci_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_LOOCI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_unpack(&this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_looci_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_LOOCI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_looci_data_bounds_check(const bcmolt_xgpon_onu_looci_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_looci_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_LOOCI_ID_ALARM_STATUS)) != 0)
+    {
+        switch (this->alarm_status)
+        {
+            case BCMOLT_STATUS_OFF:
+                break;
+            case BCMOLT_STATUS_ON:
+                break;
+            case BCMOLT_STATUS_NO_CHANGE:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ONU_LOOCI_ID_ALARM_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_onu_activation_completed_data_set_default(bcmolt_xgpon_onu_onu_activation_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_ACTIVATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        this->status = BCMOLT_RESULT_SUCCESS;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_ACTIVATION_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        this->fail_reason = BCMOLT_ACTIVATION_FAIL_REASON_NONE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_ACTIVATION_COMPLETED_ID_REGISTRATION_ID)) != 0)
+    {
+        memset(this->registration_id.arr, 0, sizeof(this->registration_id.arr));
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_ACTIVATION_COMPLETED_ID_REGISTRATION_ENCRYPTION_KEYS)) != 0)
+    {
+        memset(this->registration_encryption_keys.ploam_ik.bytes, 0, sizeof(this->registration_encryption_keys.ploam_ik.bytes));
+        memset(this->registration_encryption_keys.omci_ik.bytes, 0, sizeof(this->registration_encryption_keys.omci_ik.bytes));
+        memset(this->registration_encryption_keys.omci_k1.bytes, 0, sizeof(this->registration_encryption_keys.omci_k1.bytes));
+        memset(this->registration_encryption_keys.omci_k2.bytes, 0, sizeof(this->registration_encryption_keys.omci_k2.bytes));
+        memset(this->registration_encryption_keys.kek.bytes, 0, sizeof(this->registration_encryption_keys.kek.bytes));
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_activation_completed_data_pack(const bcmolt_xgpon_onu_onu_activation_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_ACTIVATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_result_pack(this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_ACTIVATION_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        if (!bcmolt_activation_fail_reason_pack(this->fail_reason, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_ACTIVATION_COMPLETED_ID_REGISTRATION_ID)) != 0)
+    {
+        if (!bcmolt_arr_u8_36_pack(&this->registration_id, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_ACTIVATION_COMPLETED_ID_REGISTRATION_ENCRYPTION_KEYS)) != 0)
+    {
+        if (!bcmolt_xgpon_onu_registration_keys_pack(&this->registration_encryption_keys, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_onu_activation_completed_data_get_packed_length(const bcmolt_xgpon_onu_onu_activation_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_ACTIVATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_ACTIVATION_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_ACTIVATION_COMPLETED_ID_REGISTRATION_ID)) != 0)
+    {
+        count += 36;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_ACTIVATION_COMPLETED_ID_REGISTRATION_ENCRYPTION_KEYS)) != 0)
+    {
+        count += 80;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_activation_completed_data_unpack(bcmolt_xgpon_onu_onu_activation_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_ACTIVATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_result_unpack(&this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_ACTIVATION_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        if (!bcmolt_activation_fail_reason_unpack(&this->fail_reason, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_ACTIVATION_COMPLETED_ID_REGISTRATION_ID)) != 0)
+    {
+        if (!bcmolt_arr_u8_36_unpack(&this->registration_id, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_ACTIVATION_COMPLETED_ID_REGISTRATION_ENCRYPTION_KEYS)) != 0)
+    {
+        if (!bcmolt_xgpon_onu_registration_keys_unpack(&this->registration_encryption_keys, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_activation_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_ACTIVATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_ACTIVATION_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_ACTIVATION_COMPLETED_ID_REGISTRATION_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 36))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_ACTIVATION_COMPLETED_ID_REGISTRATION_ENCRYPTION_KEYS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 80))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_activation_completed_data_bounds_check(const bcmolt_xgpon_onu_onu_activation_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_onu_activation_completed_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_ACTIVATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        switch (this->status)
+        {
+            case BCMOLT_RESULT_SUCCESS:
+                break;
+            case BCMOLT_RESULT_FAIL:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ONU_ONU_ACTIVATION_COMPLETED_ID_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_ACTIVATION_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        switch (this->fail_reason)
+        {
+            case BCMOLT_ACTIVATION_FAIL_REASON_NONE:
+                break;
+            case BCMOLT_ACTIVATION_FAIL_REASON_RANGING:
+                break;
+            case BCMOLT_ACTIVATION_FAIL_REASON_PASSWORD_AUTHENTICATION:
+                break;
+            case BCMOLT_ACTIVATION_FAIL_REASON_LOS:
+                break;
+            case BCMOLT_ACTIVATION_FAIL_REASON_ONU_ALARM:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ONU_ONU_ACTIVATION_COMPLETED_ID_FAIL_REASON;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_ACTIVATION_COMPLETED_ID_REGISTRATION_ID)) != 0)
+    {
+        if (!bcmolt_arr_u8_36_bounds_check(&this->registration_id))
+        {
+            *failed_prop = BCMOLT_XGPON_ONU_ONU_ACTIVATION_COMPLETED_ID_REGISTRATION_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_ACTIVATION_COMPLETED_ID_REGISTRATION_ENCRYPTION_KEYS)) != 0)
+    {
+        if (!bcmolt_xgpon_onu_registration_keys_bounds_check(&this->registration_encryption_keys))
+        {
+            *failed_prop = BCMOLT_XGPON_ONU_ONU_ACTIVATION_COMPLETED_ID_REGISTRATION_ENCRYPTION_KEYS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_onu_alarm_data_set_default(bcmolt_xgpon_onu_onu_alarm_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_ALARM_ID_ONU_ALARM)) != 0)
+    {
+        this->onu_alarm.losi = BCMOLT_STATUS_OFF;
+        this->onu_alarm.lobi = BCMOLT_STATUS_OFF;
+        this->onu_alarm.lopci_miss = BCMOLT_STATUS_OFF;
+        this->onu_alarm.lopci_mic_error = BCMOLT_STATUS_OFF;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_alarm_data_pack(const bcmolt_xgpon_onu_onu_alarm_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_ALARM_ID_ONU_ALARM)) != 0)
+    {
+        if (!bcmolt_xgpon_onu_alarms_pack(&this->onu_alarm, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_onu_alarm_data_get_packed_length(const bcmolt_xgpon_onu_onu_alarm_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_ALARM_ID_ONU_ALARM)) != 0)
+    {
+        count += 4;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_alarm_data_unpack(bcmolt_xgpon_onu_onu_alarm_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_ALARM_ID_ONU_ALARM)) != 0)
+    {
+        if (!bcmolt_xgpon_onu_alarms_unpack(&this->onu_alarm, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_alarm_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_ALARM_ID_ONU_ALARM)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_alarm_data_bounds_check(const bcmolt_xgpon_onu_onu_alarm_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_onu_alarm_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_ALARM_ID_ONU_ALARM)) != 0)
+    {
+        if (!bcmolt_xgpon_onu_alarms_bounds_check(&this->onu_alarm))
+        {
+            *failed_prop = BCMOLT_XGPON_ONU_ONU_ALARM_ID_ONU_ALARM;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_onu_deactivation_completed_data_set_default(bcmolt_xgpon_onu_onu_deactivation_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_DEACTIVATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        this->status = BCMOLT_RESULT_SUCCESS;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_deactivation_completed_data_pack(const bcmolt_xgpon_onu_onu_deactivation_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_DEACTIVATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_result_pack(this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_onu_deactivation_completed_data_get_packed_length(const bcmolt_xgpon_onu_onu_deactivation_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_DEACTIVATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_deactivation_completed_data_unpack(bcmolt_xgpon_onu_onu_deactivation_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_DEACTIVATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_result_unpack(&this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_deactivation_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_DEACTIVATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_deactivation_completed_data_bounds_check(const bcmolt_xgpon_onu_onu_deactivation_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_onu_deactivation_completed_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_DEACTIVATION_COMPLETED_ID_STATUS)) != 0)
+    {
+        switch (this->status)
+        {
+            case BCMOLT_RESULT_SUCCESS:
+                break;
+            case BCMOLT_RESULT_FAIL:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ONU_ONU_DEACTIVATION_COMPLETED_ID_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_onu_disable_completed_data_set_default(bcmolt_xgpon_onu_onu_disable_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_DISABLE_COMPLETED_ID_SERIAL_NUMBER)) != 0)
+    {
+        memset(this->serial_number.vendor_id, 0, sizeof(this->serial_number.vendor_id));
+        memset(this->serial_number.vendor_specific, 0, sizeof(this->serial_number.vendor_specific));
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_disable_completed_data_pack(const bcmolt_xgpon_onu_onu_disable_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_DISABLE_COMPLETED_ID_SERIAL_NUMBER)) != 0)
+    {
+        if (!bcmolt_serial_number_pack(&this->serial_number, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_onu_disable_completed_data_get_packed_length(const bcmolt_xgpon_onu_onu_disable_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_DISABLE_COMPLETED_ID_SERIAL_NUMBER)) != 0)
+    {
+        count += 8;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_disable_completed_data_unpack(bcmolt_xgpon_onu_onu_disable_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_DISABLE_COMPLETED_ID_SERIAL_NUMBER)) != 0)
+    {
+        if (!bcmolt_serial_number_unpack(&this->serial_number, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_disable_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_DISABLE_COMPLETED_ID_SERIAL_NUMBER)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_disable_completed_data_bounds_check(const bcmolt_xgpon_onu_onu_disable_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_onu_disable_completed_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_DISABLE_COMPLETED_ID_SERIAL_NUMBER)) != 0)
+    {
+        if (!bcmolt_serial_number_bounds_check(&this->serial_number))
+        {
+            *failed_prop = BCMOLT_XGPON_ONU_ONU_DISABLE_COMPLETED_ID_SERIAL_NUMBER;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_onu_enable_completed_data_set_default(bcmolt_xgpon_onu_onu_enable_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_ENABLE_COMPLETED_ID_SERIAL_NUMBER)) != 0)
+    {
+        memset(this->serial_number.vendor_id, 0, sizeof(this->serial_number.vendor_id));
+        memset(this->serial_number.vendor_specific, 0, sizeof(this->serial_number.vendor_specific));
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_enable_completed_data_pack(const bcmolt_xgpon_onu_onu_enable_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_ENABLE_COMPLETED_ID_SERIAL_NUMBER)) != 0)
+    {
+        if (!bcmolt_serial_number_pack(&this->serial_number, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_onu_enable_completed_data_get_packed_length(const bcmolt_xgpon_onu_onu_enable_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_ENABLE_COMPLETED_ID_SERIAL_NUMBER)) != 0)
+    {
+        count += 8;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_enable_completed_data_unpack(bcmolt_xgpon_onu_onu_enable_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_ENABLE_COMPLETED_ID_SERIAL_NUMBER)) != 0)
+    {
+        if (!bcmolt_serial_number_unpack(&this->serial_number, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_enable_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_ENABLE_COMPLETED_ID_SERIAL_NUMBER)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 8))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_enable_completed_data_bounds_check(const bcmolt_xgpon_onu_onu_enable_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_onu_enable_completed_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_ENABLE_COMPLETED_ID_SERIAL_NUMBER)) != 0)
+    {
+        if (!bcmolt_serial_number_bounds_check(&this->serial_number))
+        {
+            *failed_prop = BCMOLT_XGPON_ONU_ONU_ENABLE_COMPLETED_ID_SERIAL_NUMBER;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_onu_tuning_in_completed_data_set_default(bcmolt_xgpon_onu_onu_tuning_in_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_IN_COMPLETED_ID_RESULT)) != 0)
+    {
+        this->result = BCMOLT_RESULT_SUCCESS;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_IN_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        this->fail_reason = BCMOLT_TUNE_IN_FAIL_REASON_NONE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_tuning_in_completed_data_pack(const bcmolt_xgpon_onu_onu_tuning_in_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_IN_COMPLETED_ID_RESULT)) != 0)
+    {
+        if (!bcmolt_result_pack(this->result, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_IN_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        if (!bcmolt_tune_in_fail_reason_pack(this->fail_reason, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_onu_tuning_in_completed_data_get_packed_length(const bcmolt_xgpon_onu_onu_tuning_in_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_IN_COMPLETED_ID_RESULT)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_IN_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_tuning_in_completed_data_unpack(bcmolt_xgpon_onu_onu_tuning_in_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_IN_COMPLETED_ID_RESULT)) != 0)
+    {
+        if (!bcmolt_result_unpack(&this->result, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_IN_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        if (!bcmolt_tune_in_fail_reason_unpack(&this->fail_reason, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_tuning_in_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_IN_COMPLETED_ID_RESULT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_IN_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_tuning_in_completed_data_bounds_check(const bcmolt_xgpon_onu_onu_tuning_in_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_onu_tuning_in_completed_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_IN_COMPLETED_ID_RESULT)) != 0)
+    {
+        switch (this->result)
+        {
+            case BCMOLT_RESULT_SUCCESS:
+                break;
+            case BCMOLT_RESULT_FAIL:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ONU_ONU_TUNING_IN_COMPLETED_ID_RESULT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_IN_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        switch (this->fail_reason)
+        {
+            case BCMOLT_TUNE_IN_FAIL_REASON_NONE:
+                break;
+            case BCMOLT_TUNE_IN_FAIL_REASON_NO_TUNING_RESPONSE_PLOAM_RECEIVED:
+                break;
+            case BCMOLT_TUNE_IN_FAIL_REASON_ONU_ACTIVATION_FAILED:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ONU_ONU_TUNING_IN_COMPLETED_ID_FAIL_REASON;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_onu_tuning_out_completed_data_set_default(bcmolt_xgpon_onu_onu_tuning_out_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_OUT_COMPLETED_ID_RESULT)) != 0)
+    {
+        this->result = BCMOLT_RESULT_SUCCESS;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_OUT_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        this->fail_reason = BCMOLT_TUNE_OUT_FAIL_REASON_NONE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_tuning_out_completed_data_pack(const bcmolt_xgpon_onu_onu_tuning_out_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_OUT_COMPLETED_ID_RESULT)) != 0)
+    {
+        if (!bcmolt_result_pack(this->result, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_OUT_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        if (!bcmolt_tune_out_fail_reason_pack(this->fail_reason, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_onu_tuning_out_completed_data_get_packed_length(const bcmolt_xgpon_onu_onu_tuning_out_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_OUT_COMPLETED_ID_RESULT)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_OUT_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_tuning_out_completed_data_unpack(bcmolt_xgpon_onu_onu_tuning_out_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_OUT_COMPLETED_ID_RESULT)) != 0)
+    {
+        if (!bcmolt_result_unpack(&this->result, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_OUT_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        if (!bcmolt_tune_out_fail_reason_unpack(&this->fail_reason, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_tuning_out_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_OUT_COMPLETED_ID_RESULT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_OUT_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_tuning_out_completed_data_bounds_check(const bcmolt_xgpon_onu_onu_tuning_out_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_onu_tuning_out_completed_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_OUT_COMPLETED_ID_RESULT)) != 0)
+    {
+        switch (this->result)
+        {
+            case BCMOLT_RESULT_SUCCESS:
+                break;
+            case BCMOLT_RESULT_FAIL:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ONU_ONU_TUNING_OUT_COMPLETED_ID_RESULT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_OUT_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        switch (this->fail_reason)
+        {
+            case BCMOLT_TUNE_OUT_FAIL_REASON_NONE:
+                break;
+            case BCMOLT_TUNE_OUT_FAIL_REASON_NACK_PLOAM_RECEIVED:
+                break;
+            case BCMOLT_TUNE_OUT_FAIL_REASON_NO_TUNING_RESPONSE_PLOAM_RECEIVED:
+                break;
+            case BCMOLT_TUNE_OUT_FAIL_REASON_TSOURCE_TIMEOUT:
+                break;
+            case BCMOLT_TUNE_OUT_FAIL_REASON_ROLLBACK_REQUEST:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ONU_ONU_TUNING_OUT_COMPLETED_ID_FAIL_REASON;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_possible_drift_data_set_default(bcmolt_xgpon_onu_possible_drift_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_POSSIBLE_DRIFT_ID_ALARM_STATUS)) != 0)
+    {
+        this->alarm_status = BCMOLT_STATUS_OFF;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_POSSIBLE_DRIFT_ID_ESTIMATED_DRIFT)) != 0)
+    {
+        this->estimated_drift = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_possible_drift_data_pack(const bcmolt_xgpon_onu_possible_drift_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_POSSIBLE_DRIFT_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_pack(this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_POSSIBLE_DRIFT_ID_ESTIMATED_DRIFT)) != 0)
+    {
+        if (!bcmolt_buf_write_s32(buf, this->estimated_drift))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_possible_drift_data_get_packed_length(const bcmolt_xgpon_onu_possible_drift_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_POSSIBLE_DRIFT_ID_ALARM_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_POSSIBLE_DRIFT_ID_ESTIMATED_DRIFT)) != 0)
+    {
+        count += 4;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_possible_drift_data_unpack(bcmolt_xgpon_onu_possible_drift_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_POSSIBLE_DRIFT_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_unpack(&this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_POSSIBLE_DRIFT_ID_ESTIMATED_DRIFT)) != 0)
+    {
+        if (!bcmolt_buf_read_s32(buf, &this->estimated_drift))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_possible_drift_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_POSSIBLE_DRIFT_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_POSSIBLE_DRIFT_ID_ESTIMATED_DRIFT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_possible_drift_data_bounds_check(const bcmolt_xgpon_onu_possible_drift_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_possible_drift_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_POSSIBLE_DRIFT_ID_ALARM_STATUS)) != 0)
+    {
+        switch (this->alarm_status)
+        {
+            case BCMOLT_STATUS_OFF:
+                break;
+            case BCMOLT_STATUS_ON:
+                break;
+            case BCMOLT_STATUS_NO_CHANGE:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ONU_POSSIBLE_DRIFT_ID_ALARM_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_power_consumption_report_data_set_default(bcmolt_xgpon_onu_power_consumption_report_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_POWER_CONSUMPTION_REPORT_ID_POWER_CONSUMPTION_REPORT)) != 0)
+    {
+        memset(this->power_consumption_report.arr, 0, sizeof(this->power_consumption_report.arr));
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_power_consumption_report_data_pack(const bcmolt_xgpon_onu_power_consumption_report_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_POWER_CONSUMPTION_REPORT_ID_POWER_CONSUMPTION_REPORT)) != 0)
+    {
+        if (!bcmolt_arr_power_consumption_channel_report_8_pack(&this->power_consumption_report, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_power_consumption_report_data_get_packed_length(const bcmolt_xgpon_onu_power_consumption_report_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_POWER_CONSUMPTION_REPORT_ID_POWER_CONSUMPTION_REPORT)) != 0)
+    {
+        count += 32;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_power_consumption_report_data_unpack(bcmolt_xgpon_onu_power_consumption_report_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_POWER_CONSUMPTION_REPORT_ID_POWER_CONSUMPTION_REPORT)) != 0)
+    {
+        if (!bcmolt_arr_power_consumption_channel_report_8_unpack(&this->power_consumption_report, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_power_consumption_report_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_POWER_CONSUMPTION_REPORT_ID_POWER_CONSUMPTION_REPORT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 32))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_power_consumption_report_data_bounds_check(const bcmolt_xgpon_onu_power_consumption_report_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_power_consumption_report_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_POWER_CONSUMPTION_REPORT_ID_POWER_CONSUMPTION_REPORT)) != 0)
+    {
+        if (!bcmolt_arr_power_consumption_channel_report_8_bounds_check(&this->power_consumption_report))
+        {
+            *failed_prop = BCMOLT_XGPON_ONU_POWER_CONSUMPTION_REPORT_ID_POWER_CONSUMPTION_REPORT;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_power_level_report_data_set_default(bcmolt_xgpon_onu_power_level_report_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_POWER_LEVEL_REPORT_ID_ATTENUATION)) != 0)
+    {
+        this->attenuation = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_POWER_LEVEL_REPORT_ID_POWER_LEVELLING_CAPABILITY)) != 0)
+    {
+        this->power_levelling_capability = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_power_level_report_data_pack(const bcmolt_xgpon_onu_power_level_report_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_POWER_LEVEL_REPORT_ID_ATTENUATION)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->attenuation))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_POWER_LEVEL_REPORT_ID_POWER_LEVELLING_CAPABILITY)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->power_levelling_capability))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_power_level_report_data_get_packed_length(const bcmolt_xgpon_onu_power_level_report_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_POWER_LEVEL_REPORT_ID_ATTENUATION)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_POWER_LEVEL_REPORT_ID_POWER_LEVELLING_CAPABILITY)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_power_level_report_data_unpack(bcmolt_xgpon_onu_power_level_report_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_POWER_LEVEL_REPORT_ID_ATTENUATION)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->attenuation))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_POWER_LEVEL_REPORT_ID_POWER_LEVELLING_CAPABILITY)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->power_levelling_capability))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_power_level_report_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_POWER_LEVEL_REPORT_ID_ATTENUATION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_POWER_LEVEL_REPORT_ID_POWER_LEVELLING_CAPABILITY)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_power_level_report_data_bounds_check(const bcmolt_xgpon_onu_power_level_report_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_power_level_report_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_power_management_state_change_data_set_default(bcmolt_xgpon_onu_power_management_state_change_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_OLD_STATE)) != 0)
+    {
+        this->old_state = BCMOLT_ONU_STATE_NOT_CONFIGURED;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_NEW_STATE)) != 0)
+    {
+        this->new_state = BCMOLT_ONU_STATE_NOT_CONFIGURED;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_REASON)) != 0)
+    {
+        this->reason = BCMOLT_POWER_MANAGEMENT_TRANSITION_REASON_POWER_MANAGEMENT_ENABLED;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_power_management_state_change_data_pack(const bcmolt_xgpon_onu_power_management_state_change_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_OLD_STATE)) != 0)
+    {
+        if (!bcmolt_onu_state_pack(this->old_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_NEW_STATE)) != 0)
+    {
+        if (!bcmolt_onu_state_pack(this->new_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_REASON)) != 0)
+    {
+        if (!bcmolt_power_management_transition_reason_pack(this->reason, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_power_management_state_change_data_get_packed_length(const bcmolt_xgpon_onu_power_management_state_change_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_OLD_STATE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_NEW_STATE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_REASON)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_power_management_state_change_data_unpack(bcmolt_xgpon_onu_power_management_state_change_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_OLD_STATE)) != 0)
+    {
+        if (!bcmolt_onu_state_unpack(&this->old_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_NEW_STATE)) != 0)
+    {
+        if (!bcmolt_onu_state_unpack(&this->new_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_REASON)) != 0)
+    {
+        if (!bcmolt_power_management_transition_reason_unpack(&this->reason, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_power_management_state_change_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_OLD_STATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_NEW_STATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_REASON)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_power_management_state_change_data_bounds_check(const bcmolt_xgpon_onu_power_management_state_change_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_power_management_state_change_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_OLD_STATE)) != 0)
+    {
+        switch (this->old_state)
+        {
+            case BCMOLT_ONU_STATE_NOT_CONFIGURED:
+                break;
+            case BCMOLT_ONU_STATE_INACTIVE:
+                break;
+            case BCMOLT_ONU_STATE_ACTIVE:
+                break;
+            case BCMOLT_ONU_STATE_ACTIVE_STANDBY:
+                break;
+            case BCMOLT_ONU_STATE_DISABLED:
+                break;
+            case BCMOLT_ONU_STATE_AWAKE_FREE:
+                break;
+            case BCMOLT_ONU_STATE_PROCESSING:
+                break;
+            case BCMOLT_ONU_STATE_LOW_POWER_DOZE:
+                break;
+            case BCMOLT_ONU_STATE_LOW_POWER_SLEEP:
+                break;
+            case BCMOLT_ONU_STATE_LOW_POWER_WATCH:
+                break;
+            case BCMOLT_ONU_STATE_UNAWARE:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_OLD_STATE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_NEW_STATE)) != 0)
+    {
+        switch (this->new_state)
+        {
+            case BCMOLT_ONU_STATE_NOT_CONFIGURED:
+                break;
+            case BCMOLT_ONU_STATE_INACTIVE:
+                break;
+            case BCMOLT_ONU_STATE_ACTIVE:
+                break;
+            case BCMOLT_ONU_STATE_ACTIVE_STANDBY:
+                break;
+            case BCMOLT_ONU_STATE_DISABLED:
+                break;
+            case BCMOLT_ONU_STATE_AWAKE_FREE:
+                break;
+            case BCMOLT_ONU_STATE_PROCESSING:
+                break;
+            case BCMOLT_ONU_STATE_LOW_POWER_DOZE:
+                break;
+            case BCMOLT_ONU_STATE_LOW_POWER_SLEEP:
+                break;
+            case BCMOLT_ONU_STATE_LOW_POWER_WATCH:
+                break;
+            case BCMOLT_ONU_STATE_UNAWARE:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_NEW_STATE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_REASON)) != 0)
+    {
+        switch (this->reason)
+        {
+            case BCMOLT_POWER_MANAGEMENT_TRANSITION_REASON_POWER_MANAGEMENT_ENABLED:
+                break;
+            case BCMOLT_POWER_MANAGEMENT_TRANSITION_REASON_POWER_MANAGEMENT_DISABLED:
+                break;
+            case BCMOLT_POWER_MANAGEMENT_TRANSITION_REASON_SLEEP_REQUEST_AWAKE:
+                break;
+            case BCMOLT_POWER_MANAGEMENT_TRANSITION_REASON_SLEEP_REQUEST_DOZE:
+                break;
+            case BCMOLT_POWER_MANAGEMENT_TRANSITION_REASON_SLEEP_REQUEST_SLEEP:
+                break;
+            case BCMOLT_POWER_MANAGEMENT_TRANSITION_REASON_SLEEP_REQUEST_WATCH:
+                break;
+            case BCMOLT_POWER_MANAGEMENT_TRANSITION_REASON_TERI_EXPIRED:
+                break;
+            case BCMOLT_POWER_MANAGEMENT_TRANSITION_REASON_TALERTED_EXPIRED:
+                break;
+            case BCMOLT_POWER_MANAGEMENT_TRANSITION_REASON_ALARM:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ONU_POWER_MANAGEMENT_STATE_CHANGE_ID_REASON;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_pqsi_data_set_default(bcmolt_xgpon_onu_pqsi_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_PQSI_ID_ALARM_STATUS)) != 0)
+    {
+        this->alarm_status = BCMOLT_STATUS_OFF;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_pqsi_data_pack(const bcmolt_xgpon_onu_pqsi_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_PQSI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_pack(this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_pqsi_data_get_packed_length(const bcmolt_xgpon_onu_pqsi_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_PQSI_ID_ALARM_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_pqsi_data_unpack(bcmolt_xgpon_onu_pqsi_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_PQSI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_unpack(&this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_pqsi_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_PQSI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_pqsi_data_bounds_check(const bcmolt_xgpon_onu_pqsi_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_pqsi_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_PQSI_ID_ALARM_STATUS)) != 0)
+    {
+        switch (this->alarm_status)
+        {
+            case BCMOLT_STATUS_OFF:
+                break;
+            case BCMOLT_STATUS_ON:
+                break;
+            case BCMOLT_STATUS_NO_CHANGE:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ONU_PQSI_ID_ALARM_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_ranging_completed_data_set_default(bcmolt_xgpon_onu_ranging_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_RANGING_COMPLETED_ID_STATUS)) != 0)
+    {
+        this->status = BCMOLT_RESULT_SUCCESS;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_RANGING_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        this->fail_reason = BCMOLT_RANGING_FAIL_REASON_NONE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_RANGING_COMPLETED_ID_EQD)) != 0)
+    {
+        this->eqd = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_RANGING_COMPLETED_ID_NUMBER_OF_PLOAMS)) != 0)
+    {
+        this->number_of_ploams = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_RANGING_COMPLETED_ID_POWER_LEVEL)) != 0)
+    {
+        this->power_level = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_ranging_completed_data_pack(const bcmolt_xgpon_onu_ranging_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_RANGING_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_result_pack(this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_RANGING_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        if (!bcmolt_ranging_fail_reason_pack(this->fail_reason, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_RANGING_COMPLETED_ID_EQD)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->eqd))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_RANGING_COMPLETED_ID_NUMBER_OF_PLOAMS)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->number_of_ploams))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_RANGING_COMPLETED_ID_POWER_LEVEL)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->power_level))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_ranging_completed_data_get_packed_length(const bcmolt_xgpon_onu_ranging_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_RANGING_COMPLETED_ID_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_RANGING_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_RANGING_COMPLETED_ID_EQD)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_RANGING_COMPLETED_ID_NUMBER_OF_PLOAMS)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_RANGING_COMPLETED_ID_POWER_LEVEL)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_ranging_completed_data_unpack(bcmolt_xgpon_onu_ranging_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_RANGING_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_result_unpack(&this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_RANGING_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        if (!bcmolt_ranging_fail_reason_unpack(&this->fail_reason, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_RANGING_COMPLETED_ID_EQD)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->eqd))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_RANGING_COMPLETED_ID_NUMBER_OF_PLOAMS)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->number_of_ploams))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_RANGING_COMPLETED_ID_POWER_LEVEL)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->power_level))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_ranging_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_RANGING_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_RANGING_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_RANGING_COMPLETED_ID_EQD)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_RANGING_COMPLETED_ID_NUMBER_OF_PLOAMS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_RANGING_COMPLETED_ID_POWER_LEVEL)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_ranging_completed_data_bounds_check(const bcmolt_xgpon_onu_ranging_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_ranging_completed_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_RANGING_COMPLETED_ID_STATUS)) != 0)
+    {
+        switch (this->status)
+        {
+            case BCMOLT_RESULT_SUCCESS:
+                break;
+            case BCMOLT_RESULT_FAIL:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ONU_RANGING_COMPLETED_ID_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_RANGING_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        switch (this->fail_reason)
+        {
+            case BCMOLT_RANGING_FAIL_REASON_NONE:
+                break;
+            case BCMOLT_RANGING_FAIL_REASON_RANGING_ACK_TIMEOUT:
+                break;
+            case BCMOLT_RANGING_FAIL_REASON_PLOAM_DATA_MISMATCH:
+                break;
+            case BCMOLT_RANGING_FAIL_REASON_PLOAM_TYPE_MISMATCH:
+                break;
+            case BCMOLT_RANGING_FAIL_REASON_PLOAM_ONU_ID_MISMATCH:
+                break;
+            case BCMOLT_RANGING_FAIL_REASON_DRIFT_EXCEEDED:
+                break;
+            case BCMOLT_RANGING_FAIL_REASON_NO_PLOAM_RECEIVED:
+                break;
+            case BCMOLT_RANGING_FAIL_REASON_LOS:
+                break;
+            case BCMOLT_RANGING_FAIL_REASON_ALARMS:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ONU_RANGING_COMPLETED_ID_FAIL_REASON;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_registration_id_data_set_default(bcmolt_xgpon_onu_registration_id_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_REGISTRATION_ID_ID_REGISTRATION_ID)) != 0)
+    {
+        memset(this->registration_id.arr, 0, sizeof(this->registration_id.arr));
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_REGISTRATION_ID_ID_REQUEST_REGISTRATION_STATUS)) != 0)
+    {
+        this->request_registration_status = BCMOLT_RESULT_SUCCESS;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_REGISTRATION_ID_ID_REQUEST_REGISTRATION_FAIL_REASON)) != 0)
+    {
+        this->request_registration_fail_reason = BCMOLT_REQUEST_REGISTRATION_FAIL_REASON_NONE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_registration_id_data_pack(const bcmolt_xgpon_onu_registration_id_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_REGISTRATION_ID_ID_REGISTRATION_ID)) != 0)
+    {
+        if (!bcmolt_arr_u8_36_pack(&this->registration_id, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_REGISTRATION_ID_ID_REQUEST_REGISTRATION_STATUS)) != 0)
+    {
+        if (!bcmolt_result_pack(this->request_registration_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_REGISTRATION_ID_ID_REQUEST_REGISTRATION_FAIL_REASON)) != 0)
+    {
+        if (!bcmolt_request_registration_fail_reason_pack(this->request_registration_fail_reason, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_registration_id_data_get_packed_length(const bcmolt_xgpon_onu_registration_id_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_REGISTRATION_ID_ID_REGISTRATION_ID)) != 0)
+    {
+        count += 36;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_REGISTRATION_ID_ID_REQUEST_REGISTRATION_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_REGISTRATION_ID_ID_REQUEST_REGISTRATION_FAIL_REASON)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_registration_id_data_unpack(bcmolt_xgpon_onu_registration_id_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_REGISTRATION_ID_ID_REGISTRATION_ID)) != 0)
+    {
+        if (!bcmolt_arr_u8_36_unpack(&this->registration_id, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_REGISTRATION_ID_ID_REQUEST_REGISTRATION_STATUS)) != 0)
+    {
+        if (!bcmolt_result_unpack(&this->request_registration_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_REGISTRATION_ID_ID_REQUEST_REGISTRATION_FAIL_REASON)) != 0)
+    {
+        if (!bcmolt_request_registration_fail_reason_unpack(&this->request_registration_fail_reason, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_registration_id_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_REGISTRATION_ID_ID_REGISTRATION_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 36))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_REGISTRATION_ID_ID_REQUEST_REGISTRATION_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_REGISTRATION_ID_ID_REQUEST_REGISTRATION_FAIL_REASON)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_registration_id_data_bounds_check(const bcmolt_xgpon_onu_registration_id_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_registration_id_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_REGISTRATION_ID_ID_REGISTRATION_ID)) != 0)
+    {
+        if (!bcmolt_arr_u8_36_bounds_check(&this->registration_id))
+        {
+            *failed_prop = BCMOLT_XGPON_ONU_REGISTRATION_ID_ID_REGISTRATION_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_REGISTRATION_ID_ID_REQUEST_REGISTRATION_STATUS)) != 0)
+    {
+        switch (this->request_registration_status)
+        {
+            case BCMOLT_RESULT_SUCCESS:
+                break;
+            case BCMOLT_RESULT_FAIL:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ONU_REGISTRATION_ID_ID_REQUEST_REGISTRATION_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_REGISTRATION_ID_ID_REQUEST_REGISTRATION_FAIL_REASON)) != 0)
+    {
+        switch (this->request_registration_fail_reason)
+        {
+            case BCMOLT_REQUEST_REGISTRATION_FAIL_REASON_NONE:
+                break;
+            case BCMOLT_REQUEST_REGISTRATION_FAIL_REASON_REGISTRATION_PLOAM_TIMEOUT:
+                break;
+            case BCMOLT_REQUEST_REGISTRATION_FAIL_REASON_ONU_ALARM:
+                break;
+            case BCMOLT_REQUEST_REGISTRATION_FAIL_REASON_DEACTIVATION:
+                break;
+            case BCMOLT_REQUEST_REGISTRATION_FAIL_REASON_DISABLE:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ONU_REGISTRATION_ID_ID_REQUEST_REGISTRATION_FAIL_REASON;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_rssi_measurement_completed_data_set_default(bcmolt_xgpon_onu_rssi_measurement_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_RSSI_MEASUREMENT_COMPLETED_ID_STATUS)) != 0)
+    {
+        this->status = BCMOLT_RESULT_SUCCESS;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_RSSI_MEASUREMENT_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        this->fail_reason = BCMOLT_RSSI_MEASUREMENT_FAIL_REASON_NONE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_rssi_measurement_completed_data_pack(const bcmolt_xgpon_onu_rssi_measurement_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_RSSI_MEASUREMENT_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_result_pack(this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_RSSI_MEASUREMENT_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        if (!bcmolt_rssi_measurement_fail_reason_pack(this->fail_reason, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_rssi_measurement_completed_data_get_packed_length(const bcmolt_xgpon_onu_rssi_measurement_completed_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_RSSI_MEASUREMENT_COMPLETED_ID_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_RSSI_MEASUREMENT_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_rssi_measurement_completed_data_unpack(bcmolt_xgpon_onu_rssi_measurement_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_RSSI_MEASUREMENT_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_result_unpack(&this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_RSSI_MEASUREMENT_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        if (!bcmolt_rssi_measurement_fail_reason_unpack(&this->fail_reason, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_rssi_measurement_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_RSSI_MEASUREMENT_COMPLETED_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_RSSI_MEASUREMENT_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_rssi_measurement_completed_data_bounds_check(const bcmolt_xgpon_onu_rssi_measurement_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_rssi_measurement_completed_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_RSSI_MEASUREMENT_COMPLETED_ID_STATUS)) != 0)
+    {
+        switch (this->status)
+        {
+            case BCMOLT_RESULT_SUCCESS:
+                break;
+            case BCMOLT_RESULT_FAIL:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ONU_RSSI_MEASUREMENT_COMPLETED_ID_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_RSSI_MEASUREMENT_COMPLETED_ID_FAIL_REASON)) != 0)
+    {
+        switch (this->fail_reason)
+        {
+            case BCMOLT_RSSI_MEASUREMENT_FAIL_REASON_NONE:
+                break;
+            case BCMOLT_RSSI_MEASUREMENT_FAIL_REASON_NO_DELIMITER:
+                break;
+            case BCMOLT_RSSI_MEASUREMENT_FAIL_REASON_NO_ACCESS:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ONU_RSSI_MEASUREMENT_COMPLETED_ID_FAIL_REASON;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_sdi_data_set_default(bcmolt_xgpon_onu_sdi_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SDI_ID_ALARM_STATUS)) != 0)
+    {
+        this->alarm_status = BCMOLT_STATUS_OFF;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SDI_ID_BER)) != 0)
+    {
+        this->ber = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_sdi_data_pack(const bcmolt_xgpon_onu_sdi_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SDI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_pack(this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SDI_ID_BER)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->ber))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_sdi_data_get_packed_length(const bcmolt_xgpon_onu_sdi_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SDI_ID_ALARM_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SDI_ID_BER)) != 0)
+    {
+        count += 4;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_sdi_data_unpack(bcmolt_xgpon_onu_sdi_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SDI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_unpack(&this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SDI_ID_BER)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->ber))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_sdi_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SDI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SDI_ID_BER)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_sdi_data_bounds_check(const bcmolt_xgpon_onu_sdi_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_sdi_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SDI_ID_ALARM_STATUS)) != 0)
+    {
+        switch (this->alarm_status)
+        {
+            case BCMOLT_STATUS_OFF:
+                break;
+            case BCMOLT_STATUS_ON:
+                break;
+            case BCMOLT_STATUS_NO_CHANGE:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ONU_SDI_ID_ALARM_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_secure_mutual_authentication_failure_data_set_default(bcmolt_xgpon_onu_secure_mutual_authentication_failure_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_FAILURE_ID_STATUS)) != 0)
+    {
+        this->status = BCMOLT_RESULT_SUCCESS;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_FAILURE_ID_FAIL_REASON)) != 0)
+    {
+        this->fail_reason = BCMOLT_SECURE_MUTUAL_AUTHENTICATION_FAIL_REASON_TIMEOUT;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_secure_mutual_authentication_failure_data_pack(const bcmolt_xgpon_onu_secure_mutual_authentication_failure_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_FAILURE_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_result_pack(this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_FAILURE_ID_FAIL_REASON)) != 0)
+    {
+        if (!bcmolt_secure_mutual_authentication_fail_reason_pack(this->fail_reason, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_secure_mutual_authentication_failure_data_get_packed_length(const bcmolt_xgpon_onu_secure_mutual_authentication_failure_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_FAILURE_ID_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_FAILURE_ID_FAIL_REASON)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_secure_mutual_authentication_failure_data_unpack(bcmolt_xgpon_onu_secure_mutual_authentication_failure_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_FAILURE_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_result_unpack(&this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_FAILURE_ID_FAIL_REASON)) != 0)
+    {
+        if (!bcmolt_secure_mutual_authentication_fail_reason_unpack(&this->fail_reason, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_secure_mutual_authentication_failure_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_FAILURE_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_FAILURE_ID_FAIL_REASON)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_secure_mutual_authentication_failure_data_bounds_check(const bcmolt_xgpon_onu_secure_mutual_authentication_failure_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_secure_mutual_authentication_failure_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_FAILURE_ID_STATUS)) != 0)
+    {
+        switch (this->status)
+        {
+            case BCMOLT_RESULT_SUCCESS:
+                break;
+            case BCMOLT_RESULT_FAIL:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_FAILURE_ID_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_FAILURE_ID_FAIL_REASON)) != 0)
+    {
+        switch (this->fail_reason)
+        {
+            case BCMOLT_SECURE_MUTUAL_AUTHENTICATION_FAIL_REASON_TIMEOUT:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_FAILURE_ID_FAIL_REASON;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_sfi_data_set_default(bcmolt_xgpon_onu_sfi_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SFI_ID_ALARM_STATUS)) != 0)
+    {
+        this->alarm_status = BCMOLT_STATUS_OFF;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SFI_ID_BER)) != 0)
+    {
+        this->ber = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_sfi_data_pack(const bcmolt_xgpon_onu_sfi_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SFI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_pack(this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SFI_ID_BER)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->ber))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_sfi_data_get_packed_length(const bcmolt_xgpon_onu_sfi_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SFI_ID_ALARM_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SFI_ID_BER)) != 0)
+    {
+        count += 4;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_sfi_data_unpack(bcmolt_xgpon_onu_sfi_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SFI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_unpack(&this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SFI_ID_BER)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->ber))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_sfi_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SFI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SFI_ID_BER)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_sfi_data_bounds_check(const bcmolt_xgpon_onu_sfi_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_sfi_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SFI_ID_ALARM_STATUS)) != 0)
+    {
+        switch (this->alarm_status)
+        {
+            case BCMOLT_STATUS_OFF:
+                break;
+            case BCMOLT_STATUS_ON:
+                break;
+            case BCMOLT_STATUS_NO_CHANGE:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ONU_SFI_ID_ALARM_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_stat_alarm_cleared_data_set_default(bcmolt_xgpon_onu_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        this->stat = BCMOLT_XGPON_ONU_STAT_ID_POSITIVE_DRIFT;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_stat_alarm_cleared_data_pack(const bcmolt_xgpon_onu_stat_alarm_cleared_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_xgpon_onu_stat_id_pack(this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_stat_alarm_cleared_data_get_packed_length(const bcmolt_xgpon_onu_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_stat_alarm_cleared_data_unpack(bcmolt_xgpon_onu_stat_alarm_cleared_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_xgpon_onu_stat_id_unpack(&this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_stat_alarm_cleared_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_stat_alarm_cleared_data_bounds_check(const bcmolt_xgpon_onu_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_stat_alarm_cleared_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ALARM_CLEARED_ID_STAT)) != 0)
+    {
+        switch (this->stat)
+        {
+            case BCMOLT_XGPON_ONU_STAT_ID_POSITIVE_DRIFT:
+                break;
+            case BCMOLT_XGPON_ONU_STAT_ID_NEGATIVE_DRIFT:
+                break;
+            case BCMOLT_XGPON_ONU_STAT_ID_DELIMITER_MISS_DETECTION:
+                break;
+            case BCMOLT_XGPON_ONU_STAT_ID_BIP32_ERRORS:
+                break;
+            case BCMOLT_XGPON_ONU_STAT_ID_RX_WORDS:
+                break;
+            case BCMOLT_XGPON_ONU_STAT_ID_FEC_CORRECTED_SYMBOLS:
+                break;
+            case BCMOLT_XGPON_ONU_STAT_ID_FEC_CORRECTED_CODEWORDS:
+                break;
+            case BCMOLT_XGPON_ONU_STAT_ID_FEC_UNCORRECTABLE_CODEWORDS:
+                break;
+            case BCMOLT_XGPON_ONU_STAT_ID_FEC_CODEWORDS:
+                break;
+            case BCMOLT_XGPON_ONU_STAT_ID_FEC_CORRECTED_BITS:
+                break;
+            case BCMOLT_XGPON_ONU_STAT_ID_XGEM_KEY_ERRORS:
+                break;
+            case BCMOLT_XGPON_ONU_STAT_ID_XGEM_LOSS:
+                break;
+            case BCMOLT_XGPON_ONU_STAT_ID_RX_PLOAMS_MIC_ERROR:
+                break;
+            case BCMOLT_XGPON_ONU_STAT_ID_RX_PLOAMS_NON_IDLE:
+                break;
+            case BCMOLT_XGPON_ONU_STAT_ID_RX_OMCI:
+                break;
+            case BCMOLT_XGPON_ONU_STAT_ID_RX_OMCI_PACKETS_CRC_ERROR:
+                break;
+            case BCMOLT_XGPON_ONU_STAT_ID_RX_BYTES:
+                break;
+            case BCMOLT_XGPON_ONU_STAT_ID_RX_PACKETS:
+                break;
+            case BCMOLT_XGPON_ONU_STAT_ID_TX_BYTES:
+                break;
+            case BCMOLT_XGPON_ONU_STAT_ID_TX_PACKETS:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ONU_STAT_ALARM_CLEARED_ID_STAT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_stat_alarm_raised_data_set_default(bcmolt_xgpon_onu_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        this->stat = BCMOLT_XGPON_ONU_STAT_ID_POSITIVE_DRIFT;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_stat_alarm_raised_data_pack(const bcmolt_xgpon_onu_stat_alarm_raised_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_xgpon_onu_stat_id_pack(this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_stat_alarm_raised_data_get_packed_length(const bcmolt_xgpon_onu_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        count += 2;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_stat_alarm_raised_data_unpack(bcmolt_xgpon_onu_stat_alarm_raised_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_xgpon_onu_stat_id_unpack(&this->stat, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_stat_alarm_raised_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_stat_alarm_raised_data_bounds_check(const bcmolt_xgpon_onu_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_stat_alarm_raised_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_STAT_ALARM_RAISED_ID_STAT)) != 0)
+    {
+        switch (this->stat)
+        {
+            case BCMOLT_XGPON_ONU_STAT_ID_POSITIVE_DRIFT:
+                break;
+            case BCMOLT_XGPON_ONU_STAT_ID_NEGATIVE_DRIFT:
+                break;
+            case BCMOLT_XGPON_ONU_STAT_ID_DELIMITER_MISS_DETECTION:
+                break;
+            case BCMOLT_XGPON_ONU_STAT_ID_BIP32_ERRORS:
+                break;
+            case BCMOLT_XGPON_ONU_STAT_ID_RX_WORDS:
+                break;
+            case BCMOLT_XGPON_ONU_STAT_ID_FEC_CORRECTED_SYMBOLS:
+                break;
+            case BCMOLT_XGPON_ONU_STAT_ID_FEC_CORRECTED_CODEWORDS:
+                break;
+            case BCMOLT_XGPON_ONU_STAT_ID_FEC_UNCORRECTABLE_CODEWORDS:
+                break;
+            case BCMOLT_XGPON_ONU_STAT_ID_FEC_CODEWORDS:
+                break;
+            case BCMOLT_XGPON_ONU_STAT_ID_FEC_CORRECTED_BITS:
+                break;
+            case BCMOLT_XGPON_ONU_STAT_ID_XGEM_KEY_ERRORS:
+                break;
+            case BCMOLT_XGPON_ONU_STAT_ID_XGEM_LOSS:
+                break;
+            case BCMOLT_XGPON_ONU_STAT_ID_RX_PLOAMS_MIC_ERROR:
+                break;
+            case BCMOLT_XGPON_ONU_STAT_ID_RX_PLOAMS_NON_IDLE:
+                break;
+            case BCMOLT_XGPON_ONU_STAT_ID_RX_OMCI:
+                break;
+            case BCMOLT_XGPON_ONU_STAT_ID_RX_OMCI_PACKETS_CRC_ERROR:
+                break;
+            case BCMOLT_XGPON_ONU_STAT_ID_RX_BYTES:
+                break;
+            case BCMOLT_XGPON_ONU_STAT_ID_RX_PACKETS:
+                break;
+            case BCMOLT_XGPON_ONU_STAT_ID_TX_BYTES:
+                break;
+            case BCMOLT_XGPON_ONU_STAT_ID_TX_PACKETS:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ONU_STAT_ALARM_RAISED_ID_STAT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_sufi_data_set_default(bcmolt_xgpon_onu_sufi_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SUFI_ID_ALARM_STATUS)) != 0)
+    {
+        this->alarm_status = BCMOLT_STATUS_OFF;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_sufi_data_pack(const bcmolt_xgpon_onu_sufi_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SUFI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_pack(this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_sufi_data_get_packed_length(const bcmolt_xgpon_onu_sufi_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SUFI_ID_ALARM_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_sufi_data_unpack(bcmolt_xgpon_onu_sufi_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SUFI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_unpack(&this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_sufi_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SUFI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_sufi_data_bounds_check(const bcmolt_xgpon_onu_sufi_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_sufi_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SUFI_ID_ALARM_STATUS)) != 0)
+    {
+        switch (this->alarm_status)
+        {
+            case BCMOLT_STATUS_OFF:
+                break;
+            case BCMOLT_STATUS_ON:
+                break;
+            case BCMOLT_STATUS_NO_CHANGE:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ONU_SUFI_ID_ALARM_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_tiwi_data_set_default(bcmolt_xgpon_onu_tiwi_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_TIWI_ID_ALARM_STATUS)) != 0)
+    {
+        this->alarm_status = BCMOLT_STATUS_OFF;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_TIWI_ID_DRIFT_VALUE)) != 0)
+    {
+        this->drift_value = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_tiwi_data_pack(const bcmolt_xgpon_onu_tiwi_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_TIWI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_pack(this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_TIWI_ID_DRIFT_VALUE)) != 0)
+    {
+        if (!bcmolt_buf_write_s32(buf, this->drift_value))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_tiwi_data_get_packed_length(const bcmolt_xgpon_onu_tiwi_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_TIWI_ID_ALARM_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_TIWI_ID_DRIFT_VALUE)) != 0)
+    {
+        count += 4;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_tiwi_data_unpack(bcmolt_xgpon_onu_tiwi_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_TIWI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_status_unpack(&this->alarm_status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_TIWI_ID_DRIFT_VALUE)) != 0)
+    {
+        if (!bcmolt_buf_read_s32(buf, &this->drift_value))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_tiwi_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_TIWI_ID_ALARM_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_TIWI_ID_DRIFT_VALUE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_tiwi_data_bounds_check(const bcmolt_xgpon_onu_tiwi_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_tiwi_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_TIWI_ID_ALARM_STATUS)) != 0)
+    {
+        switch (this->alarm_status)
+        {
+            case BCMOLT_STATUS_OFF:
+                break;
+            case BCMOLT_STATUS_ON:
+                break;
+            case BCMOLT_STATUS_NO_CHANGE:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ONU_TIWI_ID_ALARM_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_tuning_response_data_set_default(bcmolt_xgpon_onu_tuning_response_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_TUNING_RESPONSE_ID_ACK)) != 0)
+    {
+        this->ack = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_TUNING_RESPONSE_ID_RESULT)) != 0)
+    {
+        this->result = BCMOLT_RESULT_SUCCESS;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_tuning_response_data_pack(const bcmolt_xgpon_onu_tuning_response_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_TUNING_RESPONSE_ID_ACK)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->ack))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_TUNING_RESPONSE_ID_RESULT)) != 0)
+    {
+        if (!bcmolt_result_pack(this->result, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_tuning_response_data_get_packed_length(const bcmolt_xgpon_onu_tuning_response_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_TUNING_RESPONSE_ID_ACK)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_TUNING_RESPONSE_ID_RESULT)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_tuning_response_data_unpack(bcmolt_xgpon_onu_tuning_response_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_TUNING_RESPONSE_ID_ACK)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->ack))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_TUNING_RESPONSE_ID_RESULT)) != 0)
+    {
+        if (!bcmolt_result_unpack(&this->result, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_tuning_response_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_TUNING_RESPONSE_ID_ACK)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_TUNING_RESPONSE_ID_RESULT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_tuning_response_data_bounds_check(const bcmolt_xgpon_onu_tuning_response_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_tuning_response_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_TUNING_RESPONSE_ID_RESULT)) != 0)
+    {
+        switch (this->result)
+        {
+            case BCMOLT_RESULT_SUCCESS:
+                break;
+            case BCMOLT_RESULT_FAIL:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ONU_TUNING_RESPONSE_ID_RESULT;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_auto_cfg_data_set_default(bcmolt_xgpon_onu_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_DFI)) != 0)
+    {
+        this->dfi = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_DGI)) != 0)
+    {
+        this->dgi = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_DOWI)) != 0)
+    {
+        this->dowi = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_INVALID_DBRU_REPORT)) != 0)
+    {
+        this->invalid_dbru_report = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_COMPLETED)) != 0)
+    {
+        this->key_exchange_completed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_CYCLE_SKIPPED)) != 0)
+    {
+        this->key_exchange_cycle_skipped = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_KEY_MISMATCH)) != 0)
+    {
+        this->key_exchange_key_mismatch = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_KEY_REQUEST_TIMEOUT)) != 0)
+    {
+        this->key_exchange_key_request_timeout = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_LOOCI)) != 0)
+    {
+        this->looci = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_ACTIVATION_COMPLETED)) != 0)
+    {
+        this->onu_activation_completed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_ALARM)) != 0)
+    {
+        this->onu_alarm = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_DEACTIVATION_COMPLETED)) != 0)
+    {
+        this->onu_deactivation_completed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_DISABLE_COMPLETED)) != 0)
+    {
+        this->onu_disable_completed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_ENABLE_COMPLETED)) != 0)
+    {
+        this->onu_enable_completed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_TUNING_IN_COMPLETED)) != 0)
+    {
+        this->onu_tuning_in_completed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_TUNING_OUT_COMPLETED)) != 0)
+    {
+        this->onu_tuning_out_completed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_OPTICAL_REFLECTION)) != 0)
+    {
+        this->optical_reflection = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_POSSIBLE_DRIFT)) != 0)
+    {
+        this->possible_drift = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_POWER_CONSUMPTION_REPORT)) != 0)
+    {
+        this->power_consumption_report = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_POWER_LEVEL_REPORT)) != 0)
+    {
+        this->power_level_report = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_POWER_MANAGEMENT_STATE_CHANGE)) != 0)
+    {
+        this->power_management_state_change = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_PQSI)) != 0)
+    {
+        this->pqsi = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_RANGING_COMPLETED)) != 0)
+    {
+        this->ranging_completed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_REGISTRATION_ID)) != 0)
+    {
+        this->registration_id = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_RSSI_MEASUREMENT_COMPLETED)) != 0)
+    {
+        this->rssi_measurement_completed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_SDI)) != 0)
+    {
+        this->sdi = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_SECURE_MUTUAL_AUTHENTICATION_FAILURE)) != 0)
+    {
+        this->secure_mutual_authentication_failure = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_SFI)) != 0)
+    {
+        this->sfi = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        this->stat_alarm_cleared = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        this->stat_alarm_raised = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_SUFI)) != 0)
+    {
+        this->sufi = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_TIWI)) != 0)
+    {
+        this->tiwi = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_TUNING_RESPONSE)) != 0)
+    {
+        this->tuning_response = BCMOS_FALSE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_auto_cfg_data_pack(const bcmolt_xgpon_onu_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_DFI)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->dfi))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_DGI)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->dgi))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_DOWI)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->dowi))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_INVALID_DBRU_REPORT)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->invalid_dbru_report))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->key_exchange_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_CYCLE_SKIPPED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->key_exchange_cycle_skipped))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_KEY_MISMATCH)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->key_exchange_key_mismatch))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_KEY_REQUEST_TIMEOUT)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->key_exchange_key_request_timeout))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_LOOCI)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->looci))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_ACTIVATION_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->onu_activation_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_ALARM)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->onu_alarm))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_DEACTIVATION_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->onu_deactivation_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_DISABLE_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->onu_disable_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_ENABLE_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->onu_enable_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_TUNING_IN_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->onu_tuning_in_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_TUNING_OUT_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->onu_tuning_out_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_OPTICAL_REFLECTION)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->optical_reflection))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_POSSIBLE_DRIFT)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->possible_drift))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_POWER_CONSUMPTION_REPORT)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->power_consumption_report))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_POWER_LEVEL_REPORT)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->power_level_report))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_POWER_MANAGEMENT_STATE_CHANGE)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->power_management_state_change))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_PQSI)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->pqsi))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_RANGING_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->ranging_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_REGISTRATION_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->registration_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_RSSI_MEASUREMENT_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->rssi_measurement_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_SDI)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->sdi))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_SECURE_MUTUAL_AUTHENTICATION_FAILURE)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->secure_mutual_authentication_failure))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_SFI)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->sfi))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->stat_alarm_cleared))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->stat_alarm_raised))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_SUFI)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->sufi))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_TIWI)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->tiwi))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_TUNING_RESPONSE)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->tuning_response))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_auto_cfg_data_get_packed_length(const bcmolt_xgpon_onu_auto_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_DFI)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_DGI)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_DOWI)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_INVALID_DBRU_REPORT)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_CYCLE_SKIPPED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_KEY_MISMATCH)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_KEY_REQUEST_TIMEOUT)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_LOOCI)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_ACTIVATION_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_ALARM)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_DEACTIVATION_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_DISABLE_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_ENABLE_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_TUNING_IN_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_TUNING_OUT_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_OPTICAL_REFLECTION)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_POSSIBLE_DRIFT)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_POWER_CONSUMPTION_REPORT)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_POWER_LEVEL_REPORT)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_POWER_MANAGEMENT_STATE_CHANGE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_PQSI)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_RANGING_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_REGISTRATION_ID)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_RSSI_MEASUREMENT_COMPLETED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_SDI)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_SECURE_MUTUAL_AUTHENTICATION_FAILURE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_SFI)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_SUFI)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_TIWI)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_TUNING_RESPONSE)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_auto_cfg_data_unpack(bcmolt_xgpon_onu_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_DFI)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->dfi))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_DGI)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->dgi))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_DOWI)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->dowi))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_INVALID_DBRU_REPORT)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->invalid_dbru_report))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->key_exchange_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_CYCLE_SKIPPED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->key_exchange_cycle_skipped))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_KEY_MISMATCH)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->key_exchange_key_mismatch))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_KEY_REQUEST_TIMEOUT)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->key_exchange_key_request_timeout))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_LOOCI)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->looci))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_ACTIVATION_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->onu_activation_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_ALARM)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->onu_alarm))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_DEACTIVATION_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->onu_deactivation_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_DISABLE_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->onu_disable_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_ENABLE_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->onu_enable_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_TUNING_IN_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->onu_tuning_in_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_TUNING_OUT_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->onu_tuning_out_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_OPTICAL_REFLECTION)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->optical_reflection))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_POSSIBLE_DRIFT)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->possible_drift))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_POWER_CONSUMPTION_REPORT)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->power_consumption_report))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_POWER_LEVEL_REPORT)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->power_level_report))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_POWER_MANAGEMENT_STATE_CHANGE)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->power_management_state_change))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_PQSI)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->pqsi))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_RANGING_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->ranging_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_REGISTRATION_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->registration_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_RSSI_MEASUREMENT_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->rssi_measurement_completed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_SDI)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->sdi))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_SECURE_MUTUAL_AUTHENTICATION_FAILURE)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->secure_mutual_authentication_failure))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_SFI)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->sfi))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->stat_alarm_cleared))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->stat_alarm_raised))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_SUFI)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->sufi))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_TIWI)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->tiwi))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_TUNING_RESPONSE)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->tuning_response))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_DFI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_DGI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_DOWI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_INVALID_DBRU_REPORT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_CYCLE_SKIPPED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_KEY_MISMATCH)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_KEY_EXCHANGE_KEY_REQUEST_TIMEOUT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_LOOCI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_ACTIVATION_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_ALARM)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_DEACTIVATION_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_DISABLE_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_ENABLE_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_TUNING_IN_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_ONU_TUNING_OUT_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_OPTICAL_REFLECTION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_POSSIBLE_DRIFT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_POWER_CONSUMPTION_REPORT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_POWER_LEVEL_REPORT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_POWER_MANAGEMENT_STATE_CHANGE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_PQSI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_RANGING_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_REGISTRATION_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_RSSI_MEASUREMENT_COMPLETED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_SDI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_SECURE_MUTUAL_AUTHENTICATION_FAILURE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_SFI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_STAT_ALARM_CLEARED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_STAT_ALARM_RAISED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_SUFI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_TIWI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_AUTO_CFG_ID_TUNING_RESPONSE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_auto_cfg_data_bounds_check(const bcmolt_xgpon_onu_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_auto_cfg_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_adjust_tx_wavelength_data_set_default(bcmolt_xgpon_onu_adjust_tx_wavelength_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ADJUST_TX_WAVELENGTH_ID_FREQUENCY_ADJUSTMENT_DIRECTION)) != 0)
+    {
+        this->frequency_adjustment_direction = BCMOLT_FREQUENCY_ADJUSTMENT_DIRECTION_LOWER;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ADJUST_TX_WAVELENGTH_ID_FREQUENCY_ADJUSTMENT_SIZE)) != 0)
+    {
+        this->frequency_adjustment_size = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_adjust_tx_wavelength_data_pack(const bcmolt_xgpon_onu_adjust_tx_wavelength_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ADJUST_TX_WAVELENGTH_ID_FREQUENCY_ADJUSTMENT_DIRECTION)) != 0)
+    {
+        if (!bcmolt_frequency_adjustment_direction_pack(this->frequency_adjustment_direction, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ADJUST_TX_WAVELENGTH_ID_FREQUENCY_ADJUSTMENT_SIZE)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->frequency_adjustment_size))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_adjust_tx_wavelength_data_get_packed_length(const bcmolt_xgpon_onu_adjust_tx_wavelength_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ADJUST_TX_WAVELENGTH_ID_FREQUENCY_ADJUSTMENT_DIRECTION)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ADJUST_TX_WAVELENGTH_ID_FREQUENCY_ADJUSTMENT_SIZE)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_adjust_tx_wavelength_data_unpack(bcmolt_xgpon_onu_adjust_tx_wavelength_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ADJUST_TX_WAVELENGTH_ID_FREQUENCY_ADJUSTMENT_DIRECTION)) != 0)
+    {
+        if (!bcmolt_frequency_adjustment_direction_unpack(&this->frequency_adjustment_direction, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ADJUST_TX_WAVELENGTH_ID_FREQUENCY_ADJUSTMENT_SIZE)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->frequency_adjustment_size))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_adjust_tx_wavelength_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ADJUST_TX_WAVELENGTH_ID_FREQUENCY_ADJUSTMENT_DIRECTION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ADJUST_TX_WAVELENGTH_ID_FREQUENCY_ADJUSTMENT_SIZE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_adjust_tx_wavelength_data_bounds_check(const bcmolt_xgpon_onu_adjust_tx_wavelength_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_adjust_tx_wavelength_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ADJUST_TX_WAVELENGTH_ID_FREQUENCY_ADJUSTMENT_DIRECTION)) != 0)
+    {
+        switch (this->frequency_adjustment_direction)
+        {
+            case BCMOLT_FREQUENCY_ADJUSTMENT_DIRECTION_LOWER:
+                break;
+            case BCMOLT_FREQUENCY_ADJUSTMENT_DIRECTION_HIGHER:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ONU_ADJUST_TX_WAVELENGTH_ID_FREQUENCY_ADJUSTMENT_DIRECTION;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_change_power_levelling_data_set_default(bcmolt_xgpon_onu_change_power_levelling_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CHANGE_POWER_LEVELLING_ID_CONTROL)) != 0)
+    {
+        this->control = BCMOLT_POWER_LEVELLING_CONTROL_DIRECT;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CHANGE_POWER_LEVELLING_ID_ATTENUATION)) != 0)
+    {
+        this->attenuation = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_change_power_levelling_data_pack(const bcmolt_xgpon_onu_change_power_levelling_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CHANGE_POWER_LEVELLING_ID_CONTROL)) != 0)
+    {
+        if (!bcmolt_power_levelling_control_pack(this->control, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CHANGE_POWER_LEVELLING_ID_ATTENUATION)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->attenuation))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_change_power_levelling_data_get_packed_length(const bcmolt_xgpon_onu_change_power_levelling_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CHANGE_POWER_LEVELLING_ID_CONTROL)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CHANGE_POWER_LEVELLING_ID_ATTENUATION)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_change_power_levelling_data_unpack(bcmolt_xgpon_onu_change_power_levelling_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CHANGE_POWER_LEVELLING_ID_CONTROL)) != 0)
+    {
+        if (!bcmolt_power_levelling_control_unpack(&this->control, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CHANGE_POWER_LEVELLING_ID_ATTENUATION)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->attenuation))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_change_power_levelling_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CHANGE_POWER_LEVELLING_ID_CONTROL)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CHANGE_POWER_LEVELLING_ID_ATTENUATION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_change_power_levelling_data_bounds_check(const bcmolt_xgpon_onu_change_power_levelling_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_change_power_levelling_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CHANGE_POWER_LEVELLING_ID_CONTROL)) != 0)
+    {
+        switch (this->control)
+        {
+            case BCMOLT_POWER_LEVELLING_CONTROL_DIRECT:
+                break;
+            case BCMOLT_POWER_LEVELLING_CONTROL_DECREASE:
+                break;
+            case BCMOLT_POWER_LEVELLING_CONTROL_INCREASE:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ONU_CHANGE_POWER_LEVELLING_ID_CONTROL;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_onu_tuning_out_data_set_default(bcmolt_xgpon_onu_onu_tuning_out_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID_TARGET_DS_PON_ID)) != 0)
+    {
+        this->target_ds_pon_id.administrative_label = 0;
+        this->target_ds_pon_id.dwlch_id = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID_TARGET_US_PON_ID)) != 0)
+    {
+        this->target_us_pon_id.administrative_label = 0;
+        this->target_us_pon_id.dwlch_id = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID_TIME_TO_SWITCH)) != 0)
+    {
+        this->time_to_switch = 500;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID_ROLLBACK)) != 0)
+    {
+        this->rollback = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID_STATUS)) != 0)
+    {
+        this->status = BCMOLT_STATUS_OFF;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_tuning_out_data_pack(const bcmolt_xgpon_onu_onu_tuning_out_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID_TARGET_DS_PON_ID)) != 0)
+    {
+        if (!bcmolt_pon_id_pack(&this->target_ds_pon_id, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID_TARGET_US_PON_ID)) != 0)
+    {
+        if (!bcmolt_pon_id_pack(&this->target_us_pon_id, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID_TIME_TO_SWITCH)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->time_to_switch))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID_ROLLBACK)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->rollback))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_status_pack(this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_onu_tuning_out_data_get_packed_length(const bcmolt_xgpon_onu_onu_tuning_out_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID_TARGET_DS_PON_ID)) != 0)
+    {
+        count += 5;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID_TARGET_US_PON_ID)) != 0)
+    {
+        count += 5;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID_TIME_TO_SWITCH)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID_ROLLBACK)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID_STATUS)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_tuning_out_data_unpack(bcmolt_xgpon_onu_onu_tuning_out_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID_TARGET_DS_PON_ID)) != 0)
+    {
+        if (!bcmolt_pon_id_unpack(&this->target_ds_pon_id, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID_TARGET_US_PON_ID)) != 0)
+    {
+        if (!bcmolt_pon_id_unpack(&this->target_us_pon_id, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID_TIME_TO_SWITCH)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->time_to_switch))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID_ROLLBACK)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->rollback))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_status_unpack(&this->status, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_tuning_out_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID_TARGET_DS_PON_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 5))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID_TARGET_US_PON_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 5))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID_TIME_TO_SWITCH)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID_ROLLBACK)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID_STATUS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_onu_tuning_out_data_bounds_check(const bcmolt_xgpon_onu_onu_tuning_out_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_onu_tuning_out_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID_TARGET_DS_PON_ID)) != 0)
+    {
+        if (!bcmolt_pon_id_bounds_check(&this->target_ds_pon_id))
+        {
+            *failed_prop = BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID_TARGET_DS_PON_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID_TARGET_US_PON_ID)) != 0)
+    {
+        if (!bcmolt_pon_id_bounds_check(&this->target_us_pon_id))
+        {
+            *failed_prop = BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID_TARGET_US_PON_ID;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID_TIME_TO_SWITCH)) != 0)
+    {
+        if (this->time_to_switch < 500)
+        {
+            *failed_prop = BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID_TIME_TO_SWITCH;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID_STATUS)) != 0)
+    {
+        switch (this->status)
+        {
+            case BCMOLT_STATUS_OFF:
+                break;
+            case BCMOLT_STATUS_ON:
+                break;
+            case BCMOLT_STATUS_NO_CHANGE:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ONU_ONU_TUNING_OUT_ID_STATUS;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_request_registration_data_set_default(bcmolt_xgpon_onu_request_registration_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_REQUEST_REGISTRATION_ID_SMA_FLAG)) != 0)
+    {
+        this->sma_flag = BCMOS_FALSE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_request_registration_data_pack(const bcmolt_xgpon_onu_request_registration_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_REQUEST_REGISTRATION_ID_SMA_FLAG)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->sma_flag))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_request_registration_data_get_packed_length(const bcmolt_xgpon_onu_request_registration_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_REQUEST_REGISTRATION_ID_SMA_FLAG)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_request_registration_data_unpack(bcmolt_xgpon_onu_request_registration_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_REQUEST_REGISTRATION_ID_SMA_FLAG)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->sma_flag))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_request_registration_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_REQUEST_REGISTRATION_ID_SMA_FLAG)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_request_registration_data_bounds_check(const bcmolt_xgpon_onu_request_registration_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_request_registration_id *failed_prop)
+{
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_secure_mutual_authentication_data_set_default(bcmolt_xgpon_onu_secure_mutual_authentication_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_ID_MASTER_KEY)) != 0)
+    {
+        memset(this->master_key.bytes, 0, sizeof(this->master_key.bytes));
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_ID_BUFFER)) != 0)
+    {
+        this->buffer.len = 0;
+        this->buffer.val = NULL;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_ID_MIC)) != 0)
+    {
+        this->mic = 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_secure_mutual_authentication_data_pack(const bcmolt_xgpon_onu_secure_mutual_authentication_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_ID_MASTER_KEY)) != 0)
+    {
+        if (!bcmolt_aes_key_pack(&this->master_key, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_ID_BUFFER)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_max_2048_pack(&this->buffer, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_ID_MIC)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->mic))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_secure_mutual_authentication_data_get_packed_length(const bcmolt_xgpon_onu_secure_mutual_authentication_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_ID_MASTER_KEY)) != 0)
+    {
+        count += 16;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_ID_BUFFER)) != 0)
+    {
+        count += bcmolt_u8_list_u32_max_2048_get_packed_length(&this->buffer);
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_ID_MIC)) != 0)
+    {
+        count += 4;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_secure_mutual_authentication_data_unpack(bcmolt_xgpon_onu_secure_mutual_authentication_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_ID_MASTER_KEY)) != 0)
+    {
+        if (!bcmolt_aes_key_unpack(&this->master_key, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_ID_BUFFER)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_max_2048_unpack(&this->buffer, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_ID_MIC)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->mic))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_secure_mutual_authentication_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_ID_MASTER_KEY)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 16))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_ID_BUFFER)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_max_2048_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_ID_MIC)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_secure_mutual_authentication_data_bounds_check(const bcmolt_xgpon_onu_secure_mutual_authentication_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_secure_mutual_authentication_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_ID_MASTER_KEY)) != 0)
+    {
+        if (!bcmolt_aes_key_bounds_check(&this->master_key))
+        {
+            *failed_prop = BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_ID_MASTER_KEY;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_ID_BUFFER)) != 0)
+    {
+        if (this->buffer.len > 2048)
+        {
+            return BCMOS_FALSE;
+        }
+
+        if (!bcmolt_u8_list_u32_max_2048_bounds_check(&this->buffer))
+        {
+            *failed_prop = BCMOLT_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_ID_BUFFER;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_set_onu_state_data_set_default(bcmolt_xgpon_onu_set_onu_state_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SET_ONU_STATE_ID_ONU_STATE)) != 0)
+    {
+        this->onu_state = BCMOLT_ONU_OPERATION_INACTIVE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_set_onu_state_data_pack(const bcmolt_xgpon_onu_set_onu_state_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SET_ONU_STATE_ID_ONU_STATE)) != 0)
+    {
+        if (!bcmolt_onu_operation_pack(this->onu_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_set_onu_state_data_get_packed_length(const bcmolt_xgpon_onu_set_onu_state_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SET_ONU_STATE_ID_ONU_STATE)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_set_onu_state_data_unpack(bcmolt_xgpon_onu_set_onu_state_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SET_ONU_STATE_ID_ONU_STATE)) != 0)
+    {
+        if (!bcmolt_onu_operation_unpack(&this->onu_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_set_onu_state_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SET_ONU_STATE_ID_ONU_STATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_set_onu_state_data_bounds_check(const bcmolt_xgpon_onu_set_onu_state_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_set_onu_state_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_SET_ONU_STATE_ID_ONU_STATE)) != 0)
+    {
+        switch (this->onu_state)
+        {
+            case BCMOLT_ONU_OPERATION_INACTIVE:
+                break;
+            case BCMOLT_ONU_OPERATION_ACTIVE:
+                break;
+            case BCMOLT_ONU_OPERATION_DISABLE:
+                break;
+            case BCMOLT_ONU_OPERATION_ENABLE:
+                break;
+            case BCMOLT_ONU_OPERATION_ACTIVE_STANDBY:
+                break;
+            case BCMOLT_ONU_OPERATION_AWAKE_FREE:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ONU_SET_ONU_STATE_ID_ONU_STATE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_cpu_packets_data_set_default(bcmolt_xgpon_onu_cpu_packets_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKETS_ID_PACKET_TYPE)) != 0)
+    {
+        this->packet_type = BCMOLT_PACKET_TYPE_CPU;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKETS_ID_CALC_CRC)) != 0)
+    {
+        this->calc_crc = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKETS_ID_NUMBER_OF_PACKETS)) != 0)
+    {
+        this->number_of_packets = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKETS_ID_PACKET_SIZE)) != 0)
+    {
+        this->packet_size = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKETS_ID_BUFFER)) != 0)
+    {
+        this->buffer.len = 0;
+        this->buffer.val = NULL;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_cpu_packets_data_pack(const bcmolt_xgpon_onu_cpu_packets_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKETS_ID_PACKET_TYPE)) != 0)
+    {
+        if (!bcmolt_packet_type_pack(this->packet_type, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKETS_ID_CALC_CRC)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->calc_crc))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKETS_ID_NUMBER_OF_PACKETS)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->number_of_packets))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKETS_ID_PACKET_SIZE)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, this->packet_size))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKETS_ID_BUFFER)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_max_2048_pack(&this->buffer, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_cpu_packets_data_get_packed_length(const bcmolt_xgpon_onu_cpu_packets_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKETS_ID_PACKET_TYPE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKETS_ID_CALC_CRC)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKETS_ID_NUMBER_OF_PACKETS)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKETS_ID_PACKET_SIZE)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKETS_ID_BUFFER)) != 0)
+    {
+        count += bcmolt_u8_list_u32_max_2048_get_packed_length(&this->buffer);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_cpu_packets_data_unpack(bcmolt_xgpon_onu_cpu_packets_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKETS_ID_PACKET_TYPE)) != 0)
+    {
+        if (!bcmolt_packet_type_unpack(&this->packet_type, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKETS_ID_CALC_CRC)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->calc_crc))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKETS_ID_NUMBER_OF_PACKETS)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->number_of_packets))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKETS_ID_PACKET_SIZE)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, &this->packet_size))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKETS_ID_BUFFER)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_max_2048_unpack(&this->buffer, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_cpu_packets_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKETS_ID_PACKET_TYPE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKETS_ID_CALC_CRC)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKETS_ID_NUMBER_OF_PACKETS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKETS_ID_PACKET_SIZE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKETS_ID_BUFFER)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_max_2048_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_cpu_packets_data_bounds_check(const bcmolt_xgpon_onu_cpu_packets_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_cpu_packets_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKETS_ID_PACKET_TYPE)) != 0)
+    {
+        switch (this->packet_type)
+        {
+            case BCMOLT_PACKET_TYPE_CPU:
+                break;
+            case BCMOLT_PACKET_TYPE_OMCI:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_ONU_CPU_PACKETS_ID_PACKET_TYPE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKETS_ID_NUMBER_OF_PACKETS)) != 0)
+    {
+        if (this->number_of_packets > 32)
+        {
+            *failed_prop = BCMOLT_XGPON_ONU_CPU_PACKETS_ID_NUMBER_OF_PACKETS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKETS_ID_PACKET_SIZE)) != 0)
+    {
+        if (this->packet_size > 2000)
+        {
+            *failed_prop = BCMOLT_XGPON_ONU_CPU_PACKETS_ID_PACKET_SIZE;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKETS_ID_BUFFER)) != 0)
+    {
+        if (this->buffer.len > 2048)
+        {
+            return BCMOS_FALSE;
+        }
+
+        if (!bcmolt_u8_list_u32_max_2048_bounds_check(&this->buffer))
+        {
+            *failed_prop = BCMOLT_XGPON_ONU_CPU_PACKETS_ID_BUFFER;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_ploam_packet_data_set_default(bcmolt_xgpon_onu_ploam_packet_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_PLOAM_PACKET_ID_DEFAULT_KEY)) != 0)
+    {
+        this->default_key = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_PLOAM_PACKET_ID_PLOAM)) != 0)
+    {
+        memset(this->ploam.arr, 0, sizeof(this->ploam.arr));
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_ploam_packet_data_pack(const bcmolt_xgpon_onu_ploam_packet_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_PLOAM_PACKET_ID_DEFAULT_KEY)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->default_key))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_PLOAM_PACKET_ID_PLOAM)) != 0)
+    {
+        if (!bcmolt_arr_u8_40_pack(&this->ploam, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_ploam_packet_data_get_packed_length(const bcmolt_xgpon_onu_ploam_packet_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_PLOAM_PACKET_ID_DEFAULT_KEY)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_PLOAM_PACKET_ID_PLOAM)) != 0)
+    {
+        count += 40;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_ploam_packet_data_unpack(bcmolt_xgpon_onu_ploam_packet_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_PLOAM_PACKET_ID_DEFAULT_KEY)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->default_key))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_PLOAM_PACKET_ID_PLOAM)) != 0)
+    {
+        if (!bcmolt_arr_u8_40_unpack(&this->ploam, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_ploam_packet_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_PLOAM_PACKET_ID_DEFAULT_KEY)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_PLOAM_PACKET_ID_PLOAM)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 40))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_ploam_packet_data_bounds_check(const bcmolt_xgpon_onu_ploam_packet_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_ploam_packet_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_PLOAM_PACKET_ID_PLOAM)) != 0)
+    {
+        if (!bcmolt_arr_u8_40_bounds_check(&this->ploam))
+        {
+            *failed_prop = BCMOLT_XGPON_ONU_PLOAM_PACKET_ID_PLOAM;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_cpu_packet_data_set_default(bcmolt_xgpon_onu_cpu_packet_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKET_ID_PORT_ID)) != 0)
+    {
+        this->port_id = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKET_ID_CRC_OK)) != 0)
+    {
+        this->crc_ok = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKET_ID_PACKET_SIZE)) != 0)
+    {
+        this->packet_size = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKET_ID_BUFFER)) != 0)
+    {
+        this->buffer.len = 0;
+        this->buffer.val = NULL;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_cpu_packet_data_pack(const bcmolt_xgpon_onu_cpu_packet_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKET_ID_PORT_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, this->port_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKET_ID_CRC_OK)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->crc_ok))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKET_ID_PACKET_SIZE)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->packet_size))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKET_ID_BUFFER)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_pack(&this->buffer, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_cpu_packet_data_get_packed_length(const bcmolt_xgpon_onu_cpu_packet_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKET_ID_PORT_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKET_ID_CRC_OK)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKET_ID_PACKET_SIZE)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKET_ID_BUFFER)) != 0)
+    {
+        count += bcmolt_u8_list_u32_get_packed_length(&this->buffer);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_cpu_packet_data_unpack(bcmolt_xgpon_onu_cpu_packet_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKET_ID_PORT_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, &this->port_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKET_ID_CRC_OK)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->crc_ok))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKET_ID_PACKET_SIZE)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->packet_size))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKET_ID_BUFFER)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_unpack(&this->buffer, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_cpu_packet_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKET_ID_PORT_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKET_ID_CRC_OK)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKET_ID_PACKET_SIZE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKET_ID_BUFFER)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_cpu_packet_data_bounds_check(const bcmolt_xgpon_onu_cpu_packet_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_cpu_packet_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_CPU_PACKET_ID_BUFFER)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_bounds_check(&this->buffer))
+        {
+            *failed_prop = BCMOLT_XGPON_ONU_CPU_PACKET_ID_BUFFER;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_onu_omci_packet_data_set_default(bcmolt_xgpon_onu_omci_packet_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_OMCI_PACKET_ID_PORT_ID)) != 0)
+    {
+        this->port_id = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_OMCI_PACKET_ID_CRC_OK)) != 0)
+    {
+        this->crc_ok = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_OMCI_PACKET_ID_PACKET_SIZE)) != 0)
+    {
+        this->packet_size = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_OMCI_PACKET_ID_BUFFER)) != 0)
+    {
+        this->buffer.len = 0;
+        this->buffer.val = NULL;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_omci_packet_data_pack(const bcmolt_xgpon_onu_omci_packet_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_OMCI_PACKET_ID_PORT_ID)) != 0)
+    {
+        if (!bcmolt_buf_write_u16(buf, this->port_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_OMCI_PACKET_ID_CRC_OK)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->crc_ok))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_OMCI_PACKET_ID_PACKET_SIZE)) != 0)
+    {
+        if (!bcmolt_buf_write_u32(buf, this->packet_size))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_OMCI_PACKET_ID_BUFFER)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_pack(&this->buffer, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_onu_omci_packet_data_get_packed_length(const bcmolt_xgpon_onu_omci_packet_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_OMCI_PACKET_ID_PORT_ID)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_OMCI_PACKET_ID_CRC_OK)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_OMCI_PACKET_ID_PACKET_SIZE)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_OMCI_PACKET_ID_BUFFER)) != 0)
+    {
+        count += bcmolt_u8_list_u32_get_packed_length(&this->buffer);
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_omci_packet_data_unpack(bcmolt_xgpon_onu_omci_packet_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_OMCI_PACKET_ID_PORT_ID)) != 0)
+    {
+        if (!bcmolt_buf_read_u16(buf, &this->port_id))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_OMCI_PACKET_ID_CRC_OK)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->crc_ok))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_OMCI_PACKET_ID_PACKET_SIZE)) != 0)
+    {
+        if (!bcmolt_buf_read_u32(buf, &this->packet_size))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_OMCI_PACKET_ID_BUFFER)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_unpack(&this->buffer, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_omci_packet_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_OMCI_PACKET_ID_PORT_ID)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_OMCI_PACKET_ID_CRC_OK)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_OMCI_PACKET_ID_PACKET_SIZE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_OMCI_PACKET_ID_BUFFER)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_scan(packed, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_onu_omci_packet_data_bounds_check(const bcmolt_xgpon_onu_omci_packet_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_omci_packet_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_ONU_OMCI_PACKET_ID_BUFFER)) != 0)
+    {
+        if (!bcmolt_u8_list_u32_bounds_check(&this->buffer))
+        {
+            *failed_prop = BCMOLT_XGPON_ONU_OMCI_PACKET_ID_BUFFER;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_trx_key_set_default(bcmolt_xgpon_trx_key *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_KEY_ID_PON_NI)) != 0)
+    {
+        this->pon_ni = (bcmolt_xgpon_ni) 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_trx_key_pack(const bcmolt_xgpon_trx_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, (uint8_t) this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_trx_key_get_packed_length(const bcmolt_xgpon_trx_key *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_KEY_ID_PON_NI)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_trx_key_unpack(bcmolt_xgpon_trx_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, (uint8_t *) &this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_trx_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_trx_key_bounds_check(const bcmolt_xgpon_trx_key *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_trx_key_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_KEY_ID_PON_NI)) != 0)
+    {
+        if (this->pon_ni > (bcmolt_xgpon_ni) 7)
+        {
+            *failed_prop = BCMOLT_XGPON_TRX_KEY_ID_PON_NI;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xgpon_trx_cfg_data_set_default(bcmolt_xgpon_trx_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_BURST_PROFILE)) != 0)
+    {
+        this->burst_profile.arr[0].profile_version = 0;
+        this->burst_profile.arr[0].is_fec_on = BCMOS_FALSE;
+        this->burst_profile.arr[0].delimiter_size_in_bytes = 8;
+        this->burst_profile.arr[0].delimiter_pattern_high = 3015562000UL;
+        this->burst_profile.arr[0].delimiter_pattern_low = 2999259041UL;
+        this->burst_profile.arr[0].preamble_length_in_bytes = 8;
+        this->burst_profile.arr[0].preamble_repeats_count = 20;
+        this->burst_profile.arr[0].preamble_pattern_high = 2863311530UL;
+        this->burst_profile.arr[0].preamble_pattern_low = 2863311530UL;
+        this->burst_profile.arr[0].pon_tag = 0;
+        this->burst_profile.arr[0].num_of_guard_bytes = 16;
+        this->burst_profile.arr[0].is_profile_valid = BCMOS_TRUE;
+        this->burst_profile.arr[0].burst_overhead_size_in_words = 78;
+        this->burst_profile.arr[1].profile_version = 0;
+        this->burst_profile.arr[1].is_fec_on = BCMOS_FALSE;
+        this->burst_profile.arr[1].delimiter_size_in_bytes = 8;
+        this->burst_profile.arr[1].delimiter_pattern_high = 3015562000UL;
+        this->burst_profile.arr[1].delimiter_pattern_low = 2999259041UL;
+        this->burst_profile.arr[1].preamble_length_in_bytes = 8;
+        this->burst_profile.arr[1].preamble_repeats_count = 9;
+        this->burst_profile.arr[1].preamble_pattern_high = 2863311530UL;
+        this->burst_profile.arr[1].preamble_pattern_low = 2863311530UL;
+        this->burst_profile.arr[1].pon_tag = 0;
+        this->burst_profile.arr[1].num_of_guard_bytes = 16;
+        this->burst_profile.arr[1].is_profile_valid = BCMOS_TRUE;
+        this->burst_profile.arr[1].burst_overhead_size_in_words = 56;
+        this->burst_profile.arr[2].profile_version = 0;
+        this->burst_profile.arr[2].is_fec_on = BCMOS_TRUE;
+        this->burst_profile.arr[2].delimiter_size_in_bytes = 8;
+        this->burst_profile.arr[2].delimiter_pattern_high = 3015562000UL;
+        this->burst_profile.arr[2].delimiter_pattern_low = 2999259041UL;
+        this->burst_profile.arr[2].preamble_length_in_bytes = 8;
+        this->burst_profile.arr[2].preamble_repeats_count = 20;
+        this->burst_profile.arr[2].preamble_pattern_high = 2863311530UL;
+        this->burst_profile.arr[2].preamble_pattern_low = 2863311530UL;
+        this->burst_profile.arr[2].pon_tag = 0;
+        this->burst_profile.arr[2].num_of_guard_bytes = 16;
+        this->burst_profile.arr[2].is_profile_valid = BCMOS_TRUE;
+        this->burst_profile.arr[2].burst_overhead_size_in_words = 78;
+        this->burst_profile.arr[3].profile_version = 0;
+        this->burst_profile.arr[3].is_fec_on = BCMOS_TRUE;
+        this->burst_profile.arr[3].delimiter_size_in_bytes = 8;
+        this->burst_profile.arr[3].delimiter_pattern_high = 3015562000UL;
+        this->burst_profile.arr[3].delimiter_pattern_low = 2999259041UL;
+        this->burst_profile.arr[3].preamble_length_in_bytes = 8;
+        this->burst_profile.arr[3].preamble_repeats_count = 9;
+        this->burst_profile.arr[3].preamble_pattern_high = 2863311530UL;
+        this->burst_profile.arr[3].preamble_pattern_low = 2863311530UL;
+        this->burst_profile.arr[3].pon_tag = 0;
+        this->burst_profile.arr[3].num_of_guard_bytes = 16;
+        this->burst_profile.arr[3].is_profile_valid = BCMOS_TRUE;
+        this->burst_profile.arr[3].burst_overhead_size_in_words = 56;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_TRANSCEIVER_CONFIG)) != 0)
+    {
+        this->transceiver_config.arr[0].trx_reset_pattern_first = 0;
+        this->transceiver_config.arr[0].trx_reset_pattern_middle = 4294967295UL;
+        this->transceiver_config.arr[0].trx_reset_pattern_last = 0;
+        this->transceiver_config.arr[0].trx_reset_middle_repeats_count = 4;
+        this->transceiver_config.arr[0].trx_reset_location = 0;
+        this->transceiver_config.arr[0].trx_reset_polarity = BCMOS_FALSE;
+        this->transceiver_config.arr[0].bcdr_reset_pattern_first = 0;
+        this->transceiver_config.arr[0].bcdr_reset_pattern_middle = 255;
+        this->transceiver_config.arr[0].bcdr_reset_pattern_last = 0;
+        this->transceiver_config.arr[0].bcdr_reset_middle_repeats_count = 1;
+        this->transceiver_config.arr[0].bcdr_reset_location = 20;
+        this->transceiver_config.arr[0].bcdr_reset_polarity = BCMOS_FALSE;
+        this->transceiver_config.arr[1].trx_reset_pattern_first = 0;
+        this->transceiver_config.arr[1].trx_reset_pattern_middle = 4294967295UL;
+        this->transceiver_config.arr[1].trx_reset_pattern_last = 0;
+        this->transceiver_config.arr[1].trx_reset_middle_repeats_count = 4;
+        this->transceiver_config.arr[1].trx_reset_location = 33;
+        this->transceiver_config.arr[1].trx_reset_polarity = BCMOS_FALSE;
+        this->transceiver_config.arr[1].bcdr_reset_pattern_first = 0;
+        this->transceiver_config.arr[1].bcdr_reset_pattern_middle = 255;
+        this->transceiver_config.arr[1].bcdr_reset_pattern_last = 0;
+        this->transceiver_config.arr[1].bcdr_reset_middle_repeats_count = 1;
+        this->transceiver_config.arr[1].bcdr_reset_location = 23;
+        this->transceiver_config.arr[1].bcdr_reset_polarity = BCMOS_FALSE;
+        this->transceiver_config.arr[2].trx_reset_pattern_first = 0;
+        this->transceiver_config.arr[2].trx_reset_pattern_middle = 4294967295UL;
+        this->transceiver_config.arr[2].trx_reset_pattern_last = 0;
+        this->transceiver_config.arr[2].trx_reset_middle_repeats_count = 4;
+        this->transceiver_config.arr[2].trx_reset_location = 0;
+        this->transceiver_config.arr[2].trx_reset_polarity = BCMOS_FALSE;
+        this->transceiver_config.arr[2].bcdr_reset_pattern_first = 0;
+        this->transceiver_config.arr[2].bcdr_reset_pattern_middle = 255;
+        this->transceiver_config.arr[2].bcdr_reset_pattern_last = 0;
+        this->transceiver_config.arr[2].bcdr_reset_middle_repeats_count = 1;
+        this->transceiver_config.arr[2].bcdr_reset_location = 20;
+        this->transceiver_config.arr[2].bcdr_reset_polarity = BCMOS_FALSE;
+        this->transceiver_config.arr[3].trx_reset_pattern_first = 0;
+        this->transceiver_config.arr[3].trx_reset_pattern_middle = 4294967295UL;
+        this->transceiver_config.arr[3].trx_reset_pattern_last = 0;
+        this->transceiver_config.arr[3].trx_reset_middle_repeats_count = 4;
+        this->transceiver_config.arr[3].trx_reset_location = 33;
+        this->transceiver_config.arr[3].trx_reset_polarity = BCMOS_FALSE;
+        this->transceiver_config.arr[3].bcdr_reset_pattern_first = 0;
+        this->transceiver_config.arr[3].bcdr_reset_pattern_middle = 255;
+        this->transceiver_config.arr[3].bcdr_reset_pattern_last = 0;
+        this->transceiver_config.arr[3].bcdr_reset_middle_repeats_count = 1;
+        this->transceiver_config.arr[3].bcdr_reset_location = 23;
+        this->transceiver_config.arr[3].bcdr_reset_polarity = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_TRANSCEIVER_TYPE)) != 0)
+    {
+        this->transceiver_type = BCMOLT_XGPON_TRX_TYPE_LTH_7222_PC;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_DEBUG)) != 0)
+    {
+        this->debug.rx_reversed_polarity = BCMOLT_CONTROL_STATE_DISABLE;
+        this->debug.neg_out_bit = BCMOLT_CONTROL_STATE_DISABLE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_RSSI_NORMAL_CONFIG)) != 0)
+    {
+        this->rssi_normal_config.polarity = BCMOLT_POLARITY_LOW;
+        this->rssi_normal_config.location = 35;
+        this->rssi_normal_config.location_sign = BCMOLT_SIGN_POSITIVE;
+        this->rssi_normal_config.pulse_width = 80;
+        this->rssi_normal_config.minimum_burst = 200;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_RSSI_RANGING_CONFIG)) != 0)
+    {
+        this->rssi_ranging_config.start_on_ed = BCMOS_TRUE;
+        this->rssi_ranging_config.frame_delay = 0;
+        this->rssi_ranging_config.word_delay = 20;
+        this->rssi_ranging_config.frame_delay_after_ed = 0;
+        this->rssi_ranging_config.word_delay_after_ed = 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_SERDES_CONFIGURATION)) != 0)
+    {
+        this->serdes_configuration.multi_ed_mode = BCMOS_FALSE;
+        this->serdes_configuration.ranging_mode = BCMOLT_XGPON_SERDES_RANGING_MODE_BCDR;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_BURST_PROFILE_DELIMITER_MAX_ERRORS)) != 0)
+    {
+        this->burst_profile_delimiter_max_errors.arr[0] = 7;
+        this->burst_profile_delimiter_max_errors.arr[1] = 7;
+        this->burst_profile_delimiter_max_errors.arr[2] = 7;
+        this->burst_profile_delimiter_max_errors.arr[3] = 7;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_RANGING_SM_PATTERNS_AT_INIT)) != 0)
+    {
+        this->ranging_sm_patterns_at_init.trx_reset_pattern_first = 4294967295UL;
+        this->ranging_sm_patterns_at_init.trx_reset_pattern_middle = 4294967295UL;
+        this->ranging_sm_patterns_at_init.trx_reset_pattern_last = 4294967295UL;
+        this->ranging_sm_patterns_at_init.trx_reset_middle_repeats = 8;
+        this->ranging_sm_patterns_at_init.trx_reset_location = 2;
+        this->ranging_sm_patterns_at_init.bcdr_reset_pattern_first = 4294967295UL;
+        this->ranging_sm_patterns_at_init.bcdr_reset_pattern_middle = 4294967295UL;
+        this->ranging_sm_patterns_at_init.bcdr_reset_pattern_last = 4294967295UL;
+        this->ranging_sm_patterns_at_init.bcdr_reset_middle_repeats = 4;
+        this->ranging_sm_patterns_at_init.bcdr_reset_location = 2;
+        this->ranging_sm_patterns_at_init.bcdr_reset_polarity = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_RANGING_SM_PATTERNS_ED_FAILURE)) != 0)
+    {
+        this->ranging_sm_patterns_ed_failure.trx_reset_pattern_first = 0;
+        this->ranging_sm_patterns_ed_failure.trx_reset_pattern_middle = 0;
+        this->ranging_sm_patterns_ed_failure.trx_reset_pattern_last = 0;
+        this->ranging_sm_patterns_ed_failure.trx_reset_middle_repeats = 0;
+        this->ranging_sm_patterns_ed_failure.trx_reset_location = 0;
+        this->ranging_sm_patterns_ed_failure.bcdr_reset_pattern_first = 0;
+        this->ranging_sm_patterns_ed_failure.bcdr_reset_pattern_middle = 0;
+        this->ranging_sm_patterns_ed_failure.bcdr_reset_pattern_last = 0;
+        this->ranging_sm_patterns_ed_failure.bcdr_reset_middle_repeats = 0;
+        this->ranging_sm_patterns_ed_failure.bcdr_reset_location = 0;
+        this->ranging_sm_patterns_ed_failure.bcdr_reset_polarity = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_RESET_ON_DEL_MISS)) != 0)
+    {
+        this->reset_on_del_miss = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_ED_STATE)) != 0)
+    {
+        this->ed_state.reset_on_ed_fail = BCMOS_FALSE;
+        this->ed_state.reset_on_ed_success = BCMOS_TRUE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_INVERT_ED)) != 0)
+    {
+        this->invert_ed = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_END_OF_BURST_RESET)) != 0)
+    {
+        this->end_of_burst_reset = BCMOS_FALSE;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_TRX_RST_POLARITY)) != 0)
+    {
+        this->trx_rst_polarity = BCMOS_FALSE;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_trx_cfg_data_pack(const bcmolt_xgpon_trx_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_BURST_PROFILE)) != 0)
+    {
+        if (!bcmolt_arr_xgpon_burst_profile_4_pack(&this->burst_profile, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_TRANSCEIVER_CONFIG)) != 0)
+    {
+        if (!bcmolt_arr_xgpon_trx_configuration_4_pack(&this->transceiver_config, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_TRANSCEIVER_TYPE)) != 0)
+    {
+        if (!bcmolt_xgpon_trx_type_pack(this->transceiver_type, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_DEBUG)) != 0)
+    {
+        if (!bcmolt_xgpon_trx_debug_pack(&this->debug, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_RSSI_NORMAL_CONFIG)) != 0)
+    {
+        if (!bcmolt_xgpon_rssi_normal_config_pack(&this->rssi_normal_config, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_RSSI_RANGING_CONFIG)) != 0)
+    {
+        if (!bcmolt_xgpon_rssi_ranging_config_pack(&this->rssi_ranging_config, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_SERDES_CONFIGURATION)) != 0)
+    {
+        if (!bcmolt_xgpon_serdes_configuration_pack(&this->serdes_configuration, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_BURST_PROFILE_DELIMITER_MAX_ERRORS)) != 0)
+    {
+        if (!bcmolt_arr_u8_4_pack(&this->burst_profile_delimiter_max_errors, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_RANGING_SM_PATTERNS_AT_INIT)) != 0)
+    {
+        if (!bcmolt_xgpon_rx_ranging_sm_pattern_pack(&this->ranging_sm_patterns_at_init, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_RANGING_SM_PATTERNS_ED_FAILURE)) != 0)
+    {
+        if (!bcmolt_xgpon_rx_ranging_sm_pattern_pack(&this->ranging_sm_patterns_ed_failure, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_RESET_ON_DEL_MISS)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->reset_on_del_miss))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_ED_STATE)) != 0)
+    {
+        if (!bcmolt_xgpon_ed_state_pack(&this->ed_state, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_INVERT_ED)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->invert_ed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_END_OF_BURST_RESET)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->end_of_burst_reset))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_TRX_RST_POLARITY)) != 0)
+    {
+        if (!bcmolt_buf_write_bool(buf, this->trx_rst_polarity))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xgpon_trx_cfg_data_get_packed_length(const bcmolt_xgpon_trx_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_BURST_PROFILE)) != 0)
+    {
+        count += 152;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_TRANSCEIVER_CONFIG)) != 0)
+    {
+        count += 124;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_TRANSCEIVER_TYPE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_DEBUG)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_RSSI_NORMAL_CONFIG)) != 0)
+    {
+        count += 7;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_RSSI_RANGING_CONFIG)) != 0)
+    {
+        count += 7;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_SERDES_CONFIGURATION)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_BURST_PROFILE_DELIMITER_MAX_ERRORS)) != 0)
+    {
+        count += 4;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_RANGING_SM_PATTERNS_AT_INIT)) != 0)
+    {
+        count += 29;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_RANGING_SM_PATTERNS_ED_FAILURE)) != 0)
+    {
+        count += 29;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_RESET_ON_DEL_MISS)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_ED_STATE)) != 0)
+    {
+        count += 2;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_INVERT_ED)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_END_OF_BURST_RESET)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_TRX_RST_POLARITY)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_trx_cfg_data_unpack(bcmolt_xgpon_trx_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_BURST_PROFILE)) != 0)
+    {
+        if (!bcmolt_arr_xgpon_burst_profile_4_unpack(&this->burst_profile, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_TRANSCEIVER_CONFIG)) != 0)
+    {
+        if (!bcmolt_arr_xgpon_trx_configuration_4_unpack(&this->transceiver_config, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_TRANSCEIVER_TYPE)) != 0)
+    {
+        if (!bcmolt_xgpon_trx_type_unpack(&this->transceiver_type, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_DEBUG)) != 0)
+    {
+        if (!bcmolt_xgpon_trx_debug_unpack(&this->debug, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_RSSI_NORMAL_CONFIG)) != 0)
+    {
+        if (!bcmolt_xgpon_rssi_normal_config_unpack(&this->rssi_normal_config, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_RSSI_RANGING_CONFIG)) != 0)
+    {
+        if (!bcmolt_xgpon_rssi_ranging_config_unpack(&this->rssi_ranging_config, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_SERDES_CONFIGURATION)) != 0)
+    {
+        if (!bcmolt_xgpon_serdes_configuration_unpack(&this->serdes_configuration, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_BURST_PROFILE_DELIMITER_MAX_ERRORS)) != 0)
+    {
+        if (!bcmolt_arr_u8_4_unpack(&this->burst_profile_delimiter_max_errors, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_RANGING_SM_PATTERNS_AT_INIT)) != 0)
+    {
+        if (!bcmolt_xgpon_rx_ranging_sm_pattern_unpack(&this->ranging_sm_patterns_at_init, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_RANGING_SM_PATTERNS_ED_FAILURE)) != 0)
+    {
+        if (!bcmolt_xgpon_rx_ranging_sm_pattern_unpack(&this->ranging_sm_patterns_ed_failure, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_RESET_ON_DEL_MISS)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->reset_on_del_miss))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_ED_STATE)) != 0)
+    {
+        if (!bcmolt_xgpon_ed_state_unpack(&this->ed_state, buf, extra_mem))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_INVERT_ED)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->invert_ed))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_END_OF_BURST_RESET)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->end_of_burst_reset))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_TRX_RST_POLARITY)) != 0)
+    {
+        if (!bcmolt_buf_read_bool(buf, &this->trx_rst_polarity))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_trx_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_BURST_PROFILE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 152))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_TRANSCEIVER_CONFIG)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 124))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_TRANSCEIVER_TYPE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_DEBUG)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_RSSI_NORMAL_CONFIG)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 7))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_RSSI_RANGING_CONFIG)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 7))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_SERDES_CONFIGURATION)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_BURST_PROFILE_DELIMITER_MAX_ERRORS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_RANGING_SM_PATTERNS_AT_INIT)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 29))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_RANGING_SM_PATTERNS_ED_FAILURE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 29))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_RESET_ON_DEL_MISS)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_ED_STATE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_INVERT_ED)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_END_OF_BURST_RESET)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_TRX_RST_POLARITY)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xgpon_trx_cfg_data_bounds_check(const bcmolt_xgpon_trx_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_trx_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_BURST_PROFILE)) != 0)
+    {
+        if (!bcmolt_arr_xgpon_burst_profile_4_bounds_check(&this->burst_profile))
+        {
+            *failed_prop = BCMOLT_XGPON_TRX_CFG_ID_BURST_PROFILE;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_TRANSCEIVER_CONFIG)) != 0)
+    {
+        if (!bcmolt_arr_xgpon_trx_configuration_4_bounds_check(&this->transceiver_config))
+        {
+            *failed_prop = BCMOLT_XGPON_TRX_CFG_ID_TRANSCEIVER_CONFIG;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_TRANSCEIVER_TYPE)) != 0)
+    {
+        switch (this->transceiver_type)
+        {
+            case BCMOLT_XGPON_TRX_TYPE_LTH_7222_PC:
+                break;
+            case BCMOLT_XGPON_TRX_TYPE_USER_DEFINED:
+                break;
+            case BCMOLT_XGPON_TRX_TYPE_WTD_RTXM266_702:
+                break;
+            case BCMOLT_XGPON_TRX_TYPE_LTH_7222_BC_PLUS:
+                break;
+            case BCMOLT_XGPON_TRX_TYPE_LTH_7226_PC:
+                break;
+            case BCMOLT_XGPON_TRX_TYPE_LTH_5302_PC:
+                break;
+            case BCMOLT_XGPON_TRX_TYPE_XGPON_GENERAL_1:
+                break;
+            case BCMOLT_XGPON_TRX_TYPE_XGPON_GENERAL_2:
+                break;
+            case BCMOLT_XGPON_TRX_TYPE_LTW_627_X_PC:
+                break;
+            case BCMOLT_XGPON_TRX_TYPE_XPP_XE_R_3_CDFB:
+                break;
+            default:
+                *failed_prop = BCMOLT_XGPON_TRX_CFG_ID_TRANSCEIVER_TYPE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_DEBUG)) != 0)
+    {
+        if (!bcmolt_xgpon_trx_debug_bounds_check(&this->debug))
+        {
+            *failed_prop = BCMOLT_XGPON_TRX_CFG_ID_DEBUG;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_RSSI_NORMAL_CONFIG)) != 0)
+    {
+        if (!bcmolt_xgpon_rssi_normal_config_bounds_check(&this->rssi_normal_config))
+        {
+            *failed_prop = BCMOLT_XGPON_TRX_CFG_ID_RSSI_NORMAL_CONFIG;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_RSSI_RANGING_CONFIG)) != 0)
+    {
+        if (!bcmolt_xgpon_rssi_ranging_config_bounds_check(&this->rssi_ranging_config))
+        {
+            *failed_prop = BCMOLT_XGPON_TRX_CFG_ID_RSSI_RANGING_CONFIG;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_SERDES_CONFIGURATION)) != 0)
+    {
+        if (!bcmolt_xgpon_serdes_configuration_bounds_check(&this->serdes_configuration))
+        {
+            *failed_prop = BCMOLT_XGPON_TRX_CFG_ID_SERDES_CONFIGURATION;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_BURST_PROFILE_DELIMITER_MAX_ERRORS)) != 0)
+    {
+        if (!bcmolt_arr_u8_4_bounds_check(&this->burst_profile_delimiter_max_errors))
+        {
+            *failed_prop = BCMOLT_XGPON_TRX_CFG_ID_BURST_PROFILE_DELIMITER_MAX_ERRORS;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_RANGING_SM_PATTERNS_AT_INIT)) != 0)
+    {
+        if (!bcmolt_xgpon_rx_ranging_sm_pattern_bounds_check(&this->ranging_sm_patterns_at_init))
+        {
+            *failed_prop = BCMOLT_XGPON_TRX_CFG_ID_RANGING_SM_PATTERNS_AT_INIT;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_RANGING_SM_PATTERNS_ED_FAILURE)) != 0)
+    {
+        if (!bcmolt_xgpon_rx_ranging_sm_pattern_bounds_check(&this->ranging_sm_patterns_ed_failure))
+        {
+            *failed_prop = BCMOLT_XGPON_TRX_CFG_ID_RANGING_SM_PATTERNS_ED_FAILURE;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XGPON_TRX_CFG_ID_ED_STATE)) != 0)
+    {
+        if (!bcmolt_xgpon_ed_state_bounds_check(&this->ed_state))
+        {
+            *failed_prop = BCMOLT_XGPON_TRX_CFG_ID_ED_STATE;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xpon_serdes_key_set_default(bcmolt_xpon_serdes_key *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_KEY_ID_PON_NI)) != 0)
+    {
+        this->pon_ni = (bcmolt_pon_ni) 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_KEY_ID_INSTANCE)) != 0)
+    {
+        this->instance = BCMOLT_SERDES_INSTANCE_INSTANCE_0;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xpon_serdes_key_pack(const bcmolt_xpon_serdes_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, (uint8_t) this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_KEY_ID_INSTANCE)) != 0)
+    {
+        if (!bcmolt_serdes_instance_pack(this->instance, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xpon_serdes_key_get_packed_length(const bcmolt_xpon_serdes_key *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_KEY_ID_PON_NI)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_KEY_ID_INSTANCE)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xpon_serdes_key_unpack(bcmolt_xpon_serdes_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, (uint8_t *) &this->pon_ni))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_KEY_ID_INSTANCE)) != 0)
+    {
+        if (!bcmolt_serdes_instance_unpack(&this->instance, buf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xpon_serdes_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_KEY_ID_PON_NI)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_KEY_ID_INSTANCE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xpon_serdes_key_bounds_check(const bcmolt_xpon_serdes_key *this, bcmolt_presence_mask fields_present, bcmolt_xpon_serdes_key_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_KEY_ID_PON_NI)) != 0)
+    {
+        if (this->pon_ni > (bcmolt_pon_ni) 15)
+        {
+            *failed_prop = BCMOLT_XPON_SERDES_KEY_ID_PON_NI;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_KEY_ID_INSTANCE)) != 0)
+    {
+        switch (this->instance)
+        {
+            case BCMOLT_SERDES_INSTANCE_INSTANCE_0:
+                break;
+            case BCMOLT_SERDES_INSTANCE_INSTANCE_1:
+                break;
+            default:
+                *failed_prop = BCMOLT_XPON_SERDES_KEY_ID_INSTANCE;
+                return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+void bcmolt_xpon_serdes_cfg_data_set_default(bcmolt_xpon_serdes_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_VGA)) != 0)
+    {
+        this->rx_vga = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_PF)) != 0)
+    {
+        this->rx_pf = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_LFPF)) != 0)
+    {
+        this->rx_lfpf = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_DFE1)) != 0)
+    {
+        this->rx_dfe1 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_DFE2)) != 0)
+    {
+        this->rx_dfe2 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_DFE3)) != 0)
+    {
+        this->rx_dfe3 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_DFE4)) != 0)
+    {
+        this->rx_dfe4 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_DFE5)) != 0)
+    {
+        this->rx_dfe5 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_TX_PRE)) != 0)
+    {
+        this->tx_pre = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_TX_MAIN)) != 0)
+    {
+        this->tx_main = 43;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_TX_POST1)) != 0)
+    {
+        this->tx_post1 = 5;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_TX_POST2)) != 0)
+    {
+        this->tx_post2 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_TX_POST3)) != 0)
+    {
+        this->tx_post3 = 0;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_TX_AMP)) != 0)
+    {
+        this->tx_amp = 12;
+    }
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xpon_serdes_cfg_data_pack(const bcmolt_xpon_serdes_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_VGA)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->rx_vga))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_PF)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->rx_pf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_LFPF)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->rx_lfpf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_DFE1)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->rx_dfe1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_DFE2)) != 0)
+    {
+        if (!bcmolt_buf_write_s8(buf, this->rx_dfe2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_DFE3)) != 0)
+    {
+        if (!bcmolt_buf_write_s8(buf, this->rx_dfe3))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_DFE4)) != 0)
+    {
+        if (!bcmolt_buf_write_s8(buf, this->rx_dfe4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_DFE5)) != 0)
+    {
+        if (!bcmolt_buf_write_s8(buf, this->rx_dfe5))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_TX_PRE)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->tx_pre))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_TX_MAIN)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->tx_main))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_TX_POST1)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->tx_post1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_TX_POST2)) != 0)
+    {
+        if (!bcmolt_buf_write_s8(buf, this->tx_post2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_TX_POST3)) != 0)
+    {
+        if (!bcmolt_buf_write_s8(buf, this->tx_post3))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_TX_AMP)) != 0)
+    {
+        if (!bcmolt_buf_write_u8(buf, this->tx_amp))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+uint32_t bcmolt_xpon_serdes_cfg_data_get_packed_length(const bcmolt_xpon_serdes_cfg_data *this, bcmolt_presence_mask fields_present)
+{
+    uint32_t count = 0;
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_VGA)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_PF)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_LFPF)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_DFE1)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_DFE2)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_DFE3)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_DFE4)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_DFE5)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_TX_PRE)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_TX_MAIN)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_TX_POST1)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_TX_POST2)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_TX_POST3)) != 0)
+    {
+        count += 1;
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_TX_AMP)) != 0)
+    {
+        count += 1;
+    }
+
+    return count;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xpon_serdes_cfg_data_unpack(bcmolt_xpon_serdes_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_VGA)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->rx_vga))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_PF)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->rx_pf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_LFPF)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->rx_lfpf))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_DFE1)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->rx_dfe1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_DFE2)) != 0)
+    {
+        if (!bcmolt_buf_read_s8(buf, &this->rx_dfe2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_DFE3)) != 0)
+    {
+        if (!bcmolt_buf_read_s8(buf, &this->rx_dfe3))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_DFE4)) != 0)
+    {
+        if (!bcmolt_buf_read_s8(buf, &this->rx_dfe4))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_DFE5)) != 0)
+    {
+        if (!bcmolt_buf_read_s8(buf, &this->rx_dfe5))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_TX_PRE)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->tx_pre))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_TX_MAIN)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->tx_main))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_TX_POST1)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->tx_post1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_TX_POST2)) != 0)
+    {
+        if (!bcmolt_buf_read_s8(buf, &this->tx_post2))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_TX_POST3)) != 0)
+    {
+        if (!bcmolt_buf_read_s8(buf, &this->tx_post3))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_TX_AMP)) != 0)
+    {
+        if (!bcmolt_buf_read_u8(buf, &this->tx_amp))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xpon_serdes_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present)
+{
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_VGA)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_PF)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_LFPF)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_DFE1)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_DFE2)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_DFE3)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_DFE4)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_DFE5)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_TX_PRE)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_TX_MAIN)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_TX_POST1)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_TX_POST2)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_TX_POST3)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_TX_AMP)) != 0)
+    {
+        if (!bcmolt_buf_skip(packed, 1))
+        {
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+bcmos_bool bcmolt_xpon_serdes_cfg_data_bounds_check(const bcmolt_xpon_serdes_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_xpon_serdes_cfg_id *failed_prop)
+{
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_VGA)) != 0)
+    {
+        if (this->rx_vga > 45)
+        {
+            *failed_prop = BCMOLT_XPON_SERDES_CFG_ID_RX_VGA;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_PF)) != 0)
+    {
+        if (this->rx_pf > 15)
+        {
+            *failed_prop = BCMOLT_XPON_SERDES_CFG_ID_RX_PF;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_LFPF)) != 0)
+    {
+        if (this->rx_lfpf > 7)
+        {
+            *failed_prop = BCMOLT_XPON_SERDES_CFG_ID_RX_LFPF;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_DFE1)) != 0)
+    {
+        if (this->rx_dfe1 > 63)
+        {
+            *failed_prop = BCMOLT_XPON_SERDES_CFG_ID_RX_DFE1;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_DFE2)) != 0)
+    {
+        if (this->rx_dfe2 < -31)
+        {
+            *failed_prop = BCMOLT_XPON_SERDES_CFG_ID_RX_DFE2;
+            return BCMOS_FALSE;
+        }
+
+        if (this->rx_dfe2 > 31)
+        {
+            *failed_prop = BCMOLT_XPON_SERDES_CFG_ID_RX_DFE2;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_DFE3)) != 0)
+    {
+        if (this->rx_dfe3 < -31)
+        {
+            *failed_prop = BCMOLT_XPON_SERDES_CFG_ID_RX_DFE3;
+            return BCMOS_FALSE;
+        }
+
+        if (this->rx_dfe3 > 31)
+        {
+            *failed_prop = BCMOLT_XPON_SERDES_CFG_ID_RX_DFE3;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_DFE4)) != 0)
+    {
+        if (this->rx_dfe4 < -15)
+        {
+            *failed_prop = BCMOLT_XPON_SERDES_CFG_ID_RX_DFE4;
+            return BCMOS_FALSE;
+        }
+
+        if (this->rx_dfe4 > 15)
+        {
+            *failed_prop = BCMOLT_XPON_SERDES_CFG_ID_RX_DFE4;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_RX_DFE5)) != 0)
+    {
+        if (this->rx_dfe5 < -15)
+        {
+            *failed_prop = BCMOLT_XPON_SERDES_CFG_ID_RX_DFE5;
+            return BCMOS_FALSE;
+        }
+
+        if (this->rx_dfe5 > 15)
+        {
+            *failed_prop = BCMOLT_XPON_SERDES_CFG_ID_RX_DFE5;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_TX_PRE)) != 0)
+    {
+        if (this->tx_pre > 31)
+        {
+            *failed_prop = BCMOLT_XPON_SERDES_CFG_ID_TX_PRE;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_TX_MAIN)) != 0)
+    {
+        if (this->tx_main > 112)
+        {
+            *failed_prop = BCMOLT_XPON_SERDES_CFG_ID_TX_MAIN;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_TX_POST1)) != 0)
+    {
+        if (this->tx_post1 > 63)
+        {
+            *failed_prop = BCMOLT_XPON_SERDES_CFG_ID_TX_POST1;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_TX_POST2)) != 0)
+    {
+        if (this->tx_post2 < -15)
+        {
+            *failed_prop = BCMOLT_XPON_SERDES_CFG_ID_TX_POST2;
+            return BCMOS_FALSE;
+        }
+
+        if (this->tx_post2 > 15)
+        {
+            *failed_prop = BCMOLT_XPON_SERDES_CFG_ID_TX_POST2;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_TX_POST3)) != 0)
+    {
+        if (this->tx_post3 < -7)
+        {
+            *failed_prop = BCMOLT_XPON_SERDES_CFG_ID_TX_POST3;
+            return BCMOS_FALSE;
+        }
+
+        if (this->tx_post3 > 7)
+        {
+            *failed_prop = BCMOLT_XPON_SERDES_CFG_ID_TX_POST3;
+            return BCMOS_FALSE;
+        }
+    }
+
+    if ((fields_present & (1ULL << BCMOLT_XPON_SERDES_CFG_ID_TX_AMP)) != 0)
+    {
+        if (this->tx_amp > 15)
+        {
+            *failed_prop = BCMOLT_XPON_SERDES_CFG_ID_TX_AMP;
+            return BCMOS_FALSE;
+        }
+    }
+
+    return BCMOS_TRUE;
+}
+
+bcmos_bool bcmolt_obj_has_tag(bcmolt_obj_id obj, bcmolt_obj_tag tag)
+{
+    switch (obj)
+    {
+        case BCMOLT_OBJ_ID_AE_NI:
+            return (tag == BCMOLT_OBJ_TAG_AE);
+        case BCMOLT_OBJ_ID_AE_PATH_DS:
+            return (tag == BCMOLT_OBJ_TAG_AE);
+        case BCMOLT_OBJ_ID_AE_PATH_US:
+            return (tag == BCMOLT_OBJ_TAG_AE);
+        case BCMOLT_OBJ_ID_CHANNEL:
+            return (tag == BCMOLT_OBJ_TAG_XGPON);
+        case BCMOLT_OBJ_ID_DEBUG:
+            return (((tag == BCMOLT_OBJ_TAG_EPON) || (tag == BCMOLT_OBJ_TAG_GPON)) || (tag == BCMOLT_OBJ_TAG_XGPON));
+        case BCMOLT_OBJ_ID_DEVICE:
+            return ((((tag == BCMOLT_OBJ_TAG_EPON) || (tag == BCMOLT_OBJ_TAG_GPON)) || (tag == BCMOLT_OBJ_TAG_XGPON)) || (tag == BCMOLT_OBJ_TAG_AE));
+        case BCMOLT_OBJ_ID_EPON_DENIED_LINK:
+            return (tag == BCMOLT_OBJ_TAG_EPON);
+        case BCMOLT_OBJ_ID_EPON_LINK:
+            return (tag == BCMOLT_OBJ_TAG_EPON);
+        case BCMOLT_OBJ_ID_EPON_NI:
+            return (tag == BCMOLT_OBJ_TAG_EPON);
+        case BCMOLT_OBJ_ID_EPON_ONU_10G_US:
+            return (tag == BCMOLT_OBJ_TAG_EPON);
+        case BCMOLT_OBJ_ID_EPON_ONU_1G_US:
+            return (tag == BCMOLT_OBJ_TAG_EPON);
+        case BCMOLT_OBJ_ID_EPON_PATH_10G_DS:
+            return (tag == BCMOLT_OBJ_TAG_EPON);
+        case BCMOLT_OBJ_ID_EPON_PATH_10G_US:
+            return (tag == BCMOLT_OBJ_TAG_EPON);
+        case BCMOLT_OBJ_ID_EPON_PATH_1G_DS:
+            return (tag == BCMOLT_OBJ_TAG_EPON);
+        case BCMOLT_OBJ_ID_EPON_PATH_1G_US:
+            return (tag == BCMOLT_OBJ_TAG_EPON);
+        case BCMOLT_OBJ_ID_EPON_RP:
+            return (tag == BCMOLT_OBJ_TAG_EPON);
+        case BCMOLT_OBJ_ID_GPIO:
+            return ((((tag == BCMOLT_OBJ_TAG_EPON) || (tag == BCMOLT_OBJ_TAG_GPON)) || (tag == BCMOLT_OBJ_TAG_XGPON)) || (tag == BCMOLT_OBJ_TAG_AE));
+        case BCMOLT_OBJ_ID_GPON_ALLOC:
+            return (tag == BCMOLT_OBJ_TAG_GPON);
+        case BCMOLT_OBJ_ID_GPON_GEM_PORT:
+            return (tag == BCMOLT_OBJ_TAG_GPON);
+        case BCMOLT_OBJ_ID_GPON_IWF:
+            return (tag == BCMOLT_OBJ_TAG_GPON);
+        case BCMOLT_OBJ_ID_GPON_IWF_DS_EGRESS_FLOW:
+            return (tag == BCMOLT_OBJ_TAG_GPON);
+        case BCMOLT_OBJ_ID_GPON_IWF_DS_INGRESS_FLOW:
+            return (tag == BCMOLT_OBJ_TAG_GPON);
+        case BCMOLT_OBJ_ID_GPON_IWF_MAC_TABLE:
+            return (tag == BCMOLT_OBJ_TAG_GPON);
+        case BCMOLT_OBJ_ID_GPON_IWF_US_FLOW:
+            return (tag == BCMOLT_OBJ_TAG_GPON);
+        case BCMOLT_OBJ_ID_GPON_NI:
+            return (tag == BCMOLT_OBJ_TAG_GPON);
+        case BCMOLT_OBJ_ID_GPON_ONU:
+            return (tag == BCMOLT_OBJ_TAG_GPON);
+        case BCMOLT_OBJ_ID_GPON_TRX:
+            return (tag == BCMOLT_OBJ_TAG_GPON);
+        case BCMOLT_OBJ_ID_LOG_ENTRY:
+            return (((tag == BCMOLT_OBJ_TAG_XGPON) || (tag == BCMOLT_OBJ_TAG_GPON)) || (tag == BCMOLT_OBJ_TAG_EPON));
+        case BCMOLT_OBJ_ID_LOGGER:
+            return (((tag == BCMOLT_OBJ_TAG_GPON) || (tag == BCMOLT_OBJ_TAG_XGPON)) || (tag == BCMOLT_OBJ_TAG_EPON));
+        case BCMOLT_OBJ_ID_NNI:
+            return ((((tag == BCMOLT_OBJ_TAG_GPON) || (tag == BCMOLT_OBJ_TAG_XGPON)) || (tag == BCMOLT_OBJ_TAG_EPON)) || (tag == BCMOLT_OBJ_TAG_AE));
+        case BCMOLT_OBJ_ID_NNI_SERDES:
+            return ((((tag == BCMOLT_OBJ_TAG_GPON) || (tag == BCMOLT_OBJ_TAG_XGPON)) || (tag == BCMOLT_OBJ_TAG_EPON)) || (tag == BCMOLT_OBJ_TAG_AE));
+        case BCMOLT_OBJ_ID_SOFTWARE_ERROR:
+            return ((((tag == BCMOLT_OBJ_TAG_GPON) || (tag == BCMOLT_OBJ_TAG_XGPON)) || (tag == BCMOLT_OBJ_TAG_EPON)) || (tag == BCMOLT_OBJ_TAG_AE));
+        case BCMOLT_OBJ_ID_TRX_CALIBRATION:
+            return (((tag == BCMOLT_OBJ_TAG_GPON) || (tag == BCMOLT_OBJ_TAG_XGPON)) || (tag == BCMOLT_OBJ_TAG_EPON));
+        case BCMOLT_OBJ_ID_XGPON_ALLOC:
+            return (tag == BCMOLT_OBJ_TAG_XGPON);
+        case BCMOLT_OBJ_ID_XGPON_GEM_PORT:
+            return (tag == BCMOLT_OBJ_TAG_XGPON);
+        case BCMOLT_OBJ_ID_XGPON_IWF:
+            return (tag == BCMOLT_OBJ_TAG_XGPON);
+        case BCMOLT_OBJ_ID_XGPON_NI:
+            return (tag == BCMOLT_OBJ_TAG_XGPON);
+        case BCMOLT_OBJ_ID_XGPON_ONU:
+            return (tag == BCMOLT_OBJ_TAG_XGPON);
+        case BCMOLT_OBJ_ID_XGPON_TRX:
+            return (tag == BCMOLT_OBJ_TAG_XGPON);
+        case BCMOLT_OBJ_ID_XPON_SERDES:
+            return ((((tag == BCMOLT_OBJ_TAG_GPON) || (tag == BCMOLT_OBJ_TAG_XGPON)) || (tag == BCMOLT_OBJ_TAG_EPON)) || (tag == BCMOLT_OBJ_TAG_AE));
+        default:
+            return BCMOS_FALSE;
+    }
+}
+
+/* Maple device selected as a target for CLI commands */
+bcmolt_devid current_device;
+
+/* System mode */
+static bcmolt_system_mode device_system_mode[BCMTR_MAX_OLTS];
+
+/** Set system mode
+ * \param[in]  dev            Device id
+ * \param[in]  system_mode    System mode
+ * \returns BCM_ERR_OK, BCM_ERR_NOT_SUPPORTED
+ */
+bcmos_errno bcmolt_system_mode_set(bcmolt_devid dev, bcmolt_system_mode system_mode)
+{
+    if (dev >= BCMTR_MAX_OLTS) return BCM_ERR_PARM;
+    device_system_mode[dev] = system_mode;
+    return BCM_ERR_OK;
+}
+
+/** Get system mode
+ * \param[in]  dev            Device id
+ * \param[in]  system_mode    System mode
+ * \returns BCM_ERR_OK
+ */
+bcmos_errno bcmolt_system_mode_get(bcmolt_devid dev, bcmolt_system_mode *system_mode)
+{
+    if (dev >= BCMTR_MAX_OLTS) return BCM_ERR_PARM;
+    *system_mode = device_system_mode[dev];
+    return BCM_ERR_OK;
+}
+
+/** Mapping of system mode to object tag.
+ * This function is hand-written and must be updated whenever a new system mode is added or object tags change.
+ */
+bcmos_bool bcmolt_obj_tag_valid_for_system_mode(bcmolt_system_mode system_mode, bcmolt_obj_tag tag)
+{
+    switch (system_mode)
+    {
+        case BCMOLT_SYSTEM_MODE_GPON__16_X: /* Fall-through */
+        case BCMOLT_SYSTEM_MODE_GPON__8_X:
+        case BCMOLT_SYSTEM_MODE_GPON__4_X:
+            return tag == BCMOLT_OBJ_TAG_GPON;
+        case BCMOLT_SYSTEM_MODE_EPON__16_X:
+        case BCMOLT_SYSTEM_MODE_EPON__8_X:
+        case BCMOLT_SYSTEM_MODE_EPON__4_X:
+        case BCMOLT_SYSTEM_MODE_EPON__8_X_COEXISTENCE_TDMA:
+        case BCMOLT_SYSTEM_MODE_EPON__4_X_COEXISTENCE_TDMA:
+        case BCMOLT_SYSTEM_MODE_EPON__8_X_10_G:
+        case BCMOLT_SYSTEM_MODE_EPON__4_X_10_G:
+        case BCMOLT_SYSTEM_MODE_EPON__2_X_10_G:
+            return tag == BCMOLT_OBJ_TAG_EPON;
+        case BCMOLT_SYSTEM_MODE_XGPON_1__8_X:
+        case BCMOLT_SYSTEM_MODE_XGPON_1__4_X:
+        case BCMOLT_SYSTEM_MODE_XGS__2_X_10_G:
+        case BCMOLT_SYSTEM_MODE_NGPON2__2_X_10_G:
+        case BCMOLT_SYSTEM_MODE_NGPON2__8_X_2_P_5_G:
+            return tag == BCMOLT_OBJ_TAG_XGPON;
+        case BCMOLT_SYSTEM_MODE_GPON_8_XGPON_4_X_COEXISTENCE:
+            return tag == BCMOLT_OBJ_TAG_GPON || tag == BCMOLT_OBJ_TAG_XGPON;
+        case BCMOLT_SYSTEM_MODE_AE_8_X:
+            return tag == BCMOLT_OBJ_TAG_AE;
+        default:
+            return BCMOS_FALSE;
+    }
+}
+
+bcmos_bool bcmolt_object_is_supported(bcmolt_system_mode system_mode, bcmolt_obj_id obj)
+{
+    bcmolt_obj_tag tag;
+
+    for (tag = 0; tag < BCMOLT_OBJ_TAG__NUM_OF; tag++)
+    {
+        if (bcmolt_obj_tag_valid_for_system_mode(system_mode, tag) && bcmolt_obj_has_tag(obj, tag))
+        {
+            return BCMOS_TRUE;
+        }
+    }
+
+    return BCMOS_FALSE;
+}
+
+const char *bcmolt_system_mode_name(bcmolt_system_mode mode)
+{
+    static const char *mode_name[] = { [BCMOLT_SYSTEM_MODE_GPON__16_X] = "GPON_16", [BCMOLT_SYSTEM_MODE_GPON__8_X] = "GPON_8", [BCMOLT_SYSTEM_MODE_GPON__4_X] = "GPON_4", [BCMOLT_SYSTEM_MODE_EPON__16_X] = "EPON_16", [BCMOLT_SYSTEM_MODE_EPON__8_X] = "EPON_8", [BCMOLT_SYSTEM_MODE_EPON__4_X] = "EPON_4", [BCMOLT_SYSTEM_MODE_XGPON_1__8_X] = "XGPON1_8", [BCMOLT_SYSTEM_MODE_EPON__8_X_COEXISTENCE_TDMA] = "EPON_8_TDMA", [BCMOLT_SYSTEM_MODE_EPON__4_X_COEXISTENCE_TDMA] = "EPON_4_TDMA", [BCMOLT_SYSTEM_MODE_EPON__8_X_10_G] = "EPON_8_10G", [BCMOLT_SYSTEM_MODE_EPON__4_X_10_G] = "EPON_4_10G", [BCMOLT_SYSTEM_MODE_GPON_8_XGPON_4_X_COEXISTENCE] = "GPON_8_XGPON_4", [BCMOLT_SYSTEM_MODE_AE_8_X] = "AE_8", [BCMOLT_SYSTEM_MODE_XGS__2_X_10_G] = "XGS_2_10G", [BCMOLT_SYSTEM_MODE_NGPON2__2_X_10_G] = "NGPON2_2_10G", [BCMOLT_SYSTEM_MODE_NGPON2__8_X_2_P_5_G] = "NGPON2_2_2_5G", [BCMOLT_SYSTEM_MODE_XGPON_1__4_X] = "XGPON1_4", [BCMOLT_SYSTEM_MODE_EPON__2_X_10_G] = "EPON_2_10G", };
+
+    const char *unset = "*unconfigured*";
+    const char *invalid = "*invalid*";
+
+    if (mode >= BCMOLT_SYSTEM_MODE__NUM_OF)
+    {
+        return unset;
+    }
+
+    if (mode_name[mode] == NULL)
+    {
+        return invalid;
+    }
+
+    return mode_name[mode];
+}
+
+/* XGPON num of onus */
+static bcmolt_xgpon_num_of_onus device_xgpon_num_of_onus[BCMTR_MAX_OLTS];
+
+/** Set xgpon num of onus
+ * \param[in]  dev            Device id
+ * \param[in]  xgpon_num_of_onus    XGPON num of onus
+ * \returns BCM_ERR_OK, BCM_ERR_PARM
+ */
+bcmos_errno bcmolt_xgpon_num_of_onus_set(bcmolt_devid dev, bcmolt_xgpon_num_of_onus xgpon_num_of_onus)
+{
+    if (dev >= BCMTR_MAX_OLTS) return BCM_ERR_PARM;
+    device_xgpon_num_of_onus[dev] = xgpon_num_of_onus;
+    return BCM_ERR_OK;
+}
+
+/** Get xgpon num of onus
+ * \param[in]  dev            Device id
+ * \param[in]  xgpon_num_of_onus    XGPON num of onus
+ * \returns BCM_ERR_OK, BCM_ERR_PARM
+ */
+bcmos_errno bcmolt_xgpon_num_of_onus_get(bcmolt_devid dev, bcmolt_xgpon_num_of_onus *xgpon_num_of_onus)
+{
+    if (dev >= BCMTR_MAX_OLTS) return BCM_ERR_PARM;
+    *xgpon_num_of_onus = device_xgpon_num_of_onus[dev];
+    return BCM_ERR_OK;
+}
diff --git a/bcm68620_release/release/host_driver/model/bcmolt_model_types.h b/bcm68620_release/release/host_driver/model/bcmolt_model_types.h
new file mode 100644
index 0000000..3785b02
--- /dev/null
+++ b/bcm68620_release/release/host_driver/model/bcmolt_model_types.h
@@ -0,0 +1,46987 @@
+/*
+<:copyright-BRCM:2016:proprietary:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+This program is the proprietary software of Broadcom Corporation and/or its
+licensors, and may only be used, duplicated, modified or distributed pursuant
+to the terms and conditions of a separate, written license agreement executed
+between you and Broadcom (an "Authorized License").  Except as set forth in
+an Authorized License, Broadcom grants no license (express or implied), right
+to use, or waiver of any kind with respect to the Software, and Broadcom
+expressly reserves all rights in and to the Software and all intellectual
+property rights therein.  IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE
+NO RIGHT TO USE THIS SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY
+BROADCOM AND DISCONTINUE ALL USE OF THE SOFTWARE.
+
+Except as expressly set forth in the Authorized License,
+
+1. This program, including its structure, sequence and organization,
+    constitutes the valuable trade secrets of Broadcom, and you shall use
+    all reasonable efforts to protect the confidentiality thereof, and to
+    use this information only in connection with your use of Broadcom
+    integrated circuit products.
+
+2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
+    AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, REPRESENTATIONS OR
+    WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH
+    RESPECT TO THE SOFTWARE.  BROADCOM SPECIFICALLY DISCLAIMS ANY AND
+    ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, NONINFRINGEMENT,
+    FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, ACCURACY OR
+    COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR CORRESPONDENCE
+    TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT OF USE OR
+    PERFORMANCE OF THE SOFTWARE.
+
+3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR
+    ITS LICENSORS BE LIABLE FOR (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL,
+    INDIRECT, OR EXEMPLARY DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY
+    WAY RELATING TO YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN
+    IF BROADCOM HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES;
+    OR (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE
+    SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE LIMITATIONS
+    SHALL APPLY NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF ANY
+    LIMITED REMEDY.
+:>
+*/
+#ifndef BCMOLT_MODEL_TYPES_H_
+#define BCMOLT_MODEL_TYPES_H_
+
+#include "bcmos_system.h"
+#include "bcmos_errno.h"
+#include "bcmolt_buf.h"
+#include "bcmolt_msg.h"
+#include "bcmolt_model_data.h"
+
+/** \addtogroup object_model
+ * @{
+ */
+
+/** Structure definition for the "key" group of the "ae_ni" object. 
+ */
+typedef struct bcmolt_ae_ni_key
+{
+    bcmolt_ae_ni ae_ni; /**< The index of a specific AE NI instance as seen by the host. */
+} bcmolt_ae_ni_key;
+
+/** Structure definition for the "cfg" group of the "ae_ni" object. 
+ */
+typedef struct bcmolt_ae_ni_cfg_data
+{
+    bcmos_mac_address mac_address;  /**< The MAC address used for all frames generated by the OLT on the network.  This value must be set before AE_NI is first enabled, and cannot be changed while the AE_NI is enabled. */
+    bcmolt_ae_ni_en_state ae_ni_en; /**< Indicates the enable state of the AE NI. */
+    uint16_t mtu_10g;               /**< Maximum frame size (including FCS) on the 10G path. This attribute cannot be changed on an enabled AE_NI. */
+    bcmolt_prbs_generator_config prbs_generator;    /**< DS PRBS generator configuration */
+    bcmolt_prbs_checker_config prbs_checker;        /**< US PRBS checker configuration */
+    bcmolt_prbs_status prbs_status;                 /**< Result of US PRBS checker */
+} bcmolt_ae_ni_cfg_data;
+
+/** Transport message definition for "cfg" group of "ae_ni" object. 
+ */
+typedef struct bcmolt_ae_ni_cfg
+{
+    bcmolt_cfg hdr;             /**< Transport header. */
+    bcmolt_ae_ni_key key;       /**< Object key. */
+    bcmolt_ae_ni_cfg_data data; /**< All properties that must be set by the user. */
+} bcmolt_ae_ni_cfg;
+
+/** Structure definition for the "set_ae_ni_en_state" group of the "ae_ni" 
+ * object. 
+ *
+ * Set the AE NI enable state. 
+ */
+typedef struct bcmolt_ae_ni_set_ae_ni_en_state_data
+{
+    bcmolt_ae_ni_en_state new_state;    /**< New EPON NI enable state. */
+} bcmolt_ae_ni_set_ae_ni_en_state_data;
+
+/** Transport message definition for "set_ae_ni_en_state" group of "ae_ni" 
+ * object. 
+ */
+typedef struct bcmolt_ae_ni_set_ae_ni_en_state
+{
+    bcmolt_oper hdr;        /**< Transport header. */
+    bcmolt_ae_ni_key key;   /**< Object key. */
+    bcmolt_ae_ni_set_ae_ni_en_state_data data;  /**< All properties that must be set by the user. */
+} bcmolt_ae_ni_set_ae_ni_en_state;
+
+/** Structure definition for the "key" group of the "ae_path_ds" object. 
+ */
+typedef struct bcmolt_ae_path_ds_key
+{
+    bcmolt_ae_ni ae_ni; /**< AE NI associated with this 10G downstream path. */
+} bcmolt_ae_path_ds_key;
+
+/** Structure definition for the "stat" group of the "ae_path_ds" object. 
+ */
+typedef struct bcmolt_ae_path_ds_stat_data
+{
+    uint64_t bytes;             /**< The number of bytes transmitted on this 10g downstream path. */
+    uint64_t frames;            /**< The number of frames transmitted on this 10g downstream path. */
+    uint64_t frames_64;         /**< The number of 64 byte frames transmitted on this 10g downstream path. */
+    uint64_t frames_65_127;     /**< The number of 65 to 127 byte frames transmitted on this 10g downstream path. */
+    uint64_t frames_128_255;    /**< The number of 128 to 255 byte frames transmitted on this 10g downstream path. */
+    uint64_t frames_256_511;    /**< The number of 256 to 511 byte frames transmitted on this 10g downstream path. */
+    uint64_t frames_512_1023;   /**< The number of 512 to 1023 byte frames transmitted on this 10g downstream path. */
+    uint64_t frames_1024_1518;  /**< The number of 1024 to 1518 byte frames transmitted on this 10g downstream path. */
+    uint64_t frames_1519_2047;  /**< The number of 1519 to 2047 byte frames transmitted on this 10g downstream path. */
+    uint64_t frames_2048_4095;  /**< The number of 2048 to 4095 byte frames transmitted on this 10g downstream path. */
+    uint64_t frames_4096_9216;  /**< The number of 4096 to 9216 byte frames transmitted on this 10g downstream path. */
+    uint64_t frames_9217_16383; /**< The number of 9217 to 16383 byte frames transmitted on this 10g downstream path. */
+    uint64_t broadcast_frames;  /**< The number of broadcast frames transmitted on this 10g downstream path. */
+    uint64_t data_bytes;        /**< The number of data bytes transmitted on this 10g downstream path. */
+    uint64_t multicast_frames;  /**< The number of multicast frames transmitted on this 10g downstream path. */
+    uint64_t unicast_frames;    /**< The number of unicast frames transmitted on this 10g downstream path. */
+    uint64_t abort_frames;      /**< Number of abort frames transmitted on this 10g downstream path. */
+} bcmolt_ae_path_ds_stat_data;
+
+/** Transport message definition for "stat" group of "ae_path_ds" object. 
+ */
+typedef struct bcmolt_ae_path_ds_stat
+{
+    bcmolt_stat hdr;                    /**< Transport header. */
+    bcmolt_ae_path_ds_key key;          /**< Object key. */
+    bcmolt_ae_path_ds_stat_data data;   /**< All properties that must be set by the user. */
+} bcmolt_ae_path_ds_stat;
+
+/** Structure definition for the "stat_cfg" group of the "ae_path_ds" object. 
+ */
+typedef struct bcmolt_ae_path_ds_stat_cfg_data
+{
+    bcmolt_stat_alarm_config cfg;   /**< Statistic alarm configuration. */
+} bcmolt_ae_path_ds_stat_cfg_data;
+
+/** Transport message definition for "stat_cfg" group of "ae_path_ds" object. 
+ */
+typedef struct bcmolt_ae_path_ds_stat_cfg
+{
+    bcmolt_stat_cfg hdr;        /**< Transport header. */
+    bcmolt_ae_path_ds_key key;  /**< Object key. */
+    bcmolt_ae_path_ds_stat_cfg_data data;   /**< All properties that must be set by the user. */
+} bcmolt_ae_path_ds_stat_cfg;
+
+/** Structure definition for the "stat_alarm_cleared" group of the "ae_path_ds" 
+ * object. 
+ *
+ * Sent when a configured statistic alarm condition is no longer met. 
+ */
+typedef struct bcmolt_ae_path_ds_stat_alarm_cleared_data
+{
+    bcmolt_ae_path_ds_stat_id stat; /**< Statistic identifier. */
+} bcmolt_ae_path_ds_stat_alarm_cleared_data;
+
+/** Transport message definition for "stat_alarm_cleared" group of "ae_path_ds" 
+ * object. 
+ */
+typedef struct bcmolt_ae_path_ds_stat_alarm_cleared
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_ae_path_ds_key key;  /**< Object key. */
+    bcmolt_ae_path_ds_stat_alarm_cleared_data data; /**< All properties that must be set by the user. */
+} bcmolt_ae_path_ds_stat_alarm_cleared;
+
+/** Structure definition for the "stat_alarm_raised" group of the "ae_path_ds" 
+ * object. 
+ *
+ * Sent when a configured statistic alarm condition has been met. 
+ */
+typedef struct bcmolt_ae_path_ds_stat_alarm_raised_data
+{
+    bcmolt_ae_path_ds_stat_id stat; /**< Statistic identifier. */
+} bcmolt_ae_path_ds_stat_alarm_raised_data;
+
+/** Transport message definition for "stat_alarm_raised" group of "ae_path_ds" 
+ * object. 
+ */
+typedef struct bcmolt_ae_path_ds_stat_alarm_raised
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_ae_path_ds_key key;  /**< Object key. */
+    bcmolt_ae_path_ds_stat_alarm_raised_data data;  /**< All properties that must be set by the user. */
+} bcmolt_ae_path_ds_stat_alarm_raised;
+
+/** Structure definition for the "auto_cfg" group of the "ae_path_ds" object. 
+ */
+typedef struct bcmolt_ae_path_ds_auto_cfg_data
+{
+    bcmos_bool stat_alarm_cleared;  /**< If true, indications of type "stat_alarm_cleared" will be generated. */
+    bcmos_bool stat_alarm_raised;   /**< If true, indications of type "stat_alarm_raised" will be generated. */
+} bcmolt_ae_path_ds_auto_cfg_data;
+
+/** Transport message definition for "auto_cfg" group of "ae_path_ds" object. 
+ */
+typedef struct bcmolt_ae_path_ds_auto_cfg
+{
+    bcmolt_auto_cfg hdr;                    /**< Transport header. */
+    bcmolt_ae_path_ds_key key;              /**< Object key. */
+    bcmolt_ae_path_ds_auto_cfg_data data;   /**< All properties that must be set by the user. */
+} bcmolt_ae_path_ds_auto_cfg;
+
+/** Structure definition for the "key" group of the "ae_path_us" object. 
+ */
+typedef struct bcmolt_ae_path_us_key
+{
+    bcmolt_ae_ni ae_ni; /**< AE NI associated with this 10G upstream path. */
+} bcmolt_ae_path_us_key;
+
+/** Structure definition for the "stat" group of the "ae_path_us" object. 
+ */
+typedef struct bcmolt_ae_path_us_stat_data
+{
+    uint64_t bytes;             /**< The number of bytes received on this 10g upstream path. */
+    uint64_t frames;            /**< The number of frames received on this 10g upstream path. */
+    uint64_t frames_64;         /**< The number of 64 byte frames received on this 10g upstream path. */
+    uint64_t frames_65_127;     /**< The number of 65 to 127 byte frames received on this 10g upstream path. */
+    uint64_t frames_128_255;    /**< The number of 128 to 255 byte frames received on this 10g upstream path. */
+    uint64_t frames_256_511;    /**< The number of 256 to 511 byte frames received on this 10g upstream path. */
+    uint64_t frames_512_1023;   /**< The number of 512 to 1023 byte frames received on this 10g upstream path. */
+    uint64_t frames_1024_1518;  /**< The number of 1024 to 1518 byte frames received on this 10g upstream path. */
+    uint64_t frames_1519_2047;  /**< The number of 1519 to 2047 byte frames received on this 10g upstream path. */
+    uint64_t frames_2048_4095;  /**< The number of 2048 to 4095 byte frames received on this 10g upstream path. */
+    uint64_t frames_4096_9216;  /**< The number of 4096 to 9216 byte frames received on this 10g upstream path. */
+    uint64_t frames_9217_16383; /**< The number of 9217 to 16383 byte frames received on this 10g upstream path. */
+    uint64_t broadcast_frames;  /**< The number of broadcast frames received on this 10g upstream path. */
+    uint64_t data_bytes;        /**< The number of data bytes received on this 10g upstream path. */
+    uint64_t multicast_frames;  /**< The number of multicast frames received on this 10g upstream path. */
+    uint64_t unicast_frames;    /**< The number of unicast frames received on this 10g upstream path. */
+    uint64_t abort_frames;      /**< The number of abort frames received on this 10g upstream path. */
+    uint64_t fcs_error;         /**< The number of bad FCS errors received on this 10g upstream path. */
+    uint64_t oversize_error;    /**< The number of oversize errors received on this 10g upstream path. */
+    uint64_t runt_error;        /**< The number of runt errors received on this 10g upstream path. */
+} bcmolt_ae_path_us_stat_data;
+
+/** Transport message definition for "stat" group of "ae_path_us" object. 
+ */
+typedef struct bcmolt_ae_path_us_stat
+{
+    bcmolt_stat hdr;                    /**< Transport header. */
+    bcmolt_ae_path_us_key key;          /**< Object key. */
+    bcmolt_ae_path_us_stat_data data;   /**< All properties that must be set by the user. */
+} bcmolt_ae_path_us_stat;
+
+/** Structure definition for the "stat_cfg" group of the "ae_path_us" object. 
+ */
+typedef struct bcmolt_ae_path_us_stat_cfg_data
+{
+    bcmolt_stat_alarm_config cfg;   /**< Statistic alarm configuration. */
+} bcmolt_ae_path_us_stat_cfg_data;
+
+/** Transport message definition for "stat_cfg" group of "ae_path_us" object. 
+ */
+typedef struct bcmolt_ae_path_us_stat_cfg
+{
+    bcmolt_stat_cfg hdr;        /**< Transport header. */
+    bcmolt_ae_path_us_key key;  /**< Object key. */
+    bcmolt_ae_path_us_stat_cfg_data data;   /**< All properties that must be set by the user. */
+} bcmolt_ae_path_us_stat_cfg;
+
+/** Structure definition for the "stat_alarm_cleared" group of the "ae_path_us" 
+ * object. 
+ *
+ * Sent when a configured statistic alarm condition is no longer met. 
+ */
+typedef struct bcmolt_ae_path_us_stat_alarm_cleared_data
+{
+    bcmolt_ae_path_us_stat_id stat; /**< Statistic identifier. */
+} bcmolt_ae_path_us_stat_alarm_cleared_data;
+
+/** Transport message definition for "stat_alarm_cleared" group of "ae_path_us" 
+ * object. 
+ */
+typedef struct bcmolt_ae_path_us_stat_alarm_cleared
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_ae_path_us_key key;  /**< Object key. */
+    bcmolt_ae_path_us_stat_alarm_cleared_data data; /**< All properties that must be set by the user. */
+} bcmolt_ae_path_us_stat_alarm_cleared;
+
+/** Structure definition for the "stat_alarm_raised" group of the "ae_path_us" 
+ * object. 
+ *
+ * Sent when a configured statistic alarm condition has been met. 
+ */
+typedef struct bcmolt_ae_path_us_stat_alarm_raised_data
+{
+    bcmolt_ae_path_us_stat_id stat; /**< Statistic identifier. */
+} bcmolt_ae_path_us_stat_alarm_raised_data;
+
+/** Transport message definition for "stat_alarm_raised" group of "ae_path_us" 
+ * object. 
+ */
+typedef struct bcmolt_ae_path_us_stat_alarm_raised
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_ae_path_us_key key;  /**< Object key. */
+    bcmolt_ae_path_us_stat_alarm_raised_data data;  /**< All properties that must be set by the user. */
+} bcmolt_ae_path_us_stat_alarm_raised;
+
+/** Structure definition for the "auto_cfg" group of the "ae_path_us" object. 
+ */
+typedef struct bcmolt_ae_path_us_auto_cfg_data
+{
+    bcmos_bool stat_alarm_cleared;  /**< If true, indications of type "stat_alarm_cleared" will be generated. */
+    bcmos_bool stat_alarm_raised;   /**< If true, indications of type "stat_alarm_raised" will be generated. */
+} bcmolt_ae_path_us_auto_cfg_data;
+
+/** Transport message definition for "auto_cfg" group of "ae_path_us" object. 
+ */
+typedef struct bcmolt_ae_path_us_auto_cfg
+{
+    bcmolt_auto_cfg hdr;                    /**< Transport header. */
+    bcmolt_ae_path_us_key key;              /**< Object key. */
+    bcmolt_ae_path_us_auto_cfg_data data;   /**< All properties that must be set by the user. */
+} bcmolt_ae_path_us_auto_cfg;
+
+/** Structure definition for the "key" group of the "channel" object. 
+ */
+typedef struct bcmolt_channel_key
+{
+    bcmolt_pon_ni pon_ni;   /**< PON network interface. */
+} bcmolt_channel_key;
+
+/** Structure definition for the "cfg" group of the "channel" object. 
+ */
+typedef struct bcmolt_channel_cfg_data
+{
+    bcmolt_operation_control operation_control; /**< Operation control. */
+    uint16_t tol;   /**< Transmit Optical Level. An indication of the current OLT CT transceiver channel launch power into the ODN */
+    bcmolt_system_profile system_profile;           /**< System profile. */
+#define BCMOLT_CHANNEL_CFG_DATA_CHANNEL_PROFILE_LEN 8
+    bcmolt_arr_channel_profile_8 channel_profile;   /**< Channel profile. */
+} bcmolt_channel_cfg_data;
+
+/** Transport message definition for "cfg" group of "channel" object. 
+ */
+typedef struct bcmolt_channel_cfg
+{
+    bcmolt_cfg hdr;                 /**< Transport header. */
+    bcmolt_channel_key key;         /**< Object key. */
+    bcmolt_channel_cfg_data data;   /**< All properties that must be set by the user. */
+} bcmolt_channel_cfg;
+
+/** Structure definition for the "key" group of the "debug" object. 
+ */
+typedef struct bcmolt_debug_key
+{
+    uint32_t reserved;  /**< Reserved (set to 0) */
+} bcmolt_debug_key;
+
+/** Structure definition for the "cfg" group of the "debug" object. 
+ */
+typedef struct bcmolt_debug_cfg_data
+{
+    bcmolt_console_redirection console_redirection;             /**< Log output redirection */
+    uint32_t indications_dropped;                               /**< Number of indications dropped due to congestion / shaping. */
+    uint8_t file_used_percent;                                  /**< DDR log file used percent */
+    bcmolt_api_capture_config api_capture_cfg;                  /**< Configuration for API capture. */
+    bcmolt_api_capture_stats api_capture_stats;                 /**< Statistics on the most recent API capture. */
+    bcmolt_api_capture_buffer_reader api_capture_buffer_read;   /**< Controls what portion of the capture buffer is returned when performing a cfg_get. */
+    bcmolt_u8_list_u32 api_capture_buffer;                      /**< The portion of the capture buffer currently specified by api_capture_buffer_read. */
+} bcmolt_debug_cfg_data;
+
+/** Transport message definition for "cfg" group of "debug" object. 
+ */
+typedef struct bcmolt_debug_cfg
+{
+    bcmolt_cfg hdr;             /**< Transport header. */
+    bcmolt_debug_key key;       /**< Object key. */
+    bcmolt_debug_cfg_data data; /**< All properties that must be set by the user. */
+} bcmolt_debug_cfg;
+
+/** Structure definition for the "cli_output" group of the "debug" object. 
+ *
+ * CLI Output String 
+ */
+typedef struct bcmolt_debug_cli_output_data
+{
+    bcmolt_u8_list_u32 data;    /**< output data */
+} bcmolt_debug_cli_output_data;
+
+/** Transport message definition for "cli_output" group of "debug" object. 
+ */
+typedef struct bcmolt_debug_cli_output
+{
+    bcmolt_auto hdr;                    /**< Transport header. */
+    bcmolt_debug_key key;               /**< Object key. */
+    bcmolt_debug_cli_output_data data;  /**< All properties that must be set by the user. */
+} bcmolt_debug_cli_output;
+
+/** Transport message definition for "file_almost_full" group of "debug" object. 
+ */
+typedef struct bcmolt_debug_file_almost_full
+{
+    bcmolt_auto hdr;        /**< Transport header. */
+    bcmolt_debug_key key;   /**< Object key. */
+} bcmolt_debug_file_almost_full;
+
+/** Structure definition for the "auto_cfg" group of the "debug" object. 
+ */
+typedef struct bcmolt_debug_auto_cfg_data
+{
+    bcmos_bool cli_output;          /**< If true, indications of type "cli_output" will be generated. */
+    bcmos_bool file_almost_full;    /**< If true, indications of type "file_almost_full" will be generated. */
+} bcmolt_debug_auto_cfg_data;
+
+/** Transport message definition for "auto_cfg" group of "debug" object. 
+ */
+typedef struct bcmolt_debug_auto_cfg
+{
+    bcmolt_auto_cfg hdr;                /**< Transport header. */
+    bcmolt_debug_key key;               /**< Object key. */
+    bcmolt_debug_auto_cfg_data data;    /**< All properties that must be set by the user. */
+} bcmolt_debug_auto_cfg;
+
+/** Structure definition for the "cli_input" group of the "debug" object. 
+ *
+ * CLI Input String 
+ */
+typedef struct bcmolt_debug_cli_input_data
+{
+    bcmolt_u8_list_u32 data;    /**< Input String */
+} bcmolt_debug_cli_input_data;
+
+/** Transport message definition for "cli_input" group of "debug" object. 
+ */
+typedef struct bcmolt_debug_cli_input
+{
+    bcmolt_oper hdr;                    /**< Transport header. */
+    bcmolt_debug_key key;               /**< Object key. */
+    bcmolt_debug_cli_input_data data;   /**< All properties that must be set by the user. */
+} bcmolt_debug_cli_input;
+
+/** Transport message definition for "reset_api_capture" group of "debug" 
+ * object. 
+ */
+typedef struct bcmolt_debug_reset_api_capture
+{
+    bcmolt_oper hdr;        /**< Transport header. */
+    bcmolt_debug_key key;   /**< Object key. */
+} bcmolt_debug_reset_api_capture;
+
+/** Transport message definition for "start_api_capture" group of "debug" 
+ * object. 
+ */
+typedef struct bcmolt_debug_start_api_capture
+{
+    bcmolt_oper hdr;        /**< Transport header. */
+    bcmolt_debug_key key;   /**< Object key. */
+} bcmolt_debug_start_api_capture;
+
+/** Transport message definition for "stop_api_capture" group of "debug" object. 
+ */
+typedef struct bcmolt_debug_stop_api_capture
+{
+    bcmolt_oper hdr;        /**< Transport header. */
+    bcmolt_debug_key key;   /**< Object key. */
+} bcmolt_debug_stop_api_capture;
+
+/** Structure definition for the "key" group of the "device" object. 
+ */
+typedef struct bcmolt_device_key
+{
+    uint32_t reserved;  /**< Reserved (set to 0). */
+} bcmolt_device_key;
+
+/** Structure definition for the "cfg" group of the "device" object. 
+ */
+typedef struct bcmolt_device_cfg_data
+{
+    bcmolt_system_mode system_mode; /**< System mode - this must be set by the host when initially provisioning the system.  Setting this also sets the "nni_speed" property, unless it is overridden. */
+    uint32_t keepalive_interval;    /**< Keepalive Interval in Seconds  (0 = Disable) */
+    uint32_t keepalive_tolerance;   /**< How many keepalive messages can be lost before triggering a disconnect sequence  */
+    bcmolt_firmware_sw_version firmware_sw_version;             /**< Firmware SW Version */
+    bcmolt_host_sw_version host_sw_version;                     /**< Host SW Version */
+    bcmolt_device_chip_revision chip_revision;                  /**< Revision of the BCM68620 device. */
+    bcmolt_device_state state;                                  /**< Device state */
+    bcmolt_debug_device_cfg debug;                              /**< Device configuration debug parameters */
+    bcmolt_device_nni_speed nni_speed;                          /**< Speed of the NNI interface.  This is calculated automatically when the "system_mode" property is set, but can be overridden by the host. */
+    bcmolt_ext_irq protection_switching_ext_irq;                /**< The selected external IRQ for protection switching */
+    uint32_t epon_clock_transport_sample_delay;                 /**< The time (in TQ) that it takes from when a pulse is generated at the external source to when we sample it. */
+    bcmolt_indication_shaping indication_shaping;               /**< Shaping / rate limiting for the indication channel. */
+    uint32_t chip_temperature;                                  /**< Current die temperature. */
+    bcmolt_control_state gpon_xgpon_tod_enable;                 /**< GPON/XGPON ToD control state */
+    bcmolt_gpio_pin gpon_xgpon_tod_gpio_pin;                    /**< GPON/XGPON ToD GIO pin */
+    bcmos_bool gpon_xgpon_tod_connected_internally;             /**< GPON/XGPON is ToD internally */
+    bcmolt_str_256 epon_8021_as_tod_format;                     /**< The format of the 802.1AS ToD string. */
+    bcmolt_shaper_mode epon_shaper_mode;                        /**< Controls EPON shaper behavior. */
+    bcmolt_embedded_image_entry_list_u8 embedded_image_list;    /**< List of all file images stored in the OLT. */
+    uint32_t chip_voltage;                      /**< Chip voltage in mV */
+    bcmolt_str_256 epon_tod_string;             /**< The current ToD string to be used for clock transport (EPON only). */
+    bcmolt_xgpon_num_of_onus xgpon_num_of_onus; /**< xgpon num of onus. */
+    bcmos_ipv4_address device_ip_address;       /**< The IP Address of the device */
+    uint16_t device_udp_port;                   /**< The UDP port of the Device */
+    bcmolt_uart_baudrate tod_uart_baudrate;     /**< UART baud rate */
+    uint8_t gpon_xgpon_tod_string_length;       /**< GPON/XGPON ToD string length */
+} bcmolt_device_cfg_data;
+
+/** Transport message definition for "cfg" group of "device" object. 
+ */
+typedef struct bcmolt_device_cfg
+{
+    bcmolt_cfg hdr;                 /**< Transport header. */
+    bcmolt_device_key key;          /**< Object key. */
+    bcmolt_device_cfg_data data;    /**< All properties that must be set by the user. */
+} bcmolt_device_cfg;
+
+/** Structure definition for the "connection_complete" group of the "device" 
+ * object. 
+ *
+ * The host successfully connected to the device.  The device has either been 
+ * reprogrammed with new firmware, or a connection was established with an 
+ * existing device (see the "standalone" field). 
+ */
+typedef struct bcmolt_device_connection_complete_data
+{
+    bcmos_bool standalone;  /**< If true, the device was previously running in standalone mode before this connection was established.  If false, the device was booted from reset with new firmware, etc. */
+} bcmolt_device_connection_complete_data;
+
+/** Transport message definition for "connection_complete" group of "device" 
+ * object. 
+ */
+typedef struct bcmolt_device_connection_complete
+{
+    bcmolt_auto hdr;        /**< Transport header. */
+    bcmolt_device_key key;  /**< Object key. */
+    bcmolt_device_connection_complete_data data;    /**< All properties that must be set by the user. */
+} bcmolt_device_connection_complete;
+
+/** Transport message definition for "connection_established" group of "device" 
+ * object. 
+ */
+typedef struct bcmolt_device_connection_established
+{
+    bcmolt_auto hdr;        /**< Transport header. */
+    bcmolt_device_key key;  /**< Object key. */
+} bcmolt_device_connection_established;
+
+/** Structure definition for the "connection_failure" group of the "device" 
+ * object. 
+ *
+ * The host failed to connect to the device. 
+ */
+typedef struct bcmolt_device_connection_failure_data
+{
+    bcmolt_host_connection_fail_reason reason;  /**< Connection fail reason. */
+} bcmolt_device_connection_failure_data;
+
+/** Transport message definition for "connection_failure" group of "device" 
+ * object. 
+ */
+typedef struct bcmolt_device_connection_failure
+{
+    bcmolt_auto hdr;        /**< Transport header. */
+    bcmolt_device_key key;  /**< Object key. */
+    bcmolt_device_connection_failure_data data; /**< All properties that must be set by the user. */
+} bcmolt_device_connection_failure;
+
+/** Structure definition for the "ddr_test_complete" group of the "device" 
+ * object. 
+ *
+ * The DDR Test has completed 
+ */
+typedef struct bcmolt_device_ddr_test_complete_data
+{
+    bcmolt_ddr_test_completed ddr_test; /**< Results of the DDR Test */
+} bcmolt_device_ddr_test_complete_data;
+
+/** Transport message definition for "ddr_test_complete" group of "device" 
+ * object. 
+ */
+typedef struct bcmolt_device_ddr_test_complete
+{
+    bcmolt_auto hdr;        /**< Transport header. */
+    bcmolt_device_key key;  /**< Object key. */
+    bcmolt_device_ddr_test_complete_data data;  /**< All properties that must be set by the user. */
+} bcmolt_device_ddr_test_complete;
+
+/** Structure definition for the "device_keep_alive" group of the "device" 
+ * object. 
+ *
+ * Keep alive message from the device to the host - used by the device control 
+ * library (not sent to the host application). 
+ */
+typedef struct bcmolt_device_device_keep_alive_data
+{
+    uint32_t sequence_number;   /**< sequence number */
+    uint32_t time_stamp;        /**< time stamp */
+} bcmolt_device_device_keep_alive_data;
+
+/** Transport message definition for "device_keep_alive" group of "device" 
+ * object. 
+ */
+typedef struct bcmolt_device_device_keep_alive
+{
+    bcmolt_auto hdr;        /**< Transport header. */
+    bcmolt_device_key key;  /**< Object key. */
+    bcmolt_device_device_keep_alive_data data;  /**< All properties that must be set by the user. */
+} bcmolt_device_device_keep_alive;
+
+/** Structure definition for the "device_ready" group of the "device" object. 
+ *
+ * Device ready indication used by the device control library (not sent to the 
+ * host application). 
+ */
+typedef struct bcmolt_device_device_ready_data
+{
+    bcmolt_firmware_sw_version firmware_sw_version; /**< Software Version. */
+    bcmolt_system_mode system_mode;                 /**< System Mode. */
+    bcmolt_device_nni_speed nni_speed;              /**< NNI Speed. */
+    bcmolt_device_chip_revision chip_revision;      /**< Chip Revision. */
+    bcmolt_control_state tod_enable;                /**< ToD control. */
+    bcmolt_gpio_pin tod_gpio_pin;                   /**< GPIO pin is used when ToD UART is not connected to the embedded, and TOD value is obtained by the host. */
+} bcmolt_device_device_ready_data;
+
+/** Transport message definition for "device_ready" group of "device" object. 
+ */
+typedef struct bcmolt_device_device_ready
+{
+    bcmolt_auto hdr;                        /**< Transport header. */
+    bcmolt_device_key key;                  /**< Object key. */
+    bcmolt_device_device_ready_data data;   /**< All properties that must be set by the user. */
+} bcmolt_device_device_ready;
+
+/** Transport message definition for "disconnection_complete" group of "device" 
+ * object. 
+ */
+typedef struct bcmolt_device_disconnection_complete
+{
+    bcmolt_auto hdr;        /**< Transport header. */
+    bcmolt_device_key key;  /**< Object key. */
+} bcmolt_device_disconnection_complete;
+
+/** Structure definition for the "image_transfer_complete" group of the "device" 
+ * object. 
+ */
+typedef struct bcmolt_device_image_transfer_complete_data
+{
+    bcmolt_device_image_type image_type;    /**< Image type. */
+    uint32_t block_number;                  /**< Block number. */
+    bcmolt_image_transfer_status status;    /**< Image transfer status. */
+} bcmolt_device_image_transfer_complete_data;
+
+/** Transport message definition for "image_transfer_complete" group of "device" 
+ * object. 
+ */
+typedef struct bcmolt_device_image_transfer_complete
+{
+    bcmolt_auto hdr;        /**< Transport header. */
+    bcmolt_device_key key;  /**< Object key. */
+    bcmolt_device_image_transfer_complete_data data;    /**< All properties that must be set by the user. */
+} bcmolt_device_image_transfer_complete;
+
+/** Structure definition for the "indications_dropped" group of the "device" 
+ * object. 
+ *
+ * Sent when indications are dropped due to congestion / shaping. 
+ */
+typedef struct bcmolt_device_indications_dropped_data
+{
+    uint32_t total_count;   /**< Total number of indications dropped since the system was started. */
+} bcmolt_device_indications_dropped_data;
+
+/** Transport message definition for "indications_dropped" group of "device" 
+ * object. 
+ */
+typedef struct bcmolt_device_indications_dropped
+{
+    bcmolt_auto hdr;        /**< Transport header. */
+    bcmolt_device_key key;  /**< Object key. */
+    bcmolt_device_indications_dropped_data data;    /**< All properties that must be set by the user. */
+} bcmolt_device_indications_dropped;
+
+/** Structure definition for the "sw_error" group of the "device" object. 
+ */
+typedef struct bcmolt_device_sw_error_data
+{
+    bcmolt_str_100 task_name;   /**< task name. */
+    bcmolt_str_100 file_name;   /**< file name. */
+    uint32_t line_number;       /**< line number. */
+    uint8_t pon_ni;             /**< pon_ni. */
+} bcmolt_device_sw_error_data;
+
+/** Transport message definition for "sw_error" group of "device" object. 
+ */
+typedef struct bcmolt_device_sw_error
+{
+    bcmolt_auto hdr;                    /**< Transport header. */
+    bcmolt_device_key key;              /**< Object key. */
+    bcmolt_device_sw_error_data data;   /**< All properties that must be set by the user. */
+} bcmolt_device_sw_error;
+
+/** Structure definition for the "sw_exception" group of the "device" object. 
+ */
+typedef struct bcmolt_device_sw_exception_data
+{
+    uint8_t cpu_id;         /**< CPU ID. */
+    bcmolt_str_2000 text;   /**< text. */
+} bcmolt_device_sw_exception_data;
+
+/** Transport message definition for "sw_exception" group of "device" object. 
+ */
+typedef struct bcmolt_device_sw_exception
+{
+    bcmolt_auto hdr;        /**< Transport header. */
+    bcmolt_device_key key;  /**< Object key. */
+    bcmolt_device_sw_exception_data data;   /**< All properties that must be set by the user. */
+} bcmolt_device_sw_exception;
+
+/** Structure definition for the "auto_cfg" group of the "device" object. 
+ */
+typedef struct bcmolt_device_auto_cfg_data
+{
+    bcmos_bool connection_complete;     /**< If true, indications of type "connection_complete" will be generated. */
+    bcmos_bool connection_established;  /**< If true, indications of type "connection_established" will be generated. */
+    bcmos_bool connection_failure;      /**< If true, indications of type "connection_failure" will be generated. */
+    bcmos_bool ddr_test_complete;       /**< If true, indications of type "ddr_test_complete" will be generated. */
+    bcmos_bool device_keep_alive;       /**< If true, indications of type "device_keep_alive" will be generated. */
+    bcmos_bool device_ready;            /**< If true, indications of type "device_ready" will be generated. */
+    bcmos_bool disconnection_complete;  /**< If true, indications of type "disconnection_complete" will be generated. */
+    bcmos_bool image_transfer_complete; /**< If true, indications of type "image_transfer_complete" will be generated. */
+    bcmos_bool indications_dropped;     /**< If true, indications of type "indications_dropped" will be generated. */
+    bcmos_bool sw_error;                /**< If true, indications of type "sw_error" will be generated. */
+    bcmos_bool sw_exception;            /**< If true, indications of type "sw_exception" will be generated. */
+} bcmolt_device_auto_cfg_data;
+
+/** Transport message definition for "auto_cfg" group of "device" object. 
+ */
+typedef struct bcmolt_device_auto_cfg
+{
+    bcmolt_auto_cfg hdr;                /**< Transport header. */
+    bcmolt_device_key key;              /**< Object key. */
+    bcmolt_device_auto_cfg_data data;   /**< All properties that must be set by the user. */
+} bcmolt_device_auto_cfg;
+
+/** Transport message definition for "connect" group of "device" object. 
+ */
+typedef struct bcmolt_device_connect
+{
+    bcmolt_oper hdr;        /**< Transport header. */
+    bcmolt_device_key key;  /**< Object key. */
+} bcmolt_device_connect;
+
+/** Transport message definition for "disconnect" group of "device" object. 
+ */
+typedef struct bcmolt_device_disconnect
+{
+    bcmolt_oper hdr;        /**< Transport header. */
+    bcmolt_device_key key;  /**< Object key. */
+} bcmolt_device_disconnect;
+
+/** Structure definition for the "host_keep_alive" group of the "device" object. 
+ *
+ * Keep alive message from the host to the device - used by the device control 
+ * library (should not be sent by the host application). 
+ */
+typedef struct bcmolt_device_host_keep_alive_data
+{
+    uint32_t sequence_number;   /**< sequence number */
+    uint32_t time_stamp;        /**< time stamp */
+} bcmolt_device_host_keep_alive_data;
+
+/** Transport message definition for "host_keep_alive" group of "device" object. 
+ */
+typedef struct bcmolt_device_host_keep_alive
+{
+    bcmolt_oper hdr;        /**< Transport header. */
+    bcmolt_device_key key;  /**< Object key. */
+    bcmolt_device_host_keep_alive_data data;    /**< All properties that must be set by the user. */
+} bcmolt_device_host_keep_alive;
+
+/** Structure definition for the "image_transfer_data" group of the "device" 
+ * object. 
+ *
+ * used for transferring the actual data from/to the OLT.   not to be directly 
+ * called by the user. 
+ */
+typedef struct bcmolt_device_image_transfer_data_data
+{
+    uint32_t block_number;          /**< Block number. */
+    bcmos_bool more_data;           /**< Specifies that there are more data to come. */
+    bcmolt_u8_list_u16_hex data;    /**< Data. */
+} bcmolt_device_image_transfer_data_data;
+
+/** Transport message definition for "image_transfer_data" group of "device" 
+ * object. 
+ */
+typedef struct bcmolt_device_image_transfer_data
+{
+    bcmolt_oper hdr;        /**< Transport header. */
+    bcmolt_device_key key;  /**< Object key. */
+    bcmolt_device_image_transfer_data_data data;    /**< All properties that must be set by the user. */
+} bcmolt_device_image_transfer_data;
+
+/** Structure definition for the "image_transfer_start" group of the "device" 
+ * object. 
+ *
+ * This API message informs the OLT of the start of image transfer, and 
+ * provides the information of the file image. 
+ */
+typedef struct bcmolt_device_image_transfer_start_data
+{
+    bcmolt_device_image_type image_type;    /**< File type. */
+    uint32_t image_size;                    /**< Size of the file image.  Ignored for RRQ operation. */
+    uint32_t crc32;             /**< CRC32 checksum of the entire file image. */
+    bcmolt_str_64 image_name;   /**< Name of the file image.  Null-terminated string.  This is required for the DPoE ONU only.  DPoE requires the write request OAM contains the name of the file. */
+} bcmolt_device_image_transfer_start_data;
+
+/** Transport message definition for "image_transfer_start" group of "device" 
+ * object. 
+ */
+typedef struct bcmolt_device_image_transfer_start
+{
+    bcmolt_oper hdr;        /**< Transport header. */
+    bcmolt_device_key key;  /**< Object key. */
+    bcmolt_device_image_transfer_start_data data;   /**< All properties that must be set by the user. */
+} bcmolt_device_image_transfer_start;
+
+/** Structure definition for the "reset" group of the "device" object. 
+ *
+ * Resets the host/device. 
+ */
+typedef struct bcmolt_device_reset_data
+{
+    bcmolt_device_reset_mode mode;  /**< Options to control what should be reset. */
+} bcmolt_device_reset_data;
+
+/** Transport message definition for "reset" group of "device" object. 
+ */
+typedef struct bcmolt_device_reset
+{
+    bcmolt_oper hdr;                /**< Transport header. */
+    bcmolt_device_key key;          /**< Object key. */
+    bcmolt_device_reset_data data;  /**< All properties that must be set by the user. */
+} bcmolt_device_reset;
+
+/** Structure definition for the "run_ddr_test" group of the "device" object. 
+ *
+ * Run a test on one or more of the DDR components. 
+ */
+typedef struct bcmolt_device_run_ddr_test_data
+{
+    bcmos_bool cpu;     /**< Whether or not to test the CPU DDR */
+    bcmos_bool ras_0;   /**< Whether or not to test RAS 0 DDR */
+    bcmos_bool ras_1;   /**< Whether or not to test RAS 1 DDR */
+} bcmolt_device_run_ddr_test_data;
+
+/** Transport message definition for "run_ddr_test" group of "device" object. 
+ */
+typedef struct bcmolt_device_run_ddr_test
+{
+    bcmolt_oper hdr;        /**< Transport header. */
+    bcmolt_device_key key;  /**< Object key. */
+    bcmolt_device_run_ddr_test_data data;   /**< All properties that must be set by the user. */
+} bcmolt_device_run_ddr_test;
+
+/** Transport message definition for "sw_upgrade_activate" group of "device" 
+ * object. 
+ */
+typedef struct bcmolt_device_sw_upgrade_activate
+{
+    bcmolt_oper hdr;        /**< Transport header. */
+    bcmolt_device_key key;  /**< Object key. */
+} bcmolt_device_sw_upgrade_activate;
+
+/** Structure definition for the "key" group of the "epon_denied_link" object. 
+ */
+typedef struct bcmolt_epon_denied_link_key
+{
+    bcmolt_epon_ni epon_ni;         /**< Uniquely identifies the EPON NI containing the link. */
+    bcmos_mac_address mac_address;  /**< The MAC address associated with the EPON link. */
+} bcmolt_epon_denied_link_key;
+
+/** Structure definition for the "cfg" group of the "epon_denied_link" object. 
+ */
+typedef struct bcmolt_epon_denied_link_cfg_data
+{
+    bcmolt_epon_denied_link_alarm_state alarm_state;    /**< The state of the alarms on this link. */
+} bcmolt_epon_denied_link_cfg_data;
+
+/** Transport message definition for "cfg" group of "epon_denied_link" object. 
+ */
+typedef struct bcmolt_epon_denied_link_cfg
+{
+    bcmolt_cfg hdr;                     /**< Transport header. */
+    bcmolt_epon_denied_link_key key;    /**< Object key. */
+    bcmolt_epon_denied_link_cfg_data data;  /**< All properties that must be set by the user. */
+} bcmolt_epon_denied_link_cfg;
+
+/** Structure definition for the "laser_on_off_violation" group of the 
+ * "epon_denied_link" object. 
+ *
+ * This is when a link tries to reigster with an impossible laser on or off 
+ * time. 
+ */
+typedef struct bcmolt_epon_denied_link_laser_on_off_violation_data
+{
+    bcmolt_laser_on_off_status alarm_status;    /**< Alarm Status. */
+} bcmolt_epon_denied_link_laser_on_off_violation_data;
+
+/** Transport message definition for "laser_on_off_violation" group of 
+ * "epon_denied_link" object. 
+ */
+typedef struct bcmolt_epon_denied_link_laser_on_off_violation
+{
+    bcmolt_auto hdr;                    /**< Transport header. */
+    bcmolt_epon_denied_link_key key;    /**< Object key. */
+    bcmolt_epon_denied_link_laser_on_off_violation_data data;   /**< All properties that must be set by the user. */
+} bcmolt_epon_denied_link_laser_on_off_violation;
+
+/** Structure definition for the "llid_pool_empty_violation" group of the 
+ * "epon_denied_link" object. 
+ *
+ * A link tried to register and it there are no LLIDs available. If this 
+ * occurs, it is possible there is an issue with your 'max links' and/or 'Base 
+ * LLID' fields on your RP. 
+ */
+typedef struct bcmolt_epon_denied_link_llid_pool_empty_violation_data
+{
+    bcmolt_status alarm_status; /**< Alarm Status. */
+} bcmolt_epon_denied_link_llid_pool_empty_violation_data;
+
+/** Transport message definition for "llid_pool_empty_violation" group of 
+ * "epon_denied_link" object. 
+ */
+typedef struct bcmolt_epon_denied_link_llid_pool_empty_violation
+{
+    bcmolt_auto hdr;                    /**< Transport header. */
+    bcmolt_epon_denied_link_key key;    /**< Object key. */
+    bcmolt_epon_denied_link_llid_pool_empty_violation_data data;    /**< All properties that must be set by the user. */
+} bcmolt_epon_denied_link_llid_pool_empty_violation;
+
+/** Structure definition for the "max_link_violation" group of the 
+ * "epon_denied_link" object. 
+ *
+ * A link tried to register and it would have put us over the provisioned max 
+ * links for the corresponding EPON NI. 
+ */
+typedef struct bcmolt_epon_denied_link_max_link_violation_data
+{
+    bcmolt_status alarm_status; /**< Alarm Status. */
+} bcmolt_epon_denied_link_max_link_violation_data;
+
+/** Transport message definition for "max_link_violation" group of 
+ * "epon_denied_link" object. 
+ */
+typedef struct bcmolt_epon_denied_link_max_link_violation
+{
+    bcmolt_auto hdr;                    /**< Transport header. */
+    bcmolt_epon_denied_link_key key;    /**< Object key. */
+    bcmolt_epon_denied_link_max_link_violation_data data;   /**< All properties that must be set by the user. */
+} bcmolt_epon_denied_link_max_link_violation;
+
+/** Structure definition for the "overhead_profile_violation" group of the 
+ * "epon_denied_link" object. 
+ *
+ * This is when link tries to register and there are already too many existing 
+ * laser on/off combinations. 
+ */
+typedef struct bcmolt_epon_denied_link_overhead_profile_violation_data
+{
+    bcmolt_status alarm_status; /**< Alarm status. */
+} bcmolt_epon_denied_link_overhead_profile_violation_data;
+
+/** Transport message definition for "overhead_profile_violation" group of 
+ * "epon_denied_link" object. 
+ */
+typedef struct bcmolt_epon_denied_link_overhead_profile_violation
+{
+    bcmolt_auto hdr;                    /**< Transport header. */
+    bcmolt_epon_denied_link_key key;    /**< Object key. */
+    bcmolt_epon_denied_link_overhead_profile_violation_data data;   /**< All properties that must be set by the user. */
+} bcmolt_epon_denied_link_overhead_profile_violation;
+
+/** Structure definition for the "range_violation" group of the 
+ * "epon_denied_link" object. 
+ *
+ * A link tried to register with a range value that was outside of the min/max 
+ * fiber length. 
+ */
+typedef struct bcmolt_epon_denied_link_range_violation_data
+{
+    bcmolt_range_status alarm_status;   /**< Alarm Status. */
+} bcmolt_epon_denied_link_range_violation_data;
+
+/** Transport message definition for "range_violation" group of 
+ * "epon_denied_link" object. 
+ */
+typedef struct bcmolt_epon_denied_link_range_violation
+{
+    bcmolt_auto hdr;                    /**< Transport header. */
+    bcmolt_epon_denied_link_key key;    /**< Object key. */
+    bcmolt_epon_denied_link_range_violation_data data;  /**< All properties that must be set by the user. */
+} bcmolt_epon_denied_link_range_violation;
+
+/** Structure definition for the "rogue_violation" group of the 
+ * "epon_denied_link" object. 
+ *
+ * A Rogue ONU was detected on this link/LLID.  
+ */
+typedef struct bcmolt_epon_denied_link_rogue_violation_data
+{
+    bcmolt_rogue_status alarm_status;   /**< Alarm Status. */
+} bcmolt_epon_denied_link_rogue_violation_data;
+
+/** Transport message definition for "rogue_violation" group of 
+ * "epon_denied_link" object. 
+ */
+typedef struct bcmolt_epon_denied_link_rogue_violation
+{
+    bcmolt_auto hdr;                    /**< Transport header. */
+    bcmolt_epon_denied_link_key key;    /**< Object key. */
+    bcmolt_epon_denied_link_rogue_violation_data data;  /**< All properties that must be set by the user. */
+} bcmolt_epon_denied_link_rogue_violation;
+
+/** Structure definition for the "system_resource_violation" group of the 
+ * "epon_denied_link" object. 
+ *
+ * A link tried to register and we were unable to allocate system resources for 
+ * it. 
+ */
+typedef struct bcmolt_epon_denied_link_system_resource_violation_data
+{
+    bcmolt_status alarm_status; /**< Alarm Status. */
+} bcmolt_epon_denied_link_system_resource_violation_data;
+
+/** Transport message definition for "system_resource_violation" group of 
+ * "epon_denied_link" object. 
+ */
+typedef struct bcmolt_epon_denied_link_system_resource_violation
+{
+    bcmolt_auto hdr;                    /**< Transport header. */
+    bcmolt_epon_denied_link_key key;    /**< Object key. */
+    bcmolt_epon_denied_link_system_resource_violation_data data;    /**< All properties that must be set by the user. */
+} bcmolt_epon_denied_link_system_resource_violation;
+
+/** Structure definition for the "tdm_channels_exhausted" group of the 
+ * "epon_denied_link" object. 
+ */
+typedef struct bcmolt_epon_denied_link_tdm_channels_exhausted_data
+{
+    bcmolt_status alarm_status; /**< Alarm Status. */
+} bcmolt_epon_denied_link_tdm_channels_exhausted_data;
+
+/** Transport message definition for "tdm_channels_exhausted" group of 
+ * "epon_denied_link" object. 
+ */
+typedef struct bcmolt_epon_denied_link_tdm_channels_exhausted
+{
+    bcmolt_auto hdr;                    /**< Transport header. */
+    bcmolt_epon_denied_link_key key;    /**< Object key. */
+    bcmolt_epon_denied_link_tdm_channels_exhausted_data data;   /**< All properties that must be set by the user. */
+} bcmolt_epon_denied_link_tdm_channels_exhausted;
+
+/** Structure definition for the "unknown_link_violation" group of the 
+ * "epon_denied_link" object. 
+ *
+ * A link tried to register while the PON was set to "notify unknown" 
+ * registration behavior and this link was not pre-provisioned. 
+ */
+typedef struct bcmolt_epon_denied_link_unknown_link_violation_data
+{
+    bcmolt_unknown_link_status alarm_status;    /**< Alarm Status. */
+} bcmolt_epon_denied_link_unknown_link_violation_data;
+
+/** Transport message definition for "unknown_link_violation" group of 
+ * "epon_denied_link" object. 
+ */
+typedef struct bcmolt_epon_denied_link_unknown_link_violation
+{
+    bcmolt_auto hdr;                    /**< Transport header. */
+    bcmolt_epon_denied_link_key key;    /**< Object key. */
+    bcmolt_epon_denied_link_unknown_link_violation_data data;   /**< All properties that must be set by the user. */
+} bcmolt_epon_denied_link_unknown_link_violation;
+
+/** Structure definition for the "upstream_bandwidth_violation" group of the 
+ * "epon_denied_link" object. 
+ *
+ * This link failed to register because there was insufficient upstream 
+ * bandwidth available to provide the default UBD. 
+ */
+typedef struct bcmolt_epon_denied_link_upstream_bandwidth_violation_data
+{
+    bcmolt_status alarm_status; /**< Alarm Status. */
+} bcmolt_epon_denied_link_upstream_bandwidth_violation_data;
+
+/** Transport message definition for "upstream_bandwidth_violation" group of 
+ * "epon_denied_link" object. 
+ */
+typedef struct bcmolt_epon_denied_link_upstream_bandwidth_violation
+{
+    bcmolt_auto hdr;                    /**< Transport header. */
+    bcmolt_epon_denied_link_key key;    /**< Object key. */
+    bcmolt_epon_denied_link_upstream_bandwidth_violation_data data; /**< All properties that must be set by the user. */
+} bcmolt_epon_denied_link_upstream_bandwidth_violation;
+
+/** Structure definition for the "auto_cfg" group of the "epon_denied_link" 
+ * object. 
+ */
+typedef struct bcmolt_epon_denied_link_auto_cfg_data
+{
+    bcmos_bool laser_on_off_violation;          /**< If true, indications of type "laser_on_off_violation" will be generated. */
+    bcmos_bool llid_pool_empty_violation;       /**< If true, indications of type "llid_pool_empty_violation" will be generated. */
+    bcmos_bool max_link_violation;              /**< If true, indications of type "max_link_violation" will be generated. */
+    bcmos_bool overhead_profile_violation;      /**< If true, indications of type "overhead_profile_violation" will be generated. */
+    bcmos_bool range_violation;                 /**< If true, indications of type "range_violation" will be generated. */
+    bcmos_bool rogue_violation;                 /**< If true, indications of type "rogue_violation" will be generated. */
+    bcmos_bool system_resource_violation;       /**< If true, indications of type "system_resource_violation" will be generated. */
+    bcmos_bool tdm_channels_exhausted;          /**< If true, indications of type "tdm_channels_exhausted" will be generated. */
+    bcmos_bool unknown_link_violation;          /**< If true, indications of type "unknown_link_violation" will be generated. */
+    bcmos_bool upstream_bandwidth_violation;    /**< If true, indications of type "upstream_bandwidth_violation" will be generated. */
+} bcmolt_epon_denied_link_auto_cfg_data;
+
+/** Transport message definition for "auto_cfg" group of "epon_denied_link" 
+ * object. 
+ */
+typedef struct bcmolt_epon_denied_link_auto_cfg
+{
+    bcmolt_auto_cfg hdr;                        /**< Transport header. */
+    bcmolt_epon_denied_link_key key;            /**< Object key. */
+    bcmolt_epon_denied_link_auto_cfg_data data; /**< All properties that must be set by the user. */
+} bcmolt_epon_denied_link_auto_cfg;
+
+/** Structure definition for the "key" group of the "epon_link" object. 
+ */
+typedef struct bcmolt_epon_link_key
+{
+    bcmolt_epon_ni epon_ni;         /**< Uniquely identifies the EPON NI containing the link. */
+    bcmos_mac_address mac_address;  /**< The MAC address associated with the EPON link. */
+} bcmolt_epon_link_key;
+
+/** Structure definition for the "cfg" group of the "epon_link" object. 
+ */
+typedef struct bcmolt_epon_link_cfg_data
+{
+    bcmolt_epon_link_rate link_rate;            /**< This link's downstream and upstream rate. */
+    bcmolt_epon_link_state_flags state_flags;   /**< EPON link state flags reflect the current status of the link.   Registered state flag is controled by the static registration operation for links on a protected-standby PON. */
+    bcmolt_epon_llid llid;                      /**< LLID associated with this link. */
+    bcmolt_time_quanta laser_on_time_tq;        /**< Laser-on time in time quanta. */
+    bcmolt_time_quanta laser_off_time_tq;       /**< Laser-off time in time quanta. */
+    bcmolt_time_quanta range_value_tq;          /**< Range value used for this link - in time quanta. */
+    bcmolt_meters distance;                     /**< Distance to the ONU (Differs from range value in that this ignores internal delays) */
+    bcmolt_epon_link_alarm_state alarm_state;   /**< The state of the alarms on this link. */
+    bcmolt_epon_tunnel_id tunnel_id;            /**< Upstream and downstream tunnel ID for this link. */
+    bcmolt_epon_onu_id onu_id;                  /**< ONU associated with this EPON link.  A value of 0xFF indicates that the link has not been associated with an ONU. */
+    bcmolt_epon_laser_overhead_parameters min_laser_overhead;   /**< For 1G ONUs ,these values will override the standard values of 32. */
+    bcmolt_epon_key_exchange_config key_exchange_config;        /**< Encryption key exchange configuration for this link. */
+    bcmolt_epon_encryption_config epon_encryption;              /**< Encryption configuration for this link. */
+    bcmolt_epon_link_fec_en fec_enable;                 /**< FEC enable state for this link. */
+    bcmolt_oam_heartbeat_config oam_heartbeat_config;   /**< OAM heartbeat configuration.  This includes the frame to transmit to the link, and the expected frame/mask from the ONU.   */
+    bcmolt_upstream_bandwidth_distribution upstream_bandwidth;  /**< Upstream Bandwidth. */
+    bcmolt_ubd_info ubd_info;           /**< Returns the actual values from the UBD. Useful if you want to see what value the firmware chose for a field set to 'automatic'. */
+    bcmos_bool clock_transport_enable;  /**< Whether or not to enable clock transport on this link. */
+    uint8_t pending_grants;             /**< The number of pending grants. */
+    bcmolt_epon_link_type link_type;    /**< Link Type. */
+} bcmolt_epon_link_cfg_data;
+
+/** Transport message definition for "cfg" group of "epon_link" object. 
+ */
+typedef struct bcmolt_epon_link_cfg
+{
+    bcmolt_cfg hdr;                 /**< Transport header. */
+    bcmolt_epon_link_key key;       /**< Object key. */
+    bcmolt_epon_link_cfg_data data; /**< All properties that must be set by the user. */
+} bcmolt_epon_link_cfg;
+
+/** Structure definition for the "stat" group of the "epon_link" object. 
+ */
+typedef struct bcmolt_epon_link_stat_data
+{
+    uint64_t rx_data_bytes;             /**< The number of data bytes received on this EPON link. */
+    uint64_t rx_data_frames;            /**< The number of data frames received on this EPON link. */
+    uint64_t rx_frames_64;              /**< The number of 64 byte frames received on this EPON Link */
+    uint64_t rx_frames_65_127;          /**< The number of 65 to 127 byte frames received on this EPON Link */
+    uint64_t rx_frames_128_255;         /**< The number of 128 to 255 byte frames received on this EPON Link */
+    uint64_t rx_frames_256_511;         /**< The number of 256 to 511 byte frames received on this EPON Link */
+    uint64_t rx_frames_512_1023;        /**< The number of 512 to 1023 byte frames received on this EPON Link */
+    uint64_t rx_frames_1024_1518;       /**< The number of 1024 to 1518 byte frames received on this EPON Link */
+    uint64_t rx_frames_1519_2047;       /**< The number of 1519 to 2047 byte frames received on this EPON Link */
+    uint64_t rx_frames_2048_4095;       /**< The number of 2048 to 4095 byte frames received on this EPON Link */
+    uint64_t rx_frames_4096_9216;       /**< The number of 4096 to 9216 byte frames received on this EPON Link */
+    uint64_t rx_frames_9217_16383;      /**< The number of 9217 to 16383 byte frames received on this EPON Link */
+    uint64_t rx_oam_bytes;              /**< The number of OAM bytes received on this EPON link. */
+    uint64_t rx_oam_frames;             /**< The number of OAM frames received on this EPON link. */
+    uint64_t rx_mpcp_frames;            /**< The number of MPCP frames received on this EPON link. */
+    uint64_t rx_broadcast_frames;       /**< The number of broadcast frames received on this EPON link. */
+    uint64_t rx_unicast_frames;         /**< The number of unicast frames received on this EPON link. */
+    uint64_t rx_multicast_frames;       /**< The number of multicast frames received on this EPON link. */
+    uint64_t rx_report_frames;          /**< The number of report frames received on this EPON link. */
+    uint64_t rx_fcs_error;              /**< The number of bad FCS errors received on this EPON Link */
+    uint64_t rx_oversize_error;         /**< The number of oversize errors received on this EPON Link */
+    uint64_t rx_runt_error;             /**< The number of runt errors received on this EPON Link */
+    uint64_t rx_line_code_error;        /**< The number of line code errors received on this EPON Link */
+    uint64_t rx_line_code_error_max;    /**< The number of line code errors max received on this EPON Link */
+    uint64_t tx_data_bytes;             /**< The number of data bytes transmitted on this EPON link. */
+    uint64_t tx_data_frames;            /**< The number of data frames transmitted on this EPON link. */
+    uint64_t tx_frames_64;              /**< The number of 64 byte frames transmitted on this EPON Link */
+    uint64_t tx_frames_65_127;          /**< The number of 65 to 127 byte frames transmitted on this EPON Link */
+    uint64_t tx_frames_128_255;         /**< The number of 128 to 255 byte frames transmitted on this EPON Link */
+    uint64_t tx_frames_256_511;         /**< The number of 256 to 511 byte frames transmitted on this EPON Link */
+    uint64_t tx_frames_512_1023;        /**< The number of 512 to 1023 byte frames transmitted on this EPON Link */
+    uint64_t tx_frames_1024_1518;       /**< The number of 1024 to 1518 byte frames transmitted on this EPON Link */
+    uint64_t tx_frames_1519_2047;       /**< The number of 1519 to 2047 byte frames transmitted on this EPON Link */
+    uint64_t tx_frames_2048_4095;       /**< The number of 2048 to 4095 byte frames transmitted on this EPON Link */
+    uint64_t tx_frames_4096_9216;       /**< The number of 4096 to 9216 byte frames transmitted on this EPON Link */
+    uint64_t tx_frames_9217_16383;      /**< The number of 9217 to 16383 byte frames transmitted on this EPON Link */
+    uint64_t tx_oam_bytes;              /**< The number of OAM bytes transmitted on this EPON link. */
+    uint64_t tx_oam_frames;             /**< The number of OAM frames transmitted on this EPON link. */
+    uint64_t tx_mpcp_frames;            /**< The number of MPCP frames transmitted on this EPON link. */
+    uint64_t tx_broadcast_frames;       /**< The number of broadcast frames transmitted on this EPON link. */
+    uint64_t tx_unicast_frames;         /**< The number of unicast frames transmitted on this EPON link. */
+    uint64_t tx_multicast_frames;       /**< The number of multicast frames transmitted on this EPON link. */
+    uint64_t tx_gates;                  /**< The number of gates transmitted on this EPON link. */
+} bcmolt_epon_link_stat_data;
+
+/** Transport message definition for "stat" group of "epon_link" object. 
+ */
+typedef struct bcmolt_epon_link_stat
+{
+    bcmolt_stat hdr;                    /**< Transport header. */
+    bcmolt_epon_link_key key;           /**< Object key. */
+    bcmolt_epon_link_stat_data data;    /**< All properties that must be set by the user. */
+} bcmolt_epon_link_stat;
+
+/** Structure definition for the "stat_cfg" group of the "epon_link" object. 
+ */
+typedef struct bcmolt_epon_link_stat_cfg_data
+{
+    bcmolt_stat_alarm_config cfg;   /**< Statistic alarm configuration. */
+} bcmolt_epon_link_stat_cfg_data;
+
+/** Transport message definition for "stat_cfg" group of "epon_link" object. 
+ */
+typedef struct bcmolt_epon_link_stat_cfg
+{
+    bcmolt_stat_cfg hdr;        /**< Transport header. */
+    bcmolt_epon_link_key key;   /**< Object key. */
+    bcmolt_epon_link_stat_cfg_data data;    /**< All properties that must be set by the user. */
+} bcmolt_epon_link_stat_cfg;
+
+/** Structure definition for the "duplicate_mpcp_registration_request" group of 
+ * the "epon_link" object. 
+ *
+ * A register requested was received for a link with the same MAC address as a 
+ * link that has already registered. 
+ */
+typedef struct bcmolt_epon_link_duplicate_mpcp_registration_request_data
+{
+    bcmolt_time_quanta initial_range_tq;    /**< Range as calculated from the first frame received. */
+    bcmolt_time_quanta current_range_tq;    /**< Range as calculated from the current frame. */
+} bcmolt_epon_link_duplicate_mpcp_registration_request_data;
+
+/** Transport message definition for "duplicate_mpcp_registration_request" group 
+ * of "epon_link" object. 
+ */
+typedef struct bcmolt_epon_link_duplicate_mpcp_registration_request
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_epon_link_key key;   /**< Object key. */
+    bcmolt_epon_link_duplicate_mpcp_registration_request_data data; /**< All properties that must be set by the user. */
+} bcmolt_epon_link_duplicate_mpcp_registration_request;
+
+/** Transport message definition for "encryption_enabled" group of "epon_link" 
+ * object. 
+ */
+typedef struct bcmolt_epon_link_encryption_enabled
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_epon_link_key key;   /**< Object key. */
+} bcmolt_epon_link_encryption_enabled;
+
+/** Structure definition for the "key_exchange_failure" group of the "epon_link" 
+ * object. 
+ *
+ * The OLT failed to receive an updated encryption key within the expected time 
+ * period after encryption key exchange has been initiated. 
+ */
+typedef struct bcmolt_epon_link_key_exchange_failure_data
+{
+    bcmolt_status alarm_status; /**< alarm status. */
+} bcmolt_epon_link_key_exchange_failure_data;
+
+/** Transport message definition for "key_exchange_failure" group of "epon_link" 
+ * object. 
+ */
+typedef struct bcmolt_epon_link_key_exchange_failure
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_epon_link_key key;   /**< Object key. */
+    bcmolt_epon_link_key_exchange_failure_data data;    /**< All properties that must be set by the user. */
+} bcmolt_epon_link_key_exchange_failure;
+
+/** Transport message definition for "key_exchange_started" group of "epon_link" 
+ * object. 
+ */
+typedef struct bcmolt_epon_link_key_exchange_started
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_epon_link_key key;   /**< Object key. */
+} bcmolt_epon_link_key_exchange_started;
+
+/** Transport message definition for "key_exchange_stopped" group of "epon_link" 
+ * object. 
+ */
+typedef struct bcmolt_epon_link_key_exchange_stopped
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_epon_link_key key;   /**< Object key. */
+} bcmolt_epon_link_key_exchange_stopped;
+
+/** Transport message definition for "link_deleted" group of "epon_link" object. 
+ */
+typedef struct bcmolt_epon_link_link_deleted
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_epon_link_key key;   /**< Object key. */
+} bcmolt_epon_link_link_deleted;
+
+/** Structure definition for the "link_speed_mismatch" group of the "epon_link" 
+ * object. 
+ *
+ * Host will receive this indication if a link registers then attempts to 
+ * register later at a different speed, or if the link registers at a different 
+ * speed than the speed with which it was pre-provisioned. 
+ */
+typedef struct bcmolt_epon_link_link_speed_mismatch_data
+{
+    bcmolt_epon_link_rate previous_rate;    /**< PON rate link initially registered */
+    bcmolt_epon_link_rate current_rate;     /**< PON rate link is currently attempting to register at */
+} bcmolt_epon_link_link_speed_mismatch_data;
+
+/** Transport message definition for "link_speed_mismatch" group of "epon_link" 
+ * object. 
+ */
+typedef struct bcmolt_epon_link_link_speed_mismatch
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_epon_link_key key;   /**< Object key. */
+    bcmolt_epon_link_link_speed_mismatch_data data; /**< All properties that must be set by the user. */
+} bcmolt_epon_link_link_speed_mismatch;
+
+/** Transport message definition for "mpcp_deregistered" group of "epon_link" 
+ * object. 
+ */
+typedef struct bcmolt_epon_link_mpcp_deregistered
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_epon_link_key key;   /**< Object key. */
+} bcmolt_epon_link_mpcp_deregistered;
+
+/** Structure definition for the "mpcp_discovered" group of the "epon_link" 
+ * object. 
+ *
+ * A link has completed MPCP link registration. 
+ */
+typedef struct bcmolt_epon_link_mpcp_discovered_data
+{
+    bcmolt_epon_link_info link_info;    /**< Information associated with the discovered link. */
+} bcmolt_epon_link_mpcp_discovered_data;
+
+/** Transport message definition for "mpcp_discovered" group of "epon_link" 
+ * object. 
+ */
+typedef struct bcmolt_epon_link_mpcp_discovered
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_epon_link_key key;   /**< Object key. */
+    bcmolt_epon_link_mpcp_discovered_data data; /**< All properties that must be set by the user. */
+} bcmolt_epon_link_mpcp_discovered;
+
+/** Transport message definition for "mpcp_reg_ack_timeout" group of "epon_link" 
+ * object. 
+ */
+typedef struct bcmolt_epon_link_mpcp_reg_ack_timeout
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_epon_link_key key;   /**< Object key. */
+} bcmolt_epon_link_mpcp_reg_ack_timeout;
+
+/** Structure definition for the "mpcp_report_timeout" group of the "epon_link" 
+ * object. 
+ *
+ * The provisioned limit between reports for the specified link has been 
+ * exceeded.  This link will be de-registered, and the alarm_status set when 
+ * this occurs.  The alarm_status will be cleared when the link attempts to 
+ * register again. 
+ */
+typedef struct bcmolt_epon_link_mpcp_report_timeout_data
+{
+    bcmolt_status alarm_status; /**< Alarm Status. */
+} bcmolt_epon_link_mpcp_report_timeout_data;
+
+/** Transport message definition for "mpcp_report_timeout" group of "epon_link" 
+ * object. 
+ */
+typedef struct bcmolt_epon_link_mpcp_report_timeout
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_epon_link_key key;   /**< Object key. */
+    bcmolt_epon_link_mpcp_report_timeout_data data; /**< All properties that must be set by the user. */
+} bcmolt_epon_link_mpcp_report_timeout;
+
+/** Structure definition for the "oam_keepalive_timeout" group of the 
+ * "epon_link" object. 
+ *
+ * The provisioned time limit between receiving upstream info frames has been 
+ * exceeded.  Normally an ONU will reset its OAM state machine when this 
+ * occurrs and the host must re-negotiate OAM and reprovision the link. 
+ */
+typedef struct bcmolt_epon_link_oam_keepalive_timeout_data
+{
+    bcmolt_status alarm_status; /**< Alarm Status. */
+} bcmolt_epon_link_oam_keepalive_timeout_data;
+
+/** Transport message definition for "oam_keepalive_timeout" group of 
+ * "epon_link" object. 
+ */
+typedef struct bcmolt_epon_link_oam_keepalive_timeout
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_epon_link_key key;   /**< Object key. */
+    bcmolt_epon_link_oam_keepalive_timeout_data data;   /**< All properties that must be set by the user. */
+} bcmolt_epon_link_oam_keepalive_timeout;
+
+/** Transport message definition for "oam_keepalive_timer_started" group of 
+ * "epon_link" object. 
+ */
+typedef struct bcmolt_epon_link_oam_keepalive_timer_started
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_epon_link_key key;   /**< Object key. */
+} bcmolt_epon_link_oam_keepalive_timer_started;
+
+/** Transport message definition for "oam_keepalive_timer_stopped" group of 
+ * "epon_link" object. 
+ */
+typedef struct bcmolt_epon_link_oam_keepalive_timer_stopped
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_epon_link_key key;   /**< Object key. */
+} bcmolt_epon_link_oam_keepalive_timer_stopped;
+
+/** Structure definition for the "preprovisioned_link_created" group of the 
+ * "epon_link" object. 
+ *
+ * Raised after an 'add_link' operation on an EPON NI completes successfully 
+ */
+typedef struct bcmolt_epon_link_preprovisioned_link_created_data
+{
+    bcmolt_epon_link_info link_info;    /**< Information associated with the link. */
+} bcmolt_epon_link_preprovisioned_link_created_data;
+
+/** Transport message definition for "preprovisioned_link_created" group of 
+ * "epon_link" object. 
+ */
+typedef struct bcmolt_epon_link_preprovisioned_link_created
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_epon_link_key key;   /**< Object key. */
+    bcmolt_epon_link_preprovisioned_link_created_data data; /**< All properties that must be set by the user. */
+} bcmolt_epon_link_preprovisioned_link_created;
+
+/** Structure definition for the "protection_switch_occurred" group of the 
+ * "epon_link" object. 
+ *
+ * The link has undergone a protection switch event. 
+ */
+typedef struct bcmolt_epon_link_protection_switch_occurred_data
+{
+    bcmolt_epon_protection_state protection_status; /**< The link's post-switch role (working or standby). */
+    bcmolt_time_quanta range_value_tq;              /**< Current range value in time quanta. */
+} bcmolt_epon_link_protection_switch_occurred_data;
+
+/** Transport message definition for "protection_switch_occurred" group of 
+ * "epon_link" object. 
+ */
+typedef struct bcmolt_epon_link_protection_switch_occurred
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_epon_link_key key;   /**< Object key. */
+    bcmolt_epon_link_protection_switch_occurred_data data;  /**< All properties that must be set by the user. */
+} bcmolt_epon_link_protection_switch_occurred;
+
+/** Structure definition for the "range_value_changed" group of the "epon_link" 
+ * object. 
+ *
+ * Indication sent when a range value has been changed. 
+ */
+typedef struct bcmolt_epon_link_range_value_changed_data
+{
+    bcmolt_time_quanta range_value_tq;  /**< New range value. */
+} bcmolt_epon_link_range_value_changed_data;
+
+/** Transport message definition for "range_value_changed" group of "epon_link" 
+ * object. 
+ */
+typedef struct bcmolt_epon_link_range_value_changed
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_epon_link_key key;   /**< Object key. */
+    bcmolt_epon_link_range_value_changed_data data; /**< All properties that must be set by the user. */
+} bcmolt_epon_link_range_value_changed;
+
+/** Transport message definition for "rerange_failure" group of "epon_link" 
+ * object. 
+ */
+typedef struct bcmolt_epon_link_rerange_failure
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_epon_link_key key;   /**< Object key. */
+} bcmolt_epon_link_rerange_failure;
+
+/** Structure definition for the "stat_alarm_cleared" group of the "epon_link" 
+ * object. 
+ *
+ * Sent when a configured statistic alarm condition is no longer met. 
+ */
+typedef struct bcmolt_epon_link_stat_alarm_cleared_data
+{
+    bcmolt_epon_link_stat_id stat;  /**< Statistic identifier. */
+} bcmolt_epon_link_stat_alarm_cleared_data;
+
+/** Transport message definition for "stat_alarm_cleared" group of "epon_link" 
+ * object. 
+ */
+typedef struct bcmolt_epon_link_stat_alarm_cleared
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_epon_link_key key;   /**< Object key. */
+    bcmolt_epon_link_stat_alarm_cleared_data data;  /**< All properties that must be set by the user. */
+} bcmolt_epon_link_stat_alarm_cleared;
+
+/** Structure definition for the "stat_alarm_raised" group of the "epon_link" 
+ * object. 
+ *
+ * Sent when a configured statistic alarm condition has been met. 
+ */
+typedef struct bcmolt_epon_link_stat_alarm_raised_data
+{
+    bcmolt_epon_link_stat_id stat;  /**< Statistic identifier. */
+} bcmolt_epon_link_stat_alarm_raised_data;
+
+/** Transport message definition for "stat_alarm_raised" group of "epon_link" 
+ * object. 
+ */
+typedef struct bcmolt_epon_link_stat_alarm_raised
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_epon_link_key key;   /**< Object key. */
+    bcmolt_epon_link_stat_alarm_raised_data data;   /**< All properties that must be set by the user. */
+} bcmolt_epon_link_stat_alarm_raised;
+
+/** Transport message definition for "static_registration_done" group of 
+ * "epon_link" object. 
+ */
+typedef struct bcmolt_epon_link_static_registration_done
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_epon_link_key key;   /**< Object key. */
+} bcmolt_epon_link_static_registration_done;
+
+/** Structure definition for the "auto_cfg" group of the "epon_link" object. 
+ */
+typedef struct bcmolt_epon_link_auto_cfg_data
+{
+    bcmos_bool duplicate_mpcp_registration_request; /**< If true, indications of type "duplicate_mpcp_registration_request" will be generated. */
+    bcmos_bool encryption_enabled;                  /**< If true, indications of type "encryption_enabled" will be generated. */
+    bcmos_bool key_exchange_failure;                /**< If true, indications of type "key_exchange_failure" will be generated. */
+    bcmos_bool key_exchange_started;                /**< If true, indications of type "key_exchange_started" will be generated. */
+    bcmos_bool key_exchange_stopped;                /**< If true, indications of type "key_exchange_stopped" will be generated. */
+    bcmos_bool link_deleted;                        /**< If true, indications of type "link_deleted" will be generated. */
+    bcmos_bool link_speed_mismatch;                 /**< If true, indications of type "link_speed_mismatch" will be generated. */
+    bcmos_bool mpcp_deregistered;                   /**< If true, indications of type "mpcp_deregistered" will be generated. */
+    bcmos_bool mpcp_discovered;                     /**< If true, indications of type "mpcp_discovered" will be generated. */
+    bcmos_bool mpcp_reg_ack_timeout;                /**< If true, indications of type "mpcp_reg_ack_timeout" will be generated. */
+    bcmos_bool mpcp_report_timeout;                 /**< If true, indications of type "mpcp_report_timeout" will be generated. */
+    bcmos_bool oam_keepalive_timeout;               /**< If true, indications of type "oam_keepalive_timeout" will be generated. */
+    bcmos_bool oam_keepalive_timer_started;         /**< If true, indications of type "oam_keepalive_timer_started" will be generated. */
+    bcmos_bool oam_keepalive_timer_stopped;         /**< If true, indications of type "oam_keepalive_timer_stopped" will be generated. */
+    bcmos_bool preprovisioned_link_created;         /**< If true, indications of type "preprovisioned_link_created" will be generated. */
+    bcmos_bool protection_switch_occurred;          /**< If true, indications of type "protection_switch_occurred" will be generated. */
+    bcmos_bool range_value_changed;                 /**< If true, indications of type "range_value_changed" will be generated. */
+    bcmos_bool rerange_failure;                     /**< If true, indications of type "rerange_failure" will be generated. */
+    bcmos_bool stat_alarm_cleared;                  /**< If true, indications of type "stat_alarm_cleared" will be generated. */
+    bcmos_bool stat_alarm_raised;                   /**< If true, indications of type "stat_alarm_raised" will be generated. */
+    bcmos_bool static_registration_done;            /**< If true, indications of type "static_registration_done" will be generated. */
+} bcmolt_epon_link_auto_cfg_data;
+
+/** Transport message definition for "auto_cfg" group of "epon_link" object. 
+ */
+typedef struct bcmolt_epon_link_auto_cfg
+{
+    bcmolt_auto_cfg hdr;                    /**< Transport header. */
+    bcmolt_epon_link_key key;               /**< Object key. */
+    bcmolt_epon_link_auto_cfg_data data;    /**< All properties that must be set by the user. */
+} bcmolt_epon_link_auto_cfg;
+
+/** Transport message definition for "delete_link" group of "epon_link" object. 
+ */
+typedef struct bcmolt_epon_link_delete_link
+{
+    bcmolt_oper hdr;            /**< Transport header. */
+    bcmolt_epon_link_key key;   /**< Object key. */
+} bcmolt_epon_link_delete_link;
+
+/** Transport message definition for "force_rediscovery" group of "epon_link" 
+ * object. 
+ */
+typedef struct bcmolt_epon_link_force_rediscovery
+{
+    bcmolt_oper hdr;            /**< Transport header. */
+    bcmolt_epon_link_key key;   /**< Object key. */
+} bcmolt_epon_link_force_rediscovery;
+
+/** Structure definition for the "key_exchange_start" group of the "epon_link" 
+ * object. 
+ *
+ * Apply the corresponding provisioning for 'epon_link.key_exchange_config' 
+ * against this link and then start key exchange timer with the given period. 
+ */
+typedef struct bcmolt_epon_link_key_exchange_start_data
+{
+    uint16_t period;    /**< Key exchange period in seconds. */
+} bcmolt_epon_link_key_exchange_start_data;
+
+/** Transport message definition for "key_exchange_start" group of "epon_link" 
+ * object. 
+ */
+typedef struct bcmolt_epon_link_key_exchange_start
+{
+    bcmolt_oper hdr;            /**< Transport header. */
+    bcmolt_epon_link_key key;   /**< Object key. */
+    bcmolt_epon_link_key_exchange_start_data data;  /**< All properties that must be set by the user. */
+} bcmolt_epon_link_key_exchange_start;
+
+/** Transport message definition for "key_exchange_stop" group of "epon_link" 
+ * object. 
+ */
+typedef struct bcmolt_epon_link_key_exchange_stop
+{
+    bcmolt_oper hdr;            /**< Transport header. */
+    bcmolt_epon_link_key key;   /**< Object key. */
+} bcmolt_epon_link_key_exchange_stop;
+
+/** Structure definition for the "oam_keepalive_timer_start" group of the 
+ * "epon_link" object. 
+ *
+ * Start the OAM keepalive timer against this link. 
+ */
+typedef struct bcmolt_epon_link_oam_keepalive_timer_start_data
+{
+    uint16_t send_period;   /**< The period at which to send OAM info frames (in seconds). */
+} bcmolt_epon_link_oam_keepalive_timer_start_data;
+
+/** Transport message definition for "oam_keepalive_timer_start" group of 
+ * "epon_link" object. 
+ */
+typedef struct bcmolt_epon_link_oam_keepalive_timer_start
+{
+    bcmolt_oper hdr;            /**< Transport header. */
+    bcmolt_epon_link_key key;   /**< Object key. */
+    bcmolt_epon_link_oam_keepalive_timer_start_data data;   /**< All properties that must be set by the user. */
+} bcmolt_epon_link_oam_keepalive_timer_start;
+
+/** Transport message definition for "oam_keepalive_timer_stop" group of 
+ * "epon_link" object. 
+ */
+typedef struct bcmolt_epon_link_oam_keepalive_timer_stop
+{
+    bcmolt_oper hdr;            /**< Transport header. */
+    bcmolt_epon_link_key key;   /**< Object key. */
+} bcmolt_epon_link_oam_keepalive_timer_stop;
+
+/** Structure definition for the "static_registration" group of the "epon_link" 
+ * object. 
+ *
+ * Statically registers the logical link 
+ */
+typedef struct bcmolt_epon_link_static_registration_data
+{
+    bcmolt_time_quanta laseron_time_tq;     /**< Laser-on time in time quanta.\ */
+    bcmolt_time_quanta laseroff_time_tq;    /**< Laser-off time in time quanta. */
+    bcmolt_time_quanta range_value_tq;      /**< Range value used for this link - in time quanta. */
+    uint8_t pending_grants;                 /**< The number of pending grants. */
+} bcmolt_epon_link_static_registration_data;
+
+/** Transport message definition for "static_registration" group of "epon_link" 
+ * object. 
+ */
+typedef struct bcmolt_epon_link_static_registration
+{
+    bcmolt_oper hdr;            /**< Transport header. */
+    bcmolt_epon_link_key key;   /**< Object key. */
+    bcmolt_epon_link_static_registration_data data; /**< All properties that must be set by the user. */
+} bcmolt_epon_link_static_registration;
+
+/** Structure definition for the "inject_frame" group of the "epon_link" object. 
+ *
+ * Send an arbitrary frame across the specified link. 
+ */
+typedef struct bcmolt_epon_link_inject_frame_data
+{
+    bcmolt_ethernet_frame_unmasked frame;   /**< Complete contents of the frame beginning with the DA up through but not including the CRC. */
+} bcmolt_epon_link_inject_frame_data;
+
+/** Transport message definition for "inject_frame" group of "epon_link" object. 
+ */
+typedef struct bcmolt_epon_link_inject_frame
+{
+    bcmolt_proxy hdr;           /**< Transport header. */
+    bcmolt_epon_link_key key;   /**< Object key. */
+    bcmolt_epon_link_inject_frame_data data;    /**< All properties that must be set by the user. */
+} bcmolt_epon_link_inject_frame;
+
+/** Structure definition for the "frame_captured" group of the "epon_link" 
+ * object. 
+ *
+ * A frame matching host-specified criteria was received. 
+ */
+typedef struct bcmolt_epon_link_frame_captured_data
+{
+    bcmolt_u8_list_u32 frame;   /**< Contents of the frame. */
+} bcmolt_epon_link_frame_captured_data;
+
+/** Transport message definition for "frame_captured" group of "epon_link" 
+ * object. 
+ */
+typedef struct bcmolt_epon_link_frame_captured
+{
+    bcmolt_proxy_rx hdr;                        /**< Transport header. */
+    bcmolt_epon_link_key key;                   /**< Object key. */
+    bcmolt_epon_link_frame_captured_data data;  /**< All properties that must be set by the user. */
+} bcmolt_epon_link_frame_captured;
+
+/** Structure definition for the "key" group of the "epon_ni" object. 
+ */
+typedef struct bcmolt_epon_ni_key
+{
+    bcmolt_epon_ni epon_ni; /**< The index of a specific EPON NI instance as seen by the host. */
+} bcmolt_epon_ni_key;
+
+/** Structure definition for the "cfg" group of the "epon_ni" object. 
+ */
+typedef struct bcmolt_epon_ni_cfg_data
+{
+    bcmos_mac_address mac_address;      /**< The MAC address used for all frames generated by the OLT on the PON.  This value must be set before EPON_NI is first enabled, and cannot be changed while the EPON_NI is enabled. */
+    bcmolt_epon_ni_en_state epon_ni_en; /**< Indicates the enable state of the EPON NI. */
+    bcmolt_registration_behavior registration_behavior; /**< Determines how registration requests from unknown links are handled.  Set to 'Notify Unknown' to force all links to be pre-provisioned.  If in 'Notify Unknown' mode, MPCP Registration of an unknown link will be denied, and a 'White List Violation" will be sent to the host. If set to 'Automatic', the link registers fully without host interaction.  */
+    uint16_t mtu_1g;                        /**< Maximum frame size (including FCS) on the 1G path. This attribute cannot be changed on an enabled EPON_NI. This attribute cannot be an odd value. */
+    uint16_t mtu_10g;                       /**< Maximum frame size (including FCS) on the 10G path. This attribute cannot be changed on an enabled EPON_NI. This attribute cannot be an odd value. */
+    bcmolt_meters minimum_fiber_length;     /**< The minimum fiber length, in meters, at which we expect to find an ONU. Notes: The difference between the minimum and maximum fiber length cannot exceed 100 km. This attribute cannot be changed on an enabled EPON_NI. Some ONUs can register at distances that are less than the provisioned minimum. */
+    bcmolt_meters maximum_fiber_length;     /**< The maximum fiber length, in meters, at which we expect to find an ONU. Notes: The difference between the minimum and maximum fiber length cannot exceed 100 km. This attribute cannot be changed on an enabled EPON_NI. Some ONUs can register at distances that are greater than the provisioned maximum. */
+    bcmolt_time_quanta grant_spacing_tq;    /**< The dead time on the PON between upstream bursts.  This attribute cannot be changed on an enabled EPON_NI. */
+    bcmolt_epon_logical_link_options epon_logical_link_options; /**< Configuration related to EPON links registration and reporting. This value cannot be changed on an enabled EPON_NI. */
+    uint32_t mpcp_discovery_period_ms;              /**< Period of MPCP discovery windows.  In this time period, one discovery gate will be sent for every enabled RP.  The discovery gates will be spaced equally across the time period. */
+    bcmolt_epon_ni_alarm_state alarm_state;         /**< The state of the alarms on this EPON NI. */
+    bcmolt_macaddress_list_u32_max_2048 all_links;  /**< List of all links on the EPON NI. */
+    bcmolt_epon_ni_encryption_cfg encryption_cfg;   /**< Encryption configuration that applies to the EPON NI as a whole. */
+    bcmolt_epon_protection_switching_configuration protection_switching_cfg;    /**< Protection switching configuration. */
+    bcmolt_epon_clock_transport_configuration clock_transport_cfg;              /**< Clock transport configuration. */
+#define BCMOLT_EPON_NI_CFG_DATA_DROPDOWN_WEIGHTS_LEN    7
+    bcmolt_arr_u16_7 dropdown_weights;                  /**< The solicited scheduling drop down weights for priorities 0-6 (percentages relative to that priority). Priority 7 has no drop-down, as it is the lowest priority. The drop-down weights are how much bandwidth to allocate to solicited schedulers at the next lower priority level (even when elements at this level are still active).  This is NOT the percentage allocated to the drop down, it is the ratio between a priority and its dropdown */
+#define BCMOLT_EPON_NI_CFG_DATA_APPROXIMATE_SOLICITED_USAGE_LEN 8
+    bcmolt_arr_bounds_8 approximate_solicited_usage;    /**< The approximate percentage of the PON time necessary to schedule all elements at or above each priority. */
+    uint32_t approximate_tdm_usage;                     /**< The approximate percentage of the PON time necessary to accomodate all TDM grants. */
+    uint16_t no_reports_soak_time;                      /**< Period of time after last report received to send no reports alarm (in ms). */
+    bcmolt_pon_aggregate_shaper pon_aggregate_shaper;   /**< PON Aggregate Shaper. */
+#define BCMOLT_EPON_NI_CFG_DATA_ESTIMATED_PON_LATENCY_TQ_LEN    8
+    bcmolt_arr_bounds_8 estimated_pon_latency_tq;       /**< The estimated time between when the OLT receives a non-zero report from an ONU and when the OLT will generate a grant to that ONU for each priority level. */
+    bcmolt_epon_onu_upgrade_params onu_upgrade_params;  /**< ONU upgrade params. */
+    bcmos_bool auto_rogue_detect_10g_en;                /**< Enable 10G Autonomous Rogue Dection during discovery window */
+    bcmos_bool auto_rogue_detect_1g_en;                 /**< Enable 1G Autonomous Rogue Dection during discovery window */
+    uint8_t auto_rogue_detect_10g_threshold;            /**< Set threshold for number of SyncPatterns received without a Burst Delimiter to trigger the fault. */
+} bcmolt_epon_ni_cfg_data;
+
+/** Transport message definition for "cfg" group of "epon_ni" object. 
+ */
+typedef struct bcmolt_epon_ni_cfg
+{
+    bcmolt_cfg hdr;                 /**< Transport header. */
+    bcmolt_epon_ni_key key;         /**< Object key. */
+    bcmolt_epon_ni_cfg_data data;   /**< All properties that must be set by the user. */
+} bcmolt_epon_ni_cfg;
+
+/** Transport message definition for "auto_rogue_scan_10g_failure" group of 
+ * "epon_ni" object. 
+ */
+typedef struct bcmolt_epon_ni_auto_rogue_scan_10g_failure
+{
+    bcmolt_auto hdr;        /**< Transport header. */
+    bcmolt_epon_ni_key key; /**< Object key. */
+} bcmolt_epon_ni_auto_rogue_scan_10g_failure;
+
+/** Transport message definition for "auto_rogue_scan_1g_failure" group of 
+ * "epon_ni" object. 
+ */
+typedef struct bcmolt_epon_ni_auto_rogue_scan_1g_failure
+{
+    bcmolt_auto hdr;        /**< Transport header. */
+    bcmolt_epon_ni_key key; /**< Object key. */
+} bcmolt_epon_ni_auto_rogue_scan_1g_failure;
+
+/** Structure definition for the "llid_quarantined" group of the "epon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_epon_ni_llid_quarantined_data
+{
+    bcmolt_epon_llid llid;              /**< LLID. */
+    bcmolt_epon_link_rate link_rate;    /**< Link Rate. */
+    bcmos_mac_address link_mac;         /**< Link MAC. */
+    bcmolt_time_quanta range_value_tq;  /**< Range value in time quanta. */
+} bcmolt_epon_ni_llid_quarantined_data;
+
+/** Transport message definition for "llid_quarantined" group of "epon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_epon_ni_llid_quarantined
+{
+    bcmolt_auto hdr;        /**< Transport header. */
+    bcmolt_epon_ni_key key; /**< Object key. */
+    bcmolt_epon_ni_llid_quarantined_data data;  /**< All properties that must be set by the user. */
+} bcmolt_epon_ni_llid_quarantined;
+
+/** Structure definition for the "mpcp_timestamp_changed" group of the "epon_ni" 
+ * object. 
+ *
+ * A clock transport pulse was received at the given MPCP timestamp. 
+ */
+typedef struct bcmolt_epon_ni_mpcp_timestamp_changed_data
+{
+    uint32_t mpcp_timestamp;    /**< The MPCP time at which the pulse was received. */
+} bcmolt_epon_ni_mpcp_timestamp_changed_data;
+
+/** Transport message definition for "mpcp_timestamp_changed" group of "epon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_epon_ni_mpcp_timestamp_changed
+{
+    bcmolt_auto hdr;        /**< Transport header. */
+    bcmolt_epon_ni_key key; /**< Object key. */
+    bcmolt_epon_ni_mpcp_timestamp_changed_data data;    /**< All properties that must be set by the user. */
+} bcmolt_epon_ni_mpcp_timestamp_changed;
+
+/** Structure definition for the "no_reports" group of the "epon_ni" object. 
+ *
+ * Loss of all reports on all links on the EPON NI 
+ */
+typedef struct bcmolt_epon_ni_no_reports_data
+{
+    bcmolt_status alarm_status; /**< Alarm Status. */
+} bcmolt_epon_ni_no_reports_data;
+
+/** Transport message definition for "no_reports" group of "epon_ni" object. 
+ */
+typedef struct bcmolt_epon_ni_no_reports
+{
+    bcmolt_auto hdr;                        /**< Transport header. */
+    bcmolt_epon_ni_key key;                 /**< Object key. */
+    bcmolt_epon_ni_no_reports_data data;    /**< All properties that must be set by the user. */
+} bcmolt_epon_ni_no_reports;
+
+/** Structure definition for the "onu_upgrade_complete" group of the "epon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_epon_ni_onu_upgrade_complete_data
+{
+    bcmos_bool status;  /**< Success or failure.  Against entire upgrade process. */
+    bcmolt_epon_onu_upgrade_status_list_u32 list_of_failed_entities;    /**< List of ONU-IDs the upgrade failed for. */
+} bcmolt_epon_ni_onu_upgrade_complete_data;
+
+/** Transport message definition for "onu_upgrade_complete" group of "epon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_epon_ni_onu_upgrade_complete
+{
+    bcmolt_auto hdr;        /**< Transport header. */
+    bcmolt_epon_ni_key key; /**< Object key. */
+    bcmolt_epon_ni_onu_upgrade_complete_data data;  /**< All properties that must be set by the user. */
+} bcmolt_epon_ni_onu_upgrade_complete;
+
+/** Transport message definition for "rerange_failure" group of "epon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_epon_ni_rerange_failure
+{
+    bcmolt_auto hdr;        /**< Transport header. */
+    bcmolt_epon_ni_key key; /**< Object key. */
+} bcmolt_epon_ni_rerange_failure;
+
+/** Structure definition for the "rogue_scan_complete" group of the "epon_ni" 
+ * object. 
+ *
+ * Indciation that a scan is complete, any error is also returned.  
+ */
+typedef struct bcmolt_epon_ni_rogue_scan_complete_data
+{
+    bcmolt_rogue_scan_status return_ind_status; /**< Status of completed scan. */
+} bcmolt_epon_ni_rogue_scan_complete_data;
+
+/** Transport message definition for "rogue_scan_complete" group of "epon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_epon_ni_rogue_scan_complete
+{
+    bcmolt_auto hdr;        /**< Transport header. */
+    bcmolt_epon_ni_key key; /**< Object key. */
+    bcmolt_epon_ni_rogue_scan_complete_data data;   /**< All properties that must be set by the user. */
+} bcmolt_epon_ni_rogue_scan_complete;
+
+/** Structure definition for the "rssi_measurement_completed" group of the 
+ * "epon_ni" object. 
+ */
+typedef struct bcmolt_epon_ni_rssi_measurement_completed_data
+{
+    bcmolt_result status;       /**< status. */
+    bcmolt_epon_llid llid;      /**< LLID. */
+    bcmos_mac_address link_mac; /**< Link MAC . */
+} bcmolt_epon_ni_rssi_measurement_completed_data;
+
+/** Transport message definition for "rssi_measurement_completed" group of 
+ * "epon_ni" object. 
+ */
+typedef struct bcmolt_epon_ni_rssi_measurement_completed
+{
+    bcmolt_auto hdr;        /**< Transport header. */
+    bcmolt_epon_ni_key key; /**< Object key. */
+    bcmolt_epon_ni_rssi_measurement_completed_data data;    /**< All properties that must be set by the user. */
+} bcmolt_epon_ni_rssi_measurement_completed;
+
+/** Structure definition for the "state_change_completed" group of the "epon_ni" 
+ * object. 
+ *
+ * Sent after a 'set_epon_ni_en_state' operation has completed. 
+ */
+typedef struct bcmolt_epon_ni_state_change_completed_data
+{
+    bcmolt_epon_ni_en_state new_state;  /**< New EPON NI enable state. */
+} bcmolt_epon_ni_state_change_completed_data;
+
+/** Transport message definition for "state_change_completed" group of "epon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_epon_ni_state_change_completed
+{
+    bcmolt_auto hdr;        /**< Transport header. */
+    bcmolt_epon_ni_key key; /**< Object key. */
+    bcmolt_epon_ni_state_change_completed_data data;    /**< All properties that must be set by the user. */
+} bcmolt_epon_ni_state_change_completed;
+
+/** Structure definition for the "auto_cfg" group of the "epon_ni" object. 
+ */
+typedef struct bcmolt_epon_ni_auto_cfg_data
+{
+    bcmos_bool auto_rogue_scan_10g_failure; /**< If true, indications of type "auto_rogue_scan_10g_failure" will be generated. */
+    bcmos_bool auto_rogue_scan_1g_failure;  /**< If true, indications of type "auto_rogue_scan_1g_failure" will be generated. */
+    bcmos_bool llid_quarantined;            /**< If true, indications of type "llid_quarantined" will be generated. */
+    bcmos_bool mpcp_timestamp_changed;      /**< If true, indications of type "mpcp_timestamp_changed" will be generated. */
+    bcmos_bool no_reports;                  /**< If true, indications of type "no_reports" will be generated. */
+    bcmos_bool onu_upgrade_complete;        /**< If true, indications of type "onu_upgrade_complete" will be generated. */
+    bcmos_bool rerange_failure;             /**< If true, indications of type "rerange_failure" will be generated. */
+    bcmos_bool rogue_scan_complete;         /**< If true, indications of type "rogue_scan_complete" will be generated. */
+    bcmos_bool rssi_measurement_completed;  /**< If true, indications of type "rssi_measurement_completed" will be generated. */
+    bcmos_bool state_change_completed;      /**< If true, indications of type "state_change_completed" will be generated. */
+} bcmolt_epon_ni_auto_cfg_data;
+
+/** Transport message definition for "auto_cfg" group of "epon_ni" object. 
+ */
+typedef struct bcmolt_epon_ni_auto_cfg
+{
+    bcmolt_auto_cfg hdr;                /**< Transport header. */
+    bcmolt_epon_ni_key key;             /**< Object key. */
+    bcmolt_epon_ni_auto_cfg_data data;  /**< All properties that must be set by the user. */
+} bcmolt_epon_ni_auto_cfg;
+
+/** Structure definition for the "add_link" group of the "epon_ni" object. 
+ *
+ * Pre-provision an EPON link. 
+ */
+typedef struct bcmolt_epon_ni_add_link_data
+{
+    bcmos_mac_address mac_address;  /**< The MAC address of the EPON link. */
+    bcmolt_epon_link_rate rate;     /**< Rate of link to pre-provision. */
+} bcmolt_epon_ni_add_link_data;
+
+/** Transport message definition for "add_link" group of "epon_ni" object. 
+ */
+typedef struct bcmolt_epon_ni_add_link
+{
+    bcmolt_oper hdr;                    /**< Transport header. */
+    bcmolt_epon_ni_key key;             /**< Object key. */
+    bcmolt_epon_ni_add_link_data data;  /**< All properties that must be set by the user. */
+} bcmolt_epon_ni_add_link;
+
+/** Structure definition for the "add_multicast_link" group of the "epon_ni" 
+ * object. 
+ *
+ * Pre-provision an EPON multicast link. 
+ */
+typedef struct bcmolt_epon_ni_add_multicast_link_data
+{
+    bcmos_mac_address mac_address;  /**< The MAC address of the EPON link. */
+    bcmolt_epon_link_rate rate;     /**< Rate of link to pre-provision. */
+} bcmolt_epon_ni_add_multicast_link_data;
+
+/** Transport message definition for "add_multicast_link" group of "epon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_epon_ni_add_multicast_link
+{
+    bcmolt_oper hdr;        /**< Transport header. */
+    bcmolt_epon_ni_key key; /**< Object key. */
+    bcmolt_epon_ni_add_multicast_link_data data;    /**< All properties that must be set by the user. */
+} bcmolt_epon_ni_add_multicast_link;
+
+/** Structure definition for the "add_protected_standby_link" group of the 
+ * "epon_ni" object. 
+ *
+ * Adds a protected standby link.  Once it has been created, the link is 
+ * considered "standby" for the puposes of protection switching. 
+ */
+typedef struct bcmolt_epon_ni_add_protected_standby_link_data
+{
+    bcmos_mac_address mac_address;              /**< The MAC address of the EPON link. */
+    bcmolt_epon_link_info working_link_info;    /**< Link info for the associated working link. */
+} bcmolt_epon_ni_add_protected_standby_link_data;
+
+/** Transport message definition for "add_protected_standby_link" group of 
+ * "epon_ni" object. 
+ */
+typedef struct bcmolt_epon_ni_add_protected_standby_link
+{
+    bcmolt_oper hdr;        /**< Transport header. */
+    bcmolt_epon_ni_key key; /**< Object key. */
+    bcmolt_epon_ni_add_protected_standby_link_data data;    /**< All properties that must be set by the user. */
+} bcmolt_epon_ni_add_protected_standby_link;
+
+/** Structure definition for the "issue_rssi_grant" group of the "epon_ni" 
+ * object. 
+ *
+ * Issues an RSSI grant to read RX Power 
+ */
+typedef struct bcmolt_epon_ni_issue_rssi_grant_data
+{
+    bcmos_mac_address granted_link; /**< Logical link to grant, which should either be associated with a particular unicast link of interest on the PON or, 0 for idle power measurement. 0 will use a link that will not result in upstream transmission by any device on the PON. */
+    uint16_t trigger_width;         /**< RSSI Trigger Width (Tw) in ns, Desired width of RSSI Trigger based on the Optical Module Specifications. */
+    uint16_t trigger_delay;         /**< RSSI Trigger Delay(Td), in ns, for this link to meet the (Td) delay timing requirement of the Optical Module Specifications. */
+    uint16_t sample_period;         /**< Sample period in us, internal I2C hold/prohibit time where access to device is not allowed. */
+} bcmolt_epon_ni_issue_rssi_grant_data;
+
+/** Transport message definition for "issue_rssi_grant" group of "epon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_epon_ni_issue_rssi_grant
+{
+    bcmolt_oper hdr;        /**< Transport header. */
+    bcmolt_epon_ni_key key; /**< Object key. */
+    bcmolt_epon_ni_issue_rssi_grant_data data;  /**< All properties that must be set by the user. */
+} bcmolt_epon_ni_issue_rssi_grant;
+
+/** Structure definition for the "protection_switching_apply_rerange_delta" 
+ * group of the "epon_ni" object. 
+ */
+typedef struct bcmolt_epon_ni_protection_switching_apply_rerange_delta_data
+{
+    uint32_t rerange_delta; /**< Re-range delta. */
+} bcmolt_epon_ni_protection_switching_apply_rerange_delta_data;
+
+/** Transport message definition for "protection_switching_apply_rerange_delta" 
+ * group of "epon_ni" object. 
+ */
+typedef struct bcmolt_epon_ni_protection_switching_apply_rerange_delta
+{
+    bcmolt_oper hdr;        /**< Transport header. */
+    bcmolt_epon_ni_key key; /**< Object key. */
+    bcmolt_epon_ni_protection_switching_apply_rerange_delta_data data;  /**< All properties that must be set by the user. */
+} bcmolt_epon_ni_protection_switching_apply_rerange_delta;
+
+/** Structure definition for the "rogue_llid_scan" group of the "epon_ni" 
+ * object. 
+ *
+ * Issue a request to scan all LLIDs or a specific LLID on a PON 
+ */
+typedef struct bcmolt_epon_ni_rogue_llid_scan_data
+{
+    bcmos_bool mode;        /**< True = Scan all LLIDS on the PON */
+    bcmolt_epon_llid llid;  /**< Specific LLID to scan or 0 to scan all when mode is ALL */
+} bcmolt_epon_ni_rogue_llid_scan_data;
+
+/** Transport message definition for "rogue_llid_scan" group of "epon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_epon_ni_rogue_llid_scan
+{
+    bcmolt_oper hdr;        /**< Transport header. */
+    bcmolt_epon_ni_key key; /**< Object key. */
+    bcmolt_epon_ni_rogue_llid_scan_data data;   /**< All properties that must be set by the user. */
+} bcmolt_epon_ni_rogue_llid_scan;
+
+/** Structure definition for the "set_epon_ni_en_state" group of the "epon_ni" 
+ * object. 
+ *
+ * Set the EPON NI enable state. 
+ */
+typedef struct bcmolt_epon_ni_set_epon_ni_en_state_data
+{
+    bcmolt_epon_ni_en_state new_state;  /**< New EPON NI enable state. */
+} bcmolt_epon_ni_set_epon_ni_en_state_data;
+
+/** Transport message definition for "set_epon_ni_en_state" group of "epon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_epon_ni_set_epon_ni_en_state
+{
+    bcmolt_oper hdr;        /**< Transport header. */
+    bcmolt_epon_ni_key key; /**< Object key. */
+    bcmolt_epon_ni_set_epon_ni_en_state_data data;  /**< All properties that must be set by the user. */
+} bcmolt_epon_ni_set_epon_ni_en_state;
+
+/** Structure definition for the "start_onu_upgrade" group of the "epon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_epon_ni_start_onu_upgrade_data
+{
+    bcmolt_macaddress_list_u32 list_of_onu_ids; /**< List of ONUs to upgrade the firmware. */
+} bcmolt_epon_ni_start_onu_upgrade_data;
+
+/** Transport message definition for "start_onu_upgrade" group of "epon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_epon_ni_start_onu_upgrade
+{
+    bcmolt_oper hdr;        /**< Transport header. */
+    bcmolt_epon_ni_key key; /**< Object key. */
+    bcmolt_epon_ni_start_onu_upgrade_data data; /**< All properties that must be set by the user. */
+} bcmolt_epon_ni_start_onu_upgrade;
+
+/** Structure definition for the "key" group of the "epon_onu_10g_us" object. 
+ */
+typedef struct bcmolt_epon_onu_10g_us_key
+{
+    bcmolt_epon_ni epon_ni;     /**< EPON NI with which this ONU interface is associated. */
+    bcmolt_epon_onu_id onu_id;  /**< Unique identifier of the ONU interface within its EPON NI. */
+} bcmolt_epon_onu_10g_us_key;
+
+/** Structure definition for the "cfg" group of the "epon_onu_10g_us" object. 
+ */
+typedef struct bcmolt_epon_onu_10g_us_cfg_data
+{
+    bcmolt_macaddress_list_u32_max_2048 all_links;  /**< List of MAC Addresses for all links on the ONU Id. */
+} bcmolt_epon_onu_10g_us_cfg_data;
+
+/** Transport message definition for "cfg" group of "epon_onu_10g_us" object. 
+ */
+typedef struct bcmolt_epon_onu_10g_us_cfg
+{
+    bcmolt_cfg hdr;                 /**< Transport header. */
+    bcmolt_epon_onu_10g_us_key key; /**< Object key. */
+    bcmolt_epon_onu_10g_us_cfg_data data;   /**< All properties that must be set by the user. */
+} bcmolt_epon_onu_10g_us_cfg;
+
+/** Structure definition for the "stat" group of the "epon_onu_10g_us" object. 
+ */
+typedef struct bcmolt_epon_onu_10g_us_stat_data
+{
+    uint64_t fec_code_words_total;          /**< FEC stats code words total */
+    uint64_t fec_code_words_decode_fails;   /**< FEC stats code words decode fails */
+    uint64_t fec_zeroes_corrected;          /**< FEC stats zeros corrected */
+    uint64_t fec_ones_corrected;            /**< FEC stats ones corected */
+} bcmolt_epon_onu_10g_us_stat_data;
+
+/** Transport message definition for "stat" group of "epon_onu_10g_us" object. 
+ */
+typedef struct bcmolt_epon_onu_10g_us_stat
+{
+    bcmolt_stat hdr;                        /**< Transport header. */
+    bcmolt_epon_onu_10g_us_key key;         /**< Object key. */
+    bcmolt_epon_onu_10g_us_stat_data data;  /**< All properties that must be set by the user. */
+} bcmolt_epon_onu_10g_us_stat;
+
+/** Structure definition for the "stat_cfg" group of the "epon_onu_10g_us" 
+ * object. 
+ */
+typedef struct bcmolt_epon_onu_10g_us_stat_cfg_data
+{
+    bcmolt_stat_alarm_config cfg;   /**< Statistic alarm configuration. */
+} bcmolt_epon_onu_10g_us_stat_cfg_data;
+
+/** Transport message definition for "stat_cfg" group of "epon_onu_10g_us" 
+ * object. 
+ */
+typedef struct bcmolt_epon_onu_10g_us_stat_cfg
+{
+    bcmolt_stat_cfg hdr;            /**< Transport header. */
+    bcmolt_epon_onu_10g_us_key key; /**< Object key. */
+    bcmolt_epon_onu_10g_us_stat_cfg_data data;  /**< All properties that must be set by the user. */
+} bcmolt_epon_onu_10g_us_stat_cfg;
+
+/** Structure definition for the "stat_alarm_cleared" group of the 
+ * "epon_onu_10g_us" object. 
+ *
+ * Sent when a configured statistic alarm condition is no longer met. 
+ */
+typedef struct bcmolt_epon_onu_10g_us_stat_alarm_cleared_data
+{
+    bcmolt_epon_onu_10g_us_stat_id stat;    /**< Statistic identifier. */
+} bcmolt_epon_onu_10g_us_stat_alarm_cleared_data;
+
+/** Transport message definition for "stat_alarm_cleared" group of 
+ * "epon_onu_10g_us" object. 
+ */
+typedef struct bcmolt_epon_onu_10g_us_stat_alarm_cleared
+{
+    bcmolt_auto hdr;                /**< Transport header. */
+    bcmolt_epon_onu_10g_us_key key; /**< Object key. */
+    bcmolt_epon_onu_10g_us_stat_alarm_cleared_data data;    /**< All properties that must be set by the user. */
+} bcmolt_epon_onu_10g_us_stat_alarm_cleared;
+
+/** Structure definition for the "stat_alarm_raised" group of the 
+ * "epon_onu_10g_us" object. 
+ *
+ * Sent when a configured statistic alarm condition has been met. 
+ */
+typedef struct bcmolt_epon_onu_10g_us_stat_alarm_raised_data
+{
+    bcmolt_epon_onu_10g_us_stat_id stat;    /**< Statistic identifier. */
+} bcmolt_epon_onu_10g_us_stat_alarm_raised_data;
+
+/** Transport message definition for "stat_alarm_raised" group of 
+ * "epon_onu_10g_us" object. 
+ */
+typedef struct bcmolt_epon_onu_10g_us_stat_alarm_raised
+{
+    bcmolt_auto hdr;                /**< Transport header. */
+    bcmolt_epon_onu_10g_us_key key; /**< Object key. */
+    bcmolt_epon_onu_10g_us_stat_alarm_raised_data data; /**< All properties that must be set by the user. */
+} bcmolt_epon_onu_10g_us_stat_alarm_raised;
+
+/** Structure definition for the "auto_cfg" group of the "epon_onu_10g_us" 
+ * object. 
+ */
+typedef struct bcmolt_epon_onu_10g_us_auto_cfg_data
+{
+    bcmos_bool stat_alarm_cleared;  /**< If true, indications of type "stat_alarm_cleared" will be generated. */
+    bcmos_bool stat_alarm_raised;   /**< If true, indications of type "stat_alarm_raised" will be generated. */
+} bcmolt_epon_onu_10g_us_auto_cfg_data;
+
+/** Transport message definition for "auto_cfg" group of "epon_onu_10g_us" 
+ * object. 
+ */
+typedef struct bcmolt_epon_onu_10g_us_auto_cfg
+{
+    bcmolt_auto_cfg hdr;                        /**< Transport header. */
+    bcmolt_epon_onu_10g_us_key key;             /**< Object key. */
+    bcmolt_epon_onu_10g_us_auto_cfg_data data;  /**< All properties that must be set by the user. */
+} bcmolt_epon_onu_10g_us_auto_cfg;
+
+/** Structure definition for the "key" group of the "epon_onu_1g_us" object. 
+ */
+typedef struct bcmolt_epon_onu_1g_us_key
+{
+    bcmolt_epon_ni epon_ni;     /**< EPON NI with which this ONU interface is associated. */
+    bcmolt_epon_onu_id onu_id;  /**< Unique identifier of the ONU interface within its EPON NI. */
+} bcmolt_epon_onu_1g_us_key;
+
+/** Structure definition for the "cfg" group of the "epon_onu_1g_us" object. 
+ */
+typedef struct bcmolt_epon_onu_1g_us_cfg_data
+{
+    bcmolt_macaddress_list_u32 all_links;   /**< List of MAC Addresses for all links on the ONU Id. */
+} bcmolt_epon_onu_1g_us_cfg_data;
+
+/** Transport message definition for "cfg" group of "epon_onu_1g_us" object. 
+ */
+typedef struct bcmolt_epon_onu_1g_us_cfg
+{
+    bcmolt_cfg hdr;                 /**< Transport header. */
+    bcmolt_epon_onu_1g_us_key key;  /**< Object key. */
+    bcmolt_epon_onu_1g_us_cfg_data data;    /**< All properties that must be set by the user. */
+} bcmolt_epon_onu_1g_us_cfg;
+
+/** Structure definition for the "stat" group of the "epon_onu_1g_us" object. 
+ */
+typedef struct bcmolt_epon_onu_1g_us_stat_data
+{
+    uint64_t good_frames;           /**< Good Frame Count, including nonFEC and FEC */
+    uint64_t good_bytes;            /**< Good Byte Count, including nonFEC and FEC */
+    uint64_t oversz_frames;         /**< Oversized frame count (frames larger than 2000 bytes) */
+    uint64_t non_fec_good_frames;   /**< Non FEC Good Frame Count */
+    uint64_t non_fec_good_bytes;    /**< Non FEC Good Byte Count */
+    uint64_t fec_good_frames;       /**< FEC Good Frame Count */
+    uint64_t fec_good_bytes;        /**< FEC Good Byte Count */
+    uint64_t fec_frames_exc_errs;   /**< FEC Frames which exceeded 8 symbol errors */
+    uint64_t fec_blks_no_errs;      /**< FEC Blocks with no errors */
+    uint64_t fec_blks_corr_errs;    /**< FEC Blocks with correctable errors */
+    uint64_t fec_blks_uncorr_errs;  /**< FEC Blocks with uncorrectable errors */
+    uint64_t fec_corr_bytes;        /**< FEC Corrected Bytes/Symbols */
+    uint64_t fec_corr_zeroes;       /**< FEC Corrected Zeroes, 8b domain */
+    uint64_t fec_corr_ones;         /**< FEC Corrected Ones, 8b domain */
+    uint64_t undersz_frames;        /**< Undersize frame count (frames less than 64 bytes) */
+    uint64_t errorsz_frames;        /**< Errored frame  */
+} bcmolt_epon_onu_1g_us_stat_data;
+
+/** Transport message definition for "stat" group of "epon_onu_1g_us" object. 
+ */
+typedef struct bcmolt_epon_onu_1g_us_stat
+{
+    bcmolt_stat hdr;                        /**< Transport header. */
+    bcmolt_epon_onu_1g_us_key key;          /**< Object key. */
+    bcmolt_epon_onu_1g_us_stat_data data;   /**< All properties that must be set by the user. */
+} bcmolt_epon_onu_1g_us_stat;
+
+/** Structure definition for the "stat_cfg" group of the "epon_onu_1g_us" 
+ * object. 
+ */
+typedef struct bcmolt_epon_onu_1g_us_stat_cfg_data
+{
+    bcmolt_stat_alarm_config cfg;   /**< Statistic alarm configuration. */
+} bcmolt_epon_onu_1g_us_stat_cfg_data;
+
+/** Transport message definition for "stat_cfg" group of "epon_onu_1g_us" 
+ * object. 
+ */
+typedef struct bcmolt_epon_onu_1g_us_stat_cfg
+{
+    bcmolt_stat_cfg hdr;            /**< Transport header. */
+    bcmolt_epon_onu_1g_us_key key;  /**< Object key. */
+    bcmolt_epon_onu_1g_us_stat_cfg_data data;   /**< All properties that must be set by the user. */
+} bcmolt_epon_onu_1g_us_stat_cfg;
+
+/** Structure definition for the "stat_alarm_cleared" group of the 
+ * "epon_onu_1g_us" object. 
+ *
+ * Sent when a configured statistic alarm condition is no longer met. 
+ */
+typedef struct bcmolt_epon_onu_1g_us_stat_alarm_cleared_data
+{
+    bcmolt_epon_onu_1g_us_stat_id stat; /**< Statistic identifier. */
+} bcmolt_epon_onu_1g_us_stat_alarm_cleared_data;
+
+/** Transport message definition for "stat_alarm_cleared" group of 
+ * "epon_onu_1g_us" object. 
+ */
+typedef struct bcmolt_epon_onu_1g_us_stat_alarm_cleared
+{
+    bcmolt_auto hdr;                /**< Transport header. */
+    bcmolt_epon_onu_1g_us_key key;  /**< Object key. */
+    bcmolt_epon_onu_1g_us_stat_alarm_cleared_data data; /**< All properties that must be set by the user. */
+} bcmolt_epon_onu_1g_us_stat_alarm_cleared;
+
+/** Structure definition for the "stat_alarm_raised" group of the 
+ * "epon_onu_1g_us" object. 
+ *
+ * Sent when a configured statistic alarm condition has been met. 
+ */
+typedef struct bcmolt_epon_onu_1g_us_stat_alarm_raised_data
+{
+    bcmolt_epon_onu_1g_us_stat_id stat; /**< Statistic identifier. */
+} bcmolt_epon_onu_1g_us_stat_alarm_raised_data;
+
+/** Transport message definition for "stat_alarm_raised" group of 
+ * "epon_onu_1g_us" object. 
+ */
+typedef struct bcmolt_epon_onu_1g_us_stat_alarm_raised
+{
+    bcmolt_auto hdr;                /**< Transport header. */
+    bcmolt_epon_onu_1g_us_key key;  /**< Object key. */
+    bcmolt_epon_onu_1g_us_stat_alarm_raised_data data;  /**< All properties that must be set by the user. */
+} bcmolt_epon_onu_1g_us_stat_alarm_raised;
+
+/** Structure definition for the "auto_cfg" group of the "epon_onu_1g_us" 
+ * object. 
+ */
+typedef struct bcmolt_epon_onu_1g_us_auto_cfg_data
+{
+    bcmos_bool stat_alarm_cleared;  /**< If true, indications of type "stat_alarm_cleared" will be generated. */
+    bcmos_bool stat_alarm_raised;   /**< If true, indications of type "stat_alarm_raised" will be generated. */
+} bcmolt_epon_onu_1g_us_auto_cfg_data;
+
+/** Transport message definition for "auto_cfg" group of "epon_onu_1g_us" 
+ * object. 
+ */
+typedef struct bcmolt_epon_onu_1g_us_auto_cfg
+{
+    bcmolt_auto_cfg hdr;                        /**< Transport header. */
+    bcmolt_epon_onu_1g_us_key key;              /**< Object key. */
+    bcmolt_epon_onu_1g_us_auto_cfg_data data;   /**< All properties that must be set by the user. */
+} bcmolt_epon_onu_1g_us_auto_cfg;
+
+/** Structure definition for the "key" group of the "epon_path_10g_ds" object. 
+ */
+typedef struct bcmolt_epon_path_10g_ds_key
+{
+    bcmolt_epon_ni epon_ni; /**< EPON NI associated with this 10G downstream path. */
+} bcmolt_epon_path_10g_ds_key;
+
+/** Structure definition for the "cfg" group of the "epon_path_10g_ds" object. 
+ */
+typedef struct bcmolt_epon_path_10g_ds_cfg_data
+{
+    bcmolt_epon_fec_en_state fec_state; /**< FEC enable state for the 10G downstream path on this EPON NI.  This attribute cannot be changed while the EPON_NI is enabled. */
+    bcmolt_prbs_generator_config prbs_generator;    /**< DS PRBS generator configuration */
+} bcmolt_epon_path_10g_ds_cfg_data;
+
+/** Transport message definition for "cfg" group of "epon_path_10g_ds" object. 
+ */
+typedef struct bcmolt_epon_path_10g_ds_cfg
+{
+    bcmolt_cfg hdr;                     /**< Transport header. */
+    bcmolt_epon_path_10g_ds_key key;    /**< Object key. */
+    bcmolt_epon_path_10g_ds_cfg_data data;  /**< All properties that must be set by the user. */
+} bcmolt_epon_path_10g_ds_cfg;
+
+/** Structure definition for the "stat" group of the "epon_path_10g_ds" object. 
+ */
+typedef struct bcmolt_epon_path_10g_ds_stat_data
+{
+    uint64_t bytes;             /**< The number of bytes transmitted on this 10g downstream path. */
+    uint64_t frames;            /**< The number of frames transmitted on this 10g downstream path. */
+    uint64_t frames_64;         /**< The number of 64 byte frames transmitted on this 10g downstream path. */
+    uint64_t frames_65_127;     /**< The number of 65 to 127 byte frames transmitted on this 10g downstream path. */
+    uint64_t frames_128_255;    /**< The number of 128 to 255 byte frames transmitted on this 10g downstream path. */
+    uint64_t frames_256_511;    /**< The number of 256 to 511 byte frames transmitted on this 10g downstream path. */
+    uint64_t frames_512_1023;   /**< The number of 512 to 1023 byte frames transmitted on this 10g downstream path. */
+    uint64_t frames_1024_1518;  /**< The number of 1024 to 1518 byte frames transmitted on this 10g downstream path. */
+    uint64_t frames_1519_2047;  /**< The number of 1519 to 2047 byte frames transmitted on this 10g downstream path. */
+    uint64_t frames_2048_4095;  /**< The number of 2048 to 4095 byte frames transmitted on this 10g downstream path. */
+    uint64_t frames_4096_9216;  /**< The number of 4096 to 9216 byte frames transmitted on this 10g downstream path. */
+    uint64_t frames_9217_16383; /**< The number of 9217 to 16383 byte frames transmitted on this 10g downstream path. */
+    uint64_t broadcast_frames;  /**< The number of broadcast frames transmitted on this 10g downstream path. */
+    uint64_t data_bytes;        /**< The number of data bytes transmitted on this 10g downstream path. */
+    uint64_t multicast_frames;  /**< The number of multicast frames transmitted on this 10g downstream path. */
+    uint64_t unicast_frames;    /**< The number of unicast frames transmitted on this 10g downstream path. */
+    uint64_t oam_bytes;         /**< Number of OAM bytes transmitted on this 10g downstream path. */
+    uint64_t oam_frames;        /**< Number of OAM frames transmitted on this 10g downstream path. */
+    uint64_t gate_frames;       /**< Number of gate frames transmitted on this 10g downstream path. */
+    uint64_t mpcp_frames;       /**< Number of MPCP frames transmitted on this 10g downstream path. */
+    uint64_t abort_frames;      /**< Number of abort frames transmitted on this 10g downstream path. */
+} bcmolt_epon_path_10g_ds_stat_data;
+
+/** Transport message definition for "stat" group of "epon_path_10g_ds" object. 
+ */
+typedef struct bcmolt_epon_path_10g_ds_stat
+{
+    bcmolt_stat hdr;                    /**< Transport header. */
+    bcmolt_epon_path_10g_ds_key key;    /**< Object key. */
+    bcmolt_epon_path_10g_ds_stat_data data; /**< All properties that must be set by the user. */
+} bcmolt_epon_path_10g_ds_stat;
+
+/** Structure definition for the "stat_cfg" group of the "epon_path_10g_ds" 
+ * object. 
+ */
+typedef struct bcmolt_epon_path_10g_ds_stat_cfg_data
+{
+    bcmolt_stat_alarm_config cfg;   /**< Statistic alarm configuration. */
+} bcmolt_epon_path_10g_ds_stat_cfg_data;
+
+/** Transport message definition for "stat_cfg" group of "epon_path_10g_ds" 
+ * object. 
+ */
+typedef struct bcmolt_epon_path_10g_ds_stat_cfg
+{
+    bcmolt_stat_cfg hdr;                        /**< Transport header. */
+    bcmolt_epon_path_10g_ds_key key;            /**< Object key. */
+    bcmolt_epon_path_10g_ds_stat_cfg_data data; /**< All properties that must be set by the user. */
+} bcmolt_epon_path_10g_ds_stat_cfg;
+
+/** Structure definition for the "stat_alarm_cleared" group of the 
+ * "epon_path_10g_ds" object. 
+ *
+ * Sent when a configured statistic alarm condition is no longer met. 
+ */
+typedef struct bcmolt_epon_path_10g_ds_stat_alarm_cleared_data
+{
+    bcmolt_epon_path_10g_ds_stat_id stat;   /**< Statistic identifier. */
+} bcmolt_epon_path_10g_ds_stat_alarm_cleared_data;
+
+/** Transport message definition for "stat_alarm_cleared" group of 
+ * "epon_path_10g_ds" object. 
+ */
+typedef struct bcmolt_epon_path_10g_ds_stat_alarm_cleared
+{
+    bcmolt_auto hdr;                    /**< Transport header. */
+    bcmolt_epon_path_10g_ds_key key;    /**< Object key. */
+    bcmolt_epon_path_10g_ds_stat_alarm_cleared_data data;   /**< All properties that must be set by the user. */
+} bcmolt_epon_path_10g_ds_stat_alarm_cleared;
+
+/** Structure definition for the "stat_alarm_raised" group of the 
+ * "epon_path_10g_ds" object. 
+ *
+ * Sent when a configured statistic alarm condition has been met. 
+ */
+typedef struct bcmolt_epon_path_10g_ds_stat_alarm_raised_data
+{
+    bcmolt_epon_path_10g_ds_stat_id stat;   /**< Statistic identifier. */
+} bcmolt_epon_path_10g_ds_stat_alarm_raised_data;
+
+/** Transport message definition for "stat_alarm_raised" group of 
+ * "epon_path_10g_ds" object. 
+ */
+typedef struct bcmolt_epon_path_10g_ds_stat_alarm_raised
+{
+    bcmolt_auto hdr;                    /**< Transport header. */
+    bcmolt_epon_path_10g_ds_key key;    /**< Object key. */
+    bcmolt_epon_path_10g_ds_stat_alarm_raised_data data;    /**< All properties that must be set by the user. */
+} bcmolt_epon_path_10g_ds_stat_alarm_raised;
+
+/** Structure definition for the "auto_cfg" group of the "epon_path_10g_ds" 
+ * object. 
+ */
+typedef struct bcmolt_epon_path_10g_ds_auto_cfg_data
+{
+    bcmos_bool stat_alarm_cleared;  /**< If true, indications of type "stat_alarm_cleared" will be generated. */
+    bcmos_bool stat_alarm_raised;   /**< If true, indications of type "stat_alarm_raised" will be generated. */
+} bcmolt_epon_path_10g_ds_auto_cfg_data;
+
+/** Transport message definition for "auto_cfg" group of "epon_path_10g_ds" 
+ * object. 
+ */
+typedef struct bcmolt_epon_path_10g_ds_auto_cfg
+{
+    bcmolt_auto_cfg hdr;                        /**< Transport header. */
+    bcmolt_epon_path_10g_ds_key key;            /**< Object key. */
+    bcmolt_epon_path_10g_ds_auto_cfg_data data; /**< All properties that must be set by the user. */
+} bcmolt_epon_path_10g_ds_auto_cfg;
+
+/** Structure definition for the "key" group of the "epon_path_10g_us" object. 
+ */
+typedef struct bcmolt_epon_path_10g_us_key
+{
+    bcmolt_epon_ni epon_ni; /**< EPON NI associated with this 10G upstream path. */
+} bcmolt_epon_path_10g_us_key;
+
+/** Structure definition for the "cfg" group of the "epon_path_10g_us" object. 
+ */
+typedef struct bcmolt_epon_path_10g_us_cfg_data
+{
+    bcmolt_epon_fec_en_state fec_state;         /**< FEC enable state for the 10G upstream path on this EPON NI.  This attribute cannot be changed while the EPON_NI is enabled. */
+    bcmolt_time_quanta sync_time_tq;            /**< Time quanta of sync at start of US burst.  This attribute cannot be changed while the EPON_NI is enabled. */
+    bcmolt_prbs_checker_config prbs_checker;    /**< US PRBS checker configuration */
+    bcmolt_prbs_status prbs_status;             /**< Result of US PRBS checker */
+} bcmolt_epon_path_10g_us_cfg_data;
+
+/** Transport message definition for "cfg" group of "epon_path_10g_us" object. 
+ */
+typedef struct bcmolt_epon_path_10g_us_cfg
+{
+    bcmolt_cfg hdr;                     /**< Transport header. */
+    bcmolt_epon_path_10g_us_key key;    /**< Object key. */
+    bcmolt_epon_path_10g_us_cfg_data data;  /**< All properties that must be set by the user. */
+} bcmolt_epon_path_10g_us_cfg;
+
+/** Structure definition for the "stat" group of the "epon_path_10g_us" object. 
+ */
+typedef struct bcmolt_epon_path_10g_us_stat_data
+{
+    uint64_t bytes;             /**< The number of bytes received on this 10g upstream path. */
+    uint64_t frames;            /**< The number of frames received on this 10g upstream path. */
+    uint64_t frames_64;         /**< The number of 64 byte frames received on this 10g upstream path. */
+    uint64_t frames_65_127;     /**< The number of 65 to 127 byte frames received on this 10g upstream path. */
+    uint64_t frames_128_255;    /**< The number of 128 to 255 byte frames received on this 10g upstream path. */
+    uint64_t frames_256_511;    /**< The number of 256 to 511 byte frames received on this 10g upstream path. */
+    uint64_t frames_512_1023;   /**< The number of 512 to 1023 byte frames received on this 10g upstream path. */
+    uint64_t frames_1024_1518;  /**< The number of 1024 to 1518 byte frames received on this 10g upstream path. */
+    uint64_t frames_1519_2047;  /**< The number of 1519 to 2047 byte frames received on this 10g upstream path. */
+    uint64_t frames_2048_4095;  /**< The number of 2048 to 4095 byte frames received on this 10g upstream path. */
+    uint64_t frames_4096_9216;  /**< The number of 4096 to 9216 byte frames received on this 10g upstream path. */
+    uint64_t frames_9217_16383; /**< The number of 9217 to 16383 byte frames received on this 10g upstream path. */
+    uint64_t broadcast_frames;  /**< The number of broadcast frames received on this 10g upstream path. */
+    uint64_t data_bytes;        /**< The number of data bytes received on this 10g upstream path. */
+    uint64_t multicast_frames;  /**< The number of multicast frames received on this 10g upstream path. */
+    uint64_t unicast_frames;    /**< The number of unicast frames received on this 10g upstream path. */
+    uint64_t mpcp_frames;       /**< The number of MPCP frames received on this 10g upstream path. */
+    uint64_t oam_bytes;         /**< The number of OAM bytes received on this 10g upstream path. */
+    uint64_t oam_frames;        /**< The number of OAM frames received on this 10g upstream path. */
+    uint64_t report_frames;     /**< The number of report frames received on this 10g upstream path. */
+    uint64_t abort_frames;      /**< The number of abort frames received on this 10g upstream path. */
+    uint64_t fcs_error;         /**< The number of bad FCS errors received on this 10g upstream path. */
+    uint64_t crc_8_error;       /**< The number of CRC8 errors received on this 10g upstream path. */
+    uint64_t out_of_slot;       /**< The number of out of slot errors received on this 10g upstream path. */
+    uint64_t oversize_error;    /**< The number of oversize errors received on this 10g upstream path. */
+    uint64_t runt_error;        /**< The number of runt errors received on this 10g upstream path. */
+} bcmolt_epon_path_10g_us_stat_data;
+
+/** Transport message definition for "stat" group of "epon_path_10g_us" object. 
+ */
+typedef struct bcmolt_epon_path_10g_us_stat
+{
+    bcmolt_stat hdr;                    /**< Transport header. */
+    bcmolt_epon_path_10g_us_key key;    /**< Object key. */
+    bcmolt_epon_path_10g_us_stat_data data; /**< All properties that must be set by the user. */
+} bcmolt_epon_path_10g_us_stat;
+
+/** Structure definition for the "stat_cfg" group of the "epon_path_10g_us" 
+ * object. 
+ */
+typedef struct bcmolt_epon_path_10g_us_stat_cfg_data
+{
+    bcmolt_stat_alarm_config cfg;   /**< Statistic alarm configuration. */
+} bcmolt_epon_path_10g_us_stat_cfg_data;
+
+/** Transport message definition for "stat_cfg" group of "epon_path_10g_us" 
+ * object. 
+ */
+typedef struct bcmolt_epon_path_10g_us_stat_cfg
+{
+    bcmolt_stat_cfg hdr;                        /**< Transport header. */
+    bcmolt_epon_path_10g_us_key key;            /**< Object key. */
+    bcmolt_epon_path_10g_us_stat_cfg_data data; /**< All properties that must be set by the user. */
+} bcmolt_epon_path_10g_us_stat_cfg;
+
+/** Structure definition for the "stat_alarm_cleared" group of the 
+ * "epon_path_10g_us" object. 
+ *
+ * Sent when a configured statistic alarm condition is no longer met. 
+ */
+typedef struct bcmolt_epon_path_10g_us_stat_alarm_cleared_data
+{
+    bcmolt_epon_path_10g_us_stat_id stat;   /**< Statistic identifier. */
+} bcmolt_epon_path_10g_us_stat_alarm_cleared_data;
+
+/** Transport message definition for "stat_alarm_cleared" group of 
+ * "epon_path_10g_us" object. 
+ */
+typedef struct bcmolt_epon_path_10g_us_stat_alarm_cleared
+{
+    bcmolt_auto hdr;                    /**< Transport header. */
+    bcmolt_epon_path_10g_us_key key;    /**< Object key. */
+    bcmolt_epon_path_10g_us_stat_alarm_cleared_data data;   /**< All properties that must be set by the user. */
+} bcmolt_epon_path_10g_us_stat_alarm_cleared;
+
+/** Structure definition for the "stat_alarm_raised" group of the 
+ * "epon_path_10g_us" object. 
+ *
+ * Sent when a configured statistic alarm condition has been met. 
+ */
+typedef struct bcmolt_epon_path_10g_us_stat_alarm_raised_data
+{
+    bcmolt_epon_path_10g_us_stat_id stat;   /**< Statistic identifier. */
+} bcmolt_epon_path_10g_us_stat_alarm_raised_data;
+
+/** Transport message definition for "stat_alarm_raised" group of 
+ * "epon_path_10g_us" object. 
+ */
+typedef struct bcmolt_epon_path_10g_us_stat_alarm_raised
+{
+    bcmolt_auto hdr;                    /**< Transport header. */
+    bcmolt_epon_path_10g_us_key key;    /**< Object key. */
+    bcmolt_epon_path_10g_us_stat_alarm_raised_data data;    /**< All properties that must be set by the user. */
+} bcmolt_epon_path_10g_us_stat_alarm_raised;
+
+/** Structure definition for the "auto_cfg" group of the "epon_path_10g_us" 
+ * object. 
+ */
+typedef struct bcmolt_epon_path_10g_us_auto_cfg_data
+{
+    bcmos_bool stat_alarm_cleared;  /**< If true, indications of type "stat_alarm_cleared" will be generated. */
+    bcmos_bool stat_alarm_raised;   /**< If true, indications of type "stat_alarm_raised" will be generated. */
+} bcmolt_epon_path_10g_us_auto_cfg_data;
+
+/** Transport message definition for "auto_cfg" group of "epon_path_10g_us" 
+ * object. 
+ */
+typedef struct bcmolt_epon_path_10g_us_auto_cfg
+{
+    bcmolt_auto_cfg hdr;                        /**< Transport header. */
+    bcmolt_epon_path_10g_us_key key;            /**< Object key. */
+    bcmolt_epon_path_10g_us_auto_cfg_data data; /**< All properties that must be set by the user. */
+} bcmolt_epon_path_10g_us_auto_cfg;
+
+/** Structure definition for the "key" group of the "epon_path_1g_ds" object. 
+ */
+typedef struct bcmolt_epon_path_1g_ds_key
+{
+    bcmolt_epon_ni epon_ni; /**< EPON NI associated with this 1G downstream path. */
+} bcmolt_epon_path_1g_ds_key;
+
+/** Structure definition for the "cfg" group of the "epon_path_1g_ds" object. 
+ */
+typedef struct bcmolt_epon_path_1g_ds_cfg_data
+{
+    bcmolt_epon_fec_en_state default_fec_state; /**< Default FEC enable state for the 1G downstream path on this EPON NI.  This attribute cannot be changed while the EPON_NI is enabled. */
+    bcmolt_raman_mitigation_mode raman_mode;    /**< Raman mitigation mode for the 1G downstream path on this EPON NI.  Raman mitigation cannot coexist with turbo mode.  This attribute cannot be changed while the EPON_NI is enabled. */
+    bcmolt_epon_1g_turbo_mode turbo_2g_mode;    /**< Operate the 1G downstream path at the turbo 2G data rate on this EPON NI.  Raman mitigation cannot coexist with turbo mode.  This attribute cannot be changed while the EPON_NI is enabled. */
+    bcmolt_prbs_generator_config prbs_generator;    /**< DS PRBS generator configuration */
+} bcmolt_epon_path_1g_ds_cfg_data;
+
+/** Transport message definition for "cfg" group of "epon_path_1g_ds" object. 
+ */
+typedef struct bcmolt_epon_path_1g_ds_cfg
+{
+    bcmolt_cfg hdr;                 /**< Transport header. */
+    bcmolt_epon_path_1g_ds_key key; /**< Object key. */
+    bcmolt_epon_path_1g_ds_cfg_data data;   /**< All properties that must be set by the user. */
+} bcmolt_epon_path_1g_ds_cfg;
+
+/** Structure definition for the "stat" group of the "epon_path_1g_ds" object. 
+ */
+typedef struct bcmolt_epon_path_1g_ds_stat_data
+{
+    uint64_t bytes;             /**< The number of bytes transmitted on this 1g downstream path. */
+    uint64_t frames;            /**< The number of frames transmitted on this 1g downstream path. */
+    uint64_t frames_64;         /**< The number of 64 byte frames transmitted on this 1g downstream path. */
+    uint64_t frames_65_127;     /**< The number of 65 to 127 byte frames transmitted on this 1g downstream path. */
+    uint64_t frames_128_255;    /**< The number of 128 to 255 byte frames transmitted on this 1g downstream path. */
+    uint64_t frames_256_511;    /**< The number of 256 to 511 byte frames transmitted on this 1g downstream path. */
+    uint64_t frames_512_1023;   /**< The number of 512 to 1023 byte frames transmitted on this 1g downstream path. */
+    uint64_t frames_1024_1518;  /**< The number of 1024 to 1518 byte frames transmitted on this 1g downstream path. */
+    uint64_t frames_1519_2047;  /**< The number of 1519 to 2047 byte frames transmitted on this 1g downstream path. */
+    uint64_t frames_2048_4095;  /**< The number of 2048 to 4095 byte frames transmitted on this 1g downstream path. */
+    uint64_t frames_4096_9216;  /**< The number of 4096 to 9216 byte frames transmitted on this 1g downstream path. */
+    uint64_t frames_9217_16383; /**< The number of 9217 to 16383 byte frames transmitted on this 1g downstream path. */
+    uint64_t broadcast_frames;  /**< The number of broadcast frames transmitted on this 1g downstream path. */
+    uint64_t data_bytes;        /**< The number of data bytes transmitted on this 1g downstream path. */
+    uint64_t multicast_frames;  /**< The number of multicast frames transmitted on this 1g downstream path. */
+    uint64_t unicast_frames;    /**< The number of unicast frames transmitted on this 1g downstream path. */
+    uint64_t oam_bytes;         /**< Number of OAM bytes transmitted on this 1g downstream path. */
+    uint64_t oam_frames;        /**< Number of OAM frames transmitted on this 1g downstream path. */
+    uint64_t gate_frames;       /**< Number of gate frames transmitted on this 1g downstream path. */
+    uint64_t mpcp_frames;       /**< Number of MPCP frames transmitted on this 1g downstream path. */
+    uint64_t abort_frames;      /**< Number of abort frames transmitted on this 1g downstream path. */
+} bcmolt_epon_path_1g_ds_stat_data;
+
+/** Transport message definition for "stat" group of "epon_path_1g_ds" object. 
+ */
+typedef struct bcmolt_epon_path_1g_ds_stat
+{
+    bcmolt_stat hdr;                /**< Transport header. */
+    bcmolt_epon_path_1g_ds_key key; /**< Object key. */
+    bcmolt_epon_path_1g_ds_stat_data data;  /**< All properties that must be set by the user. */
+} bcmolt_epon_path_1g_ds_stat;
+
+/** Structure definition for the "stat_cfg" group of the "epon_path_1g_ds" 
+ * object. 
+ */
+typedef struct bcmolt_epon_path_1g_ds_stat_cfg_data
+{
+    bcmolt_stat_alarm_config cfg;   /**< Statistic alarm configuration. */
+} bcmolt_epon_path_1g_ds_stat_cfg_data;
+
+/** Transport message definition for "stat_cfg" group of "epon_path_1g_ds" 
+ * object. 
+ */
+typedef struct bcmolt_epon_path_1g_ds_stat_cfg
+{
+    bcmolt_stat_cfg hdr;                        /**< Transport header. */
+    bcmolt_epon_path_1g_ds_key key;             /**< Object key. */
+    bcmolt_epon_path_1g_ds_stat_cfg_data data;  /**< All properties that must be set by the user. */
+} bcmolt_epon_path_1g_ds_stat_cfg;
+
+/** Structure definition for the "stat_alarm_cleared" group of the 
+ * "epon_path_1g_ds" object. 
+ *
+ * Sent when a configured statistic alarm condition is no longer met. 
+ */
+typedef struct bcmolt_epon_path_1g_ds_stat_alarm_cleared_data
+{
+    bcmolt_epon_path_1g_ds_stat_id stat;    /**< Statistic identifier. */
+} bcmolt_epon_path_1g_ds_stat_alarm_cleared_data;
+
+/** Transport message definition for "stat_alarm_cleared" group of 
+ * "epon_path_1g_ds" object. 
+ */
+typedef struct bcmolt_epon_path_1g_ds_stat_alarm_cleared
+{
+    bcmolt_auto hdr;                /**< Transport header. */
+    bcmolt_epon_path_1g_ds_key key; /**< Object key. */
+    bcmolt_epon_path_1g_ds_stat_alarm_cleared_data data;    /**< All properties that must be set by the user. */
+} bcmolt_epon_path_1g_ds_stat_alarm_cleared;
+
+/** Structure definition for the "stat_alarm_raised" group of the 
+ * "epon_path_1g_ds" object. 
+ *
+ * Sent when a configured statistic alarm condition has been met. 
+ */
+typedef struct bcmolt_epon_path_1g_ds_stat_alarm_raised_data
+{
+    bcmolt_epon_path_1g_ds_stat_id stat;    /**< Statistic identifier. */
+} bcmolt_epon_path_1g_ds_stat_alarm_raised_data;
+
+/** Transport message definition for "stat_alarm_raised" group of 
+ * "epon_path_1g_ds" object. 
+ */
+typedef struct bcmolt_epon_path_1g_ds_stat_alarm_raised
+{
+    bcmolt_auto hdr;                /**< Transport header. */
+    bcmolt_epon_path_1g_ds_key key; /**< Object key. */
+    bcmolt_epon_path_1g_ds_stat_alarm_raised_data data; /**< All properties that must be set by the user. */
+} bcmolt_epon_path_1g_ds_stat_alarm_raised;
+
+/** Structure definition for the "auto_cfg" group of the "epon_path_1g_ds" 
+ * object. 
+ */
+typedef struct bcmolt_epon_path_1g_ds_auto_cfg_data
+{
+    bcmos_bool stat_alarm_cleared;  /**< If true, indications of type "stat_alarm_cleared" will be generated. */
+    bcmos_bool stat_alarm_raised;   /**< If true, indications of type "stat_alarm_raised" will be generated. */
+} bcmolt_epon_path_1g_ds_auto_cfg_data;
+
+/** Transport message definition for "auto_cfg" group of "epon_path_1g_ds" 
+ * object. 
+ */
+typedef struct bcmolt_epon_path_1g_ds_auto_cfg
+{
+    bcmolt_auto_cfg hdr;                        /**< Transport header. */
+    bcmolt_epon_path_1g_ds_key key;             /**< Object key. */
+    bcmolt_epon_path_1g_ds_auto_cfg_data data;  /**< All properties that must be set by the user. */
+} bcmolt_epon_path_1g_ds_auto_cfg;
+
+/** Structure definition for the "key" group of the "epon_path_1g_us" object. 
+ */
+typedef struct bcmolt_epon_path_1g_us_key
+{
+    bcmolt_epon_ni epon_ni; /**< EPON NI associated with this 1G upstream path. */
+} bcmolt_epon_path_1g_us_key;
+
+/** Structure definition for the "cfg" group of the "epon_path_1g_us" object. 
+ */
+typedef struct bcmolt_epon_path_1g_us_cfg_data
+{
+    bcmolt_epon_fec_en_state default_fec_state; /**< Default FEC enable state for the 1G upstream path on this EPON NI.  This attribute cannot be changed while the EPON_NI is enabled. */
+    bcmolt_time_quanta sync_time_tq;            /**< Time quanta of sync at start of US burst.  This attribute cannot be changed while the EPON_NI is enabled. */
+    bcmolt_prbs_checker_config prbs_checker;    /**< US PRBS checker configuration */
+    bcmolt_prbs_status prbs_status;             /**< Result of US PRBS checker */
+} bcmolt_epon_path_1g_us_cfg_data;
+
+/** Transport message definition for "cfg" group of "epon_path_1g_us" object. 
+ */
+typedef struct bcmolt_epon_path_1g_us_cfg
+{
+    bcmolt_cfg hdr;                 /**< Transport header. */
+    bcmolt_epon_path_1g_us_key key; /**< Object key. */
+    bcmolt_epon_path_1g_us_cfg_data data;   /**< All properties that must be set by the user. */
+} bcmolt_epon_path_1g_us_cfg;
+
+/** Structure definition for the "stat" group of the "epon_path_1g_us" object. 
+ */
+typedef struct bcmolt_epon_path_1g_us_stat_data
+{
+    uint64_t bytes;             /**< The number of bytes received on this 1g upstream path. */
+    uint64_t frames;            /**< The number of frames received on this 1g upstream path. */
+    uint64_t frames_64;         /**< The number of 64 byte frames received on this 1g upstream path. */
+    uint64_t frames_65_127;     /**< The number of 65 to 127 byte frames received on this 1g upstream path. */
+    uint64_t frames_128_255;    /**< The number of 128 to 255 byte frames received on this 1g upstream path. */
+    uint64_t frames_256_511;    /**< The number of 256 to 511 byte frames received on this 1g upstream path. */
+    uint64_t frames_512_1023;   /**< The number of 512 to 1023 byte frames received on this 1g upstream path. */
+    uint64_t frames_1024_1518;  /**< The number of 1024 to 1518 byte frames received on this 1g upstream path. */
+    uint64_t frames_1519_2047;  /**< The number of 1519 to 2047 byte frames received on this 1g upstream path. */
+    uint64_t frames_2048_4095;  /**< The number of 2048 to 4095 byte frames received on this 1g upstream path. */
+    uint64_t frames_4096_9216;  /**< The number of 4096 to 9216 byte frames received on this 1g upstream path. */
+    uint64_t frames_9217_16383; /**< The number of 9217 to 16383 byte frames received on this 1g upstream path. */
+    uint64_t broadcast_frames;  /**< The number of broadcast frames received on this 1g upstream path. */
+    uint64_t data_bytes;        /**< The number of data bytes received on this 1g upstream path. */
+    uint64_t multicast_frames;  /**< The number of multicast frames received on this 1g upstream path. */
+    uint64_t unicast_frames;    /**< The number of unicast frames received on this 1g upstream path. */
+    uint64_t mpcp_frames;       /**< The number of MPCP frames received on this 1g upstream path. */
+    uint64_t oam_bytes;         /**< The number of OAM bytes received on this 1g upstream path. */
+    uint64_t oam_frames;        /**< The number of OAM frames received on this 1g upstream path. */
+    uint64_t report_frames;     /**< The number of report frames received on this 1g upstream path. */
+    uint64_t abort_frames;      /**< The number of abort frames received on this 1g upstream path. */
+    uint64_t fcs_error;         /**< The number of bad FCS errors received on this 1g upstream path. */
+    uint64_t crc_8_error;       /**< The number of CRC8 errors received on this 1g upstream path. */
+    uint64_t out_of_slot;       /**< The number of out of slot errors received on this 1g upstream path. */
+    uint64_t oversize_error;    /**< The number of oversize errors received on this 1g upstream path. */
+    uint64_t runt_error;        /**< The number of runt errors received on this 1g upstream path. */
+} bcmolt_epon_path_1g_us_stat_data;
+
+/** Transport message definition for "stat" group of "epon_path_1g_us" object. 
+ */
+typedef struct bcmolt_epon_path_1g_us_stat
+{
+    bcmolt_stat hdr;                /**< Transport header. */
+    bcmolt_epon_path_1g_us_key key; /**< Object key. */
+    bcmolt_epon_path_1g_us_stat_data data;  /**< All properties that must be set by the user. */
+} bcmolt_epon_path_1g_us_stat;
+
+/** Structure definition for the "stat_cfg" group of the "epon_path_1g_us" 
+ * object. 
+ */
+typedef struct bcmolt_epon_path_1g_us_stat_cfg_data
+{
+    bcmolt_stat_alarm_config cfg;   /**< Statistic alarm configuration. */
+} bcmolt_epon_path_1g_us_stat_cfg_data;
+
+/** Transport message definition for "stat_cfg" group of "epon_path_1g_us" 
+ * object. 
+ */
+typedef struct bcmolt_epon_path_1g_us_stat_cfg
+{
+    bcmolt_stat_cfg hdr;                        /**< Transport header. */
+    bcmolt_epon_path_1g_us_key key;             /**< Object key. */
+    bcmolt_epon_path_1g_us_stat_cfg_data data;  /**< All properties that must be set by the user. */
+} bcmolt_epon_path_1g_us_stat_cfg;
+
+/** Structure definition for the "stat_alarm_cleared" group of the 
+ * "epon_path_1g_us" object. 
+ *
+ * Sent when a configured statistic alarm condition is no longer met. 
+ */
+typedef struct bcmolt_epon_path_1g_us_stat_alarm_cleared_data
+{
+    bcmolt_epon_path_1g_us_stat_id stat;    /**< Statistic identifier. */
+} bcmolt_epon_path_1g_us_stat_alarm_cleared_data;
+
+/** Transport message definition for "stat_alarm_cleared" group of 
+ * "epon_path_1g_us" object. 
+ */
+typedef struct bcmolt_epon_path_1g_us_stat_alarm_cleared
+{
+    bcmolt_auto hdr;                /**< Transport header. */
+    bcmolt_epon_path_1g_us_key key; /**< Object key. */
+    bcmolt_epon_path_1g_us_stat_alarm_cleared_data data;    /**< All properties that must be set by the user. */
+} bcmolt_epon_path_1g_us_stat_alarm_cleared;
+
+/** Structure definition for the "stat_alarm_raised" group of the 
+ * "epon_path_1g_us" object. 
+ *
+ * Sent when a configured statistic alarm condition has been met. 
+ */
+typedef struct bcmolt_epon_path_1g_us_stat_alarm_raised_data
+{
+    bcmolt_epon_path_1g_us_stat_id stat;    /**< Statistic identifier. */
+} bcmolt_epon_path_1g_us_stat_alarm_raised_data;
+
+/** Transport message definition for "stat_alarm_raised" group of 
+ * "epon_path_1g_us" object. 
+ */
+typedef struct bcmolt_epon_path_1g_us_stat_alarm_raised
+{
+    bcmolt_auto hdr;                /**< Transport header. */
+    bcmolt_epon_path_1g_us_key key; /**< Object key. */
+    bcmolt_epon_path_1g_us_stat_alarm_raised_data data; /**< All properties that must be set by the user. */
+} bcmolt_epon_path_1g_us_stat_alarm_raised;
+
+/** Structure definition for the "auto_cfg" group of the "epon_path_1g_us" 
+ * object. 
+ */
+typedef struct bcmolt_epon_path_1g_us_auto_cfg_data
+{
+    bcmos_bool stat_alarm_cleared;  /**< If true, indications of type "stat_alarm_cleared" will be generated. */
+    bcmos_bool stat_alarm_raised;   /**< If true, indications of type "stat_alarm_raised" will be generated. */
+} bcmolt_epon_path_1g_us_auto_cfg_data;
+
+/** Transport message definition for "auto_cfg" group of "epon_path_1g_us" 
+ * object. 
+ */
+typedef struct bcmolt_epon_path_1g_us_auto_cfg
+{
+    bcmolt_auto_cfg hdr;                        /**< Transport header. */
+    bcmolt_epon_path_1g_us_key key;             /**< Object key. */
+    bcmolt_epon_path_1g_us_auto_cfg_data data;  /**< All properties that must be set by the user. */
+} bcmolt_epon_path_1g_us_auto_cfg;
+
+/** Structure definition for the "key" group of the "epon_rp" object. 
+ */
+typedef struct bcmolt_epon_rp_key
+{
+    bcmolt_epon_ni epon_ni;             /**< EPON NI containing this RP. */
+    bcmolt_epon_link_rate link_rate;    /**< Link rate associated with this RP.  Must be one of 10/10, 10/1, or 1/1. */
+} bcmolt_epon_rp_key;
+
+/** Structure definition for the "cfg" group of the "epon_rp" object. 
+ */
+typedef struct bcmolt_epon_rp_cfg_data
+{
+    bcmolt_epon_llid base_llid;                 /**< Base (lowest) logical link identifier for this RP.  This attribute cannot be changed while the EPON_NI is enabled, nor while any non-system links exist.  The sum of this value and max_links for this RP must be 0x7eff or smaller. */
+    bcmos_bool mpcp_disc_en;                    /**< Governs whether discovery gates for this RP are issued  */
+    bcmolt_time_quanta mpcp_disc_gnt_len_tq;    /**< Length of discovery grants in time quanta for this RP. */
+    uint16_t mpcp_report_timeout;               /**< Number of ms before links are deregistered due to no report received. */
+    uint16_t max_mpcp_reg_per_disc_window;      /**< Maximum number of MPCP registrations per discovery window on this RP (0 indicates unlimited). */
+    uint16_t max_links; /**< Maximum number of links to register on this EPON_RP.  This attribute cannot be changed while the EPON_NI is enabled, nor while any non-system links exist.  The actual limit is dependent on the system mode. */
+    bcmolt_upstream_bandwidth_distribution default_upstream_bandwidth;  /**< Default upstream bandwidth for newly created links. */
+    double rate_of_refraction;  /**< These are magic numbers derived using the process defined in ITU-T G.984.3 Appendix VII (http://www.itu.int/rec/T-REC-G.984.3-200911-S!Amd2/en) and ITU-T G.987.3 Appendix II (http://www.itu.int/rec/T-REC-G.987.3-201010-S/en) */
+} bcmolt_epon_rp_cfg_data;
+
+/** Transport message definition for "cfg" group of "epon_rp" object. 
+ */
+typedef struct bcmolt_epon_rp_cfg
+{
+    bcmolt_cfg hdr;                 /**< Transport header. */
+    bcmolt_epon_rp_key key;         /**< Object key. */
+    bcmolt_epon_rp_cfg_data data;   /**< All properties that must be set by the user. */
+} bcmolt_epon_rp_cfg;
+
+/** Structure definition for the "key" group of the "gpio" object. 
+ */
+typedef struct bcmolt_gpio_key
+{
+    uint32_t reserved;          /**< Reserved (set to 0). */
+    bcmolt_gpio_pin gpio_id;    /**< GPIO ID. */
+} bcmolt_gpio_key;
+
+/** Structure definition for the "cfg" group of the "gpio" object. 
+ */
+typedef struct bcmolt_gpio_cfg_data
+{
+    bcmolt_gpio_pin_dir direction;  /**< GPIO PIN direction (input or output) */
+    bcmolt_gpio_value value;        /**< Value to write. */
+} bcmolt_gpio_cfg_data;
+
+/** Transport message definition for "cfg" group of "gpio" object. 
+ */
+typedef struct bcmolt_gpio_cfg
+{
+    bcmolt_cfg hdr;             /**< Transport header. */
+    bcmolt_gpio_key key;        /**< Object key. */
+    bcmolt_gpio_cfg_data data;  /**< All properties that must be set by the user. */
+} bcmolt_gpio_cfg;
+
+/** Structure definition for the "key" group of the "gpon_alloc" object. 
+ */
+typedef struct bcmolt_gpon_alloc_key
+{
+    bcmolt_gpon_ni pon_ni;          /**< PON network interface. */
+    bcmolt_gpon_alloc_id alloc_id;  /**< Alloc ID. */
+} bcmolt_gpon_alloc_key;
+
+/** Structure definition for the "cfg" group of the "gpon_alloc" object. 
+ */
+typedef struct bcmolt_gpon_alloc_cfg_data
+{
+    bcmolt_alloc_state state;   /**< Current Alloc ID state */
+    bcmolt_pon_alloc_sla sla;   /**< Alloc ID SLA */
+    bcmolt_gpon_onu_id onu_id;  /**< ONU ID the alloc ID is assigned to */
+    bcmos_bool collect_stats;   /**< Enable statistics collection for this alloc ID */
+} bcmolt_gpon_alloc_cfg_data;
+
+/** Transport message definition for "cfg" group of "gpon_alloc" object. 
+ */
+typedef struct bcmolt_gpon_alloc_cfg
+{
+    bcmolt_cfg hdr;                     /**< Transport header. */
+    bcmolt_gpon_alloc_key key;          /**< Object key. */
+    bcmolt_gpon_alloc_cfg_data data;    /**< All properties that must be set by the user. */
+} bcmolt_gpon_alloc_cfg;
+
+/** Structure definition for the "stat" group of the "gpon_alloc" object. 
+ */
+typedef struct bcmolt_gpon_alloc_stat_data
+{
+    uint64_t rx_bytes;  /**< Number of alloc ID received bytes. */
+} bcmolt_gpon_alloc_stat_data;
+
+/** Transport message definition for "stat" group of "gpon_alloc" object. 
+ */
+typedef struct bcmolt_gpon_alloc_stat
+{
+    bcmolt_stat hdr;                    /**< Transport header. */
+    bcmolt_gpon_alloc_key key;          /**< Object key. */
+    bcmolt_gpon_alloc_stat_data data;   /**< All properties that must be set by the user. */
+} bcmolt_gpon_alloc_stat;
+
+/** Structure definition for the "stat_cfg" group of the "gpon_alloc" object. 
+ */
+typedef struct bcmolt_gpon_alloc_stat_cfg_data
+{
+    bcmolt_stat_alarm_config cfg;   /**< Statistic alarm configuration. */
+} bcmolt_gpon_alloc_stat_cfg_data;
+
+/** Transport message definition for "stat_cfg" group of "gpon_alloc" object. 
+ */
+typedef struct bcmolt_gpon_alloc_stat_cfg
+{
+    bcmolt_stat_cfg hdr;        /**< Transport header. */
+    bcmolt_gpon_alloc_key key;  /**< Object key. */
+    bcmolt_gpon_alloc_stat_cfg_data data;   /**< All properties that must be set by the user. */
+} bcmolt_gpon_alloc_stat_cfg;
+
+/** Structure definition for the "configuration_completed" group of the 
+ * "gpon_alloc" object. 
+ */
+typedef struct bcmolt_gpon_alloc_configuration_completed_data
+{
+    bcmolt_result status;           /**< Status. */
+    bcmolt_alloc_state new_state;   /**< new state. */
+} bcmolt_gpon_alloc_configuration_completed_data;
+
+/** Transport message definition for "configuration_completed" group of 
+ * "gpon_alloc" object. 
+ */
+typedef struct bcmolt_gpon_alloc_configuration_completed
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_gpon_alloc_key key;  /**< Object key. */
+    bcmolt_gpon_alloc_configuration_completed_data data;    /**< All properties that must be set by the user. */
+} bcmolt_gpon_alloc_configuration_completed;
+
+/** Structure definition for the "get_alloc_stats_completed" group of the 
+ * "gpon_alloc" object. 
+ *
+ * Collected alloc ID statistics from get_stats operation 
+ */
+typedef struct bcmolt_gpon_alloc_get_alloc_stats_completed_data
+{
+    bcmolt_result status;           /**< status. */
+    uint32_t average_nsr_used;      /**< Average NSR used bytes. */
+    uint32_t average_nsr_allocated; /**< Average NSR allocated bytes. */
+    uint32_t average_sr_report;     /**< Average SR report. */
+} bcmolt_gpon_alloc_get_alloc_stats_completed_data;
+
+/** Transport message definition for "get_alloc_stats_completed" group of 
+ * "gpon_alloc" object. 
+ */
+typedef struct bcmolt_gpon_alloc_get_alloc_stats_completed
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_gpon_alloc_key key;  /**< Object key. */
+    bcmolt_gpon_alloc_get_alloc_stats_completed_data data;  /**< All properties that must be set by the user. */
+} bcmolt_gpon_alloc_get_alloc_stats_completed;
+
+/** Structure definition for the "stat_alarm_cleared" group of the "gpon_alloc" 
+ * object. 
+ *
+ * Sent when a configured statistic alarm condition is no longer met. 
+ */
+typedef struct bcmolt_gpon_alloc_stat_alarm_cleared_data
+{
+    bcmolt_gpon_alloc_stat_id stat; /**< Statistic identifier. */
+} bcmolt_gpon_alloc_stat_alarm_cleared_data;
+
+/** Transport message definition for "stat_alarm_cleared" group of "gpon_alloc" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_alloc_stat_alarm_cleared
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_gpon_alloc_key key;  /**< Object key. */
+    bcmolt_gpon_alloc_stat_alarm_cleared_data data; /**< All properties that must be set by the user. */
+} bcmolt_gpon_alloc_stat_alarm_cleared;
+
+/** Structure definition for the "stat_alarm_raised" group of the "gpon_alloc" 
+ * object. 
+ *
+ * Sent when a configured statistic alarm condition has been met. 
+ */
+typedef struct bcmolt_gpon_alloc_stat_alarm_raised_data
+{
+    bcmolt_gpon_alloc_stat_id stat; /**< Statistic identifier. */
+} bcmolt_gpon_alloc_stat_alarm_raised_data;
+
+/** Transport message definition for "stat_alarm_raised" group of "gpon_alloc" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_alloc_stat_alarm_raised
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_gpon_alloc_key key;  /**< Object key. */
+    bcmolt_gpon_alloc_stat_alarm_raised_data data;  /**< All properties that must be set by the user. */
+} bcmolt_gpon_alloc_stat_alarm_raised;
+
+/** Structure definition for the "auto_cfg" group of the "gpon_alloc" object. 
+ */
+typedef struct bcmolt_gpon_alloc_auto_cfg_data
+{
+    bcmos_bool configuration_completed;     /**< If true, indications of type "configuration_completed" will be generated. */
+    bcmos_bool get_alloc_stats_completed;   /**< If true, indications of type "get_alloc_stats_completed" will be generated. */
+    bcmos_bool stat_alarm_cleared;          /**< If true, indications of type "stat_alarm_cleared" will be generated. */
+    bcmos_bool stat_alarm_raised;           /**< If true, indications of type "stat_alarm_raised" will be generated. */
+} bcmolt_gpon_alloc_auto_cfg_data;
+
+/** Transport message definition for "auto_cfg" group of "gpon_alloc" object. 
+ */
+typedef struct bcmolt_gpon_alloc_auto_cfg
+{
+    bcmolt_auto_cfg hdr;                    /**< Transport header. */
+    bcmolt_gpon_alloc_key key;              /**< Object key. */
+    bcmolt_gpon_alloc_auto_cfg_data data;   /**< All properties that must be set by the user. */
+} bcmolt_gpon_alloc_auto_cfg;
+
+/** Structure definition for the "get_stats" group of the "gpon_alloc" object. 
+ *
+ * Run statistics collection for a given period of time 
+ */
+typedef struct bcmolt_gpon_alloc_get_stats_data
+{
+    uint32_t num_of_cycles; /**< The number of cycles to run statistics collection */
+} bcmolt_gpon_alloc_get_stats_data;
+
+/** Transport message definition for "get_stats" group of "gpon_alloc" object. 
+ */
+typedef struct bcmolt_gpon_alloc_get_stats
+{
+    bcmolt_oper hdr;                        /**< Transport header. */
+    bcmolt_gpon_alloc_key key;              /**< Object key. */
+    bcmolt_gpon_alloc_get_stats_data data;  /**< All properties that must be set by the user. */
+} bcmolt_gpon_alloc_get_stats;
+
+/** Structure definition for the "set_state" group of the "gpon_alloc" object. 
+ *
+ * Sets the alloc's activation state.  This is only used for protection 
+ * switching on an active-standby PON.  In normal operation, this isn't 
+ * necessary since allocs are activated/deactivated automatically along with 
+ * the ONU. 
+ */
+typedef struct bcmolt_gpon_alloc_set_state_data
+{
+    bcmolt_alloc_operation state;   /**< State. */
+} bcmolt_gpon_alloc_set_state_data;
+
+/** Transport message definition for "set_state" group of "gpon_alloc" object. 
+ */
+typedef struct bcmolt_gpon_alloc_set_state
+{
+    bcmolt_oper hdr;                        /**< Transport header. */
+    bcmolt_gpon_alloc_key key;              /**< Object key. */
+    bcmolt_gpon_alloc_set_state_data data;  /**< All properties that must be set by the user. */
+} bcmolt_gpon_alloc_set_state;
+
+/** Structure definition for the "key" group of the "gpon_gem_port" object. 
+ */
+typedef struct bcmolt_gpon_gem_port_key
+{
+    bcmolt_gpon_ni pon_ni;          /**< PON network interface. */
+    bcmolt_gpon_gem_id gem_port_id; /**< GEM Port ID. */
+} bcmolt_gpon_gem_port_key;
+
+/** Structure definition for the "cfg" group of the "gpon_gem_port" object. 
+ */
+typedef struct bcmolt_gpon_gem_port_cfg_data
+{
+    bcmolt_gem_port_configuration configuration;                /**< GEM port configuration parameters */
+    bcmolt_gpon_onu_id onu_id;                                  /**< ONU ID this GEM port is assigned to */
+    bcmolt_gpon_gem_port_state gem_port_state;                  /**< Current GEM port state */
+    bcmolt_control_state downstream_encryption_mode;            /**< Enable/Disable the downstream encryption mode of the GEM Port */
+    bcmolt_us_gem_port_destination upstream_destination_queue;  /**< The destination queue of the packets arriving on this GEM Port on the upstream direction */
+    bcmolt_control_state control;                       /**< Enable/Disable the GEM Port ID in the OLT */
+    bcmolt_gpon_debug_flow_config debug_flow_config;    /**< Traffic flow debug options */
+    uint16_t mac_table_entry_limit;                     /**< The maximum number of MAC table entries allowed for this GEM port (0 = no limit). */
+} bcmolt_gpon_gem_port_cfg_data;
+
+/** Transport message definition for "cfg" group of "gpon_gem_port" object. 
+ */
+typedef struct bcmolt_gpon_gem_port_cfg
+{
+    bcmolt_cfg hdr;                     /**< Transport header. */
+    bcmolt_gpon_gem_port_key key;       /**< Object key. */
+    bcmolt_gpon_gem_port_cfg_data data; /**< All properties that must be set by the user. */
+} bcmolt_gpon_gem_port_cfg;
+
+/** Structure definition for the "stat" group of the "gpon_gem_port" object. 
+ */
+typedef struct bcmolt_gpon_gem_port_stat_data
+{
+    uint64_t rx_packets;    /**< Received GEM frames. */
+    uint64_t rx_bytes;      /**< Received bytes. */
+    uint64_t tx_packets;    /**< Transmitted GEM frames. */
+    uint64_t tx_bytes;      /**< Transmitted bytes. */
+} bcmolt_gpon_gem_port_stat_data;
+
+/** Transport message definition for "stat" group of "gpon_gem_port" object. 
+ */
+typedef struct bcmolt_gpon_gem_port_stat
+{
+    bcmolt_stat hdr;                /**< Transport header. */
+    bcmolt_gpon_gem_port_key key;   /**< Object key. */
+    bcmolt_gpon_gem_port_stat_data data;    /**< All properties that must be set by the user. */
+} bcmolt_gpon_gem_port_stat;
+
+/** Structure definition for the "stat_cfg" group of the "gpon_gem_port" object. 
+ */
+typedef struct bcmolt_gpon_gem_port_stat_cfg_data
+{
+    bcmolt_stat_alarm_config cfg;   /**< Statistic alarm configuration. */
+} bcmolt_gpon_gem_port_stat_cfg_data;
+
+/** Transport message definition for "stat_cfg" group of "gpon_gem_port" object. 
+ */
+typedef struct bcmolt_gpon_gem_port_stat_cfg
+{
+    bcmolt_stat_cfg hdr;                        /**< Transport header. */
+    bcmolt_gpon_gem_port_key key;               /**< Object key. */
+    bcmolt_gpon_gem_port_stat_cfg_data data;    /**< All properties that must be set by the user. */
+} bcmolt_gpon_gem_port_stat_cfg;
+
+/** Structure definition for the "configuration_completed" group of the 
+ * "gpon_gem_port" object. 
+ */
+typedef struct bcmolt_gpon_gem_port_configuration_completed_data
+{
+    bcmolt_result status;                   /**< status. */
+    bcmolt_gpon_gem_port_state new_state;   /**< new state. */
+} bcmolt_gpon_gem_port_configuration_completed_data;
+
+/** Transport message definition for "configuration_completed" group of 
+ * "gpon_gem_port" object. 
+ */
+typedef struct bcmolt_gpon_gem_port_configuration_completed
+{
+    bcmolt_auto hdr;                /**< Transport header. */
+    bcmolt_gpon_gem_port_key key;   /**< Object key. */
+    bcmolt_gpon_gem_port_configuration_completed_data data; /**< All properties that must be set by the user. */
+} bcmolt_gpon_gem_port_configuration_completed;
+
+/** Structure definition for the "stat_alarm_cleared" group of the 
+ * "gpon_gem_port" object. 
+ *
+ * Sent when a configured statistic alarm condition is no longer met. 
+ */
+typedef struct bcmolt_gpon_gem_port_stat_alarm_cleared_data
+{
+    bcmolt_gpon_gem_port_stat_id stat;  /**< Statistic identifier. */
+} bcmolt_gpon_gem_port_stat_alarm_cleared_data;
+
+/** Transport message definition for "stat_alarm_cleared" group of 
+ * "gpon_gem_port" object. 
+ */
+typedef struct bcmolt_gpon_gem_port_stat_alarm_cleared
+{
+    bcmolt_auto hdr;                /**< Transport header. */
+    bcmolt_gpon_gem_port_key key;   /**< Object key. */
+    bcmolt_gpon_gem_port_stat_alarm_cleared_data data;  /**< All properties that must be set by the user. */
+} bcmolt_gpon_gem_port_stat_alarm_cleared;
+
+/** Structure definition for the "stat_alarm_raised" group of the 
+ * "gpon_gem_port" object. 
+ *
+ * Sent when a configured statistic alarm condition has been met. 
+ */
+typedef struct bcmolt_gpon_gem_port_stat_alarm_raised_data
+{
+    bcmolt_gpon_gem_port_stat_id stat;  /**< Statistic identifier. */
+} bcmolt_gpon_gem_port_stat_alarm_raised_data;
+
+/** Transport message definition for "stat_alarm_raised" group of 
+ * "gpon_gem_port" object. 
+ */
+typedef struct bcmolt_gpon_gem_port_stat_alarm_raised
+{
+    bcmolt_auto hdr;                /**< Transport header. */
+    bcmolt_gpon_gem_port_key key;   /**< Object key. */
+    bcmolt_gpon_gem_port_stat_alarm_raised_data data;   /**< All properties that must be set by the user. */
+} bcmolt_gpon_gem_port_stat_alarm_raised;
+
+/** Structure definition for the "auto_cfg" group of the "gpon_gem_port" object. 
+ */
+typedef struct bcmolt_gpon_gem_port_auto_cfg_data
+{
+    bcmos_bool configuration_completed; /**< If true, indications of type "configuration_completed" will be generated. */
+    bcmos_bool stat_alarm_cleared;      /**< If true, indications of type "stat_alarm_cleared" will be generated. */
+    bcmos_bool stat_alarm_raised;       /**< If true, indications of type "stat_alarm_raised" will be generated. */
+} bcmolt_gpon_gem_port_auto_cfg_data;
+
+/** Transport message definition for "auto_cfg" group of "gpon_gem_port" object. 
+ */
+typedef struct bcmolt_gpon_gem_port_auto_cfg
+{
+    bcmolt_auto_cfg hdr;                        /**< Transport header. */
+    bcmolt_gpon_gem_port_key key;               /**< Object key. */
+    bcmolt_gpon_gem_port_auto_cfg_data data;    /**< All properties that must be set by the user. */
+} bcmolt_gpon_gem_port_auto_cfg;
+
+/** Structure definition for the "set_state" group of the "gpon_gem_port" 
+ * object. 
+ *
+ * Sets the GEM port's activation state.  This is only used for protection 
+ * switching on an active-standby PON.  In normal operation, this isn't 
+ * necessary since GEM ports are activated/deactivated automatically along with 
+ * the ONU. 
+ */
+typedef struct bcmolt_gpon_gem_port_set_state_data
+{
+    bcmolt_gem_port_operation state;    /**< State. */
+} bcmolt_gpon_gem_port_set_state_data;
+
+/** Transport message definition for "set_state" group of "gpon_gem_port" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_gem_port_set_state
+{
+    bcmolt_oper hdr;                /**< Transport header. */
+    bcmolt_gpon_gem_port_key key;   /**< Object key. */
+    bcmolt_gpon_gem_port_set_state_data data;   /**< All properties that must be set by the user. */
+} bcmolt_gpon_gem_port_set_state;
+
+/** Structure definition for the "key" group of the "gpon_iwf" object. 
+ */
+typedef struct bcmolt_gpon_iwf_key
+{
+    bcmolt_gpon_ni pon_ni;  /**< PON network interface. */
+} bcmolt_gpon_iwf_key;
+
+/** Structure definition for the "cfg" group of the "gpon_iwf" object. 
+ */
+typedef struct bcmolt_gpon_iwf_cfg_data
+{
+    bcmolt_iwf_mode iwf_mode;               /**< IWF mapping mode */
+#define BCMOLT_GPON_IWF_CFG_DATA_US_TPID_PER_FLOW_LEN   2
+    bcmolt_arr_u16_2_hex us_tpid_per_flow;  /**< TPID value of the VLAN tag added to upstream packet when IWF mode is set to per flow */
+    uint16_t us_otag_direct_tpid;           /**< TPID value of the VLAN tag added to upstream packet when IWF mode is set to direct mode */
+    uint8_t us_otag_direct_pbit;            /**< P-bit value of the VLAN tag added to upstream packet when IWF mode is set to direct mode */
+#define BCMOLT_GPON_IWF_CFG_DATA_DS_TPID_LEN    5
+    bcmolt_arr_u16_5_hex ds_tpid;           /**< Packets marked with one of the five configured DS TPID options will be forwarded, all the rest will be dropped */
+    bcmolt_mac_table_configuration mac_table_configuration;     /**< MAC table configuration */
+    bcmolt_gpon_iwf_debug_flow_config debug_flow_configuration; /**< MAC table configuration */
+    uint16_t mac_table_count;                       /**< Number of MAC table entries configured in the MAC table */
+    uint16_t forbidden_vlan_flow_gem_range_start;   /**< Forbidden range for Vlans, Flows and Gems start value */
+} bcmolt_gpon_iwf_cfg_data;
+
+/** Transport message definition for "cfg" group of "gpon_iwf" object. 
+ */
+typedef struct bcmolt_gpon_iwf_cfg
+{
+    bcmolt_cfg hdr;                 /**< Transport header. */
+    bcmolt_gpon_iwf_key key;        /**< Object key. */
+    bcmolt_gpon_iwf_cfg_data data;  /**< All properties that must be set by the user. */
+} bcmolt_gpon_iwf_cfg;
+
+/** Structure definition for the "stat" group of the "gpon_iwf" object. 
+ */
+typedef struct bcmolt_gpon_iwf_stat_data
+{
+    uint64_t ds_hit_event;              /**< DS hit event. */
+    uint64_t ds_miss_event;             /**< DS miss event. */
+    uint64_t ds_drop_due_to_miss_event; /**< DS drop due to miss event. */
+    uint64_t ds_drop_due_to_hit_event;  /**< DS drop due to hit event. */
+    uint64_t ds_drop_to_disabled_gem;   /**< DS drop to disabled GEM. */
+    uint64_t new_mac_discovered;        /**< New MAC discovered. */
+    uint64_t move_event;                /**< Move event. */
+    uint64_t new_mac_drop_due_to_fifo_full; /**< New MAC drop due to fifo full. */
+} bcmolt_gpon_iwf_stat_data;
+
+/** Transport message definition for "stat" group of "gpon_iwf" object. 
+ */
+typedef struct bcmolt_gpon_iwf_stat
+{
+    bcmolt_stat hdr;                /**< Transport header. */
+    bcmolt_gpon_iwf_key key;        /**< Object key. */
+    bcmolt_gpon_iwf_stat_data data; /**< All properties that must be set by the user. */
+} bcmolt_gpon_iwf_stat;
+
+/** Structure definition for the "stat_cfg" group of the "gpon_iwf" object. 
+ */
+typedef struct bcmolt_gpon_iwf_stat_cfg_data
+{
+    bcmolt_stat_alarm_config cfg;   /**< Statistic alarm configuration. */
+} bcmolt_gpon_iwf_stat_cfg_data;
+
+/** Transport message definition for "stat_cfg" group of "gpon_iwf" object. 
+ */
+typedef struct bcmolt_gpon_iwf_stat_cfg
+{
+    bcmolt_stat_cfg hdr;                /**< Transport header. */
+    bcmolt_gpon_iwf_key key;            /**< Object key. */
+    bcmolt_gpon_iwf_stat_cfg_data data; /**< All properties that must be set by the user. */
+} bcmolt_gpon_iwf_stat_cfg;
+
+/** Transport message definition for "flush_mac_table_completed" group of 
+ * "gpon_iwf" object. 
+ */
+typedef struct bcmolt_gpon_iwf_flush_mac_table_completed
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_gpon_iwf_key key;    /**< Object key. */
+} bcmolt_gpon_iwf_flush_mac_table_completed;
+
+/** Structure definition for the "scan_mac_table_completed" group of the 
+ * "gpon_iwf" object. 
+ *
+ * A MAC table scan initiated using the "scan_mac_table" operation is complete. 
+ */
+typedef struct bcmolt_gpon_iwf_scan_mac_table_completed_data
+{
+    bcmos_mac_address mac_address;  /**< Entry MAC address. */
+    bcmolt_gpon_mac_table_scan_result_list_u16 entries; /**< Scan results for this entry.  If this list is empty, the MAC address was not found in the table. */
+} bcmolt_gpon_iwf_scan_mac_table_completed_data;
+
+/** Transport message definition for "scan_mac_table_completed" group of 
+ * "gpon_iwf" object. 
+ */
+typedef struct bcmolt_gpon_iwf_scan_mac_table_completed
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_gpon_iwf_key key;    /**< Object key. */
+    bcmolt_gpon_iwf_scan_mac_table_completed_data data; /**< All properties that must be set by the user. */
+} bcmolt_gpon_iwf_scan_mac_table_completed;
+
+/** Structure definition for the "stat_alarm_cleared" group of the "gpon_iwf" 
+ * object. 
+ *
+ * Sent when a configured statistic alarm condition is no longer met. 
+ */
+typedef struct bcmolt_gpon_iwf_stat_alarm_cleared_data
+{
+    bcmolt_gpon_iwf_stat_id stat;   /**< Statistic identifier. */
+} bcmolt_gpon_iwf_stat_alarm_cleared_data;
+
+/** Transport message definition for "stat_alarm_cleared" group of "gpon_iwf" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_iwf_stat_alarm_cleared
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_gpon_iwf_key key;    /**< Object key. */
+    bcmolt_gpon_iwf_stat_alarm_cleared_data data;   /**< All properties that must be set by the user. */
+} bcmolt_gpon_iwf_stat_alarm_cleared;
+
+/** Structure definition for the "stat_alarm_raised" group of the "gpon_iwf" 
+ * object. 
+ *
+ * Sent when a configured statistic alarm condition has been met. 
+ */
+typedef struct bcmolt_gpon_iwf_stat_alarm_raised_data
+{
+    bcmolt_gpon_iwf_stat_id stat;   /**< Statistic identifier. */
+} bcmolt_gpon_iwf_stat_alarm_raised_data;
+
+/** Transport message definition for "stat_alarm_raised" group of "gpon_iwf" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_iwf_stat_alarm_raised
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_gpon_iwf_key key;    /**< Object key. */
+    bcmolt_gpon_iwf_stat_alarm_raised_data data;    /**< All properties that must be set by the user. */
+} bcmolt_gpon_iwf_stat_alarm_raised;
+
+/** Structure definition for the "auto_cfg" group of the "gpon_iwf" object. 
+ */
+typedef struct bcmolt_gpon_iwf_auto_cfg_data
+{
+    bcmos_bool flush_mac_table_completed;   /**< If true, indications of type "flush_mac_table_completed" will be generated. */
+    bcmos_bool scan_mac_table_completed;    /**< If true, indications of type "scan_mac_table_completed" will be generated. */
+    bcmos_bool stat_alarm_cleared;          /**< If true, indications of type "stat_alarm_cleared" will be generated. */
+    bcmos_bool stat_alarm_raised;           /**< If true, indications of type "stat_alarm_raised" will be generated. */
+} bcmolt_gpon_iwf_auto_cfg_data;
+
+/** Transport message definition for "auto_cfg" group of "gpon_iwf" object. 
+ */
+typedef struct bcmolt_gpon_iwf_auto_cfg
+{
+    bcmolt_auto_cfg hdr;                /**< Transport header. */
+    bcmolt_gpon_iwf_key key;            /**< Object key. */
+    bcmolt_gpon_iwf_auto_cfg_data data; /**< All properties that must be set by the user. */
+} bcmolt_gpon_iwf_auto_cfg;
+
+/** Structure definition for the "flush_mac_table" group of the "gpon_iwf" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_iwf_flush_mac_table_data
+{
+    bcmolt_flush_mac_table_option control;  /**< control. */
+    bcmolt_vlan_id vid;                     /**< VID. */
+    bcmolt_flow_id flow_id;                 /**< FLOW ID. */
+} bcmolt_gpon_iwf_flush_mac_table_data;
+
+/** Transport message definition for "flush_mac_table" group of "gpon_iwf" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_iwf_flush_mac_table
+{
+    bcmolt_oper hdr;            /**< Transport header. */
+    bcmolt_gpon_iwf_key key;    /**< Object key. */
+    bcmolt_gpon_iwf_flush_mac_table_data data;  /**< All properties that must be set by the user. */
+} bcmolt_gpon_iwf_flush_mac_table;
+
+/** Structure definition for the "scan_mac_table" group of the "gpon_iwf" 
+ * object. 
+ *
+ * Scans MAC table for a given MAC address then returns the associated 
+ * information 
+ */
+typedef struct bcmolt_gpon_iwf_scan_mac_table_data
+{
+    bcmos_mac_address mac_address;  /**< Entry MAC address. */
+} bcmolt_gpon_iwf_scan_mac_table_data;
+
+/** Transport message definition for "scan_mac_table" group of "gpon_iwf" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_iwf_scan_mac_table
+{
+    bcmolt_oper hdr;            /**< Transport header. */
+    bcmolt_gpon_iwf_key key;    /**< Object key. */
+    bcmolt_gpon_iwf_scan_mac_table_data data;   /**< All properties that must be set by the user. */
+} bcmolt_gpon_iwf_scan_mac_table;
+
+/** Structure definition for the "key" group of the "gpon_iwf_ds_egress_flow" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_iwf_ds_egress_flow_key
+{
+    bcmolt_gpon_ni pon_ni;  /**< PON network interface. */
+    bcmolt_flow_id flow_id; /**< Flow ID. */
+} bcmolt_gpon_iwf_ds_egress_flow_key;
+
+/** Structure definition for the "cfg" group of the "gpon_iwf_ds_egress_flow" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_iwf_ds_egress_flow_cfg_data
+{
+    bcmolt_gpon_gem_id gem_port;    /**< GEM port ID */
+    bcmos_bool pbit_control;        /**< If enabled, the Pbits value is taken from the mapping VLAN tag (Inner/Outer) VLAN Pbits location and added to the configured GEM port ID value to create the Final GEM ID */
+} bcmolt_gpon_iwf_ds_egress_flow_cfg_data;
+
+/** Transport message definition for "cfg" group of "gpon_iwf_ds_egress_flow" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_iwf_ds_egress_flow_cfg
+{
+    bcmolt_cfg hdr; /**< Transport header. */
+    bcmolt_gpon_iwf_ds_egress_flow_key key;         /**< Object key. */
+    bcmolt_gpon_iwf_ds_egress_flow_cfg_data data;   /**< All properties that must be set by the user. */
+} bcmolt_gpon_iwf_ds_egress_flow_cfg;
+
+/** Structure definition for the "key" group of the "gpon_iwf_ds_ingress_flow" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_iwf_ds_ingress_flow_key
+{
+    bcmolt_gpon_ni pon_ni;  /**< PON network interface. */
+    bcmolt_vlan_id vlan_id; /**< vlan ID. */
+} bcmolt_gpon_iwf_ds_ingress_flow_key;
+
+/** Structure definition for the "cfg" group of the "gpon_iwf_ds_ingress_flow" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_iwf_ds_ingress_flow_cfg_data
+{
+    bcmolt_vlan_to_flow_mapping_method mapping_method;  /**< The Mapping method defines how the flow ID will be determined */
+    bcmolt_mapping_tag_method mapping_tag;              /**< Define if the outer or the inner VLAN tag of the packet will determine the flow ID */
+    bcmolt_ds_vlan_action vlan_action;                  /**< Define the outer VLAN tag manipulation on the packet: transparent or remove */
+} bcmolt_gpon_iwf_ds_ingress_flow_cfg_data;
+
+/** Transport message definition for "cfg" group of "gpon_iwf_ds_ingress_flow" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_iwf_ds_ingress_flow_cfg
+{
+    bcmolt_cfg hdr; /**< Transport header. */
+    bcmolt_gpon_iwf_ds_ingress_flow_key key;        /**< Object key. */
+    bcmolt_gpon_iwf_ds_ingress_flow_cfg_data data;  /**< All properties that must be set by the user. */
+} bcmolt_gpon_iwf_ds_ingress_flow_cfg;
+
+/** Structure definition for the "key" group of the "gpon_iwf_mac_table" object. 
+ */
+typedef struct bcmolt_gpon_iwf_mac_table_key
+{
+    bcmolt_gpon_ni pon_ni;          /**< PON network interface. */
+    bcmos_mac_address mac_address;  /**< MAC address. */
+    bcmolt_vlan_id vlan;            /**< VLAN. */
+} bcmolt_gpon_iwf_mac_table_key;
+
+/** Structure definition for the "cfg" group of the "gpon_iwf_mac_table" object. 
+ */
+typedef struct bcmolt_gpon_iwf_mac_table_cfg_data
+{
+    bcmolt_flow_id flow_id;         /**< The flow ID assigned to traffic that matches this MAC table entry. */
+    bcmos_bool stat;                /**< Whether or not the MAC entry is static.  Static entries don't age. */
+    bcmolt_gpon_gem_id gem_port_id; /**< The GEM port ID of the traffic that created this table entry.  This only applies to automatically-learned entries.  Manually-added entries will have the value BCMOLT_PON_GEM_PORT_ID_INVALID. */
+    bcmolt_gpon_onu_id onu_id;      /**< The ONU ID for the traffic that created this table entry.  This only valid if gem_port_id is valid.  Otherwise this will be set to BCMOLT_GPON_ONU_ID_INVALID. */
+} bcmolt_gpon_iwf_mac_table_cfg_data;
+
+/** Transport message definition for "cfg" group of "gpon_iwf_mac_table" object. 
+ */
+typedef struct bcmolt_gpon_iwf_mac_table_cfg
+{
+    bcmolt_cfg hdr;                     /**< Transport header. */
+    bcmolt_gpon_iwf_mac_table_key key;  /**< Object key. */
+    bcmolt_gpon_iwf_mac_table_cfg_data data;    /**< All properties that must be set by the user. */
+} bcmolt_gpon_iwf_mac_table_cfg;
+
+/** Transport message definition for "mac_aged" group of "gpon_iwf_mac_table" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_iwf_mac_table_mac_aged
+{
+    bcmolt_auto hdr;                    /**< Transport header. */
+    bcmolt_gpon_iwf_mac_table_key key;  /**< Object key. */
+} bcmolt_gpon_iwf_mac_table_mac_aged;
+
+/** Structure definition for the "mac_dropped" group of the "gpon_iwf_mac_table" 
+ * object. 
+ *
+ * Sent when an entry cannot be learned since the MAC table is full. 
+ */
+typedef struct bcmolt_gpon_iwf_mac_table_mac_dropped_data
+{
+    bcmolt_flow_id flow_id; /**< The flow ID of the entry that was dropped. */
+} bcmolt_gpon_iwf_mac_table_mac_dropped_data;
+
+/** Transport message definition for "mac_dropped" group of "gpon_iwf_mac_table" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_iwf_mac_table_mac_dropped
+{
+    bcmolt_auto hdr;                    /**< Transport header. */
+    bcmolt_gpon_iwf_mac_table_key key;  /**< Object key. */
+    bcmolt_gpon_iwf_mac_table_mac_dropped_data data;    /**< All properties that must be set by the user. */
+} bcmolt_gpon_iwf_mac_table_mac_dropped;
+
+/** Structure definition for the "mac_move" group of the "gpon_iwf_mac_table" 
+ * object. 
+ *
+ * Sent when the MAC table is in move mode and a packet is seen that matches on 
+ * MAC address / VID but doesn't match on flow ID. 
+ */
+typedef struct bcmolt_gpon_iwf_mac_table_mac_move_data
+{
+    bcmolt_flow_id old_flow_id; /**< The flow ID in the current MAC table entry. */
+    bcmolt_flow_id new_flow_id; /**< The flow ID seen in the traffic stream. */
+} bcmolt_gpon_iwf_mac_table_mac_move_data;
+
+/** Transport message definition for "mac_move" group of "gpon_iwf_mac_table" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_iwf_mac_table_mac_move
+{
+    bcmolt_auto hdr;                    /**< Transport header. */
+    bcmolt_gpon_iwf_mac_table_key key;  /**< Object key. */
+    bcmolt_gpon_iwf_mac_table_mac_move_data data;   /**< All properties that must be set by the user. */
+} bcmolt_gpon_iwf_mac_table_mac_move;
+
+/** Structure definition for the "new_mac" group of the "gpon_iwf_mac_table" 
+ * object. 
+ *
+ * Sent when a new MAC address / VID combination is seen in the upstream 
+ * traffic stream. 
+ */
+typedef struct bcmolt_gpon_iwf_mac_table_new_mac_data
+{
+    bcmolt_flow_id flow_id; /**< The flow ID associated with the new entry. */
+} bcmolt_gpon_iwf_mac_table_new_mac_data;
+
+/** Transport message definition for "new_mac" group of "gpon_iwf_mac_table" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_iwf_mac_table_new_mac
+{
+    bcmolt_auto hdr;                    /**< Transport header. */
+    bcmolt_gpon_iwf_mac_table_key key;  /**< Object key. */
+    bcmolt_gpon_iwf_mac_table_new_mac_data data;    /**< All properties that must be set by the user. */
+} bcmolt_gpon_iwf_mac_table_new_mac;
+
+/** Structure definition for the "auto_cfg" group of the "gpon_iwf_mac_table" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_iwf_mac_table_auto_cfg_data
+{
+    bcmos_bool mac_aged;    /**< If true, indications of type "mac_aged" will be generated. */
+    bcmos_bool mac_dropped; /**< If true, indications of type "mac_dropped" will be generated. */
+    bcmos_bool mac_move;    /**< If true, indications of type "mac_move" will be generated. */
+    bcmos_bool new_mac;     /**< If true, indications of type "new_mac" will be generated. */
+} bcmolt_gpon_iwf_mac_table_auto_cfg_data;
+
+/** Transport message definition for "auto_cfg" group of "gpon_iwf_mac_table" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_iwf_mac_table_auto_cfg
+{
+    bcmolt_auto_cfg hdr;                /**< Transport header. */
+    bcmolt_gpon_iwf_mac_table_key key;  /**< Object key. */
+    bcmolt_gpon_iwf_mac_table_auto_cfg_data data;   /**< All properties that must be set by the user. */
+} bcmolt_gpon_iwf_mac_table_auto_cfg;
+
+/** Structure definition for the "key" group of the "gpon_iwf_us_flow" object. 
+ */
+typedef struct bcmolt_gpon_iwf_us_flow_key
+{
+    bcmolt_gpon_ni pon_ni;          /**< PON network interface. */
+    bcmolt_gpon_gem_id gem_port_id; /**< GEM Port  ID. */
+} bcmolt_gpon_iwf_us_flow_key;
+
+/** Structure definition for the "cfg" group of the "gpon_iwf_us_flow" object. 
+ */
+typedef struct bcmolt_gpon_iwf_us_flow_cfg_data
+{
+    bcmolt_flow_id flow_id;             /**< Flow ID. */
+    bcmos_bool mac_learning;            /**< MAC learning. */
+    bcmolt_us_vlan_action vlan_action;  /**< VLAN action. */
+    bcmolt_vlan_tag vlan_tag;           /**< Vlan tag. */
+    uint8_t tpid_index;                 /**< TPID index. */
+} bcmolt_gpon_iwf_us_flow_cfg_data;
+
+/** Transport message definition for "cfg" group of "gpon_iwf_us_flow" object. 
+ */
+typedef struct bcmolt_gpon_iwf_us_flow_cfg
+{
+    bcmolt_cfg hdr;                     /**< Transport header. */
+    bcmolt_gpon_iwf_us_flow_key key;    /**< Object key. */
+    bcmolt_gpon_iwf_us_flow_cfg_data data;  /**< All properties that must be set by the user. */
+} bcmolt_gpon_iwf_us_flow_cfg;
+
+/** Structure definition for the "key" group of the "gpon_ni" object. 
+ */
+typedef struct bcmolt_gpon_ni_key
+{
+    bcmolt_gpon_ni pon_ni;  /**< PON network interface. */
+} bcmolt_gpon_ni_key;
+
+/** Structure definition for the "cfg" group of the "gpon_ni" object. 
+ */
+typedef struct bcmolt_gpon_ni_cfg_data
+{
+    bcmolt_pon_status pon_status;   /**< PON status parameters */
+    bcmolt_pon_available_bandwidth available_bandwidth; /**< PON available bandwidth parameters */
+    uint16_t number_of_active_onus;                     /**< Number of active ONUs on the PON */
+    uint16_t number_of_active_standby_onus;             /**< number of active standby onus. */
+    bcmolt_prbs_status prbs_status;                     /**< Result of US PRBS checker */
+    bcmolt_pon_distance pon_distance;                   /**< PON distance */
+    uint32_t ranging_window_size;                       /**< Ranging window size */
+    uint32_t preassigned_equalization_delay;            /**< ONU pre-assigned equalization delay */
+    uint32_t eqd_cycles_number;                     /**< How many ranging windows are opened during a single ONU activation process */
+    bcmolt_pon_power_level power_level;             /**< ONU power level configuration */
+    bcmolt_control_state ds_fec_mode;               /**< DS FEC mode */
+    bcmolt_pon_drift_control drift_control;         /**< Drift control process configuration */
+    bcmolt_ber_interval ds_ber_reporting_interval;  /**< DS BER reporting interval */
+    uint8_t los_alarm_threshold;                    /**< LOS alarm threshold */
+    bcmolt_status los_initial_value;                /**< LOS initial value following PON activation */
+    bcmolt_gpon_onu_alarms_thresholds onu_alarms_thresholds;    /**< ONU alarms thresholds configuration */
+    bcmolt_ber_monitor_params ber_monitor;                      /**< BER monitor process configuration */
+    uint16_t ploam_ack_timeout;                 /**< Timeout for receiving ACK ploam */
+    bcmolt_gpon_onu_activation onu_activation;  /**< ONU activation control parameters */
+    bcmolt_gpon_sn_acquisition sn_acquisition;  /**< Serial Number process configuration */
+    bcmolt_gpon_key_exchange key_exchange;      /**< Key Exchange process configuration */
+    bcmolt_pon_protection_switching protection_switching;       /**< Protection switching control */
+    bcmolt_cbr_rt_allocation_profile cbr_rt_allocation_profile; /**< CBR Real Time allocation profile */
+#define BCMOLT_GPON_NI_CFG_DATA_CBR_NRT_ALLOCATION_PROFILE_LEN  2
+    bcmolt_arr_u16_2 cbr_nrt_allocation_profile;                /**< CBR non Real Time allocation profile */
+    bcmolt_pon_dba dba; /**< DBA configuration */
+    bcmolt_onu_power_management_configuration power_management;             /**< ONU power management control */
+    bcmolt_rogue_onu_detection_process rogue_onu_detection_process;         /**< Rogue ONU detection process configuration */
+    bcmolt_periodic_standby_pon_monitoring periodic_standby_pon_monitoring; /**< Periodic Standby PON monitoring */
+    bcmolt_prbs_checker_config prbs_checker;                        /**< US PRBS checker configuration */
+    bcmolt_prbs_generator_config prbs_generator;                    /**< DS PRBS generator configuration */
+    bcmolt_gpon_alloc_id min_data_alloc_id;                         /**< Min data Alloc ID value */
+    bcmolt_automatic_onu_deactivation automatic_onu_deactivation;   /**< Option to disable the automatic deactivation of ONUs due to alarms */
+    uint32_t us_bandwidth_limit;    /**< Total PON upstream bandwidth limit in bytes per second. */
+    bcmolt_gpon_onu_with_state_list_u16_max_128 all_onus;                   /**< All ONUs currently provisioned on this PON. */
+    bcmolt_gpon_gem_port_with_state_list_u16_max_128 all_mcast_gem_ports;   /**< All multicast GEM ports currently provisioned on this PON. */
+    bcmolt_gpon_ni_debug debug; /**< PON NI debug parameters */
+    bcmolt_gpon_onu_upgrade_params onu_upgrade_params;  /**< ONU upgrade params. */
+    uint16_t ps_c_wait_before_deactivation_timeout;     /**< PS type C timeout in milliseconds */
+    bcmolt_control_state bip32_indication_control;      /**< Option to disable the bip32 indication when the value is zero */
+} bcmolt_gpon_ni_cfg_data;
+
+/** Transport message definition for "cfg" group of "gpon_ni" object. 
+ */
+typedef struct bcmolt_gpon_ni_cfg
+{
+    bcmolt_cfg hdr;                 /**< Transport header. */
+    bcmolt_gpon_ni_key key;         /**< Object key. */
+    bcmolt_gpon_ni_cfg_data data;   /**< All properties that must be set by the user. */
+} bcmolt_gpon_ni_cfg;
+
+/** Structure definition for the "stat" group of the "gpon_ni" object. 
+ */
+typedef struct bcmolt_gpon_ni_stat_data
+{
+    uint64_t fec_codewords;             /**< Received FEC codewords. */
+    uint64_t fec_codewords_uncorrected; /**< Received uncorrected FEC codewords. */
+    uint64_t bip8_bytes;                /**< Received bytes protected by bip8. */
+    uint64_t bip8_errors;               /**< Received bip8 errors. */
+    uint64_t rx_gem_packets;            /**< Received GEM frames. */
+    uint64_t rx_gem_dropped;            /**< Received dropped GEM ID packets. */
+    uint64_t rx_gem_idle;               /**< Received idle GEM frames. */
+    uint64_t rx_gem_corrected;          /**< Received corrected GEM frames. */
+    uint64_t rx_gem_illegal;            /**< Received illegal GEM frames. */
+    uint64_t rx_allocations_valid;      /**< Received valid allocations. */
+    uint64_t rx_allocations_invalid;    /**< Received invalid allocations. */
+    uint64_t rx_allocations_disabled;   /**< Received disabled allocations. */
+    uint64_t rx_ploams;                 /**< Received Ploams. */
+    uint64_t rx_ploams_non_idle;        /**< Received non idle Ploams. */
+    uint64_t rx_ploams_error;           /**< Received error Ploams. */
+    uint64_t rx_ploams_dropped;         /**< Received dropped Ploams. */
+    uint64_t rx_cpu;                    /**< Received CPU packets. */
+    uint64_t rx_omci;                   /**< Received OMCI packets. */
+    uint64_t rx_omci_packets_crc_error; /**< Received OMCI packets with CRC errors. */
+    uint64_t rx_dropped_too_short;      /**< Received packets dropped due to length too short. */
+    uint64_t rx_dropped_too_long;       /**< Received packet dropped due to length too long. */
+    uint64_t rx_crc_errors;             /**< Received packet dropped due to crc error. */
+    uint64_t rx_key_errors;             /**< Received packet dropped due to key error. */
+    uint64_t rx_fragments_errors;       /**< Received packet dropped due to fragmentation error. */
+    uint64_t rx_packets_dropped;        /**< Global dropped packets. */
+    uint64_t tx_gem;                    /**< Transmitted GEM frames. */
+    uint64_t tx_ploams;                 /**< Transmitted Ploams. */
+    uint64_t tx_gem_fragments;          /**< Transmitted GEM fragments. */
+    uint64_t tx_cpu;                    /**< Transmitted CPU packets. */
+    uint64_t tx_omci;                   /**< Transmitted OMCI packets. */
+    uint8_t tx_cpu_omci_packets_dropped;    /**< Transmit packets dropped due to illegal length. */
+    uint64_t tx_dropped_illegal_length;     /**< Transmitted packet dropped due to illegal length. */
+    uint64_t tx_dropped_tpid_miss;          /**< Dropped because of TPID miss. */
+    uint64_t tx_dropped_vid_miss;           /**< Dropped because of VID miss. */
+} bcmolt_gpon_ni_stat_data;
+
+/** Transport message definition for "stat" group of "gpon_ni" object. 
+ */
+typedef struct bcmolt_gpon_ni_stat
+{
+    bcmolt_stat hdr;                /**< Transport header. */
+    bcmolt_gpon_ni_key key;         /**< Object key. */
+    bcmolt_gpon_ni_stat_data data;  /**< All properties that must be set by the user. */
+} bcmolt_gpon_ni_stat;
+
+/** Structure definition for the "stat_cfg" group of the "gpon_ni" object. 
+ */
+typedef struct bcmolt_gpon_ni_stat_cfg_data
+{
+    bcmolt_stat_alarm_config cfg;   /**< Statistic alarm configuration. */
+} bcmolt_gpon_ni_stat_cfg_data;
+
+/** Transport message definition for "stat_cfg" group of "gpon_ni" object. 
+ */
+typedef struct bcmolt_gpon_ni_stat_cfg
+{
+    bcmolt_stat_cfg hdr;                /**< Transport header. */
+    bcmolt_gpon_ni_key key;             /**< Object key. */
+    bcmolt_gpon_ni_stat_cfg_data data;  /**< All properties that must be set by the user. */
+} bcmolt_gpon_ni_stat_cfg;
+
+/** Transport message definition for "activate_all_onus_completed" group of 
+ * "gpon_ni" object. 
+ */
+typedef struct bcmolt_gpon_ni_activate_all_onus_completed
+{
+    bcmolt_auto hdr;        /**< Transport header. */
+    bcmolt_gpon_ni_key key; /**< Object key. */
+} bcmolt_gpon_ni_activate_all_onus_completed;
+
+/** Structure definition for the "cpu_packets_failure" group of the "gpon_ni" 
+ * object. 
+ *
+ * A failure was encountered during the "cpu_packets" proxy operation. 
+ */
+typedef struct bcmolt_gpon_ni_cpu_packets_failure_data
+{
+    bcmolt_packet_injection_error error;    /**< The error that was encountered. */
+    bcmolt_gpon_gem_id gem_port_id;         /**< The GEM port that caused the error. */
+} bcmolt_gpon_ni_cpu_packets_failure_data;
+
+/** Transport message definition for "cpu_packets_failure" group of "gpon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_ni_cpu_packets_failure
+{
+    bcmolt_auto hdr;        /**< Transport header. */
+    bcmolt_gpon_ni_key key; /**< Object key. */
+    bcmolt_gpon_ni_cpu_packets_failure_data data;   /**< All properties that must be set by the user. */
+} bcmolt_gpon_ni_cpu_packets_failure;
+
+/** Transport message definition for "deactivate_all_onus_completed" group of 
+ * "gpon_ni" object. 
+ */
+typedef struct bcmolt_gpon_ni_deactivate_all_onus_completed
+{
+    bcmolt_auto hdr;        /**< Transport header. */
+    bcmolt_gpon_ni_key key; /**< Object key. */
+} bcmolt_gpon_ni_deactivate_all_onus_completed;
+
+/** Transport message definition for "disable_all_onus_completed" group of 
+ * "gpon_ni" object. 
+ */
+typedef struct bcmolt_gpon_ni_disable_all_onus_completed
+{
+    bcmolt_auto hdr;        /**< Transport header. */
+    bcmolt_gpon_ni_key key; /**< Object key. */
+} bcmolt_gpon_ni_disable_all_onus_completed;
+
+/** Transport message definition for "enable_all_onus_completed" group of 
+ * "gpon_ni" object. 
+ */
+typedef struct bcmolt_gpon_ni_enable_all_onus_completed
+{
+    bcmolt_auto hdr;        /**< Transport header. */
+    bcmolt_gpon_ni_key key; /**< Object key. */
+} bcmolt_gpon_ni_enable_all_onus_completed;
+
+/** Structure definition for the "los" group of the "gpon_ni" object. 
+ */
+typedef struct bcmolt_gpon_ni_los_data
+{
+    bcmolt_status status;   /**< status. */
+} bcmolt_gpon_ni_los_data;
+
+/** Transport message definition for "los" group of "gpon_ni" object. 
+ */
+typedef struct bcmolt_gpon_ni_los
+{
+    bcmolt_auto hdr;                /**< Transport header. */
+    bcmolt_gpon_ni_key key;         /**< Object key. */
+    bcmolt_gpon_ni_los_data data;   /**< All properties that must be set by the user. */
+} bcmolt_gpon_ni_los;
+
+/** Structure definition for the "onu_discovered" group of the "gpon_ni" object. 
+ */
+typedef struct bcmolt_gpon_ni_onu_discovered_data
+{
+    bcmolt_serial_number serial_number; /**< serial number. */
+    uint32_t ranging_time;              /**< ranging time. */
+    bcmolt_gpon_onu_id onu_id;          /**< onu_id. */
+} bcmolt_gpon_ni_onu_discovered_data;
+
+/** Transport message definition for "onu_discovered" group of "gpon_ni" object. 
+ */
+typedef struct bcmolt_gpon_ni_onu_discovered
+{
+    bcmolt_auto hdr;        /**< Transport header. */
+    bcmolt_gpon_ni_key key; /**< Object key. */
+    bcmolt_gpon_ni_onu_discovered_data data;    /**< All properties that must be set by the user. */
+} bcmolt_gpon_ni_onu_discovered;
+
+/** Structure definition for the "onu_upgrade_complete" group of the "gpon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_ni_onu_upgrade_complete_data
+{
+    bcmos_bool status;  /**< Success or failure.  Against entire upgrade process. */
+    bcmolt_gpon_onu_upgrade_status_list_u32 list_of_failed_entities;    /**< List of ONU-IDs the upgrade failed for. */
+} bcmolt_gpon_ni_onu_upgrade_complete_data;
+
+/** Transport message definition for "onu_upgrade_complete" group of "gpon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_ni_onu_upgrade_complete
+{
+    bcmolt_auto hdr;        /**< Transport header. */
+    bcmolt_gpon_ni_key key; /**< Object key. */
+    bcmolt_gpon_ni_onu_upgrade_complete_data data;  /**< All properties that must be set by the user. */
+} bcmolt_gpon_ni_onu_upgrade_complete;
+
+/** Structure definition for the "protection_switching_onus_ranged" group of the 
+ * "gpon_ni" object. 
+ *
+ * After a switchover is complete and all ONU ranging times have stabilized, 
+ * this indication is sent to inform the host of all new ONU EQDs. 
+ */
+typedef struct bcmolt_gpon_ni_protection_switching_onus_ranged_data
+{
+    bcmolt_gpon_onu_eqd_list_u32 onus;  /**< ONUs. */
+} bcmolt_gpon_ni_protection_switching_onus_ranged_data;
+
+/** Transport message definition for "protection_switching_onus_ranged" group of 
+ * "gpon_ni" object. 
+ */
+typedef struct bcmolt_gpon_ni_protection_switching_onus_ranged
+{
+    bcmolt_auto hdr;        /**< Transport header. */
+    bcmolt_gpon_ni_key key; /**< Object key. */
+    bcmolt_gpon_ni_protection_switching_onus_ranged_data data;  /**< All properties that must be set by the user. */
+} bcmolt_gpon_ni_protection_switching_onus_ranged;
+
+/** Structure definition for the "protection_switching_switchover_completed" 
+ * group of the "gpon_ni" object. 
+ */
+typedef struct bcmolt_gpon_ni_protection_switching_switchover_completed_data
+{
+    bcmolt_result result;   /**< Result. */
+} bcmolt_gpon_ni_protection_switching_switchover_completed_data;
+
+/** Transport message definition for "protection_switching_switchover_completed" 
+ * group of "gpon_ni" object. 
+ */
+typedef struct bcmolt_gpon_ni_protection_switching_switchover_completed
+{
+    bcmolt_auto hdr;        /**< Transport header. */
+    bcmolt_gpon_ni_key key; /**< Object key. */
+    bcmolt_gpon_ni_protection_switching_switchover_completed_data data; /**< All properties that must be set by the user. */
+} bcmolt_gpon_ni_protection_switching_switchover_completed;
+
+/** Structure definition for the "protection_switching_traffic_resume" group of 
+ * the "gpon_ni" object. 
+ */
+typedef struct bcmolt_gpon_ni_protection_switching_traffic_resume_data
+{
+    bcmolt_traffic_resume_result result;    /**< Result. */
+} bcmolt_gpon_ni_protection_switching_traffic_resume_data;
+
+/** Transport message definition for "protection_switching_traffic_resume" group 
+ * of "gpon_ni" object. 
+ */
+typedef struct bcmolt_gpon_ni_protection_switching_traffic_resume
+{
+    bcmolt_auto hdr;        /**< Transport header. */
+    bcmolt_gpon_ni_key key; /**< Object key. */
+    bcmolt_gpon_ni_protection_switching_traffic_resume_data data;   /**< All properties that must be set by the user. */
+} bcmolt_gpon_ni_protection_switching_traffic_resume;
+
+/** Structure definition for the "rogue_detection_completed" group of the 
+ * "gpon_ni" object. 
+ */
+typedef struct bcmolt_gpon_ni_rogue_detection_completed_data
+{
+    bcmolt_rogue_detection_window window_type;          /**< Silent Window or Cut off Window */
+    bcmolt_rogue_measurement_result measurement_status; /**< Status of the rogue ONU detection result. */
+    bcmolt_gpon_alloc_id alloc_id;                      /**< Alloc-ID */
+    bcmolt_gpon_onu_id onu_id;                  /**< ONU-ID */
+    bcmos_bool is_delineation;                  /**< Burst Delineation detected during the rogue ONU detection. */
+    bcmos_bool is_ed;                           /**< Is ED. */
+    bcmolt_u8_list_u32 rx_data;                 /**< Captured PLOAMu message if the burst delinieation was detected. */
+    bcmolt_gpon_onu_id ploam_received_onu_id;   /**< ONU ID received in the ploam */
+    bcmos_bool ploam_received_crc_error;        /**< Crc error in the received ploam */
+} bcmolt_gpon_ni_rogue_detection_completed_data;
+
+/** Transport message definition for "rogue_detection_completed" group of 
+ * "gpon_ni" object. 
+ */
+typedef struct bcmolt_gpon_ni_rogue_detection_completed
+{
+    bcmolt_auto hdr;        /**< Transport header. */
+    bcmolt_gpon_ni_key key; /**< Object key. */
+    bcmolt_gpon_ni_rogue_detection_completed_data data; /**< All properties that must be set by the user. */
+} bcmolt_gpon_ni_rogue_detection_completed;
+
+/** Transport message definition for "rogue_onu_special_map_cycle_start" group 
+ * of "gpon_ni" object. 
+ */
+typedef struct bcmolt_gpon_ni_rogue_onu_special_map_cycle_start
+{
+    bcmolt_auto hdr;        /**< Transport header. */
+    bcmolt_gpon_ni_key key; /**< Object key. */
+} bcmolt_gpon_ni_rogue_onu_special_map_cycle_start;
+
+/** Transport message definition for "serial_number_acquisition_cycle_start" 
+ * group of "gpon_ni" object. 
+ */
+typedef struct bcmolt_gpon_ni_serial_number_acquisition_cycle_start
+{
+    bcmolt_auto hdr;        /**< Transport header. */
+    bcmolt_gpon_ni_key key; /**< Object key. */
+} bcmolt_gpon_ni_serial_number_acquisition_cycle_start;
+
+/** Structure definition for the "standby_pon_monitoring_cycle_completed" group 
+ * of the "gpon_ni" object. 
+ */
+typedef struct bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_data
+{
+    uint32_t number_of_detected_delimiter;  /**< number of detected delimiter. */
+    bcmolt_status energy_detect_signal;     /**< energy detect signal. */
+} bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_data;
+
+/** Transport message definition for "standby_pon_monitoring_cycle_completed" 
+ * group of "gpon_ni" object. 
+ */
+typedef struct bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed
+{
+    bcmolt_auto hdr;        /**< Transport header. */
+    bcmolt_gpon_ni_key key; /**< Object key. */
+    bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_data data;    /**< All properties that must be set by the user. */
+} bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed;
+
+/** Structure definition for the "stat_alarm_cleared" group of the "gpon_ni" 
+ * object. 
+ *
+ * Sent when a configured statistic alarm condition is no longer met. 
+ */
+typedef struct bcmolt_gpon_ni_stat_alarm_cleared_data
+{
+    bcmolt_gpon_ni_stat_id stat;    /**< Statistic identifier. */
+} bcmolt_gpon_ni_stat_alarm_cleared_data;
+
+/** Transport message definition for "stat_alarm_cleared" group of "gpon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_ni_stat_alarm_cleared
+{
+    bcmolt_auto hdr;        /**< Transport header. */
+    bcmolt_gpon_ni_key key; /**< Object key. */
+    bcmolt_gpon_ni_stat_alarm_cleared_data data;    /**< All properties that must be set by the user. */
+} bcmolt_gpon_ni_stat_alarm_cleared;
+
+/** Structure definition for the "stat_alarm_raised" group of the "gpon_ni" 
+ * object. 
+ *
+ * Sent when a configured statistic alarm condition has been met. 
+ */
+typedef struct bcmolt_gpon_ni_stat_alarm_raised_data
+{
+    bcmolt_gpon_ni_stat_id stat;    /**< Statistic identifier. */
+} bcmolt_gpon_ni_stat_alarm_raised_data;
+
+/** Transport message definition for "stat_alarm_raised" group of "gpon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_ni_stat_alarm_raised
+{
+    bcmolt_auto hdr;        /**< Transport header. */
+    bcmolt_gpon_ni_key key; /**< Object key. */
+    bcmolt_gpon_ni_stat_alarm_raised_data data; /**< All properties that must be set by the user. */
+} bcmolt_gpon_ni_stat_alarm_raised;
+
+/** Structure definition for the "state_change_completed" group of the "gpon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_ni_state_change_completed_data
+{
+    bcmolt_result result;               /**< Result. */
+    bcmolt_pon_state previous_state;    /**< Previous state. */
+    bcmolt_pon_state new_state;         /**< New state. */
+} bcmolt_gpon_ni_state_change_completed_data;
+
+/** Transport message definition for "state_change_completed" group of "gpon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_ni_state_change_completed
+{
+    bcmolt_auto hdr;        /**< Transport header. */
+    bcmolt_gpon_ni_key key; /**< Object key. */
+    bcmolt_gpon_ni_state_change_completed_data data;    /**< All properties that must be set by the user. */
+} bcmolt_gpon_ni_state_change_completed;
+
+/** Structure definition for the "tod_request_completed" group of the "gpon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_ni_tod_request_completed_data
+{
+    bcmolt_str_64 tod_string;   /**< tod_string. */
+    uint32_t sfc;               /**< sfc. */
+    uint64_t rtc_offset_sec;    /**< rtc_offset_sec. */
+    uint32_t rtc_offset_nsec;   /**< rtc_offset_nsec. */
+    bcmolt_result status;       /**< status. */
+} bcmolt_gpon_ni_tod_request_completed_data;
+
+/** Transport message definition for "tod_request_completed" group of "gpon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_ni_tod_request_completed
+{
+    bcmolt_auto hdr;        /**< Transport header. */
+    bcmolt_gpon_ni_key key; /**< Object key. */
+    bcmolt_gpon_ni_tod_request_completed_data data; /**< All properties that must be set by the user. */
+} bcmolt_gpon_ni_tod_request_completed;
+
+/** Structure definition for the "auto_cfg" group of the "gpon_ni" object. 
+ */
+typedef struct bcmolt_gpon_ni_auto_cfg_data
+{
+    bcmos_bool activate_all_onus_completed;     /**< If true, indications of type "activate_all_onus_completed" will be generated. */
+    bcmos_bool cpu_packets_failure;             /**< If true, indications of type "cpu_packets_failure" will be generated. */
+    bcmos_bool deactivate_all_onus_completed;   /**< If true, indications of type "deactivate_all_onus_completed" will be generated. */
+    bcmos_bool disable_all_onus_completed;      /**< If true, indications of type "disable_all_onus_completed" will be generated. */
+    bcmos_bool enable_all_onus_completed;       /**< If true, indications of type "enable_all_onus_completed" will be generated. */
+    bcmos_bool los;                     /**< If true, indications of type "los" will be generated. */
+    bcmos_bool onu_discovered;          /**< If true, indications of type "onu_discovered" will be generated. */
+    bcmos_bool onu_upgrade_complete;    /**< If true, indications of type "onu_upgrade_complete" will be generated. */
+    bcmos_bool protection_switching_onus_ranged;            /**< If true, indications of type "protection_switching_onus_ranged" will be generated. */
+    bcmos_bool protection_switching_switchover_completed;   /**< If true, indications of type "protection_switching_switchover_completed" will be generated. */
+    bcmos_bool protection_switching_traffic_resume;         /**< If true, indications of type "protection_switching_traffic_resume" will be generated. */
+    bcmos_bool rogue_detection_completed;                   /**< If true, indications of type "rogue_detection_completed" will be generated. */
+    bcmos_bool rogue_onu_special_map_cycle_start;           /**< If true, indications of type "rogue_onu_special_map_cycle_start" will be generated. */
+    bcmos_bool serial_number_acquisition_cycle_start;       /**< If true, indications of type "serial_number_acquisition_cycle_start" will be generated. */
+    bcmos_bool standby_pon_monitoring_cycle_completed;      /**< If true, indications of type "standby_pon_monitoring_cycle_completed" will be generated. */
+    bcmos_bool stat_alarm_cleared;      /**< If true, indications of type "stat_alarm_cleared" will be generated. */
+    bcmos_bool stat_alarm_raised;       /**< If true, indications of type "stat_alarm_raised" will be generated. */
+    bcmos_bool state_change_completed;  /**< If true, indications of type "state_change_completed" will be generated. */
+    bcmos_bool tod_request_completed;   /**< If true, indications of type "tod_request_completed" will be generated. */
+} bcmolt_gpon_ni_auto_cfg_data;
+
+/** Transport message definition for "auto_cfg" group of "gpon_ni" object. 
+ */
+typedef struct bcmolt_gpon_ni_auto_cfg
+{
+    bcmolt_auto_cfg hdr;                /**< Transport header. */
+    bcmolt_gpon_ni_key key;             /**< Object key. */
+    bcmolt_gpon_ni_auto_cfg_data data;  /**< All properties that must be set by the user. */
+} bcmolt_gpon_ni_auto_cfg;
+
+/** Structure definition for the "disable_serial_number" group of the "gpon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_ni_disable_serial_number_data
+{
+    bcmolt_disable_serial_number_control control;   /**< control. */
+    bcmolt_serial_number serial_number;             /**< serial number. */
+} bcmolt_gpon_ni_disable_serial_number_data;
+
+/** Transport message definition for "disable_serial_number" group of "gpon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_ni_disable_serial_number
+{
+    bcmolt_oper hdr;        /**< Transport header. */
+    bcmolt_gpon_ni_key key; /**< Object key. */
+    bcmolt_gpon_ni_disable_serial_number_data data; /**< All properties that must be set by the user. */
+} bcmolt_gpon_ni_disable_serial_number;
+
+/** Structure definition for the 
+ * "protection_switching_type_c_set_multiple_onu_state" group of the "gpon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_data
+{
+    bcmolt_switch_over_type_c_onu_state onu_state;  /**< onu state. */
+    bcmolt_gpon_onu_id_list_u32_max_256 onu_list;   /**< onu list. */
+} bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_data;
+
+/** Transport message definition for 
+ * "protection_switching_type_c_set_multiple_onu_state" group of "gpon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state
+{
+    bcmolt_oper hdr;        /**< Transport header. */
+    bcmolt_gpon_ni_key key; /**< Object key. */
+    bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_data data;    /**< All properties that must be set by the user. */
+} bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state;
+
+/** Transport message definition for "reset" group of "gpon_ni" object. 
+ */
+typedef struct bcmolt_gpon_ni_reset
+{
+    bcmolt_oper hdr;        /**< Transport header. */
+    bcmolt_gpon_ni_key key; /**< Object key. */
+} bcmolt_gpon_ni_reset;
+
+/** Structure definition for the "rogue_detection_window" group of the "gpon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_ni_rogue_detection_window_data
+{
+    bcmolt_rogue_detection_window window_type;  /**< Type of silent measurement to execute */
+    bcmolt_gpon_alloc_id alloc_id;              /**< ALLOC ID to scan */
+    bcmolt_gpon_onu_id onu_id;                  /**< ONU ID to scan */
+    bcmos_bool second_ranging_window;           /**< Not currently supported */
+} bcmolt_gpon_ni_rogue_detection_window_data;
+
+/** Transport message definition for "rogue_detection_window" group of "gpon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_ni_rogue_detection_window
+{
+    bcmolt_oper hdr;        /**< Transport header. */
+    bcmolt_gpon_ni_key key; /**< Object key. */
+    bcmolt_gpon_ni_rogue_detection_window_data data;    /**< All properties that must be set by the user. */
+} bcmolt_gpon_ni_rogue_detection_window;
+
+/** Structure definition for the "set_onu_state" group of the "gpon_ni" object. 
+ *
+ * Set the operation state of all ONUs. 
+ */
+typedef struct bcmolt_gpon_ni_set_onu_state_data
+{
+    bcmolt_onu_operation onu_state; /**< New operation state of all ONUs.  The default operation may be configured by the GPON NI configuration object : gpon_ni.cfg.sn_acquisition. */
+} bcmolt_gpon_ni_set_onu_state_data;
+
+/** Transport message definition for "set_onu_state" group of "gpon_ni" object. 
+ */
+typedef struct bcmolt_gpon_ni_set_onu_state
+{
+    bcmolt_oper hdr;                        /**< Transport header. */
+    bcmolt_gpon_ni_key key;                 /**< Object key. */
+    bcmolt_gpon_ni_set_onu_state_data data; /**< All properties that must be set by the user. */
+} bcmolt_gpon_ni_set_onu_state;
+
+/** Structure definition for the "set_pon_state" group of the "gpon_ni" object. 
+ */
+typedef struct bcmolt_gpon_ni_set_pon_state_data
+{
+    bcmolt_pon_operation pon_state; /**< PON state. */
+} bcmolt_gpon_ni_set_pon_state_data;
+
+/** Transport message definition for "set_pon_state" group of "gpon_ni" object. 
+ */
+typedef struct bcmolt_gpon_ni_set_pon_state
+{
+    bcmolt_oper hdr;                        /**< Transport header. */
+    bcmolt_gpon_ni_key key;                 /**< Object key. */
+    bcmolt_gpon_ni_set_pon_state_data data; /**< All properties that must be set by the user. */
+} bcmolt_gpon_ni_set_pon_state;
+
+/** Transport message definition for "single_request_standby_pon_monitoring" 
+ * group of "gpon_ni" object. 
+ */
+typedef struct bcmolt_gpon_ni_single_request_standby_pon_monitoring
+{
+    bcmolt_oper hdr;        /**< Transport header. */
+    bcmolt_gpon_ni_key key; /**< Object key. */
+} bcmolt_gpon_ni_single_request_standby_pon_monitoring;
+
+/** Structure definition for the "start_onu_upgrade" group of the "gpon_ni" 
+ * object. 
+ *
+ * OLT to ONU firmware transfer 
+ */
+typedef struct bcmolt_gpon_ni_start_onu_upgrade_data
+{
+    bcmolt_pon_onu_id_list_u32 list_of_onu_ids; /**< List of ONU IDs to upgrade the firmware. */
+} bcmolt_gpon_ni_start_onu_upgrade_data;
+
+/** Transport message definition for "start_onu_upgrade" group of "gpon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_ni_start_onu_upgrade
+{
+    bcmolt_oper hdr;        /**< Transport header. */
+    bcmolt_gpon_ni_key key; /**< Object key. */
+    bcmolt_gpon_ni_start_onu_upgrade_data data; /**< All properties that must be set by the user. */
+} bcmolt_gpon_ni_start_onu_upgrade;
+
+/** Transport message definition for "tod_request" group of "gpon_ni" object. 
+ */
+typedef struct bcmolt_gpon_ni_tod_request
+{
+    bcmolt_oper hdr;        /**< Transport header. */
+    bcmolt_gpon_ni_key key; /**< Object key. */
+} bcmolt_gpon_ni_tod_request;
+
+/** Structure definition for the "broadcast_ploam_packet" group of the "gpon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_ni_broadcast_ploam_packet_data
+{
+#define BCMOLT_GPON_NI_BROADCAST_PLOAM_PACKET_DATA_PLOAM_LEN    12
+    bcmolt_arr_u8_12 ploam; /**< ploam. */
+} bcmolt_gpon_ni_broadcast_ploam_packet_data;
+
+/** Transport message definition for "broadcast_ploam_packet" group of "gpon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_ni_broadcast_ploam_packet
+{
+    bcmolt_proxy hdr;       /**< Transport header. */
+    bcmolt_gpon_ni_key key; /**< Object key. */
+    bcmolt_gpon_ni_broadcast_ploam_packet_data data;    /**< All properties that must be set by the user. */
+} bcmolt_gpon_ni_broadcast_ploam_packet;
+
+/** Structure definition for the "cpu_packets" group of the "gpon_ni" object. 
+ */
+typedef struct bcmolt_gpon_ni_cpu_packets_data
+{
+    bcmolt_packet_type packet_type;                     /**< packet type. */
+    bcmos_bool calc_crc;                                /**< calc crc. */
+    bcmolt_gpon_gem_id_list_u8_max_16 gem_port_list;    /**< gem port list. */
+    bcmolt_u8_list_u32_max_2048 buffer;                 /**< buffer. */
+} bcmolt_gpon_ni_cpu_packets_data;
+
+/** Transport message definition for "cpu_packets" group of "gpon_ni" object. 
+ */
+typedef struct bcmolt_gpon_ni_cpu_packets
+{
+    bcmolt_proxy hdr;                       /**< Transport header. */
+    bcmolt_gpon_ni_key key;                 /**< Object key. */
+    bcmolt_gpon_ni_cpu_packets_data data;   /**< All properties that must be set by the user. */
+} bcmolt_gpon_ni_cpu_packets;
+
+/** Structure definition for the "key" group of the "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_key
+{
+    bcmolt_gpon_ni pon_ni;      /**< PON network interface. */
+    bcmolt_gpon_onu_id onu_id;  /**< ONU ID. */
+} bcmolt_gpon_onu_key;
+
+/** Structure definition for the "cfg" group of the "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_cfg_data
+{
+    bcmolt_onu_state onu_state;         /**< Current ONU state */
+    bcmolt_serial_number serial_number; /**< ONU serial number */
+#define BCMOLT_GPON_ONU_CFG_DATA_PASSWORD_LEN   10
+    bcmolt_arr_u8_10 password;          /**< ONU password */
+    bcmos_bool auto_password_learning;  /**< Enable\Disable automatic password learning */
+    bcmos_bool us_fec;                  /**< Enable\Disable US FEC for ONU */
+    bcmolt_gpon_gem_id omci_port_id;    /**< OMCI port ID  */
+    bcmolt_ber_interval ds_ber_reporting_interval;  /**< DS BER reporting interval */
+    bcmolt_aes_key aes_encryption_key;              /**< AES encryption key.  */
+    bcmolt_gpon_onu_alarm_state alarm_state;        /**< State of all ONU alarms.  This is normally read-only and can only be written when the PON is in active-standby mode to keep the ONU in sync. */
+    uint32_t ranging_time;                  /**< ONU ranging time.  This is normally read-only and can only be written when the PON is in active-standby mode to keep the ONU in sync. */
+    bcmolt_status disabled_after_discovery; /**< This ONU was disabled after SN discovery */
+    bcmolt_deactivation_reason deactivation_reason;                 /**< Reason for the last ONU deactivation */
+    bcmolt_gpon_gem_port_with_state_list_u16_max_256 all_gem_ports; /**< All unicast GEM ports currently provisioned on this ONU. */
+    bcmolt_gpon_alloc_with_state_list_u16_max_32 all_allocs;        /**< All alloc IDs currently provisioned on this ONU. */
+    bcmos_bool onu_ps_type_c;                       /**< onu protection switching type c. */
+    bcmolt_extended_guard_time extended_guard_time; /**< Additional guard time (in bytes) for this ONU. */
+} bcmolt_gpon_onu_cfg_data;
+
+/** Transport message definition for "cfg" group of "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_cfg
+{
+    bcmolt_cfg hdr;                 /**< Transport header. */
+    bcmolt_gpon_onu_key key;        /**< Object key. */
+    bcmolt_gpon_onu_cfg_data data;  /**< All properties that must be set by the user. */
+} bcmolt_gpon_onu_cfg;
+
+/** Structure definition for the "stat" group of the "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_stat_data
+{
+    uint64_t fec_codewords;             /**< Total received FEC codewords. */
+    uint64_t fec_bytes_corrected;       /**< FEC codewords corrected bytes. */
+    uint64_t fec_codewords_corrected;   /**< FEC corrected codewords error . */
+    uint64_t fec_codewords_uncorrected; /**< FEC not corrected codewords error. */
+    uint64_t bip8_bytes;                /**< Received bytes for BIP8. */
+    uint64_t bip8_errors;               /**< Bit error according to BIP8. */
+    uint64_t rx_ploams_crc_error;       /**< Received PLOAMs with CRC error. */
+    uint64_t rx_ploams_non_idle;        /**< Received non idle PLOAMs. */
+    uint64_t positive_drift;            /**< Positive drift. */
+    uint64_t negative_drift;            /**< Negative drift. */
+    uint64_t rx_omci;                   /**< Received OMCI packets. */
+    uint64_t rx_omci_packets_crc_error; /**< Received OMCI packets with CRC errors. */
+    uint64_t ber_reported;              /**< BER reported. */
+    uint64_t unreceived_burst;          /**< Unreceived burst. */
+    uint64_t lcdg_errors;               /**< LCDG errors. */
+    uint64_t rdi_errors;                /**< RDI errors. */
+    uint64_t rx_bytes;                  /**< rx bytes. */
+    uint64_t rx_packets;                /**< rx packets. */
+    uint64_t tx_bytes;                  /**< tx bytes. */
+    uint64_t tx_packets;                /**< tx packets. */
+} bcmolt_gpon_onu_stat_data;
+
+/** Transport message definition for "stat" group of "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_stat
+{
+    bcmolt_stat hdr;                /**< Transport header. */
+    bcmolt_gpon_onu_key key;        /**< Object key. */
+    bcmolt_gpon_onu_stat_data data; /**< All properties that must be set by the user. */
+} bcmolt_gpon_onu_stat;
+
+/** Structure definition for the "stat_cfg" group of the "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_stat_cfg_data
+{
+    bcmolt_stat_alarm_config cfg;   /**< Statistic alarm configuration. */
+} bcmolt_gpon_onu_stat_cfg_data;
+
+/** Transport message definition for "stat_cfg" group of "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_stat_cfg
+{
+    bcmolt_stat_cfg hdr;                /**< Transport header. */
+    bcmolt_gpon_onu_key key;            /**< Object key. */
+    bcmolt_gpon_onu_stat_cfg_data data; /**< All properties that must be set by the user. */
+} bcmolt_gpon_onu_stat_cfg;
+
+/** Structure definition for the "ber_interval_configuration_completed" group of 
+ * the "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_ber_interval_configuration_completed_data
+{
+    bcmolt_ber_interval ber_interval;   /**< BER interval in ms. */
+    bcmolt_result result;               /**< Result. */
+} bcmolt_gpon_onu_ber_interval_configuration_completed_data;
+
+/** Transport message definition for "ber_interval_configuration_completed" 
+ * group of "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_ber_interval_configuration_completed
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_gpon_onu_key key;    /**< Object key. */
+    bcmolt_gpon_onu_ber_interval_configuration_completed_data data; /**< All properties that must be set by the user. */
+} bcmolt_gpon_onu_ber_interval_configuration_completed;
+
+/** Structure definition for the "dfi" group of the "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_dfi_data
+{
+    bcmolt_status alarm_status; /**< alarm status. */
+} bcmolt_gpon_onu_dfi_data;
+
+/** Transport message definition for "dfi" group of "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_dfi
+{
+    bcmolt_auto hdr;                /**< Transport header. */
+    bcmolt_gpon_onu_key key;        /**< Object key. */
+    bcmolt_gpon_onu_dfi_data data;  /**< All properties that must be set by the user. */
+} bcmolt_gpon_onu_dfi;
+
+/** Structure definition for the "dgi" group of the "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_dgi_data
+{
+    bcmolt_status alarm_status; /**< alarm status. */
+} bcmolt_gpon_onu_dgi_data;
+
+/** Transport message definition for "dgi" group of "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_dgi
+{
+    bcmolt_auto hdr;                /**< Transport header. */
+    bcmolt_gpon_onu_key key;        /**< Object key. */
+    bcmolt_gpon_onu_dgi_data data;  /**< All properties that must be set by the user. */
+} bcmolt_gpon_onu_dgi;
+
+/** Structure definition for the "dowi" group of the "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_dowi_data
+{
+    bcmolt_status alarm_status; /**< Alarm status. */
+    int32_t drift_value;        /**< Calculated amount of drift (positive + negative as a signed value). */
+    uint32_t new_eqd;           /**< New EQD after drift is corrected (only valid if status is 'on'). */
+} bcmolt_gpon_onu_dowi_data;
+
+/** Transport message definition for "dowi" group of "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_dowi
+{
+    bcmolt_auto hdr;                /**< Transport header. */
+    bcmolt_gpon_onu_key key;        /**< Object key. */
+    bcmolt_gpon_onu_dowi_data data; /**< All properties that must be set by the user. */
+} bcmolt_gpon_onu_dowi;
+
+/** Structure definition for the "err" group of the "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_err_data
+{
+    uint8_t bip8_errors;    /**< BIP8 errors. */
+} bcmolt_gpon_onu_err_data;
+
+/** Transport message definition for "err" group of "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_err
+{
+    bcmolt_auto hdr;                /**< Transport header. */
+    bcmolt_gpon_onu_key key;        /**< Object key. */
+    bcmolt_gpon_onu_err_data data;  /**< All properties that must be set by the user. */
+} bcmolt_gpon_onu_err;
+
+/** Structure definition for the "invalid_dbru_report" group of the "gpon_onu" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_onu_invalid_dbru_report_data
+{
+    bcmolt_gpon_alloc_id alloc_id;  /**< Alloc-ID. */
+} bcmolt_gpon_onu_invalid_dbru_report_data;
+
+/** Transport message definition for "invalid_dbru_report" group of "gpon_onu" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_onu_invalid_dbru_report
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_gpon_onu_key key;    /**< Object key. */
+    bcmolt_gpon_onu_invalid_dbru_report_data data;  /**< All properties that must be set by the user. */
+} bcmolt_gpon_onu_invalid_dbru_report;
+
+/** Structure definition for the "key_exchange_completed" group of the 
+ * "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_key_exchange_completed_data
+{
+    bcmolt_aes_key new_key; /**< new key. */
+} bcmolt_gpon_onu_key_exchange_completed_data;
+
+/** Transport message definition for "key_exchange_completed" group of 
+ * "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_key_exchange_completed
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_gpon_onu_key key;    /**< Object key. */
+    bcmolt_gpon_onu_key_exchange_completed_data data;   /**< All properties that must be set by the user. */
+} bcmolt_gpon_onu_key_exchange_completed;
+
+/** Transport message definition for "key_exchange_cycle_skipped" group of 
+ * "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_key_exchange_cycle_skipped
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_gpon_onu_key key;    /**< Object key. */
+} bcmolt_gpon_onu_key_exchange_cycle_skipped;
+
+/** Structure definition for the "key_exchange_decrypt_required" group of the 
+ * "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_key_exchange_decrypt_required_data
+{
+    bcmolt_aes_key new_key; /**< new key. */
+} bcmolt_gpon_onu_key_exchange_decrypt_required_data;
+
+/** Transport message definition for "key_exchange_decrypt_required" group of 
+ * "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_key_exchange_decrypt_required
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_gpon_onu_key key;    /**< Object key. */
+    bcmolt_gpon_onu_key_exchange_decrypt_required_data data;    /**< All properties that must be set by the user. */
+} bcmolt_gpon_onu_key_exchange_decrypt_required;
+
+/** Structure definition for the "key_exchange_key_mismatch" group of the 
+ * "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_key_exchange_key_mismatch_data
+{
+    bcmolt_aes_key expected_key;    /**< expected key. */
+    bcmolt_aes_key received_key;    /**< received key. */
+} bcmolt_gpon_onu_key_exchange_key_mismatch_data;
+
+/** Transport message definition for "key_exchange_key_mismatch" group of 
+ * "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_key_exchange_key_mismatch
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_gpon_onu_key key;    /**< Object key. */
+    bcmolt_gpon_onu_key_exchange_key_mismatch_data data;    /**< All properties that must be set by the user. */
+} bcmolt_gpon_onu_key_exchange_key_mismatch;
+
+/** Transport message definition for "key_exchange_key_request_timeout" group of 
+ * "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_key_exchange_key_request_timeout
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_gpon_onu_key key;    /**< Object key. */
+} bcmolt_gpon_onu_key_exchange_key_request_timeout;
+
+/** Structure definition for the "key_exchange_unconsecutive_index" group of the 
+ * "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_key_exchange_unconsecutive_index_data
+{
+    uint32_t expected_index;    /**< expected index. */
+    uint32_t actual_index;      /**< actual index. */
+} bcmolt_gpon_onu_key_exchange_unconsecutive_index_data;
+
+/** Transport message definition for "key_exchange_unconsecutive_index" group of 
+ * "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_key_exchange_unconsecutive_index
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_gpon_onu_key key;    /**< Object key. */
+    bcmolt_gpon_onu_key_exchange_unconsecutive_index_data data; /**< All properties that must be set by the user. */
+} bcmolt_gpon_onu_key_exchange_unconsecutive_index;
+
+/** Structure definition for the "loai" group of the "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_loai_data
+{
+    bcmolt_status alarm_status; /**< alarm status. */
+} bcmolt_gpon_onu_loai_data;
+
+/** Transport message definition for "loai" group of "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_loai
+{
+    bcmolt_auto hdr;                /**< Transport header. */
+    bcmolt_gpon_onu_key key;        /**< Object key. */
+    bcmolt_gpon_onu_loai_data data; /**< All properties that must be set by the user. */
+} bcmolt_gpon_onu_loai;
+
+/** Structure definition for the "loki" group of the "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_loki_data
+{
+    bcmolt_status alarm_status; /**< alarm status. */
+} bcmolt_gpon_onu_loki_data;
+
+/** Transport message definition for "loki" group of "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_loki
+{
+    bcmolt_auto hdr;                /**< Transport header. */
+    bcmolt_gpon_onu_key key;        /**< Object key. */
+    bcmolt_gpon_onu_loki_data data; /**< All properties that must be set by the user. */
+} bcmolt_gpon_onu_loki;
+
+/** Structure definition for the "memi" group of the "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_memi_data
+{
+#define BCMOLT_GPON_ONU_MEMI_DATA_PLOAM_BUFFER_LEN  13
+    bcmolt_arr_u8_13 ploam_buffer;  /**< PLOAM buffer. */
+} bcmolt_gpon_onu_memi_data;
+
+/** Transport message definition for "memi" group of "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_memi
+{
+    bcmolt_auto hdr;                /**< Transport header. */
+    bcmolt_gpon_onu_key key;        /**< Object key. */
+    bcmolt_gpon_onu_memi_data data; /**< All properties that must be set by the user. */
+} bcmolt_gpon_onu_memi;
+
+/** Structure definition for the "omci_port_id_configuration_completed" group of 
+ * the "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_omci_port_id_configuration_completed_data
+{
+    bcmolt_gpon_gem_id gem_port;    /**< GEM Port ID. */
+    bcmolt_result status;           /**< status. */
+    bcmolt_omci_port_id_operation operation;    /**< Operation. */
+} bcmolt_gpon_onu_omci_port_id_configuration_completed_data;
+
+/** Transport message definition for "omci_port_id_configuration_completed" 
+ * group of "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_omci_port_id_configuration_completed
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_gpon_onu_key key;    /**< Object key. */
+    bcmolt_gpon_onu_omci_port_id_configuration_completed_data data; /**< All properties that must be set by the user. */
+} bcmolt_gpon_onu_omci_port_id_configuration_completed;
+
+/** Structure definition for the "onu_activation_completed" group of the 
+ * "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_onu_activation_completed_data
+{
+    bcmolt_result status;                       /**< status. */
+    bcmolt_activation_fail_reason fail_reason;  /**< fail reason. */
+} bcmolt_gpon_onu_onu_activation_completed_data;
+
+/** Transport message definition for "onu_activation_completed" group of 
+ * "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_onu_activation_completed
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_gpon_onu_key key;    /**< Object key. */
+    bcmolt_gpon_onu_onu_activation_completed_data data; /**< All properties that must be set by the user. */
+} bcmolt_gpon_onu_onu_activation_completed;
+
+/** Structure definition for the "onu_activation_standby_completed" group of the 
+ * "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_onu_activation_standby_completed_data
+{
+    bcmolt_result result;   /**< result. */
+} bcmolt_gpon_onu_onu_activation_standby_completed_data;
+
+/** Transport message definition for "onu_activation_standby_completed" group of 
+ * "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_onu_activation_standby_completed
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_gpon_onu_key key;    /**< Object key. */
+    bcmolt_gpon_onu_onu_activation_standby_completed_data data; /**< All properties that must be set by the user. */
+} bcmolt_gpon_onu_onu_activation_standby_completed;
+
+/** Structure definition for the "onu_alarm" group of the "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_onu_alarm_data
+{
+    bcmolt_gpon_onu_alarms onu_alarm;   /**< onu alarm. */
+} bcmolt_gpon_onu_onu_alarm_data;
+
+/** Transport message definition for "onu_alarm" group of "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_onu_alarm
+{
+    bcmolt_auto hdr;                        /**< Transport header. */
+    bcmolt_gpon_onu_key key;                /**< Object key. */
+    bcmolt_gpon_onu_onu_alarm_data data;    /**< All properties that must be set by the user. */
+} bcmolt_gpon_onu_onu_alarm;
+
+/** Structure definition for the "onu_deactivation_completed" group of the 
+ * "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_onu_deactivation_completed_data
+{
+    bcmolt_result status;   /**< status. */
+} bcmolt_gpon_onu_onu_deactivation_completed_data;
+
+/** Transport message definition for "onu_deactivation_completed" group of 
+ * "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_onu_deactivation_completed
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_gpon_onu_key key;    /**< Object key. */
+    bcmolt_gpon_onu_onu_deactivation_completed_data data;   /**< All properties that must be set by the user. */
+} bcmolt_gpon_onu_onu_deactivation_completed;
+
+/** Structure definition for the "onu_disable_completed" group of the "gpon_onu" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_onu_onu_disable_completed_data
+{
+    bcmolt_serial_number serial_number; /**< serial number. */
+} bcmolt_gpon_onu_onu_disable_completed_data;
+
+/** Transport message definition for "onu_disable_completed" group of "gpon_onu" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_onu_onu_disable_completed
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_gpon_onu_key key;    /**< Object key. */
+    bcmolt_gpon_onu_onu_disable_completed_data data;    /**< All properties that must be set by the user. */
+} bcmolt_gpon_onu_onu_disable_completed;
+
+/** Structure definition for the "onu_enable_completed" group of the "gpon_onu" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_onu_onu_enable_completed_data
+{
+    bcmolt_serial_number serial_number; /**< serial number. */
+} bcmolt_gpon_onu_onu_enable_completed_data;
+
+/** Transport message definition for "onu_enable_completed" group of "gpon_onu" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_onu_onu_enable_completed
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_gpon_onu_key key;    /**< Object key. */
+    bcmolt_gpon_onu_onu_enable_completed_data data; /**< All properties that must be set by the user. */
+} bcmolt_gpon_onu_onu_enable_completed;
+
+/** Transport message definition for "optical_reflection" group of "gpon_onu" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_onu_optical_reflection
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_gpon_onu_key key;    /**< Object key. */
+} bcmolt_gpon_onu_optical_reflection;
+
+/** Structure definition for the "password_authentication_completed" group of 
+ * the "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_password_authentication_completed_data
+{
+    bcmolt_result status;   /**< status. */
+    bcmolt_password_authentication_fail_reason fail_reason; /**< fail reason. */
+#define BCMOLT_GPON_ONU_PASSWORD_AUTHENTICATION_COMPLETED_DATA_PASSWORD_LEN 10
+    bcmolt_arr_u8_10 password;  /**< password. */
+} bcmolt_gpon_onu_password_authentication_completed_data;
+
+/** Transport message definition for "password_authentication_completed" group 
+ * of "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_password_authentication_completed
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_gpon_onu_key key;    /**< Object key. */
+    bcmolt_gpon_onu_password_authentication_completed_data data;    /**< All properties that must be set by the user. */
+} bcmolt_gpon_onu_password_authentication_completed;
+
+/** Structure definition for the "pee" group of the "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_pee_data
+{
+    bcmolt_status alarm_status; /**< alarm status. */
+} bcmolt_gpon_onu_pee_data;
+
+/** Transport message definition for "pee" group of "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_pee
+{
+    bcmolt_auto hdr;                /**< Transport header. */
+    bcmolt_gpon_onu_key key;        /**< Object key. */
+    bcmolt_gpon_onu_pee_data data;  /**< All properties that must be set by the user. */
+} bcmolt_gpon_onu_pee;
+
+/** Structure definition for the "possible_drift" group of the "gpon_onu" 
+ * object. 
+ *
+ * An ONU in a low power state may be experiencing drift beyond the configured 
+ * threshold. The estimate may be inaccurate depending on ONU behavior. Actual 
+ * drift may be less than estimated. 
+ */
+typedef struct bcmolt_gpon_onu_possible_drift_data
+{
+    bcmolt_status alarm_status; /**< On: estimated drift has exceeded the configured threshold. */
+    int32_t estimated_drift;    /**< If status is on, the estimated drift value, otherwise zero (0). */
+} bcmolt_gpon_onu_possible_drift_data;
+
+/** Transport message definition for "possible_drift" group of "gpon_onu" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_onu_possible_drift
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_gpon_onu_key key;    /**< Object key. */
+    bcmolt_gpon_onu_possible_drift_data data;   /**< All properties that must be set by the user. */
+} bcmolt_gpon_onu_possible_drift;
+
+/** Structure definition for the "power_management_state_change" group of the 
+ * "gpon_onu" object. 
+ *
+ * Notification that an ONUs power management state has changed. 
+ */
+typedef struct bcmolt_gpon_onu_power_management_state_change_data
+{
+    bcmolt_onu_state old_state; /**< The state the ONU was previously in. */
+    bcmolt_onu_state new_state; /**< The state the ONU is currently in. */
+    bcmolt_power_management_transition_reason reason;   /**< The reason for the state change. */
+} bcmolt_gpon_onu_power_management_state_change_data;
+
+/** Transport message definition for "power_management_state_change" group of 
+ * "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_power_management_state_change
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_gpon_onu_key key;    /**< Object key. */
+    bcmolt_gpon_onu_power_management_state_change_data data;    /**< All properties that must be set by the user. */
+} bcmolt_gpon_onu_power_management_state_change;
+
+/** Structure definition for the "pst" group of the "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_pst_data
+{
+    uint32_t link_number;   /**< link number. */
+    uint8_t k1;             /**< K1. */
+    uint8_t k2;             /**< K2. */
+} bcmolt_gpon_onu_pst_data;
+
+/** Transport message definition for "pst" group of "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_pst
+{
+    bcmolt_auto hdr;                /**< Transport header. */
+    bcmolt_gpon_onu_key key;        /**< Object key. */
+    bcmolt_gpon_onu_pst_data data;  /**< All properties that must be set by the user. */
+} bcmolt_gpon_onu_pst;
+
+/** Structure definition for the "ranging_completed" group of the "gpon_onu" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_onu_ranging_completed_data
+{
+    bcmolt_result status;                   /**< status. */
+    bcmolt_ranging_fail_reason fail_reason; /**< fail reason. */
+    uint8_t number_of_ploams;               /**< number of PLOAMs. */
+    uint32_t eqd;           /**< EQD. */
+    uint8_t power_level;    /**< Power Level. */
+} bcmolt_gpon_onu_ranging_completed_data;
+
+/** Transport message definition for "ranging_completed" group of "gpon_onu" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_onu_ranging_completed
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_gpon_onu_key key;    /**< Object key. */
+    bcmolt_gpon_onu_ranging_completed_data data;    /**< All properties that must be set by the user. */
+} bcmolt_gpon_onu_ranging_completed;
+
+/** Structure definition for the "rei" group of the "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_rei_data
+{
+    uint32_t bip8_errors;   /**< BIP8 errors. */
+} bcmolt_gpon_onu_rei_data;
+
+/** Transport message definition for "rei" group of "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_rei
+{
+    bcmolt_auto hdr;                /**< Transport header. */
+    bcmolt_gpon_onu_key key;        /**< Object key. */
+    bcmolt_gpon_onu_rei_data data;  /**< All properties that must be set by the user. */
+} bcmolt_gpon_onu_rei;
+
+/** Structure definition for the "rssi_measurement_completed" group of the 
+ * "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_rssi_measurement_completed_data
+{
+    bcmolt_result status;   /**< status. */
+    bcmolt_rssi_measurement_fail_reason fail_reason;    /**< fail reason. */
+} bcmolt_gpon_onu_rssi_measurement_completed_data;
+
+/** Transport message definition for "rssi_measurement_completed" group of 
+ * "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_rssi_measurement_completed
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_gpon_onu_key key;    /**< Object key. */
+    bcmolt_gpon_onu_rssi_measurement_completed_data data;   /**< All properties that must be set by the user. */
+} bcmolt_gpon_onu_rssi_measurement_completed;
+
+/** Structure definition for the "sdi" group of the "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_sdi_data
+{
+    bcmolt_status alarm_status; /**< alarm status. */
+    uint32_t ber;               /**< Inverse bit error rate (e.g. if this number is 1000, the BER is 1/1000). */
+} bcmolt_gpon_onu_sdi_data;
+
+/** Transport message definition for "sdi" group of "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_sdi
+{
+    bcmolt_auto hdr;                /**< Transport header. */
+    bcmolt_gpon_onu_key key;        /**< Object key. */
+    bcmolt_gpon_onu_sdi_data data;  /**< All properties that must be set by the user. */
+} bcmolt_gpon_onu_sdi;
+
+/** Structure definition for the "sfi" group of the "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_sfi_data
+{
+    bcmolt_status alarm_status; /**< alarm status. */
+    uint32_t ber;               /**< Inverse bit error rate (e.g. if this number is 1000, the BER is 1/1000). */
+} bcmolt_gpon_onu_sfi_data;
+
+/** Transport message definition for "sfi" group of "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_sfi
+{
+    bcmolt_auto hdr;                /**< Transport header. */
+    bcmolt_gpon_onu_key key;        /**< Object key. */
+    bcmolt_gpon_onu_sfi_data data;  /**< All properties that must be set by the user. */
+} bcmolt_gpon_onu_sfi;
+
+/** Structure definition for the "stat_alarm_cleared" group of the "gpon_onu" 
+ * object. 
+ *
+ * Sent when a configured statistic alarm condition is no longer met. 
+ */
+typedef struct bcmolt_gpon_onu_stat_alarm_cleared_data
+{
+    bcmolt_gpon_onu_stat_id stat;   /**< Statistic identifier. */
+} bcmolt_gpon_onu_stat_alarm_cleared_data;
+
+/** Transport message definition for "stat_alarm_cleared" group of "gpon_onu" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_onu_stat_alarm_cleared
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_gpon_onu_key key;    /**< Object key. */
+    bcmolt_gpon_onu_stat_alarm_cleared_data data;   /**< All properties that must be set by the user. */
+} bcmolt_gpon_onu_stat_alarm_cleared;
+
+/** Structure definition for the "stat_alarm_raised" group of the "gpon_onu" 
+ * object. 
+ *
+ * Sent when a configured statistic alarm condition has been met. 
+ */
+typedef struct bcmolt_gpon_onu_stat_alarm_raised_data
+{
+    bcmolt_gpon_onu_stat_id stat;   /**< Statistic identifier. */
+} bcmolt_gpon_onu_stat_alarm_raised_data;
+
+/** Transport message definition for "stat_alarm_raised" group of "gpon_onu" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_onu_stat_alarm_raised
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_gpon_onu_key key;    /**< Object key. */
+    bcmolt_gpon_onu_stat_alarm_raised_data data;    /**< All properties that must be set by the user. */
+} bcmolt_gpon_onu_stat_alarm_raised;
+
+/** Structure definition for the "sufi" group of the "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_sufi_data
+{
+    bcmolt_status alarm_status; /**< alarm status. */
+} bcmolt_gpon_onu_sufi_data;
+
+/** Transport message definition for "sufi" group of "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_sufi
+{
+    bcmolt_auto hdr;                /**< Transport header. */
+    bcmolt_gpon_onu_key key;        /**< Object key. */
+    bcmolt_gpon_onu_sufi_data data; /**< All properties that must be set by the user. */
+} bcmolt_gpon_onu_sufi;
+
+/** Structure definition for the "tiwi" group of the "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_tiwi_data
+{
+    bcmolt_status alarm_status; /**< Alarm status. */
+    int32_t drift_value;        /**< Calculated amount of drift (positive + negative as a signed value). */
+} bcmolt_gpon_onu_tiwi_data;
+
+/** Transport message definition for "tiwi" group of "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_tiwi
+{
+    bcmolt_auto hdr;                /**< Transport header. */
+    bcmolt_gpon_onu_key key;        /**< Object key. */
+    bcmolt_gpon_onu_tiwi_data data; /**< All properties that must be set by the user. */
+} bcmolt_gpon_onu_tiwi;
+
+/** Structure definition for the "auto_cfg" group of the "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_auto_cfg_data
+{
+    bcmos_bool ber_interval_configuration_completed;    /**< If true, indications of type "ber_interval_configuration_completed" will be generated. */
+    bcmos_bool dfi;                     /**< If true, indications of type "dfi" will be generated. */
+    bcmos_bool dgi;                     /**< If true, indications of type "dgi" will be generated. */
+    bcmos_bool dowi;                    /**< If true, indications of type "dowi" will be generated. */
+    bcmos_bool err;                     /**< If true, indications of type "err" will be generated. */
+    bcmos_bool invalid_dbru_report;     /**< If true, indications of type "invalid_dbru_report" will be generated. */
+    bcmos_bool key_exchange_completed;  /**< If true, indications of type "key_exchange_completed" will be generated. */
+    bcmos_bool key_exchange_cycle_skipped;          /**< If true, indications of type "key_exchange_cycle_skipped" will be generated. */
+    bcmos_bool key_exchange_decrypt_required;       /**< If true, indications of type "key_exchange_decrypt_required" will be generated. */
+    bcmos_bool key_exchange_key_mismatch;           /**< If true, indications of type "key_exchange_key_mismatch" will be generated. */
+    bcmos_bool key_exchange_key_request_timeout;    /**< If true, indications of type "key_exchange_key_request_timeout" will be generated. */
+    bcmos_bool key_exchange_unconsecutive_index;    /**< If true, indications of type "key_exchange_unconsecutive_index" will be generated. */
+    bcmos_bool loai;    /**< If true, indications of type "loai" will be generated. */
+    bcmos_bool loki;    /**< If true, indications of type "loki" will be generated. */
+    bcmos_bool memi;    /**< If true, indications of type "memi" will be generated. */
+    bcmos_bool omci_port_id_configuration_completed;    /**< If true, indications of type "omci_port_id_configuration_completed" will be generated. */
+    bcmos_bool onu_activation_completed;                /**< If true, indications of type "onu_activation_completed" will be generated. */
+    bcmos_bool onu_activation_standby_completed;        /**< If true, indications of type "onu_activation_standby_completed" will be generated. */
+    bcmos_bool onu_alarm;                   /**< If true, indications of type "onu_alarm" will be generated. */
+    bcmos_bool onu_deactivation_completed;  /**< If true, indications of type "onu_deactivation_completed" will be generated. */
+    bcmos_bool onu_disable_completed;       /**< If true, indications of type "onu_disable_completed" will be generated. */
+    bcmos_bool onu_enable_completed;        /**< If true, indications of type "onu_enable_completed" will be generated. */
+    bcmos_bool optical_reflection;          /**< If true, indications of type "optical_reflection" will be generated. */
+    bcmos_bool password_authentication_completed;   /**< If true, indications of type "password_authentication_completed" will be generated. */
+    bcmos_bool pee;             /**< If true, indications of type "pee" will be generated. */
+    bcmos_bool possible_drift;  /**< If true, indications of type "possible_drift" will be generated. */
+    bcmos_bool power_management_state_change;   /**< If true, indications of type "power_management_state_change" will be generated. */
+    bcmos_bool pst;                 /**< If true, indications of type "pst" will be generated. */
+    bcmos_bool ranging_completed;   /**< If true, indications of type "ranging_completed" will be generated. */
+    bcmos_bool rei;                 /**< If true, indications of type "rei" will be generated. */
+    bcmos_bool rssi_measurement_completed;  /**< If true, indications of type "rssi_measurement_completed" will be generated. */
+    bcmos_bool sdi;                 /**< If true, indications of type "sdi" will be generated. */
+    bcmos_bool sfi;                 /**< If true, indications of type "sfi" will be generated. */
+    bcmos_bool stat_alarm_cleared;  /**< If true, indications of type "stat_alarm_cleared" will be generated. */
+    bcmos_bool stat_alarm_raised;   /**< If true, indications of type "stat_alarm_raised" will be generated. */
+    bcmos_bool sufi;                /**< If true, indications of type "sufi" will be generated. */
+    bcmos_bool tiwi;                /**< If true, indications of type "tiwi" will be generated. */
+} bcmolt_gpon_onu_auto_cfg_data;
+
+/** Transport message definition for "auto_cfg" group of "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_auto_cfg
+{
+    bcmolt_auto_cfg hdr;                /**< Transport header. */
+    bcmolt_gpon_onu_key key;            /**< Object key. */
+    bcmolt_gpon_onu_auto_cfg_data data; /**< All properties that must be set by the user. */
+} bcmolt_gpon_onu_auto_cfg;
+
+/** Structure definition for the "change_power_level" group of the "gpon_onu" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_onu_change_power_level_data
+{
+    bcmolt_onu_power_level power_level_action;  /**< power level action. */
+} bcmolt_gpon_onu_change_power_level_data;
+
+/** Transport message definition for "change_power_level" group of "gpon_onu" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_onu_change_power_level
+{
+    bcmolt_oper hdr;            /**< Transport header. */
+    bcmolt_gpon_onu_key key;    /**< Object key. */
+    bcmolt_gpon_onu_change_power_level_data data;   /**< All properties that must be set by the user. */
+} bcmolt_gpon_onu_change_power_level;
+
+/** Transport message definition for "rssi_measurement" group of "gpon_onu" 
+ * object. 
+ */
+typedef struct bcmolt_gpon_onu_rssi_measurement
+{
+    bcmolt_oper hdr;            /**< Transport header. */
+    bcmolt_gpon_onu_key key;    /**< Object key. */
+} bcmolt_gpon_onu_rssi_measurement;
+
+/** Structure definition for the "set_onu_state" group of the "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_set_onu_state_data
+{
+    bcmolt_onu_operation onu_state; /**< ONU state. */
+} bcmolt_gpon_onu_set_onu_state_data;
+
+/** Transport message definition for "set_onu_state" group of "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_set_onu_state
+{
+    bcmolt_oper hdr;            /**< Transport header. */
+    bcmolt_gpon_onu_key key;    /**< Object key. */
+    bcmolt_gpon_onu_set_onu_state_data data;    /**< All properties that must be set by the user. */
+} bcmolt_gpon_onu_set_onu_state;
+
+/** Structure definition for the "cpu_packets" group of the "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_cpu_packets_data
+{
+    bcmolt_packet_type packet_type;     /**< packet type. */
+    bcmos_bool calc_crc;                /**< calc crc. */
+    uint8_t number_of_packets;          /**< number of packets. */
+    uint16_t packet_size;               /**< Single packet size. */
+    bcmolt_u8_list_u32_max_2048 buffer; /**< buffer. */
+} bcmolt_gpon_onu_cpu_packets_data;
+
+/** Transport message definition for "cpu_packets" group of "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_cpu_packets
+{
+    bcmolt_proxy hdr;                       /**< Transport header. */
+    bcmolt_gpon_onu_key key;                /**< Object key. */
+    bcmolt_gpon_onu_cpu_packets_data data;  /**< All properties that must be set by the user. */
+} bcmolt_gpon_onu_cpu_packets;
+
+/** Structure definition for the "ploam_packet" group of the "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_ploam_packet_data
+{
+#define BCMOLT_GPON_ONU_PLOAM_PACKET_DATA_PLOAM_LEN 12
+    bcmolt_arr_u8_12 ploam; /**< ploam. */
+} bcmolt_gpon_onu_ploam_packet_data;
+
+/** Transport message definition for "ploam_packet" group of "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_ploam_packet
+{
+    bcmolt_proxy hdr;                       /**< Transport header. */
+    bcmolt_gpon_onu_key key;                /**< Object key. */
+    bcmolt_gpon_onu_ploam_packet_data data; /**< All properties that must be set by the user. */
+} bcmolt_gpon_onu_ploam_packet;
+
+/** Structure definition for the "cpu_packet" group of the "gpon_onu" object. 
+ *
+ * Indicates CPU packet was received on the US from this ONU id 
+ */
+typedef struct bcmolt_gpon_onu_cpu_packet_data
+{
+    uint16_t port_id;           /**< port_id. */
+    bcmos_bool crc_ok;          /**< crc_ok. */
+    uint32_t packet_size;       /**< packet_size. */
+    bcmolt_u8_list_u32 buffer;  /**< buffer. */
+} bcmolt_gpon_onu_cpu_packet_data;
+
+/** Transport message definition for "cpu_packet" group of "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_cpu_packet
+{
+    bcmolt_proxy_rx hdr;                    /**< Transport header. */
+    bcmolt_gpon_onu_key key;                /**< Object key. */
+    bcmolt_gpon_onu_cpu_packet_data data;   /**< All properties that must be set by the user. */
+} bcmolt_gpon_onu_cpu_packet;
+
+/** Structure definition for the "omci_packet" group of the "gpon_onu" object. 
+ *
+ * Indicates OMCI packet was received on the US from this ONU id 
+ */
+typedef struct bcmolt_gpon_onu_omci_packet_data
+{
+    uint16_t port_id;           /**< port_id. */
+    bcmos_bool crc_ok;          /**< crc_ok. */
+    uint32_t packet_size;       /**< packet_size. */
+    bcmolt_u8_list_u32 buffer;  /**< buffer. */
+} bcmolt_gpon_onu_omci_packet_data;
+
+/** Transport message definition for "omci_packet" group of "gpon_onu" object. 
+ */
+typedef struct bcmolt_gpon_onu_omci_packet
+{
+    bcmolt_proxy_rx hdr;                    /**< Transport header. */
+    bcmolt_gpon_onu_key key;                /**< Object key. */
+    bcmolt_gpon_onu_omci_packet_data data;  /**< All properties that must be set by the user. */
+} bcmolt_gpon_onu_omci_packet;
+
+/** Structure definition for the "key" group of the "gpon_trx" object. 
+ */
+typedef struct bcmolt_gpon_trx_key
+{
+    bcmolt_gpon_ni pon_ni;  /**< PON network interface. */
+} bcmolt_gpon_trx_key;
+
+/** Structure definition for the "cfg" group of the "gpon_trx" object. 
+ */
+typedef struct bcmolt_gpon_trx_cfg_data
+{
+    bcmolt_trx_type transceiver_type;   /**< transceiver type. */
+    bcmolt_la_resync_pattern_configuration la_configuration;    /**< LA configuration. */
+    bcmolt_bcdr_resync_pattern_configuration bcdr;              /**< BCDR. */
+    bcmolt_resync_control la_ranging_after_no_ed_resync;        /**< LA ranging after no ed resync . */
+    bcmolt_resync_control bcdr_ranging_after_no_ed_resync;      /**< used in ranging mode after no ed found */
+    bcmolt_resync_control la_ranging_after_ed_resync;           /**< LA ranging after ed resync . */
+    bcmolt_resync_control bcdr_ranging_after_ed_resync;         /**< BCDR ranging after ed resync. */
+    bcmolt_polarity la_resync_polarity;     /**< la resync polarity. */
+    bcmolt_polarity bcdr_resync_polarity;   /**< BCDR resync polarity. */
+    bcmolt_ranging_resync_conditions bcdr_ranging_resync_conditions;            /**< bcdr ranging resync conditions. */
+    bcmolt_ranging_resync_conditions la_ranging_resync_conditions;              /**< la ranging resync conditions. */
+    bcmolt_trx_rx_configuration rx_configuration;                               /**< RX configuration. */
+    bcmolt_ranging_control_configuration ranging_control_stages_configuration;  /**< ranging control stages configuration. */
+    bcmolt_trx_energy_detect energy_detect;             /**< Energy Detect. */
+    bcmolt_resync_control end_of_burst_data_pattern;    /**< end of burst data pattern . */
+    bcmolt_resync_control end_of_burst_ranging_pattern; /**< end of burst ranging pattern. */
+    bcmolt_trx_preamble preamble;                       /**< Preamble. */
+    bcmolt_trx_delimiter delimiter;                     /**< Delimiter. */
+    uint32_t guard_bits;    /**< Guard bits. */
+    bcmolt_serdes_configuration serdes_configuration;   /**< serdes configuration. */
+    uint32_t plo_ranging;   /**< PLO for ranging. */
+    uint32_t plo_data;      /**< PLO for data. */
+    bcmolt_gpon_rssi_general_configuration rssi_normal_config;  /**< rssi normal config. */
+    bcmolt_ranging_rssi_control ranging_rssi_resync_control;    /**< ranging rssi resync control. */
+} bcmolt_gpon_trx_cfg_data;
+
+/** Transport message definition for "cfg" group of "gpon_trx" object. 
+ */
+typedef struct bcmolt_gpon_trx_cfg
+{
+    bcmolt_cfg hdr;                 /**< Transport header. */
+    bcmolt_gpon_trx_key key;        /**< Object key. */
+    bcmolt_gpon_trx_cfg_data data;  /**< All properties that must be set by the user. */
+} bcmolt_gpon_trx_cfg;
+
+/** Structure definition for the "key" group of the "log_entry" object. 
+ */
+typedef struct bcmolt_log_entry_key
+{
+    uint32_t log_id;        /**< log id. */
+    uint8_t reserved;       /**< reserved. */
+    bcmolt_str_100 name;    /**< name. */
+} bcmolt_log_entry_key;
+
+/** Structure definition for the "cfg" group of the "log_entry" object. 
+ */
+typedef struct bcmolt_log_entry_cfg_data
+{
+    bcmolt_log_level default_log_level; /**< default log level. */
+    bcmolt_log_type default_log_type;   /**< default log type. */
+    bcmolt_log_level log_level_print;   /**< log level print. */
+    bcmolt_log_level log_level_save;    /**< log level save. */
+    bcmolt_log_type log_type;           /**< log type. */
+    bcmolt_log_style log_style;         /**< log_style. */
+    bcmolt_str_100 log_name;            /**< log name. */
+} bcmolt_log_entry_cfg_data;
+
+/** Transport message definition for "cfg" group of "log_entry" object. 
+ */
+typedef struct bcmolt_log_entry_cfg
+{
+    bcmolt_cfg hdr;                 /**< Transport header. */
+    bcmolt_log_entry_key key;       /**< Object key. */
+    bcmolt_log_entry_cfg_data data; /**< All properties that must be set by the user. */
+} bcmolt_log_entry_cfg;
+
+/** Structure definition for the "stat" group of the "log_entry" object. 
+ */
+typedef struct bcmolt_log_entry_stat_data
+{
+#define BCMOLT_LOG_ENTRY_STAT_DATA_MSG_COUNT_LEN    6
+    bcmolt_arr_u32_6 msg_count; /**< msg count. */
+    uint32_t lost_msg_count;    /**< lost msg count. */
+} bcmolt_log_entry_stat_data;
+
+/** Transport message definition for "stat" group of "log_entry" object. 
+ */
+typedef struct bcmolt_log_entry_stat
+{
+    bcmolt_stat hdr;                    /**< Transport header. */
+    bcmolt_log_entry_key key;           /**< Object key. */
+    bcmolt_log_entry_stat_data data;    /**< All properties that must be set by the user. */
+} bcmolt_log_entry_stat;
+
+/** Structure definition for the "stat_cfg" group of the "log_entry" object. 
+ */
+typedef struct bcmolt_log_entry_stat_cfg_data
+{
+    bcmolt_stat_alarm_config cfg;   /**< Statistic alarm configuration. */
+} bcmolt_log_entry_stat_cfg_data;
+
+/** Transport message definition for "stat_cfg" group of "log_entry" object. 
+ */
+typedef struct bcmolt_log_entry_stat_cfg
+{
+    bcmolt_stat_cfg hdr;        /**< Transport header. */
+    bcmolt_log_entry_key key;   /**< Object key. */
+    bcmolt_log_entry_stat_cfg_data data;    /**< All properties that must be set by the user. */
+} bcmolt_log_entry_stat_cfg;
+
+/** Structure definition for the "stat_alarm_cleared" group of the "log_entry" 
+ * object. 
+ *
+ * Sent when a configured statistic alarm condition is no longer met. 
+ */
+typedef struct bcmolt_log_entry_stat_alarm_cleared_data
+{
+    bcmolt_log_entry_stat_id stat;  /**< Statistic identifier. */
+} bcmolt_log_entry_stat_alarm_cleared_data;
+
+/** Transport message definition for "stat_alarm_cleared" group of "log_entry" 
+ * object. 
+ */
+typedef struct bcmolt_log_entry_stat_alarm_cleared
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_log_entry_key key;   /**< Object key. */
+    bcmolt_log_entry_stat_alarm_cleared_data data;  /**< All properties that must be set by the user. */
+} bcmolt_log_entry_stat_alarm_cleared;
+
+/** Structure definition for the "stat_alarm_raised" group of the "log_entry" 
+ * object. 
+ *
+ * Sent when a configured statistic alarm condition has been met. 
+ */
+typedef struct bcmolt_log_entry_stat_alarm_raised_data
+{
+    bcmolt_log_entry_stat_id stat;  /**< Statistic identifier. */
+} bcmolt_log_entry_stat_alarm_raised_data;
+
+/** Transport message definition for "stat_alarm_raised" group of "log_entry" 
+ * object. 
+ */
+typedef struct bcmolt_log_entry_stat_alarm_raised
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_log_entry_key key;   /**< Object key. */
+    bcmolt_log_entry_stat_alarm_raised_data data;   /**< All properties that must be set by the user. */
+} bcmolt_log_entry_stat_alarm_raised;
+
+/** Structure definition for the "auto_cfg" group of the "log_entry" object. 
+ */
+typedef struct bcmolt_log_entry_auto_cfg_data
+{
+    bcmos_bool stat_alarm_cleared;  /**< If true, indications of type "stat_alarm_cleared" will be generated. */
+    bcmos_bool stat_alarm_raised;   /**< If true, indications of type "stat_alarm_raised" will be generated. */
+} bcmolt_log_entry_auto_cfg_data;
+
+/** Transport message definition for "auto_cfg" group of "log_entry" object. 
+ */
+typedef struct bcmolt_log_entry_auto_cfg
+{
+    bcmolt_auto_cfg hdr;                    /**< Transport header. */
+    bcmolt_log_entry_key key;               /**< Object key. */
+    bcmolt_log_entry_auto_cfg_data data;    /**< All properties that must be set by the user. */
+} bcmolt_log_entry_auto_cfg;
+
+/** Structure definition for the "key" group of the "logger" object. 
+ */
+typedef struct bcmolt_logger_key
+{
+    uint32_t reserved;          /**< reserved. */
+    bcmolt_log_file_id file_id; /**< should be 0 */
+} bcmolt_logger_key;
+
+/** Structure definition for the "cfg" group of the "logger" object. 
+ */
+typedef struct bcmolt_logger_cfg_data
+{
+    bcmolt_log_buffer buffer;       /**< Contains "next" log records read by "bcmolt_cfg_get() API */
+    bcmos_bool wrap_around;         /**< Log file wrap-around option. TRUE=wrap around when full. FALSE=stop when full */
+    bcmos_bool clear_after_read;    /**< Clear log after last record has been read */
+    bcmos_bool enable_log;          /**< Enable logger */
+    bcmolt_str_1000 log_names;      /**< log_names. */
+} bcmolt_logger_cfg_data;
+
+/** Transport message definition for "cfg" group of "logger" object. 
+ */
+typedef struct bcmolt_logger_cfg
+{
+    bcmolt_cfg hdr;                 /**< Transport header. */
+    bcmolt_logger_key key;          /**< Object key. */
+    bcmolt_logger_cfg_data data;    /**< All properties that must be set by the user. */
+} bcmolt_logger_cfg;
+
+/** Structure definition for the "stat" group of the "logger" object. 
+ */
+typedef struct bcmolt_logger_stat_data
+{
+    uint32_t lines_in_log;  /**< lines in log. */
+} bcmolt_logger_stat_data;
+
+/** Transport message definition for "stat" group of "logger" object. 
+ */
+typedef struct bcmolt_logger_stat
+{
+    bcmolt_stat hdr;                /**< Transport header. */
+    bcmolt_logger_key key;          /**< Object key. */
+    bcmolt_logger_stat_data data;   /**< All properties that must be set by the user. */
+} bcmolt_logger_stat;
+
+/** Structure definition for the "stat_cfg" group of the "logger" object. 
+ */
+typedef struct bcmolt_logger_stat_cfg_data
+{
+    bcmolt_stat_alarm_config cfg;   /**< Statistic alarm configuration. */
+} bcmolt_logger_stat_cfg_data;
+
+/** Transport message definition for "stat_cfg" group of "logger" object. 
+ */
+typedef struct bcmolt_logger_stat_cfg
+{
+    bcmolt_stat_cfg hdr;                /**< Transport header. */
+    bcmolt_logger_key key;              /**< Object key. */
+    bcmolt_logger_stat_cfg_data data;   /**< All properties that must be set by the user. */
+} bcmolt_logger_stat_cfg;
+
+/** Structure definition for the "stat_alarm_cleared" group of the "logger" 
+ * object. 
+ *
+ * Sent when a configured statistic alarm condition is no longer met. 
+ */
+typedef struct bcmolt_logger_stat_alarm_cleared_data
+{
+    bcmolt_logger_stat_id stat; /**< Statistic identifier. */
+} bcmolt_logger_stat_alarm_cleared_data;
+
+/** Transport message definition for "stat_alarm_cleared" group of "logger" 
+ * object. 
+ */
+typedef struct bcmolt_logger_stat_alarm_cleared
+{
+    bcmolt_auto hdr;        /**< Transport header. */
+    bcmolt_logger_key key;  /**< Object key. */
+    bcmolt_logger_stat_alarm_cleared_data data; /**< All properties that must be set by the user. */
+} bcmolt_logger_stat_alarm_cleared;
+
+/** Structure definition for the "stat_alarm_raised" group of the "logger" 
+ * object. 
+ *
+ * Sent when a configured statistic alarm condition has been met. 
+ */
+typedef struct bcmolt_logger_stat_alarm_raised_data
+{
+    bcmolt_logger_stat_id stat; /**< Statistic identifier. */
+} bcmolt_logger_stat_alarm_raised_data;
+
+/** Transport message definition for "stat_alarm_raised" group of "logger" 
+ * object. 
+ */
+typedef struct bcmolt_logger_stat_alarm_raised
+{
+    bcmolt_auto hdr;        /**< Transport header. */
+    bcmolt_logger_key key;  /**< Object key. */
+    bcmolt_logger_stat_alarm_raised_data data;  /**< All properties that must be set by the user. */
+} bcmolt_logger_stat_alarm_raised;
+
+/** Structure definition for the "auto_cfg" group of the "logger" object. 
+ */
+typedef struct bcmolt_logger_auto_cfg_data
+{
+    bcmos_bool stat_alarm_cleared;  /**< If true, indications of type "stat_alarm_cleared" will be generated. */
+    bcmos_bool stat_alarm_raised;   /**< If true, indications of type "stat_alarm_raised" will be generated. */
+} bcmolt_logger_auto_cfg_data;
+
+/** Transport message definition for "auto_cfg" group of "logger" object. 
+ */
+typedef struct bcmolt_logger_auto_cfg
+{
+    bcmolt_auto_cfg hdr;                /**< Transport header. */
+    bcmolt_logger_key key;              /**< Object key. */
+    bcmolt_logger_auto_cfg_data data;   /**< All properties that must be set by the user. */
+} bcmolt_logger_auto_cfg;
+
+/** Transport message definition for "clear_log" group of "logger" object. 
+ */
+typedef struct bcmolt_logger_clear_log
+{
+    bcmolt_oper hdr;        /**< Transport header. */
+    bcmolt_logger_key key;  /**< Object key. */
+} bcmolt_logger_clear_log;
+
+/** Structure definition for the "key" group of the "nni" object. 
+ */
+typedef struct bcmolt_nni_key
+{
+    bcmolt_pon_ni pon_ni;   /**< PON NI. */
+} bcmolt_nni_key;
+
+/** Structure definition for the "cfg" group of the "nni" object. 
+ */
+typedef struct bcmolt_nni_cfg_data
+{
+    bcmolt_control_state remote_loopback;   /**< Incoming packets coming from the PON (upstream) and going back to the PON (Downstream)  */
+    bcmolt_control_state line_loopback;     /**< Incoming packets coming from the NNI interface to the PM and going back towards the NNI interface */
+    bcmos_mac_address mac_address;          /**< Mac address to be used for this NNI. */
+    bcmolt_nni_link_status nni_status;      /**< NNI status */
+    bcmolt_nni_link_status nni_backup_status;   /**< Status of the backup NNI. */
+    bcmolt_nni_connection active_nni;           /**< Which NNI is currently active. */
+    uint32_t nni_status_polling_interval_ms;    /**< How often to check the status of the primary and backup NNIs (units: ms). Zero (0) disables status polling. */
+    bcmos_bool autoswitch;                      /**< Should firmware automatically switch between primary/backup NNIs when Loss of Link is detected? */
+    bcmolt_control_state flow_control;          /**< NNI Flow control. */
+} bcmolt_nni_cfg_data;
+
+/** Transport message definition for "cfg" group of "nni" object. 
+ */
+typedef struct bcmolt_nni_cfg
+{
+    bcmolt_cfg hdr;             /**< Transport header. */
+    bcmolt_nni_key key;         /**< Object key. */
+    bcmolt_nni_cfg_data data;   /**< All properties that must be set by the user. */
+} bcmolt_nni_cfg;
+
+/** Structure definition for the "stat" group of the "nni" object. 
+ */
+typedef struct bcmolt_nni_stat_data
+{
+    uint64_t rx_frames_64;              /**< The count of RX 64 byte frames on this NNI. */
+    uint64_t rx_frames_65_127;          /**< The count of RX 65 to 127 byte frames on this NNI. */
+    uint64_t rx_frames_128_255;         /**< The count of RX 128 to 255 byte frames on this NNI. */
+    uint64_t rx_frames_256_511;         /**< The count of RX 256 to 511 byte frames on this NNI. */
+    uint64_t rx_frames_512_1023;        /**< The count of RX 512 to 1023 byte frames on this NNI. */
+    uint64_t rx_frames_1024_1518;       /**< The count of RX 1024 to 1518 byte frames on this NNI. */
+    uint64_t rx_frames_1519_2047;       /**< The count of RX 1519 to 2047 byte frames on this NNI. */
+    uint64_t rx_frames_2048_4095;       /**< The count of RX 2048 to 4095 byte frames on this NNI. */
+    uint64_t rx_frames_4096_9216;       /**< The count of RX 4096 to 9216 byte frames on this NNI. */
+    uint64_t rx_frames_9217_16383;      /**< The count of RX 9217 to 16383 byte frames on this NNI. */
+    uint64_t rx_frames;                 /**< The number of received frames on this NNI. This includes all errored frames as well. */
+    uint64_t rx_bytes;                  /**< The number of received bytes on this NNI. This includes all errored frames as well. */
+    uint64_t rx_good_frames;            /**< The number of received good frames on this NNI. */
+    uint64_t rx_unicast_frames;         /**< The number of received unicast frames on this NNI. */
+    uint64_t rx_multicast_frames;       /**< The number of received multicast frames on this NNI. */
+    uint64_t rx_broadcast_frames;       /**< The number of received broadcast frames on this NNI. */
+    uint64_t rx_fcs_errors;             /**< The number of received FCS errors on this NNI. */
+    uint64_t rx_control_frames;         /**< The number of received control frames on this NNI. */
+    uint64_t rx_pause_frames;           /**< The number of received pause frames on this NNI. */
+    uint64_t rx_pfc_frames;             /**< The number of received PFC frames on this NNI. */
+    uint64_t rx_unsupported_opcode;     /**< The number of received Unsupported Opcode frames on this NNI. */
+    uint64_t rx_unsupported_da;         /**< The number of received unsupported DA frames on this NNI. */
+    uint64_t rx_alignment_errors;       /**< The number of received alignment errors on this NNI. */
+    uint64_t rx_length_out_of_range;    /**< The number of received length out of range errors on this NNI. */
+    uint64_t rx_code_errors;            /**< The number of received code errors on this NNI. */
+    uint64_t rx_oversized_frames;       /**< The number of received oversized frames on this NNI. */
+    uint64_t rx_jabber_frames;          /**< The number of received jabber frames on this NNI. these are oversized frames that also contain an invalid CRC, code error, or IEEE length check error. */
+    uint64_t rx_mtu_check_errors;       /**< The number of received MTU Check Errors on this NNI. */
+    uint64_t rx_promiscuous_frames;     /**< The number of received frames on this NNI that are not control packets and have a DA that is not matching with the RX SA. */
+    uint64_t rx_vlan_frames;            /**< The number of received VLAN tagged frames on this NNI (with TPID 8100). This counts both single and double tagged frames. */
+    uint64_t rx_double_vlan_frames;     /**< The number of received double VLAN tagged frames on this NNI (with TPID 8100).  */
+    uint64_t rx_truncated_frames;       /**< The number of received truncated frames on this NNI. This is likely due to RX FIFO Full.  */
+    uint64_t rx_undersize_frames;       /**< The number of received undersized frames on this NNI. */
+    uint64_t rx_fragmented_frames;      /**< The number of received fragmented frames on this NNI. */
+    uint64_t rx_runt_frames;            /**< The number of received runt frames on this NNI. */
+    uint64_t tx_frames_64;              /**< The count of TX 64 byte frames on this NNI. */
+    uint64_t tx_frames_65_127;          /**< The count of TX 65 to 127 byte frames on this NNI. */
+    uint64_t tx_frames_128_255;         /**< The count of TX 128 to 255 byte frames on this NNI. */
+    uint64_t tx_frames_256_511;         /**< The count of TX 256 to 511 byte frames on this NNI. */
+    uint64_t tx_frames_512_1023;        /**< The count of TX 512 to 1023 byte frames on this NNI. */
+    uint64_t tx_frames_1024_1518;       /**< The count of TX 1024 to 1518 byte frames on this NNI. */
+    uint64_t tx_frames_1519_2047;       /**< The count of TX 1519 to 2047 byte frames on this NNI. */
+    uint64_t tx_frames_2048_4095;       /**< The count of TX 2048 to 4095 byte frames on this NNI. */
+    uint64_t tx_frames_4096_9216;       /**< The count of TX 4096 to 9216 byte frames on this NNI. */
+    uint64_t tx_frames_9217_16383;      /**< The count of TX 9217 to 16383 byte frames on this NNI. */
+    uint64_t tx_frames;                 /**< The number of transmitted frames on this NNI. This includes all errored frames as well. */
+    uint64_t tx_bytes;                  /**< The number of transmitted bytes on this NNI. This includes all errored frames as well. */
+    uint64_t tx_good_frames;            /**< The number of transmitted good frames on this NNI. */
+    uint64_t tx_unicast_frames;         /**< The number of transmitted unicast frames on this NNI. */
+    uint64_t tx_multicast_frames;       /**< The number of transmitted multicast frames on this NNI. */
+    uint64_t tx_broadcast_frames;       /**< The number of transmitted broadcast frames on this NNI. */
+    uint64_t tx_pause_frames;           /**< The number of transmitted pause frames on this NNI. */
+    uint64_t tx_pfc_frames;             /**< The number of transmitted PFC frames on this NNI. */
+    uint64_t tx_jabber_frames;          /**< The number of transmitted jabber frames on this NNI. These are oversized frames that also contain an invalid FCS. */
+    uint64_t tx_fcs_errors;             /**< The number of transmitted FCS errors on this NNI.  */
+    uint64_t tx_control_frames;         /**< The number of transmitted control frames on this NNI.  */
+    uint64_t tx_oversize_frames;        /**< The number of transmitted oversized frames on this NNI.  */
+    uint64_t tx_fragmented_frames;      /**< The number of transmitted fragmented frames on this NNI.  */
+    uint64_t tx_error_frames;           /**< The number of transmitted errored frames on this NNI.  */
+    uint64_t tx_vlan_frames;            /**< The number of transmitted VLAN tagged frames on this NNI (with TPID 8100). This counts both single and double tagged frames. */
+    uint64_t tx_double_vlan_frames;     /**< The number of transmitted double VLAN tagged frames on this NNI (with TPID 8100).  */
+    uint64_t tx_runt_frames;            /**< The number of transmitted runt frames on this NNI.  */
+    uint64_t tx_underrun_frames;        /**< The number of transmitted underrun frames on this NNI. Thus happens when a frame encounters a MAC underrun (Tx Sync FIFO runs out of data before the end of packet). */
+} bcmolt_nni_stat_data;
+
+/** Transport message definition for "stat" group of "nni" object. 
+ */
+typedef struct bcmolt_nni_stat
+{
+    bcmolt_stat hdr;            /**< Transport header. */
+    bcmolt_nni_key key;         /**< Object key. */
+    bcmolt_nni_stat_data data;  /**< All properties that must be set by the user. */
+} bcmolt_nni_stat;
+
+/** Structure definition for the "stat_cfg" group of the "nni" object. 
+ */
+typedef struct bcmolt_nni_stat_cfg_data
+{
+    bcmolt_stat_alarm_config cfg;   /**< Statistic alarm configuration. */
+} bcmolt_nni_stat_cfg_data;
+
+/** Transport message definition for "stat_cfg" group of "nni" object. 
+ */
+typedef struct bcmolt_nni_stat_cfg
+{
+    bcmolt_stat_cfg hdr;            /**< Transport header. */
+    bcmolt_nni_key key;             /**< Object key. */
+    bcmolt_nni_stat_cfg_data data;  /**< All properties that must be set by the user. */
+} bcmolt_nni_stat_cfg;
+
+/** Structure definition for the "stat_alarm_cleared" group of the "nni" object. 
+ *
+ * Sent when a configured statistic alarm condition is no longer met. 
+ */
+typedef struct bcmolt_nni_stat_alarm_cleared_data
+{
+    bcmolt_nni_stat_id stat;    /**< Statistic identifier. */
+} bcmolt_nni_stat_alarm_cleared_data;
+
+/** Transport message definition for "stat_alarm_cleared" group of "nni" object. 
+ */
+typedef struct bcmolt_nni_stat_alarm_cleared
+{
+    bcmolt_auto hdr;    /**< Transport header. */
+    bcmolt_nni_key key; /**< Object key. */
+    bcmolt_nni_stat_alarm_cleared_data data;    /**< All properties that must be set by the user. */
+} bcmolt_nni_stat_alarm_cleared;
+
+/** Structure definition for the "stat_alarm_raised" group of the "nni" object. 
+ *
+ * Sent when a configured statistic alarm condition has been met. 
+ */
+typedef struct bcmolt_nni_stat_alarm_raised_data
+{
+    bcmolt_nni_stat_id stat;    /**< Statistic identifier. */
+} bcmolt_nni_stat_alarm_raised_data;
+
+/** Transport message definition for "stat_alarm_raised" group of "nni" object. 
+ */
+typedef struct bcmolt_nni_stat_alarm_raised
+{
+    bcmolt_auto hdr;                        /**< Transport header. */
+    bcmolt_nni_key key;                     /**< Object key. */
+    bcmolt_nni_stat_alarm_raised_data data; /**< All properties that must be set by the user. */
+} bcmolt_nni_stat_alarm_raised;
+
+/** Structure definition for the "status_changed" group of the "nni" object. 
+ *
+ * NNI Link status changed 
+ */
+typedef struct bcmolt_nni_status_changed_data
+{
+    bcmolt_status new_status;               /**< New NNI Link Status */
+    bcmolt_nni_connection link;             /**< Which NNI this indication pertains to. */
+    bcmolt_nni_connection previous_active;  /**< Which NNI was active before this status change. */
+    bcmolt_nni_connection new_active;       /**< Which NNI is now active after this status change. */
+} bcmolt_nni_status_changed_data;
+
+/** Transport message definition for "status_changed" group of "nni" object. 
+ */
+typedef struct bcmolt_nni_status_changed
+{
+    bcmolt_auto hdr;                        /**< Transport header. */
+    bcmolt_nni_key key;                     /**< Object key. */
+    bcmolt_nni_status_changed_data data;    /**< All properties that must be set by the user. */
+} bcmolt_nni_status_changed;
+
+/** Structure definition for the "auto_cfg" group of the "nni" object. 
+ */
+typedef struct bcmolt_nni_auto_cfg_data
+{
+    bcmos_bool stat_alarm_cleared;  /**< If true, indications of type "stat_alarm_cleared" will be generated. */
+    bcmos_bool stat_alarm_raised;   /**< If true, indications of type "stat_alarm_raised" will be generated. */
+    bcmos_bool status_changed;      /**< If true, indications of type "status_changed" will be generated. */
+} bcmolt_nni_auto_cfg_data;
+
+/** Transport message definition for "auto_cfg" group of "nni" object. 
+ */
+typedef struct bcmolt_nni_auto_cfg
+{
+    bcmolt_auto_cfg hdr;            /**< Transport header. */
+    bcmolt_nni_key key;             /**< Object key. */
+    bcmolt_nni_auto_cfg_data data;  /**< All properties that must be set by the user. */
+} bcmolt_nni_auto_cfg;
+
+/** Structure definition for the "key" group of the "nni_serdes" object. 
+ */
+typedef struct bcmolt_nni_serdes_key
+{
+    bcmolt_pon_ni pon_ni;               /**< PON NI. */
+    bcmolt_serdes_instance instance;    /**< SerDes instance.: 0 = Primary, 1 = Secondary. */
+} bcmolt_nni_serdes_key;
+
+/** Structure definition for the "cfg" group of the "nni_serdes" object. 
+ */
+typedef struct bcmolt_nni_serdes_cfg_data
+{
+    uint8_t rx_vga;     /**< Rx Vga. */
+    uint8_t rx_pf;      /**< Peaking Filter */
+    uint8_t rx_lfpf;    /**< Low Frequency Peaking Filter */
+    uint8_t rx_dfe1;    /**< Rx DFE1. */
+    int8_t rx_dfe2;     /**< Rx DFE2. */
+    int8_t rx_dfe3;     /**< Rx DFE3. */
+    int8_t rx_dfe4;     /**< Rx DFE4. */
+    int8_t rx_dfe5;     /**< Rx DFE5. */
+    uint8_t tx_pre;     /**< Tx Pre. */
+    uint8_t tx_main;    /**< Tx Main. */
+    uint8_t tx_post1;   /**< Tx Post1. */
+    int8_t tx_post2;    /**< Tx Post2. */
+    int8_t tx_post3;    /**< Tx Post3. */
+    uint8_t tx_amp;     /**< Tx Amp. */
+} bcmolt_nni_serdes_cfg_data;
+
+/** Transport message definition for "cfg" group of "nni_serdes" object. 
+ */
+typedef struct bcmolt_nni_serdes_cfg
+{
+    bcmolt_cfg hdr;                     /**< Transport header. */
+    bcmolt_nni_serdes_key key;          /**< Object key. */
+    bcmolt_nni_serdes_cfg_data data;    /**< All properties that must be set by the user. */
+} bcmolt_nni_serdes_cfg;
+
+/** Structure definition for the "key" group of the "software_error" object. 
+ */
+typedef struct bcmolt_software_error_key
+{
+    uint32_t reserved;  /**< Reserved (set to 0). */
+    uint32_t idx;       /**< Index. */
+} bcmolt_software_error_key;
+
+/** Structure definition for the "cfg" group of the "software_error" object. 
+ */
+typedef struct bcmolt_software_error_cfg_data
+{
+    bcmolt_sw_error entry;  /**< Entry. */
+} bcmolt_software_error_cfg_data;
+
+/** Transport message definition for "cfg" group of "software_error" object. 
+ */
+typedef struct bcmolt_software_error_cfg
+{
+    bcmolt_cfg hdr;                 /**< Transport header. */
+    bcmolt_software_error_key key;  /**< Object key. */
+    bcmolt_software_error_cfg_data data;    /**< All properties that must be set by the user. */
+} bcmolt_software_error_cfg;
+
+/** Structure definition for the "key" group of the "trx_calibration" object. 
+ */
+typedef struct bcmolt_trx_calibration_key
+{
+    uint32_t reserved;  /**< Reserved (set to 0) */
+} bcmolt_trx_calibration_key;
+
+/** Structure definition for the "capture_window_and_statistic_completed" group 
+ * of the "trx_calibration" object. 
+ */
+typedef struct bcmolt_trx_calibration_capture_window_and_statistic_completed_data
+{
+    bcmolt_u32_list_u32_max_500_hex data_window;    /**< data window. */
+    bcmolt_u32_list_u32_max_500_hex strobe_window;  /**< strobe window. */
+    uint64_t edge_rise_min_min;                     /**< edge rise min min. */
+    uint64_t edge_rise_min_max;                     /**< edge rise min max. */
+    uint64_t edge_rise_max_min;                     /**< edge rise max min. */
+    uint64_t edge_rise_max_max;                     /**< edge rise max max. */
+    uint64_t edge_fall_min_min;                     /**< edge fall min min . */
+    uint64_t edge_fall_min_max;                     /**< edge fall min max. */
+    uint64_t edge_fall_max_min;                     /**< edge fall max min. */
+    uint64_t edge_fall_max_max;                     /**< edge fall max max. */
+    bcmolt_result result;   /**< result. */
+} bcmolt_trx_calibration_capture_window_and_statistic_completed_data;
+
+/** Transport message definition for "capture_window_and_statistic_completed" 
+ * group of "trx_calibration" object. 
+ */
+typedef struct bcmolt_trx_calibration_capture_window_and_statistic_completed
+{
+    bcmolt_auto hdr;                /**< Transport header. */
+    bcmolt_trx_calibration_key key; /**< Object key. */
+    bcmolt_trx_calibration_capture_window_and_statistic_completed_data data;    /**< All properties that must be set by the user. */
+} bcmolt_trx_calibration_capture_window_and_statistic_completed;
+
+/** Structure definition for the "auto_cfg" group of the "trx_calibration" 
+ * object. 
+ */
+typedef struct bcmolt_trx_calibration_auto_cfg_data
+{
+    bcmos_bool capture_window_and_statistic_completed;  /**< If true, indications of type "capture_window_and_statistic_completed" will be generated. */
+} bcmolt_trx_calibration_auto_cfg_data;
+
+/** Transport message definition for "auto_cfg" group of "trx_calibration" 
+ * object. 
+ */
+typedef struct bcmolt_trx_calibration_auto_cfg
+{
+    bcmolt_auto_cfg hdr;                        /**< Transport header. */
+    bcmolt_trx_calibration_key key;             /**< Object key. */
+    bcmolt_trx_calibration_auto_cfg_data data;  /**< All properties that must be set by the user. */
+} bcmolt_trx_calibration_auto_cfg;
+
+/** Structure definition for the "start_capture_window" group of the 
+ * "trx_calibration" object. 
+ */
+typedef struct bcmolt_trx_calibration_start_capture_window_data
+{
+    uint8_t pon_ni; /**< pon_ni. */
+    bcmolt_trx_calibration_trigger trigger;         /**< trigger. */
+    bcmolt_capture_strobe_signal strobe;            /**< strobe. */
+    bcmolt_trx_calibration_window_mode window_mode; /**< window mode. */
+    uint16_t onu_id;    /**< onu id. */
+    bcmolt_trx_calibration_trigger_position trigger_position;   /**< trigger position. */
+    bcmos_bool stop_due_to_corrupt_strobe;                      /**< enable/disable corrupt strobe from MAC to terminate stat window */
+    uint16_t start_offset;      /**< start offset. */
+    uint16_t end_offset;        /**< end offset. */
+    uint8_t number_of_cycles;   /**< number of cycles. */
+} bcmolt_trx_calibration_start_capture_window_data;
+
+/** Transport message definition for "start_capture_window" group of 
+ * "trx_calibration" object. 
+ */
+typedef struct bcmolt_trx_calibration_start_capture_window
+{
+    bcmolt_oper hdr;                /**< Transport header. */
+    bcmolt_trx_calibration_key key; /**< Object key. */
+    bcmolt_trx_calibration_start_capture_window_data data;  /**< All properties that must be set by the user. */
+} bcmolt_trx_calibration_start_capture_window;
+
+/** Structure definition for the "stop_capture_window" group of the 
+ * "trx_calibration" object. 
+ */
+typedef struct bcmolt_trx_calibration_stop_capture_window_data
+{
+    uint8_t pon_ni; /**< pon_ni. */
+} bcmolt_trx_calibration_stop_capture_window_data;
+
+/** Transport message definition for "stop_capture_window" group of 
+ * "trx_calibration" object. 
+ */
+typedef struct bcmolt_trx_calibration_stop_capture_window
+{
+    bcmolt_oper hdr;                /**< Transport header. */
+    bcmolt_trx_calibration_key key; /**< Object key. */
+    bcmolt_trx_calibration_stop_capture_window_data data;   /**< All properties that must be set by the user. */
+} bcmolt_trx_calibration_stop_capture_window;
+
+/** Structure definition for the "key" group of the "xgpon_alloc" object. 
+ */
+typedef struct bcmolt_xgpon_alloc_key
+{
+    bcmolt_xgpon_ni pon_ni;         /**< PON network interface. */
+    bcmolt_xgpon_alloc_id alloc_id; /**< Alloc ID. */
+} bcmolt_xgpon_alloc_key;
+
+/** Structure definition for the "cfg" group of the "xgpon_alloc" object. 
+ */
+typedef struct bcmolt_xgpon_alloc_cfg_data
+{
+    bcmolt_alloc_state state;   /**< Current Alloc ID state */
+    bcmolt_pon_alloc_sla sla;   /**< Alloc ID SLA */
+    bcmolt_xgpon_onu_id onu_id; /**< ONU ID the alloc ID is assigned to */
+    bcmos_bool collect_stats;   /**< Enable statistics collection for this alloc ID */
+} bcmolt_xgpon_alloc_cfg_data;
+
+/** Transport message definition for "cfg" group of "xgpon_alloc" object. 
+ */
+typedef struct bcmolt_xgpon_alloc_cfg
+{
+    bcmolt_cfg hdr;                     /**< Transport header. */
+    bcmolt_xgpon_alloc_key key;         /**< Object key. */
+    bcmolt_xgpon_alloc_cfg_data data;   /**< All properties that must be set by the user. */
+} bcmolt_xgpon_alloc_cfg;
+
+/** Structure definition for the "stat" group of the "xgpon_alloc" object. 
+ */
+typedef struct bcmolt_xgpon_alloc_stat_data
+{
+    uint64_t rx_bytes;  /**< Number of alloc ID received bytes. */
+} bcmolt_xgpon_alloc_stat_data;
+
+/** Transport message definition for "stat" group of "xgpon_alloc" object. 
+ */
+typedef struct bcmolt_xgpon_alloc_stat
+{
+    bcmolt_stat hdr;                    /**< Transport header. */
+    bcmolt_xgpon_alloc_key key;         /**< Object key. */
+    bcmolt_xgpon_alloc_stat_data data;  /**< All properties that must be set by the user. */
+} bcmolt_xgpon_alloc_stat;
+
+/** Structure definition for the "stat_cfg" group of the "xgpon_alloc" object. 
+ */
+typedef struct bcmolt_xgpon_alloc_stat_cfg_data
+{
+    bcmolt_stat_alarm_config cfg;   /**< Statistic alarm configuration. */
+} bcmolt_xgpon_alloc_stat_cfg_data;
+
+/** Transport message definition for "stat_cfg" group of "xgpon_alloc" object. 
+ */
+typedef struct bcmolt_xgpon_alloc_stat_cfg
+{
+    bcmolt_stat_cfg hdr;        /**< Transport header. */
+    bcmolt_xgpon_alloc_key key; /**< Object key. */
+    bcmolt_xgpon_alloc_stat_cfg_data data;  /**< All properties that must be set by the user. */
+} bcmolt_xgpon_alloc_stat_cfg;
+
+/** Structure definition for the "configuration_completed" group of the 
+ * "xgpon_alloc" object. 
+ */
+typedef struct bcmolt_xgpon_alloc_configuration_completed_data
+{
+    bcmolt_result status;           /**< status. */
+    bcmolt_alloc_state new_state;   /**< new state. */
+} bcmolt_xgpon_alloc_configuration_completed_data;
+
+/** Transport message definition for "configuration_completed" group of 
+ * "xgpon_alloc" object. 
+ */
+typedef struct bcmolt_xgpon_alloc_configuration_completed
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_xgpon_alloc_key key; /**< Object key. */
+    bcmolt_xgpon_alloc_configuration_completed_data data;   /**< All properties that must be set by the user. */
+} bcmolt_xgpon_alloc_configuration_completed;
+
+/** Structure definition for the "get_alloc_stats_completed" group of the 
+ * "xgpon_alloc" object. 
+ *
+ * Collected alloc ID statistics from get_stats operation 
+ */
+typedef struct bcmolt_xgpon_alloc_get_alloc_stats_completed_data
+{
+    bcmolt_result status;           /**< status. */
+    uint32_t average_nsr_used;      /**< Average NSR used words. */
+    uint32_t average_nsr_allocated; /**< Average NSR allocated words. */
+    uint32_t average_sr_report;     /**< Average SR report. */
+} bcmolt_xgpon_alloc_get_alloc_stats_completed_data;
+
+/** Transport message definition for "get_alloc_stats_completed" group of 
+ * "xgpon_alloc" object. 
+ */
+typedef struct bcmolt_xgpon_alloc_get_alloc_stats_completed
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_xgpon_alloc_key key; /**< Object key. */
+    bcmolt_xgpon_alloc_get_alloc_stats_completed_data data; /**< All properties that must be set by the user. */
+} bcmolt_xgpon_alloc_get_alloc_stats_completed;
+
+/** Structure definition for the "stat_alarm_cleared" group of the "xgpon_alloc" 
+ * object. 
+ *
+ * Sent when a configured statistic alarm condition is no longer met. 
+ */
+typedef struct bcmolt_xgpon_alloc_stat_alarm_cleared_data
+{
+    bcmolt_xgpon_alloc_stat_id stat;    /**< Statistic identifier. */
+} bcmolt_xgpon_alloc_stat_alarm_cleared_data;
+
+/** Transport message definition for "stat_alarm_cleared" group of "xgpon_alloc" 
+ * object. 
+ */
+typedef struct bcmolt_xgpon_alloc_stat_alarm_cleared
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_xgpon_alloc_key key; /**< Object key. */
+    bcmolt_xgpon_alloc_stat_alarm_cleared_data data;    /**< All properties that must be set by the user. */
+} bcmolt_xgpon_alloc_stat_alarm_cleared;
+
+/** Structure definition for the "stat_alarm_raised" group of the "xgpon_alloc" 
+ * object. 
+ *
+ * Sent when a configured statistic alarm condition has been met. 
+ */
+typedef struct bcmolt_xgpon_alloc_stat_alarm_raised_data
+{
+    bcmolt_xgpon_alloc_stat_id stat;    /**< Statistic identifier. */
+} bcmolt_xgpon_alloc_stat_alarm_raised_data;
+
+/** Transport message definition for "stat_alarm_raised" group of "xgpon_alloc" 
+ * object. 
+ */
+typedef struct bcmolt_xgpon_alloc_stat_alarm_raised
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_xgpon_alloc_key key; /**< Object key. */
+    bcmolt_xgpon_alloc_stat_alarm_raised_data data; /**< All properties that must be set by the user. */
+} bcmolt_xgpon_alloc_stat_alarm_raised;
+
+/** Structure definition for the "auto_cfg" group of the "xgpon_alloc" object. 
+ */
+typedef struct bcmolt_xgpon_alloc_auto_cfg_data
+{
+    bcmos_bool configuration_completed;     /**< If true, indications of type "configuration_completed" will be generated. */
+    bcmos_bool get_alloc_stats_completed;   /**< If true, indications of type "get_alloc_stats_completed" will be generated. */
+    bcmos_bool stat_alarm_cleared;          /**< If true, indications of type "stat_alarm_cleared" will be generated. */
+    bcmos_bool stat_alarm_raised;           /**< If true, indications of type "stat_alarm_raised" will be generated. */
+} bcmolt_xgpon_alloc_auto_cfg_data;
+
+/** Transport message definition for "auto_cfg" group of "xgpon_alloc" object. 
+ */
+typedef struct bcmolt_xgpon_alloc_auto_cfg
+{
+    bcmolt_auto_cfg hdr;                    /**< Transport header. */
+    bcmolt_xgpon_alloc_key key;             /**< Object key. */
+    bcmolt_xgpon_alloc_auto_cfg_data data;  /**< All properties that must be set by the user. */
+} bcmolt_xgpon_alloc_auto_cfg;
+
+/** Structure definition for the "get_stats" group of the "xgpon_alloc" object. 
+ *
+ * Run statistics collection for a given period of time 
+ */
+typedef struct bcmolt_xgpon_alloc_get_stats_data
+{
+    uint32_t num_of_cycles; /**< The number of cycles to run statistics collection */
+} bcmolt_xgpon_alloc_get_stats_data;
+
+/** Transport message definition for "get_stats" group of "xgpon_alloc" object. 
+ */
+typedef struct bcmolt_xgpon_alloc_get_stats
+{
+    bcmolt_oper hdr;                        /**< Transport header. */
+    bcmolt_xgpon_alloc_key key;             /**< Object key. */
+    bcmolt_xgpon_alloc_get_stats_data data; /**< All properties that must be set by the user. */
+} bcmolt_xgpon_alloc_get_stats;
+
+/** Structure definition for the "set_state" group of the "xgpon_alloc" object. 
+ *
+ * Sets the alloc's activation state.  This is only used for protection 
+ * switching on an active-standby PON.  In normal operation, this isn't 
+ * necessary since allocs are activated/deactivated automatically along with 
+ * the ONU. 
+ */
+typedef struct bcmolt_xgpon_alloc_set_state_data
+{
+    bcmolt_alloc_operation state;   /**< State. */
+} bcmolt_xgpon_alloc_set_state_data;
+
+/** Transport message definition for "set_state" group of "xgpon_alloc" object. 
+ */
+typedef struct bcmolt_xgpon_alloc_set_state
+{
+    bcmolt_oper hdr;                        /**< Transport header. */
+    bcmolt_xgpon_alloc_key key;             /**< Object key. */
+    bcmolt_xgpon_alloc_set_state_data data; /**< All properties that must be set by the user. */
+} bcmolt_xgpon_alloc_set_state;
+
+/** Structure definition for the "key" group of the "xgpon_gem_port" object. 
+ */
+typedef struct bcmolt_xgpon_gem_port_key
+{
+    bcmolt_xgpon_ni pon_ni;             /**< PON network interface. */
+    bcmolt_xgpon_gem_id gem_port_id;    /**< GEM PORT ID. */
+} bcmolt_xgpon_gem_port_key;
+
+/** Structure definition for the "cfg" group of the "xgpon_gem_port" object. 
+ */
+typedef struct bcmolt_xgpon_gem_port_cfg_data
+{
+    bcmolt_gem_port_configuration configuration;                /**< GEM port configuration parameters */
+    bcmolt_xgpon_onu_id onu_id;                                 /**< ONU ID this GEM port is assigned to */
+    bcmolt_xgpon_gem_port_state gem_port_state;                 /**< Current GEM port state */
+    bcmolt_control_state encryption_mode;                       /**< Enable/Disable the downstream encryption mode of the GEM Port */
+    bcmolt_us_gem_port_destination upstream_destination_queue;  /**< The destination queue of the packets arriving on this GEM Port on the upstream direction */
+    bcmolt_control_state control;   /**< Enable/Disable the GEM Port ID in the OLT */
+} bcmolt_xgpon_gem_port_cfg_data;
+
+/** Transport message definition for "cfg" group of "xgpon_gem_port" object. 
+ */
+typedef struct bcmolt_xgpon_gem_port_cfg
+{
+    bcmolt_cfg hdr;                 /**< Transport header. */
+    bcmolt_xgpon_gem_port_key key;  /**< Object key. */
+    bcmolt_xgpon_gem_port_cfg_data data;    /**< All properties that must be set by the user. */
+} bcmolt_xgpon_gem_port_cfg;
+
+/** Structure definition for the "stat" group of the "xgpon_gem_port" object. 
+ */
+typedef struct bcmolt_xgpon_gem_port_stat_data
+{
+    uint64_t tx_bytes;      /**< TX bytes. */
+    uint64_t tx_packets;    /**< TX packets. */
+    uint64_t rx_packets;    /**< RX packets. */
+    uint64_t rx_bytes;      /**< RX bytes. */
+} bcmolt_xgpon_gem_port_stat_data;
+
+/** Transport message definition for "stat" group of "xgpon_gem_port" object. 
+ */
+typedef struct bcmolt_xgpon_gem_port_stat
+{
+    bcmolt_stat hdr;                        /**< Transport header. */
+    bcmolt_xgpon_gem_port_key key;          /**< Object key. */
+    bcmolt_xgpon_gem_port_stat_data data;   /**< All properties that must be set by the user. */
+} bcmolt_xgpon_gem_port_stat;
+
+/** Structure definition for the "stat_cfg" group of the "xgpon_gem_port" 
+ * object. 
+ */
+typedef struct bcmolt_xgpon_gem_port_stat_cfg_data
+{
+    bcmolt_stat_alarm_config cfg;   /**< Statistic alarm configuration. */
+} bcmolt_xgpon_gem_port_stat_cfg_data;
+
+/** Transport message definition for "stat_cfg" group of "xgpon_gem_port" 
+ * object. 
+ */
+typedef struct bcmolt_xgpon_gem_port_stat_cfg
+{
+    bcmolt_stat_cfg hdr;            /**< Transport header. */
+    bcmolt_xgpon_gem_port_key key;  /**< Object key. */
+    bcmolt_xgpon_gem_port_stat_cfg_data data;   /**< All properties that must be set by the user. */
+} bcmolt_xgpon_gem_port_stat_cfg;
+
+/** Structure definition for the "stat_alarm_cleared" group of the 
+ * "xgpon_gem_port" object. 
+ *
+ * Sent when a configured statistic alarm condition is no longer met. 
+ */
+typedef struct bcmolt_xgpon_gem_port_stat_alarm_cleared_data
+{
+    bcmolt_xgpon_gem_port_stat_id stat; /**< Statistic identifier. */
+} bcmolt_xgpon_gem_port_stat_alarm_cleared_data;
+
+/** Transport message definition for "stat_alarm_cleared" group of 
+ * "xgpon_gem_port" object. 
+ */
+typedef struct bcmolt_xgpon_gem_port_stat_alarm_cleared
+{
+    bcmolt_auto hdr;                /**< Transport header. */
+    bcmolt_xgpon_gem_port_key key;  /**< Object key. */
+    bcmolt_xgpon_gem_port_stat_alarm_cleared_data data; /**< All properties that must be set by the user. */
+} bcmolt_xgpon_gem_port_stat_alarm_cleared;
+
+/** Structure definition for the "stat_alarm_raised" group of the 
+ * "xgpon_gem_port" object. 
+ *
+ * Sent when a configured statistic alarm condition has been met. 
+ */
+typedef struct bcmolt_xgpon_gem_port_stat_alarm_raised_data
+{
+    bcmolt_xgpon_gem_port_stat_id stat; /**< Statistic identifier. */
+} bcmolt_xgpon_gem_port_stat_alarm_raised_data;
+
+/** Transport message definition for "stat_alarm_raised" group of 
+ * "xgpon_gem_port" object. 
+ */
+typedef struct bcmolt_xgpon_gem_port_stat_alarm_raised
+{
+    bcmolt_auto hdr;                /**< Transport header. */
+    bcmolt_xgpon_gem_port_key key;  /**< Object key. */
+    bcmolt_xgpon_gem_port_stat_alarm_raised_data data;  /**< All properties that must be set by the user. */
+} bcmolt_xgpon_gem_port_stat_alarm_raised;
+
+/** Structure definition for the "auto_cfg" group of the "xgpon_gem_port" 
+ * object. 
+ */
+typedef struct bcmolt_xgpon_gem_port_auto_cfg_data
+{
+    bcmos_bool stat_alarm_cleared;  /**< If true, indications of type "stat_alarm_cleared" will be generated. */
+    bcmos_bool stat_alarm_raised;   /**< If true, indications of type "stat_alarm_raised" will be generated. */
+} bcmolt_xgpon_gem_port_auto_cfg_data;
+
+/** Transport message definition for "auto_cfg" group of "xgpon_gem_port" 
+ * object. 
+ */
+typedef struct bcmolt_xgpon_gem_port_auto_cfg
+{
+    bcmolt_auto_cfg hdr;                        /**< Transport header. */
+    bcmolt_xgpon_gem_port_key key;              /**< Object key. */
+    bcmolt_xgpon_gem_port_auto_cfg_data data;   /**< All properties that must be set by the user. */
+} bcmolt_xgpon_gem_port_auto_cfg;
+
+/** Structure definition for the "key" group of the "xgpon_iwf" object. 
+ */
+typedef struct bcmolt_xgpon_iwf_key
+{
+    bcmolt_xgpon_ni pon_ni; /**< PON network interface. */
+} bcmolt_xgpon_iwf_key;
+
+/** Structure definition for the "cfg" group of the "xgpon_iwf" object. 
+ */
+typedef struct bcmolt_xgpon_iwf_cfg_data
+{
+    uint16_t us_otag_direct_tpid;   /**< TPID value of the VLAN tag added to upstream packet */
+#define BCMOLT_XGPON_IWF_CFG_DATA_DS_TPID_LEN   5
+    bcmolt_arr_u16_5_hex ds_tpid;   /**< Packets marked with one of the five configured DS TPID options will be forwarded, all the rest will be dropped */
+} bcmolt_xgpon_iwf_cfg_data;
+
+/** Transport message definition for "cfg" group of "xgpon_iwf" object. 
+ */
+typedef struct bcmolt_xgpon_iwf_cfg
+{
+    bcmolt_cfg hdr;                 /**< Transport header. */
+    bcmolt_xgpon_iwf_key key;       /**< Object key. */
+    bcmolt_xgpon_iwf_cfg_data data; /**< All properties that must be set by the user. */
+} bcmolt_xgpon_iwf_cfg;
+
+/** Structure definition for the "key" group of the "xgpon_ni" object. 
+ */
+typedef struct bcmolt_xgpon_ni_key
+{
+    bcmolt_xgpon_ni pon_ni; /**< PON network interface. */
+} bcmolt_xgpon_ni_key;
+
+/** Structure definition for the "cfg" group of the "xgpon_ni" object. 
+ */
+typedef struct bcmolt_xgpon_ni_cfg_data
+{
+    bcmolt_hw_pon_id hw_pon_id; /**< 51 bit PON identifier. This attribute is part of the downstream physical synchronization block (PSBd) */
+    bcmolt_pon_available_bandwidth available_bandwidth; /**< PON available bandwidth parameters */
+    uint16_t number_of_active_onus;                     /**< Number of active ONUs on the PON */
+    bcmolt_pon_status pon_status;                       /**< PON status parameters */
+    bcmolt_pon_distance pon_distance;                   /**< PON distance */
+    uint32_t ranging_window_size;                       /**< Ranging window size in BW units (4-byte words for 2.5G upstream, 16-byte blocks for 10G upstream) */
+    uint32_t eqd_cycles_number;             /**< How many ranging windows are opened during a single ONU activation process */
+    bcmolt_pon_drift_control drift_control; /**< Drift control process configuration */
+    uint8_t los_alarm_threshold;            /**< LOS alarm threshold */
+    bcmolt_status los_initial_value;        /**< LOS initial value following PON activation */
+    bcmolt_xgpon_onu_alarms_thresholds onu_alarms_thresholds;               /**< ONU alarms thresholds configuration */
+    bcmolt_ber_monitor_params ber_monitor;                                  /**< BER monitor process configuration */
+    bcmolt_xgpon_onu_activation onu_activation;                             /**< ONU activation control parameters */
+    bcmolt_xgpon_sn_acquisition sn_acquisition;                             /**< Serial Number process configuration */
+    bcmolt_xgpon_key_exchange key_exchange;                                 /**< Key Exchange process configuration */
+    bcmolt_xgpon_protection_switching protection_switching;                 /**< Protection switching control */
+    bcmolt_xgpon_protection_switching_debug protection_switching_debug;     /**< protection switching debug . */
+    bcmolt_cbr_rt_allocation_profile cbr_rt_allocation_profile;             /**< CBR Real Time allocation profile */
+#define BCMOLT_XGPON_NI_CFG_DATA_CBR_NRT_ALLOCATION_PROFILE_LEN 2
+    bcmolt_arr_u16_2 cbr_nrt_allocation_profile;                            /**< CBR non Real Time allocation profile */
+    bcmolt_onu_power_management_configuration power_management;             /**< ONU power management control */
+    bcmolt_rogue_onu_detection_process rogue_onu_detection_process;         /**< TBD */
+    bcmolt_periodic_standby_pon_monitoring periodic_standby_pon_monitoring; /**< Periodic Standby PON monitoring */
+    bcmolt_dba_mode dba_mode;                       /**< DBA mode */
+    bcmolt_xgpon_ploam_handling ploam_handling;     /**< Ploam handling configuration */
+    bcmolt_xgpon_alloc_id min_data_alloc_id;        /**< Min data Alloc ID value */
+    bcmolt_xgpon_gem_id min_data_gem_port_id;       /**< Min data XGEM port ID value */
+    bcmolt_xgpon_multicast_key multicast_key;       /**< Multicast XGEM ports encryption control */
+    bcmolt_prbs_checker_config prbs_checker;        /**< US PRBS checker configuration */
+    bcmolt_prbs_generator_config prbs_generator;    /**< DS PRBS generator configuration */
+    bcmolt_prbs_status prbs_status;                 /**< Result of US PRBS checker */
+    bcmolt_automatic_onu_deactivation automatic_onu_deactivation;   /**< Option to disable the automatic deactivation of ONUs due to alarms */
+    uint32_t us_bandwidth_limit;    /**< Total PON upstream bandwidth limit in bytes per second. */
+    bcmolt_xgpon_onu_with_state_list_u16_max_510 all_onus;                  /**< All ONUs currently provisioned on this PON. */
+    bcmolt_xgpon_gem_port_with_state_list_u16_max_128 all_mcast_gem_ports;  /**< All multicast GEM ports currently provisioned on this PON. */
+    bcmolt_xgpon_ni_debug debug;                        /**< PON NI debug parameters */
+    bcmolt_gpon_onu_upgrade_params onu_upgrade_params;  /**< ONU upgrade params. */
+    bcmolt_control_state ds_fec_mode;                   /**< DS FEC mode. */
+    bcmolt_dba_type dba_type;                   /**< DBA implementation type */
+    bcmolt_onu_tuning_configuration onu_tuning; /**< onu tuning. */
+} bcmolt_xgpon_ni_cfg_data;
+
+/** Transport message definition for "cfg" group of "xgpon_ni" object. 
+ */
+typedef struct bcmolt_xgpon_ni_cfg
+{
+    bcmolt_cfg hdr;                 /**< Transport header. */
+    bcmolt_xgpon_ni_key key;        /**< Object key. */
+    bcmolt_xgpon_ni_cfg_data data;  /**< All properties that must be set by the user. */
+} bcmolt_xgpon_ni_cfg;
+
+/** Structure definition for the "stat" group of the "xgpon_ni" object. 
+ */
+typedef struct bcmolt_xgpon_ni_stat_data
+{
+    uint64_t fec_codewords;             /**< Receive FEC codewords. */
+    uint64_t bip32_bytes;               /**< Received bytes protected by bip32. */
+    uint64_t bip32_errors;              /**< Received bip32 errors. */
+    uint64_t rx_xgtc_headers;           /**< Received valid XGTC headers. */
+    uint64_t rx_xgtc_corrected;         /**< Received corrected XGTC headers. */
+    uint64_t rx_xgtc_uncorrected;       /**< Received uncorrected XGTC headers. */
+    uint64_t rx_xgem;                   /**< Received valid XGEM frames. */
+    uint64_t rx_xgem_dropped;           /**< Received dropped XGEM ID frames. */
+    uint64_t rx_xgem_idle;              /**< Received idle XGEM frames. */
+    uint64_t rx_xgem_corrected;         /**< Received corrected XGEM frames. */
+    uint64_t rx_crc_error;              /**< Received packets with CRC error. */
+    uint64_t rx_fragment_error;         /**< Received fragment errors. */
+    uint64_t rx_packets_dropped;        /**< Global dropped packets. */
+    uint64_t rx_dropped_too_short;      /**< Received packets dropped due to length too short. */
+    uint64_t rx_dropped_too_long;       /**< Received packet dropped due to length too long. */
+    uint64_t rx_key_error;              /**< Received key errors. */
+    uint64_t tx_ploams;                 /**< Transmitted Ploams. */
+    uint64_t rx_ploams_dropped;         /**< Received dropped Ploams. */
+    uint64_t rx_allocations_valid;      /**< Received valid allocations. */
+    uint64_t rx_allocations_invalid;    /**< Received invalid allocations. */
+    uint64_t rx_allocations_disabled;   /**< Received disabled allocations. */
+    uint64_t rx_ploams;                 /**< Received Ploams. */
+    uint64_t rx_ploams_non_idle;        /**< Received non idle Ploams. */
+    uint64_t rx_ploams_error;           /**< Received error Ploams. */
+    uint64_t rx_cpu;                    /**< Received CPU packets. */
+    uint64_t rx_omci;                   /**< Received OMCI packets. */
+    uint64_t rx_omci_packets_crc_error; /**< Received OMCI packets with CRC errors. */
+    uint64_t tx_packets;                /**< Transmitted packets. */
+    uint64_t tx_xgem;                   /**< Transmitted XGEM fragments. */
+    uint64_t tx_cpu;                    /**< Transmitted CPU packets. */
+    uint64_t tx_omci;                   /**< Transmitted OMCI packets. */
+    uint8_t tx_cpu_omci_packets_dropped;    /**< Transmit packets dropped due to illegal length. */
+    uint64_t tx_dropped_illegal_length;     /**< Transmit packets dropped due to illegal length. */
+    uint64_t tx_dropped_tpid_miss;          /**< Transmit packets dropped due to TPID miss. */
+    uint64_t tx_dropped_vid_miss;           /**< Transmit packets droped due to VID miss. */
+} bcmolt_xgpon_ni_stat_data;
+
+/** Transport message definition for "stat" group of "xgpon_ni" object. 
+ */
+typedef struct bcmolt_xgpon_ni_stat
+{
+    bcmolt_stat hdr;                /**< Transport header. */
+    bcmolt_xgpon_ni_key key;        /**< Object key. */
+    bcmolt_xgpon_ni_stat_data data; /**< All properties that must be set by the user. */
+} bcmolt_xgpon_ni_stat;
+
+/** Structure definition for the "stat_cfg" group of the "xgpon_ni" object. 
+ */
+typedef struct bcmolt_xgpon_ni_stat_cfg_data
+{
+    bcmolt_stat_alarm_config cfg;   /**< Statistic alarm configuration. */
+} bcmolt_xgpon_ni_stat_cfg_data;
+
+/** Transport message definition for "stat_cfg" group of "xgpon_ni" object. 
+ */
+typedef struct bcmolt_xgpon_ni_stat_cfg
+{
+    bcmolt_stat_cfg hdr;                /**< Transport header. */
+    bcmolt_xgpon_ni_key key;            /**< Object key. */
+    bcmolt_xgpon_ni_stat_cfg_data data; /**< All properties that must be set by the user. */
+} bcmolt_xgpon_ni_stat_cfg;
+
+/** Transport message definition for "activate_all_onus_completed" group of 
+ * "xgpon_ni" object. 
+ */
+typedef struct bcmolt_xgpon_ni_activate_all_onus_completed
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_xgpon_ni_key key;    /**< Object key. */
+} bcmolt_xgpon_ni_activate_all_onus_completed;
+
+/** Structure definition for the "cpu_packets_failure" group of the "xgpon_ni" 
+ * object. 
+ *
+ * A failure was encountered during the "cpu_packets" proxy operation. 
+ */
+typedef struct bcmolt_xgpon_ni_cpu_packets_failure_data
+{
+    bcmolt_packet_injection_error error;    /**< The error that was encountered. */
+    bcmolt_xgpon_gem_id gem_port_id;        /**< The GEM port that caused the error. */
+} bcmolt_xgpon_ni_cpu_packets_failure_data;
+
+/** Transport message definition for "cpu_packets_failure" group of "xgpon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_xgpon_ni_cpu_packets_failure
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_xgpon_ni_key key;    /**< Object key. */
+    bcmolt_xgpon_ni_cpu_packets_failure_data data;  /**< All properties that must be set by the user. */
+} bcmolt_xgpon_ni_cpu_packets_failure;
+
+/** Transport message definition for "deactivate_all_onus_completed" group of 
+ * "xgpon_ni" object. 
+ */
+typedef struct bcmolt_xgpon_ni_deactivate_all_onus_completed
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_xgpon_ni_key key;    /**< Object key. */
+} bcmolt_xgpon_ni_deactivate_all_onus_completed;
+
+/** Transport message definition for "disable_all_onus_completed" group of 
+ * "xgpon_ni" object. 
+ */
+typedef struct bcmolt_xgpon_ni_disable_all_onus_completed
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_xgpon_ni_key key;    /**< Object key. */
+} bcmolt_xgpon_ni_disable_all_onus_completed;
+
+/** Transport message definition for "enable_all_onus_completed" group of 
+ * "xgpon_ni" object. 
+ */
+typedef struct bcmolt_xgpon_ni_enable_all_onus_completed
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_xgpon_ni_key key;    /**< Object key. */
+} bcmolt_xgpon_ni_enable_all_onus_completed;
+
+/** Structure definition for the "los" group of the "xgpon_ni" object. 
+ */
+typedef struct bcmolt_xgpon_ni_los_data
+{
+    bcmolt_status status;   /**< status. */
+} bcmolt_xgpon_ni_los_data;
+
+/** Transport message definition for "los" group of "xgpon_ni" object. 
+ */
+typedef struct bcmolt_xgpon_ni_los
+{
+    bcmolt_auto hdr;                /**< Transport header. */
+    bcmolt_xgpon_ni_key key;        /**< Object key. */
+    bcmolt_xgpon_ni_los_data data;  /**< All properties that must be set by the user. */
+} bcmolt_xgpon_ni_los;
+
+/** Structure definition for the "onu_discovered" group of the "xgpon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_xgpon_ni_onu_discovered_data
+{
+    bcmolt_serial_number serial_number; /**< serial number. */
+    uint32_t ranging_time;              /**< ranging time. */
+    bcmolt_xgpon_onu_id onu_id;         /**< onu_id. */
+    bcmolt_upstream_line_rate_capabilities upstream_line_rate_capabilities; /**< Upstream line rate capabilities */
+    uint8_t current_downstream_pon_id;                  /**< The PON-ID received by the ONU in its current downstream wavelength channel */
+    uint8_t current_upstream_pon_id;                    /**< The PON-ID of the Channel Profile containing the descriptor of the upstream wavelength channel in which the ONU is transmitting */
+#define BCMOLT_XGPON_NI_ONU_DISCOVERED_DATA_CALIBRATION_RECORD_LEN  8
+    bcmolt_arr_calibration_record_8 calibration_record; /**< Calibration record */
+    uint8_t tuning_granularity;             /**< The tuning granularity of the ONU transmitted expressed in units of 1Ghz. Value of 0 indicates that the ONU does not support fine tuning / dithering */
+    uint8_t step_tuning_time;               /**< The value of the tuning time for a single granularity step, expressed in unit of PHY frames. The value 0 indicates that the ONU does not support fine tuning / dithering */
+    uint8_t attenuation;                    /**< The ONU attenuation in steps of 3dB at the time of the message transmission as part of the power levelling report. Value of 0 represents un-attenuated transmission */
+    uint8_t power_levelling_capabilities;   /**< The ONU supports attenuation level in step of 3dB */
+} bcmolt_xgpon_ni_onu_discovered_data;
+
+/** Transport message definition for "onu_discovered" group of "xgpon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_xgpon_ni_onu_discovered
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_xgpon_ni_key key;    /**< Object key. */
+    bcmolt_xgpon_ni_onu_discovered_data data;   /**< All properties that must be set by the user. */
+} bcmolt_xgpon_ni_onu_discovered;
+
+/** Structure definition for the "onu_upgrade_complete" group of the "xgpon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_xgpon_ni_onu_upgrade_complete_data
+{
+    bcmos_bool status;  /**< Success or failure.  Against entire upgrade process.  This is added per Anat's request. */
+    bcmolt_gpon_onu_upgrade_status_list_u32 list_of_failed_entities;    /**< List of ONU-IDs the upgrade failed for. */
+} bcmolt_xgpon_ni_onu_upgrade_complete_data;
+
+/** Transport message definition for "onu_upgrade_complete" group of "xgpon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_xgpon_ni_onu_upgrade_complete
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_xgpon_ni_key key;    /**< Object key. */
+    bcmolt_xgpon_ni_onu_upgrade_complete_data data; /**< All properties that must be set by the user. */
+} bcmolt_xgpon_ni_onu_upgrade_complete;
+
+/** Structure definition for the "protection_switching_onus_ranged" group of the 
+ * "xgpon_ni" object. 
+ *
+ * After a switchover is complete and all ONU ranging times have stabilized, 
+ * this indication is sent to inform the host of all new ONU EQDs. 
+ */
+typedef struct bcmolt_xgpon_ni_protection_switching_onus_ranged_data
+{
+    bcmolt_xgpon_onu_eqd_list_u32 onus; /**< ONUs. */
+} bcmolt_xgpon_ni_protection_switching_onus_ranged_data;
+
+/** Transport message definition for "protection_switching_onus_ranged" group of 
+ * "xgpon_ni" object. 
+ */
+typedef struct bcmolt_xgpon_ni_protection_switching_onus_ranged
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_xgpon_ni_key key;    /**< Object key. */
+    bcmolt_xgpon_ni_protection_switching_onus_ranged_data data; /**< All properties that must be set by the user. */
+} bcmolt_xgpon_ni_protection_switching_onus_ranged;
+
+/** Structure definition for the "protection_switching_switchover_completed" 
+ * group of the "xgpon_ni" object. 
+ */
+typedef struct bcmolt_xgpon_ni_protection_switching_switchover_completed_data
+{
+    bcmolt_result result;   /**< Result. */
+} bcmolt_xgpon_ni_protection_switching_switchover_completed_data;
+
+/** Transport message definition for "protection_switching_switchover_completed" 
+ * group of "xgpon_ni" object. 
+ */
+typedef struct bcmolt_xgpon_ni_protection_switching_switchover_completed
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_xgpon_ni_key key;    /**< Object key. */
+    bcmolt_xgpon_ni_protection_switching_switchover_completed_data data;    /**< All properties that must be set by the user. */
+} bcmolt_xgpon_ni_protection_switching_switchover_completed;
+
+/** Structure definition for the "protection_switching_traffic_resume" group of 
+ * the "xgpon_ni" object. 
+ */
+typedef struct bcmolt_xgpon_ni_protection_switching_traffic_resume_data
+{
+    bcmolt_traffic_resume_result result;    /**< Result. */
+} bcmolt_xgpon_ni_protection_switching_traffic_resume_data;
+
+/** Transport message definition for "protection_switching_traffic_resume" group 
+ * of "xgpon_ni" object. 
+ */
+typedef struct bcmolt_xgpon_ni_protection_switching_traffic_resume
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_xgpon_ni_key key;    /**< Object key. */
+    bcmolt_xgpon_ni_protection_switching_traffic_resume_data data;  /**< All properties that must be set by the user. */
+} bcmolt_xgpon_ni_protection_switching_traffic_resume;
+
+/** Structure definition for the "rogue_detection_completed" group of the 
+ * "xgpon_ni" object. 
+ */
+typedef struct bcmolt_xgpon_ni_rogue_detection_completed_data
+{
+    bcmolt_rogue_detection_window window_type;          /**< Silent Window or Cut off Window */
+    bcmolt_rogue_measurement_result measurement_status; /**< Status of the rogue ONU detection result. */
+    bcmolt_xgpon_alloc_id alloc_id;                     /**< Alloc-ID */
+    bcmolt_xgpon_onu_id onu_id;                 /**< ONU-ID */
+    bcmos_bool is_delineation;                  /**< Burst Delineation detected during the rogue ONU detection. */
+    bcmos_bool is_ed;                           /**< Is ED. */
+    bcmolt_u8_list_u32 rx_data;                 /**< Captured PLOAMu message if the burst delinieation was detected. */
+    bcmolt_xgpon_onu_id ploam_received_onu_id;  /**< ONU ID received in the ploam */
+    bcmos_bool ploam_received_mic_error;        /**< Mic error in the received ploam */
+} bcmolt_xgpon_ni_rogue_detection_completed_data;
+
+/** Transport message definition for "rogue_detection_completed" group of 
+ * "xgpon_ni" object. 
+ */
+typedef struct bcmolt_xgpon_ni_rogue_detection_completed
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_xgpon_ni_key key;    /**< Object key. */
+    bcmolt_xgpon_ni_rogue_detection_completed_data data;    /**< All properties that must be set by the user. */
+} bcmolt_xgpon_ni_rogue_detection_completed;
+
+/** Transport message definition for "rogue_onu_special_map_cycle_start" group 
+ * of "xgpon_ni" object. 
+ */
+typedef struct bcmolt_xgpon_ni_rogue_onu_special_map_cycle_start
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_xgpon_ni_key key;    /**< Object key. */
+} bcmolt_xgpon_ni_rogue_onu_special_map_cycle_start;
+
+/** Transport message definition for "serial_number_acquisition_cycle_start" 
+ * group of "xgpon_ni" object. 
+ */
+typedef struct bcmolt_xgpon_ni_serial_number_acquisition_cycle_start
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_xgpon_ni_key key;    /**< Object key. */
+} bcmolt_xgpon_ni_serial_number_acquisition_cycle_start;
+
+/** Structure definition for the "standby_pon_monitoring_cycle_completed" group 
+ * of the "xgpon_ni" object. 
+ */
+typedef struct bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_data
+{
+    uint32_t number_of_detected_delimiter;  /**< number of detected delimiter. */
+    bcmolt_status energy_detect_signal;     /**< energy detect signal. */
+} bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_data;
+
+/** Transport message definition for "standby_pon_monitoring_cycle_completed" 
+ * group of "xgpon_ni" object. 
+ */
+typedef struct bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_xgpon_ni_key key;    /**< Object key. */
+    bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_data data;   /**< All properties that must be set by the user. */
+} bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed;
+
+/** Structure definition for the "stat_alarm_cleared" group of the "xgpon_ni" 
+ * object. 
+ *
+ * Sent when a configured statistic alarm condition is no longer met. 
+ */
+typedef struct bcmolt_xgpon_ni_stat_alarm_cleared_data
+{
+    bcmolt_xgpon_ni_stat_id stat;   /**< Statistic identifier. */
+} bcmolt_xgpon_ni_stat_alarm_cleared_data;
+
+/** Transport message definition for "stat_alarm_cleared" group of "xgpon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_xgpon_ni_stat_alarm_cleared
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_xgpon_ni_key key;    /**< Object key. */
+    bcmolt_xgpon_ni_stat_alarm_cleared_data data;   /**< All properties that must be set by the user. */
+} bcmolt_xgpon_ni_stat_alarm_cleared;
+
+/** Structure definition for the "stat_alarm_raised" group of the "xgpon_ni" 
+ * object. 
+ *
+ * Sent when a configured statistic alarm condition has been met. 
+ */
+typedef struct bcmolt_xgpon_ni_stat_alarm_raised_data
+{
+    bcmolt_xgpon_ni_stat_id stat;   /**< Statistic identifier. */
+} bcmolt_xgpon_ni_stat_alarm_raised_data;
+
+/** Transport message definition for "stat_alarm_raised" group of "xgpon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_xgpon_ni_stat_alarm_raised
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_xgpon_ni_key key;    /**< Object key. */
+    bcmolt_xgpon_ni_stat_alarm_raised_data data;    /**< All properties that must be set by the user. */
+} bcmolt_xgpon_ni_stat_alarm_raised;
+
+/** Structure definition for the "state_change_completed" group of the 
+ * "xgpon_ni" object. 
+ */
+typedef struct bcmolt_xgpon_ni_state_change_completed_data
+{
+    bcmolt_result result;               /**< Result. */
+    bcmolt_pon_state previous_state;    /**< Previous state. */
+    bcmolt_pon_state new_state;         /**< new state. */
+} bcmolt_xgpon_ni_state_change_completed_data;
+
+/** Transport message definition for "state_change_completed" group of 
+ * "xgpon_ni" object. 
+ */
+typedef struct bcmolt_xgpon_ni_state_change_completed
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_xgpon_ni_key key;    /**< Object key. */
+    bcmolt_xgpon_ni_state_change_completed_data data;   /**< All properties that must be set by the user. */
+} bcmolt_xgpon_ni_state_change_completed;
+
+/** Structure definition for the "tod_request_completed" group of the "xgpon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_xgpon_ni_tod_request_completed_data
+{
+    bcmolt_str_64 tod_string;   /**< tod_string. */
+    uint64_t sfc;               /**< sfc. */
+    uint64_t rtc_offset_sec;    /**< rtc_offset_sec. */
+    uint32_t rtc_offset_nsec;   /**< rtc_offset_nsec. */
+    bcmolt_result status;       /**< status. */
+} bcmolt_xgpon_ni_tod_request_completed_data;
+
+/** Transport message definition for "tod_request_completed" group of "xgpon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_xgpon_ni_tod_request_completed
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_xgpon_ni_key key;    /**< Object key. */
+    bcmolt_xgpon_ni_tod_request_completed_data data;    /**< All properties that must be set by the user. */
+} bcmolt_xgpon_ni_tod_request_completed;
+
+/** Structure definition for the "auto_cfg" group of the "xgpon_ni" object. 
+ */
+typedef struct bcmolt_xgpon_ni_auto_cfg_data
+{
+    bcmos_bool activate_all_onus_completed;     /**< If true, indications of type "activate_all_onus_completed" will be generated. */
+    bcmos_bool cpu_packets_failure;             /**< If true, indications of type "cpu_packets_failure" will be generated. */
+    bcmos_bool deactivate_all_onus_completed;   /**< If true, indications of type "deactivate_all_onus_completed" will be generated. */
+    bcmos_bool disable_all_onus_completed;      /**< If true, indications of type "disable_all_onus_completed" will be generated. */
+    bcmos_bool enable_all_onus_completed;       /**< If true, indications of type "enable_all_onus_completed" will be generated. */
+    bcmos_bool los;                     /**< If true, indications of type "los" will be generated. */
+    bcmos_bool onu_discovered;          /**< If true, indications of type "onu_discovered" will be generated. */
+    bcmos_bool onu_upgrade_complete;    /**< If true, indications of type "onu_upgrade_complete" will be generated. */
+    bcmos_bool protection_switching_onus_ranged;            /**< If true, indications of type "protection_switching_onus_ranged" will be generated. */
+    bcmos_bool protection_switching_switchover_completed;   /**< If true, indications of type "protection_switching_switchover_completed" will be generated. */
+    bcmos_bool protection_switching_traffic_resume;         /**< If true, indications of type "protection_switching_traffic_resume" will be generated. */
+    bcmos_bool rogue_detection_completed;                   /**< If true, indications of type "rogue_detection_completed" will be generated. */
+    bcmos_bool rogue_onu_special_map_cycle_start;           /**< If true, indications of type "rogue_onu_special_map_cycle_start" will be generated. */
+    bcmos_bool serial_number_acquisition_cycle_start;       /**< If true, indications of type "serial_number_acquisition_cycle_start" will be generated. */
+    bcmos_bool standby_pon_monitoring_cycle_completed;      /**< If true, indications of type "standby_pon_monitoring_cycle_completed" will be generated. */
+    bcmos_bool stat_alarm_cleared;      /**< If true, indications of type "stat_alarm_cleared" will be generated. */
+    bcmos_bool stat_alarm_raised;       /**< If true, indications of type "stat_alarm_raised" will be generated. */
+    bcmos_bool state_change_completed;  /**< If true, indications of type "state_change_completed" will be generated. */
+    bcmos_bool tod_request_completed;   /**< If true, indications of type "tod_request_completed" will be generated. */
+} bcmolt_xgpon_ni_auto_cfg_data;
+
+/** Transport message definition for "auto_cfg" group of "xgpon_ni" object. 
+ */
+typedef struct bcmolt_xgpon_ni_auto_cfg
+{
+    bcmolt_auto_cfg hdr;                /**< Transport header. */
+    bcmolt_xgpon_ni_key key;            /**< Object key. */
+    bcmolt_xgpon_ni_auto_cfg_data data; /**< All properties that must be set by the user. */
+} bcmolt_xgpon_ni_auto_cfg;
+
+/** Structure definition for the "adjust_tx_wavelength" group of the "xgpon_ni" 
+ * object. 
+ *
+ * Instruct an unassigned ONU to adjust its upstream transmitter wavelength 
+ */
+typedef struct bcmolt_xgpon_ni_adjust_tx_wavelength_data
+{
+    bcmolt_serial_number serial_number; /**< Serial number */
+    bcmolt_frequency_adjustment_direction freqency_adjustment_direction;    /**< Frequency adjustment direction */
+    uint8_t frequency_adjustment_size;  /**< The size of the frequncy adjustment in units of 0.1 Ghz */
+} bcmolt_xgpon_ni_adjust_tx_wavelength_data;
+
+/** Transport message definition for "adjust_tx_wavelength" group of "xgpon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_xgpon_ni_adjust_tx_wavelength
+{
+    bcmolt_oper hdr;            /**< Transport header. */
+    bcmolt_xgpon_ni_key key;    /**< Object key. */
+    bcmolt_xgpon_ni_adjust_tx_wavelength_data data; /**< All properties that must be set by the user. */
+} bcmolt_xgpon_ni_adjust_tx_wavelength;
+
+/** Structure definition for the "disable_serial_number" group of the "xgpon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_xgpon_ni_disable_serial_number_data
+{
+    bcmolt_disable_serial_number_control control;   /**< control. */
+    bcmolt_serial_number serial_number;             /**< serial number. */
+} bcmolt_xgpon_ni_disable_serial_number_data;
+
+/** Transport message definition for "disable_serial_number" group of "xgpon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_xgpon_ni_disable_serial_number
+{
+    bcmolt_oper hdr;            /**< Transport header. */
+    bcmolt_xgpon_ni_key key;    /**< Object key. */
+    bcmolt_xgpon_ni_disable_serial_number_data data;    /**< All properties that must be set by the user. */
+} bcmolt_xgpon_ni_disable_serial_number;
+
+/** Transport message definition for "reset" group of "xgpon_ni" object. 
+ */
+typedef struct bcmolt_xgpon_ni_reset
+{
+    bcmolt_oper hdr;            /**< Transport header. */
+    bcmolt_xgpon_ni_key key;    /**< Object key. */
+} bcmolt_xgpon_ni_reset;
+
+/** Structure definition for the "rogue_detection_window" group of the 
+ * "xgpon_ni" object. 
+ */
+typedef struct bcmolt_xgpon_ni_rogue_detection_window_data
+{
+    bcmolt_rogue_detection_window window_type;  /**< Type of silent measurement to execute */
+    bcmolt_xgpon_alloc_id alloc_id;             /**< ALLOC ID to scan */
+    bcmolt_xgpon_onu_id onu_id;                 /**< ONU ID to scan */
+    bcmos_bool second_ranging_window;           /**< Not currently supported */
+} bcmolt_xgpon_ni_rogue_detection_window_data;
+
+/** Transport message definition for "rogue_detection_window" group of 
+ * "xgpon_ni" object. 
+ */
+typedef struct bcmolt_xgpon_ni_rogue_detection_window
+{
+    bcmolt_oper hdr;            /**< Transport header. */
+    bcmolt_xgpon_ni_key key;    /**< Object key. */
+    bcmolt_xgpon_ni_rogue_detection_window_data data;   /**< All properties that must be set by the user. */
+} bcmolt_xgpon_ni_rogue_detection_window;
+
+/** Structure definition for the "run_special_bw_map" group of the "xgpon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_xgpon_ni_run_special_bw_map_data
+{
+    uint8_t number_of_cycle;    /**< number of cycle. */
+    uint8_t allocation_number;  /**< allocation number. */
+    uint8_t bw_map_array;       /**< bw map array. */
+} bcmolt_xgpon_ni_run_special_bw_map_data;
+
+/** Transport message definition for "run_special_bw_map" group of "xgpon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_xgpon_ni_run_special_bw_map
+{
+    bcmolt_oper hdr;            /**< Transport header. */
+    bcmolt_xgpon_ni_key key;    /**< Object key. */
+    bcmolt_xgpon_ni_run_special_bw_map_data data;   /**< All properties that must be set by the user. */
+} bcmolt_xgpon_ni_run_special_bw_map;
+
+/** Structure definition for the "set_onu_state" group of the "xgpon_ni" object. 
+ *
+ * Set the operation state of all ONUs. 
+ */
+typedef struct bcmolt_xgpon_ni_set_onu_state_data
+{
+    bcmolt_onu_operation onu_state; /**< New operation state of all ONUs.  The default operation may be configured by the XGPON NI configuration object : xgpon_ni.cfg.sn_acquisition. */
+} bcmolt_xgpon_ni_set_onu_state_data;
+
+/** Transport message definition for "set_onu_state" group of "xgpon_ni" object. 
+ */
+typedef struct bcmolt_xgpon_ni_set_onu_state
+{
+    bcmolt_oper hdr;            /**< Transport header. */
+    bcmolt_xgpon_ni_key key;    /**< Object key. */
+    bcmolt_xgpon_ni_set_onu_state_data data;    /**< All properties that must be set by the user. */
+} bcmolt_xgpon_ni_set_onu_state;
+
+/** Structure definition for the "set_pon_state" group of the "xgpon_ni" object. 
+ */
+typedef struct bcmolt_xgpon_ni_set_pon_state_data
+{
+    bcmolt_pon_operation pon_state; /**< PON state. */
+} bcmolt_xgpon_ni_set_pon_state_data;
+
+/** Transport message definition for "set_pon_state" group of "xgpon_ni" object. 
+ */
+typedef struct bcmolt_xgpon_ni_set_pon_state
+{
+    bcmolt_oper hdr;            /**< Transport header. */
+    bcmolt_xgpon_ni_key key;    /**< Object key. */
+    bcmolt_xgpon_ni_set_pon_state_data data;    /**< All properties that must be set by the user. */
+} bcmolt_xgpon_ni_set_pon_state;
+
+/** Transport message definition for "single_request_standby_pon_monitoring" 
+ * group of "xgpon_ni" object. 
+ */
+typedef struct bcmolt_xgpon_ni_single_request_standby_pon_monitoring
+{
+    bcmolt_oper hdr;            /**< Transport header. */
+    bcmolt_xgpon_ni_key key;    /**< Object key. */
+} bcmolt_xgpon_ni_single_request_standby_pon_monitoring;
+
+/** Structure definition for the "start_onu_upgrade" group of the "xgpon_ni" 
+ * object. 
+ *
+ * OLT to ONU firmware transfer 
+ */
+typedef struct bcmolt_xgpon_ni_start_onu_upgrade_data
+{
+    bcmolt_pon_onu_id_list_u32 list_of_onu_ids; /**< List of ONU IDs to upgrade the firmware. */
+} bcmolt_xgpon_ni_start_onu_upgrade_data;
+
+/** Transport message definition for "start_onu_upgrade" group of "xgpon_ni" 
+ * object. 
+ */
+typedef struct bcmolt_xgpon_ni_start_onu_upgrade
+{
+    bcmolt_oper hdr;            /**< Transport header. */
+    bcmolt_xgpon_ni_key key;    /**< Object key. */
+    bcmolt_xgpon_ni_start_onu_upgrade_data data;    /**< All properties that must be set by the user. */
+} bcmolt_xgpon_ni_start_onu_upgrade;
+
+/** Transport message definition for "tod_request" group of "xgpon_ni" object. 
+ */
+typedef struct bcmolt_xgpon_ni_tod_request
+{
+    bcmolt_oper hdr;            /**< Transport header. */
+    bcmolt_xgpon_ni_key key;    /**< Object key. */
+} bcmolt_xgpon_ni_tod_request;
+
+/** Structure definition for the "broadcast_ploam_packet" group of the 
+ * "xgpon_ni" object. 
+ */
+typedef struct bcmolt_xgpon_ni_broadcast_ploam_packet_data
+{
+#define BCMOLT_XGPON_NI_BROADCAST_PLOAM_PACKET_DATA_PLOAM_LEN   40
+    bcmolt_arr_u8_40 ploam; /**< ploam. */
+} bcmolt_xgpon_ni_broadcast_ploam_packet_data;
+
+/** Transport message definition for "broadcast_ploam_packet" group of 
+ * "xgpon_ni" object. 
+ */
+typedef struct bcmolt_xgpon_ni_broadcast_ploam_packet
+{
+    bcmolt_proxy hdr;           /**< Transport header. */
+    bcmolt_xgpon_ni_key key;    /**< Object key. */
+    bcmolt_xgpon_ni_broadcast_ploam_packet_data data;   /**< All properties that must be set by the user. */
+} bcmolt_xgpon_ni_broadcast_ploam_packet;
+
+/** Structure definition for the "cpu_packets" group of the "xgpon_ni" object. 
+ */
+typedef struct bcmolt_xgpon_ni_cpu_packets_data
+{
+    bcmolt_packet_type packet_type;                     /**< packet type. */
+    bcmos_bool calc_crc;                                /**< calc crc. */
+    bcmolt_xgpon_gem_id_list_u8_max_16 gem_port_list;   /**< gem port list. */
+    bcmolt_u8_list_u32_max_2048 buffer;                 /**< buffer. */
+} bcmolt_xgpon_ni_cpu_packets_data;
+
+/** Transport message definition for "cpu_packets" group of "xgpon_ni" object. 
+ */
+typedef struct bcmolt_xgpon_ni_cpu_packets
+{
+    bcmolt_proxy hdr;                       /**< Transport header. */
+    bcmolt_xgpon_ni_key key;                /**< Object key. */
+    bcmolt_xgpon_ni_cpu_packets_data data;  /**< All properties that must be set by the user. */
+} bcmolt_xgpon_ni_cpu_packets;
+
+/** Structure definition for the "key" group of the "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_key
+{
+    bcmolt_xgpon_ni pon_ni;     /**< PON network interface. */
+    bcmolt_xgpon_onu_id onu_id; /**< onu id. */
+} bcmolt_xgpon_onu_key;
+
+/** Structure definition for the "cfg" group of the "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_cfg_data
+{
+    bcmolt_onu_state onu_state;     /**< Current ONU state */
+    bcmolt_onu_state onu_old_state; /**< onu old state. */
+    bcmolt_xgpon_onu_alarm_state alarm_state;   /**< State of all ONU alarms.  This is normally read-only and can only be written when the PON is in active-standby mode to keep the ONU in sync. */
+    bcmolt_xgpon_onu_registration_keys registration_encryption_keys;    /**< AES encryption keys learned during ONU registration.  This is normally read-only and can only be written when the PON is in active-standby mode to keep the ONU in sync. */
+    bcmolt_xgpon_onu_aes_key current_encryption_key;                    /**< Current AES encryption key.  This is normally read-only and can only be written when the PON is in active-standby mode to keep the ONU in sync. */
+    bcmolt_serial_number serial_number;                 /**< ONU serial number */
+#define BCMOLT_XGPON_ONU_CFG_DATA_REGISTRATION_ID_LEN   36
+    bcmolt_arr_u8_36 registration_id;                   /**< ONU registration ID */
+    bcmos_bool registration_id_auto_learning;           /**< Enable\Disable automatic registration learning */
+    bcmolt_burst_profile_index ranging_burst_profile;   /**< Burst profile index for ranging allocations */
+    bcmolt_burst_profile_index data_burst_profile;      /**< Burst profile index for data allocations */
+    uint32_t ranging_time;                  /**< ONU ranging time.  This is normally read-only and can only be written when the PON is in active-standby mode to keep the ONU in sync. */
+    bcmolt_status disabled_after_discovery; /**< This ONU was disabled after SN discovery */
+    bcmolt_deactivation_reason deactivation_reason;                     /**< deactivation reason. */
+    bcmolt_xgpon_gem_port_with_state_list_u16_max_256 all_gem_ports;    /**< All unicast GEM ports currently provisioned on this ONU. */
+    bcmolt_xgpon_alloc_with_state_list_u16_max_32 all_allocs;           /**< All alloc IDs currently provisioned on this ONU. */
+    bcmolt_extended_guard_time extended_guard_time;                     /**< Additional guard time (in bytes) for this ONU. */
+    bcmolt_upstream_line_rate_capabilities us_line_rate;                /**< US line rate. */
+#define BCMOLT_XGPON_ONU_CFG_DATA_CALIBRATION_RECORD_LEN    8
+    bcmolt_arr_calibration_record_8 calibration_record;                 /**< Calibration record. */
+    uint8_t tuning_granularity;             /**< The tuning granularity of the ONU transmitted expressed in units of 1GHz. Value of 0 indicates that the ONU does not support fine tuning/dithering */
+    uint8_t step_tuning_time;               /**< The value of the tuning time for a single granularity step, expressed in units of PHY frames. */
+    uint8_t power_levelling_capabilities;   /**< Power levelling capabilities. */
+    bcmolt_request_registration_status request_registration_status; /**< This value indicate that the onu is in the middle of request registration process */
+} bcmolt_xgpon_onu_cfg_data;
+
+/** Transport message definition for "cfg" group of "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_cfg
+{
+    bcmolt_cfg hdr;                 /**< Transport header. */
+    bcmolt_xgpon_onu_key key;       /**< Object key. */
+    bcmolt_xgpon_onu_cfg_data data; /**< All properties that must be set by the user. */
+} bcmolt_xgpon_onu_cfg;
+
+/** Structure definition for the "stat" group of the "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_stat_data
+{
+    uint64_t positive_drift;            /**< positive drift. */
+    uint64_t negative_drift;            /**< negative drift. */
+    uint64_t delimiter_miss_detection;  /**< delimiter miss detection. */
+    uint64_t bip32_errors;              /**< bip32 errors. */
+    uint64_t rx_words;                  /**< Number of 4-byte words received (word size is 4 bytes regardless of upstream data rate). */
+    uint64_t fec_corrected_symbols;     /**< fec corrected symbols. */
+    uint64_t fec_corrected_codewords;   /**< fec corrected codewords. */
+    uint64_t fec_uncorrectable_codewords;   /**< fec uncorrectable codewords. */
+    uint64_t fec_codewords;                 /**< fec total codewords. */
+    uint64_t fec_corrected_bits;            /**< fec corrected bits. */
+    uint64_t xgem_key_errors;               /**< xgem key error. */
+    uint64_t xgem_loss;                     /**< xgem loss . */
+    uint64_t rx_ploams_mic_error;           /**< mic error ploam. */
+    uint64_t rx_ploams_non_idle;            /**< non idle ploam. */
+    uint64_t rx_omci;                       /**< Received OMCI packets. */
+    uint64_t rx_omci_packets_crc_error;     /**< Received OMCI packets with CRC errors. */
+    uint64_t rx_bytes;                      /**< rx bytes. */
+    uint64_t rx_packets;                    /**< rx packets. */
+    uint64_t tx_bytes;                      /**< tx bytes. */
+    uint64_t tx_packets;                    /**< tx packets. */
+} bcmolt_xgpon_onu_stat_data;
+
+/** Transport message definition for "stat" group of "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_stat
+{
+    bcmolt_stat hdr;                    /**< Transport header. */
+    bcmolt_xgpon_onu_key key;           /**< Object key. */
+    bcmolt_xgpon_onu_stat_data data;    /**< All properties that must be set by the user. */
+} bcmolt_xgpon_onu_stat;
+
+/** Structure definition for the "stat_cfg" group of the "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_stat_cfg_data
+{
+    bcmolt_stat_alarm_config cfg;   /**< Statistic alarm configuration. */
+} bcmolt_xgpon_onu_stat_cfg_data;
+
+/** Transport message definition for "stat_cfg" group of "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_stat_cfg
+{
+    bcmolt_stat_cfg hdr;                    /**< Transport header. */
+    bcmolt_xgpon_onu_key key;               /**< Object key. */
+    bcmolt_xgpon_onu_stat_cfg_data data;    /**< All properties that must be set by the user. */
+} bcmolt_xgpon_onu_stat_cfg;
+
+/** Structure definition for the "dfi" group of the "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_dfi_data
+{
+    bcmolt_status alarm_status; /**< alarm status. */
+} bcmolt_xgpon_onu_dfi_data;
+
+/** Transport message definition for "dfi" group of "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_dfi
+{
+    bcmolt_auto hdr;                /**< Transport header. */
+    bcmolt_xgpon_onu_key key;       /**< Object key. */
+    bcmolt_xgpon_onu_dfi_data data; /**< All properties that must be set by the user. */
+} bcmolt_xgpon_onu_dfi;
+
+/** Structure definition for the "dgi" group of the "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_dgi_data
+{
+    bcmolt_status alarm_status; /**< alarm status. */
+} bcmolt_xgpon_onu_dgi_data;
+
+/** Transport message definition for "dgi" group of "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_dgi
+{
+    bcmolt_auto hdr;                /**< Transport header. */
+    bcmolt_xgpon_onu_key key;       /**< Object key. */
+    bcmolt_xgpon_onu_dgi_data data; /**< All properties that must be set by the user. */
+} bcmolt_xgpon_onu_dgi;
+
+/** Structure definition for the "dowi" group of the "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_dowi_data
+{
+    bcmolt_status alarm_status; /**< Alarm status. */
+    int32_t drift_value;        /**< Calculated amount of drift (positive + negative as a signed value). */
+    uint32_t new_eqd;           /**< New EQD after drift is corrected (only valid if status is 'on'). */
+} bcmolt_xgpon_onu_dowi_data;
+
+/** Transport message definition for "dowi" group of "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_dowi
+{
+    bcmolt_auto hdr;                    /**< Transport header. */
+    bcmolt_xgpon_onu_key key;           /**< Object key. */
+    bcmolt_xgpon_onu_dowi_data data;    /**< All properties that must be set by the user. */
+} bcmolt_xgpon_onu_dowi;
+
+/** Structure definition for the "invalid_dbru_report" group of the "xgpon_onu" 
+ * object. 
+ */
+typedef struct bcmolt_xgpon_onu_invalid_dbru_report_data
+{
+    bcmolt_xgpon_alloc_id alloc_id; /**< Alloc-ID. */
+} bcmolt_xgpon_onu_invalid_dbru_report_data;
+
+/** Transport message definition for "invalid_dbru_report" group of "xgpon_onu" 
+ * object. 
+ */
+typedef struct bcmolt_xgpon_onu_invalid_dbru_report
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_xgpon_onu_key key;   /**< Object key. */
+    bcmolt_xgpon_onu_invalid_dbru_report_data data; /**< All properties that must be set by the user. */
+} bcmolt_xgpon_onu_invalid_dbru_report;
+
+/** Structure definition for the "key_exchange_completed" group of the 
+ * "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_key_exchange_completed_data
+{
+    bcmolt_xgpon_onu_aes_key new_key;   /**< new key. */
+} bcmolt_xgpon_onu_key_exchange_completed_data;
+
+/** Transport message definition for "key_exchange_completed" group of 
+ * "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_key_exchange_completed
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_xgpon_onu_key key;   /**< Object key. */
+    bcmolt_xgpon_onu_key_exchange_completed_data data;  /**< All properties that must be set by the user. */
+} bcmolt_xgpon_onu_key_exchange_completed;
+
+/** Transport message definition for "key_exchange_cycle_skipped" group of 
+ * "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_key_exchange_cycle_skipped
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_xgpon_onu_key key;   /**< Object key. */
+} bcmolt_xgpon_onu_key_exchange_cycle_skipped;
+
+/** Structure definition for the "key_exchange_key_mismatch" group of the 
+ * "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_key_exchange_key_mismatch_data
+{
+    bcmolt_aes_key expected_key;    /**< expected key. */
+    bcmolt_aes_key received_key;    /**< received key. */
+} bcmolt_xgpon_onu_key_exchange_key_mismatch_data;
+
+/** Transport message definition for "key_exchange_key_mismatch" group of 
+ * "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_key_exchange_key_mismatch
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_xgpon_onu_key key;   /**< Object key. */
+    bcmolt_xgpon_onu_key_exchange_key_mismatch_data data;   /**< All properties that must be set by the user. */
+} bcmolt_xgpon_onu_key_exchange_key_mismatch;
+
+/** Transport message definition for "key_exchange_key_request_timeout" group of 
+ * "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_key_exchange_key_request_timeout
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_xgpon_onu_key key;   /**< Object key. */
+} bcmolt_xgpon_onu_key_exchange_key_request_timeout;
+
+/** Structure definition for the "looci" group of the "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_looci_data
+{
+    bcmolt_status alarm_status; /**< alarm status. */
+} bcmolt_xgpon_onu_looci_data;
+
+/** Transport message definition for "looci" group of "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_looci
+{
+    bcmolt_auto hdr;                    /**< Transport header. */
+    bcmolt_xgpon_onu_key key;           /**< Object key. */
+    bcmolt_xgpon_onu_looci_data data;   /**< All properties that must be set by the user. */
+} bcmolt_xgpon_onu_looci;
+
+/** Structure definition for the "onu_activation_completed" group of the 
+ * "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_onu_activation_completed_data
+{
+    bcmolt_result status;   /**< status. */
+    bcmolt_activation_fail_reason fail_reason;  /**< fail reason. */
+#define BCMOLT_XGPON_ONU_ONU_ACTIVATION_COMPLETED_DATA_REGISTRATION_ID_LEN  36
+    bcmolt_arr_u8_36 registration_id;           /**< registration id. */
+    bcmolt_xgpon_onu_registration_keys registration_encryption_keys;    /**< registration encryption keys. */
+} bcmolt_xgpon_onu_onu_activation_completed_data;
+
+/** Transport message definition for "onu_activation_completed" group of 
+ * "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_onu_activation_completed
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_xgpon_onu_key key;   /**< Object key. */
+    bcmolt_xgpon_onu_onu_activation_completed_data data;    /**< All properties that must be set by the user. */
+} bcmolt_xgpon_onu_onu_activation_completed;
+
+/** Structure definition for the "onu_alarm" group of the "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_onu_alarm_data
+{
+    bcmolt_xgpon_onu_alarms onu_alarm;  /**< onu alarm. */
+} bcmolt_xgpon_onu_onu_alarm_data;
+
+/** Transport message definition for "onu_alarm" group of "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_onu_alarm
+{
+    bcmolt_auto hdr;                        /**< Transport header. */
+    bcmolt_xgpon_onu_key key;               /**< Object key. */
+    bcmolt_xgpon_onu_onu_alarm_data data;   /**< All properties that must be set by the user. */
+} bcmolt_xgpon_onu_onu_alarm;
+
+/** Structure definition for the "onu_deactivation_completed" group of the 
+ * "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_onu_deactivation_completed_data
+{
+    bcmolt_result status;   /**< Status. */
+} bcmolt_xgpon_onu_onu_deactivation_completed_data;
+
+/** Transport message definition for "onu_deactivation_completed" group of 
+ * "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_onu_deactivation_completed
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_xgpon_onu_key key;   /**< Object key. */
+    bcmolt_xgpon_onu_onu_deactivation_completed_data data;  /**< All properties that must be set by the user. */
+} bcmolt_xgpon_onu_onu_deactivation_completed;
+
+/** Structure definition for the "onu_disable_completed" group of the 
+ * "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_onu_disable_completed_data
+{
+    bcmolt_serial_number serial_number; /**< serial number. */
+} bcmolt_xgpon_onu_onu_disable_completed_data;
+
+/** Transport message definition for "onu_disable_completed" group of 
+ * "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_onu_disable_completed
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_xgpon_onu_key key;   /**< Object key. */
+    bcmolt_xgpon_onu_onu_disable_completed_data data;   /**< All properties that must be set by the user. */
+} bcmolt_xgpon_onu_onu_disable_completed;
+
+/** Structure definition for the "onu_enable_completed" group of the "xgpon_onu" 
+ * object. 
+ */
+typedef struct bcmolt_xgpon_onu_onu_enable_completed_data
+{
+    bcmolt_serial_number serial_number; /**< serial number. */
+} bcmolt_xgpon_onu_onu_enable_completed_data;
+
+/** Transport message definition for "onu_enable_completed" group of "xgpon_onu" 
+ * object. 
+ */
+typedef struct bcmolt_xgpon_onu_onu_enable_completed
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_xgpon_onu_key key;   /**< Object key. */
+    bcmolt_xgpon_onu_onu_enable_completed_data data;    /**< All properties that must be set by the user. */
+} bcmolt_xgpon_onu_onu_enable_completed;
+
+/** Structure definition for the "onu_tuning_in_completed" group of the 
+ * "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_onu_tuning_in_completed_data
+{
+    bcmolt_result result;                   /**< result. */
+    bcmolt_tune_in_fail_reason fail_reason; /**< fail reason. */
+} bcmolt_xgpon_onu_onu_tuning_in_completed_data;
+
+/** Transport message definition for "onu_tuning_in_completed" group of 
+ * "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_onu_tuning_in_completed
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_xgpon_onu_key key;   /**< Object key. */
+    bcmolt_xgpon_onu_onu_tuning_in_completed_data data; /**< All properties that must be set by the user. */
+} bcmolt_xgpon_onu_onu_tuning_in_completed;
+
+/** Structure definition for the "onu_tuning_out_completed" group of the 
+ * "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_onu_tuning_out_completed_data
+{
+    bcmolt_result result;                       /**< result. */
+    bcmolt_tune_out_fail_reason fail_reason;    /**< fail reason. */
+} bcmolt_xgpon_onu_onu_tuning_out_completed_data;
+
+/** Transport message definition for "onu_tuning_out_completed" group of 
+ * "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_onu_tuning_out_completed
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_xgpon_onu_key key;   /**< Object key. */
+    bcmolt_xgpon_onu_onu_tuning_out_completed_data data;    /**< All properties that must be set by the user. */
+} bcmolt_xgpon_onu_onu_tuning_out_completed;
+
+/** Transport message definition for "optical_reflection" group of "xgpon_onu" 
+ * object. 
+ */
+typedef struct bcmolt_xgpon_onu_optical_reflection
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_xgpon_onu_key key;   /**< Object key. */
+} bcmolt_xgpon_onu_optical_reflection;
+
+/** Structure definition for the "possible_drift" group of the "xgpon_onu" 
+ * object. 
+ *
+ * An ONU in a low power state may be experiencing drift beyond the configured 
+ * threshold. The estimate may be inaccurate depending on ONU behavior. Actual 
+ * drift may be less than estimated. 
+ */
+typedef struct bcmolt_xgpon_onu_possible_drift_data
+{
+    bcmolt_status alarm_status; /**< On: estimated drift has exceeded the configured threshold. */
+    int32_t estimated_drift;    /**< If status is on, the estimated drift value, otherwise zero (0). */
+} bcmolt_xgpon_onu_possible_drift_data;
+
+/** Transport message definition for "possible_drift" group of "xgpon_onu" 
+ * object. 
+ */
+typedef struct bcmolt_xgpon_onu_possible_drift
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_xgpon_onu_key key;   /**< Object key. */
+    bcmolt_xgpon_onu_possible_drift_data data;  /**< All properties that must be set by the user. */
+} bcmolt_xgpon_onu_possible_drift;
+
+/** Structure definition for the "power_consumption_report" group of the 
+ * "xgpon_onu" object. 
+ *
+ * Power consumption report 
+ */
+typedef struct bcmolt_xgpon_onu_power_consumption_report_data
+{
+#define BCMOLT_XGPON_ONU_POWER_CONSUMPTION_REPORT_DATA_POWER_CONSUMPTION_REPORT_LEN 8
+    bcmolt_arr_power_consumption_channel_report_8 power_consumption_report; /**< power consumption report. */
+} bcmolt_xgpon_onu_power_consumption_report_data;
+
+/** Transport message definition for "power_consumption_report" group of 
+ * "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_power_consumption_report
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_xgpon_onu_key key;   /**< Object key. */
+    bcmolt_xgpon_onu_power_consumption_report_data data;    /**< All properties that must be set by the user. */
+} bcmolt_xgpon_onu_power_consumption_report;
+
+/** Structure definition for the "power_level_report" group of the "xgpon_onu" 
+ * object. 
+ *
+ * Power level report 
+ */
+typedef struct bcmolt_xgpon_onu_power_level_report_data
+{
+    uint8_t attenuation;                /**< Attenuation. */
+    uint8_t power_levelling_capability; /**< Power levelling capability. */
+} bcmolt_xgpon_onu_power_level_report_data;
+
+/** Transport message definition for "power_level_report" group of "xgpon_onu" 
+ * object. 
+ */
+typedef struct bcmolt_xgpon_onu_power_level_report
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_xgpon_onu_key key;   /**< Object key. */
+    bcmolt_xgpon_onu_power_level_report_data data;  /**< All properties that must be set by the user. */
+} bcmolt_xgpon_onu_power_level_report;
+
+/** Structure definition for the "power_management_state_change" group of the 
+ * "xgpon_onu" object. 
+ *
+ * Notification that an ONUs power management state has changed. 
+ */
+typedef struct bcmolt_xgpon_onu_power_management_state_change_data
+{
+    bcmolt_onu_state old_state; /**< The state the ONU was previously in. */
+    bcmolt_onu_state new_state; /**< The state the ONU is currently in. */
+    bcmolt_power_management_transition_reason reason;   /**< The reason for the state change. */
+} bcmolt_xgpon_onu_power_management_state_change_data;
+
+/** Transport message definition for "power_management_state_change" group of 
+ * "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_power_management_state_change
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_xgpon_onu_key key;   /**< Object key. */
+    bcmolt_xgpon_onu_power_management_state_change_data data;   /**< All properties that must be set by the user. */
+} bcmolt_xgpon_onu_power_management_state_change;
+
+/** Structure definition for the "pqsi" group of the "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_pqsi_data
+{
+    bcmolt_status alarm_status; /**< alarm status. */
+} bcmolt_xgpon_onu_pqsi_data;
+
+/** Transport message definition for "pqsi" group of "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_pqsi
+{
+    bcmolt_auto hdr;                    /**< Transport header. */
+    bcmolt_xgpon_onu_key key;           /**< Object key. */
+    bcmolt_xgpon_onu_pqsi_data data;    /**< All properties that must be set by the user. */
+} bcmolt_xgpon_onu_pqsi;
+
+/** Structure definition for the "ranging_completed" group of the "xgpon_onu" 
+ * object. 
+ */
+typedef struct bcmolt_xgpon_onu_ranging_completed_data
+{
+    bcmolt_result status;                   /**< status. */
+    bcmolt_ranging_fail_reason fail_reason; /**< fail reason. */
+    uint32_t eqd;               /**< EQD. */
+    uint8_t number_of_ploams;   /**< number of ploams. */
+    uint8_t power_level;        /**< power level. */
+} bcmolt_xgpon_onu_ranging_completed_data;
+
+/** Transport message definition for "ranging_completed" group of "xgpon_onu" 
+ * object. 
+ */
+typedef struct bcmolt_xgpon_onu_ranging_completed
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_xgpon_onu_key key;   /**< Object key. */
+    bcmolt_xgpon_onu_ranging_completed_data data;   /**< All properties that must be set by the user. */
+} bcmolt_xgpon_onu_ranging_completed;
+
+/** Structure definition for the "registration_id" group of the "xgpon_onu" 
+ * object. 
+ *
+ * Registration ID 
+ */
+typedef struct bcmolt_xgpon_onu_registration_id_data
+{
+#define BCMOLT_XGPON_ONU_REGISTRATION_ID_DATA_REGISTRATION_ID_LEN   36
+    bcmolt_arr_u8_36 registration_id;           /**< Registration ID. */
+    bcmolt_result request_registration_status;  /**< request registration status. */
+    bcmolt_request_registration_fail_reason request_registration_fail_reason;   /**< request registration fail reason. */
+} bcmolt_xgpon_onu_registration_id_data;
+
+/** Transport message definition for "registration_id" group of "xgpon_onu" 
+ * object. 
+ */
+typedef struct bcmolt_xgpon_onu_registration_id
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_xgpon_onu_key key;   /**< Object key. */
+    bcmolt_xgpon_onu_registration_id_data data; /**< All properties that must be set by the user. */
+} bcmolt_xgpon_onu_registration_id;
+
+/** Structure definition for the "rssi_measurement_completed" group of the 
+ * "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_rssi_measurement_completed_data
+{
+    bcmolt_result status;   /**< status. */
+    bcmolt_rssi_measurement_fail_reason fail_reason;    /**< fail reason. */
+} bcmolt_xgpon_onu_rssi_measurement_completed_data;
+
+/** Transport message definition for "rssi_measurement_completed" group of 
+ * "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_rssi_measurement_completed
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_xgpon_onu_key key;   /**< Object key. */
+    bcmolt_xgpon_onu_rssi_measurement_completed_data data;  /**< All properties that must be set by the user. */
+} bcmolt_xgpon_onu_rssi_measurement_completed;
+
+/** Structure definition for the "sdi" group of the "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_sdi_data
+{
+    bcmolt_status alarm_status; /**< alarm status. */
+    uint32_t ber;               /**< Inverse bit error rate (e.g. if this number is 1000, the BER is 1/1000). */
+} bcmolt_xgpon_onu_sdi_data;
+
+/** Transport message definition for "sdi" group of "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_sdi
+{
+    bcmolt_auto hdr;                /**< Transport header. */
+    bcmolt_xgpon_onu_key key;       /**< Object key. */
+    bcmolt_xgpon_onu_sdi_data data; /**< All properties that must be set by the user. */
+} bcmolt_xgpon_onu_sdi;
+
+/** Structure definition for the "secure_mutual_authentication_failure" group of 
+ * the "xgpon_onu" object. 
+ *
+ * Failure of secure mutual authentication due to MIC error 
+ */
+typedef struct bcmolt_xgpon_onu_secure_mutual_authentication_failure_data
+{
+    bcmolt_result status;   /**< status. */
+    bcmolt_secure_mutual_authentication_fail_reason fail_reason;    /**< secure mutual authentication fail reason. */
+} bcmolt_xgpon_onu_secure_mutual_authentication_failure_data;
+
+/** Transport message definition for "secure_mutual_authentication_failure" 
+ * group of "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_secure_mutual_authentication_failure
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_xgpon_onu_key key;   /**< Object key. */
+    bcmolt_xgpon_onu_secure_mutual_authentication_failure_data data;    /**< All properties that must be set by the user. */
+} bcmolt_xgpon_onu_secure_mutual_authentication_failure;
+
+/** Structure definition for the "sfi" group of the "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_sfi_data
+{
+    bcmolt_status alarm_status; /**< alarm status. */
+    uint32_t ber;               /**< Inverse bit error rate (e.g. if this number is 1000, the BER is 1/1000). */
+} bcmolt_xgpon_onu_sfi_data;
+
+/** Transport message definition for "sfi" group of "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_sfi
+{
+    bcmolt_auto hdr;                /**< Transport header. */
+    bcmolt_xgpon_onu_key key;       /**< Object key. */
+    bcmolt_xgpon_onu_sfi_data data; /**< All properties that must be set by the user. */
+} bcmolt_xgpon_onu_sfi;
+
+/** Structure definition for the "stat_alarm_cleared" group of the "xgpon_onu" 
+ * object. 
+ *
+ * Sent when a configured statistic alarm condition is no longer met. 
+ */
+typedef struct bcmolt_xgpon_onu_stat_alarm_cleared_data
+{
+    bcmolt_xgpon_onu_stat_id stat;  /**< Statistic identifier. */
+} bcmolt_xgpon_onu_stat_alarm_cleared_data;
+
+/** Transport message definition for "stat_alarm_cleared" group of "xgpon_onu" 
+ * object. 
+ */
+typedef struct bcmolt_xgpon_onu_stat_alarm_cleared
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_xgpon_onu_key key;   /**< Object key. */
+    bcmolt_xgpon_onu_stat_alarm_cleared_data data;  /**< All properties that must be set by the user. */
+} bcmolt_xgpon_onu_stat_alarm_cleared;
+
+/** Structure definition for the "stat_alarm_raised" group of the "xgpon_onu" 
+ * object. 
+ *
+ * Sent when a configured statistic alarm condition has been met. 
+ */
+typedef struct bcmolt_xgpon_onu_stat_alarm_raised_data
+{
+    bcmolt_xgpon_onu_stat_id stat;  /**< Statistic identifier. */
+} bcmolt_xgpon_onu_stat_alarm_raised_data;
+
+/** Transport message definition for "stat_alarm_raised" group of "xgpon_onu" 
+ * object. 
+ */
+typedef struct bcmolt_xgpon_onu_stat_alarm_raised
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_xgpon_onu_key key;   /**< Object key. */
+    bcmolt_xgpon_onu_stat_alarm_raised_data data;   /**< All properties that must be set by the user. */
+} bcmolt_xgpon_onu_stat_alarm_raised;
+
+/** Structure definition for the "sufi" group of the "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_sufi_data
+{
+    bcmolt_status alarm_status; /**< alarm status. */
+} bcmolt_xgpon_onu_sufi_data;
+
+/** Transport message definition for "sufi" group of "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_sufi
+{
+    bcmolt_auto hdr;                    /**< Transport header. */
+    bcmolt_xgpon_onu_key key;           /**< Object key. */
+    bcmolt_xgpon_onu_sufi_data data;    /**< All properties that must be set by the user. */
+} bcmolt_xgpon_onu_sufi;
+
+/** Structure definition for the "tiwi" group of the "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_tiwi_data
+{
+    bcmolt_status alarm_status; /**< Alarm status. */
+    int32_t drift_value;        /**< Calculated amount of drift (positive + negative as a signed value). */
+} bcmolt_xgpon_onu_tiwi_data;
+
+/** Transport message definition for "tiwi" group of "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_tiwi
+{
+    bcmolt_auto hdr;                    /**< Transport header. */
+    bcmolt_xgpon_onu_key key;           /**< Object key. */
+    bcmolt_xgpon_onu_tiwi_data data;    /**< All properties that must be set by the user. */
+} bcmolt_xgpon_onu_tiwi;
+
+/** Structure definition for the "tuning_response" group of the "xgpon_onu" 
+ * object. 
+ */
+typedef struct bcmolt_xgpon_onu_tuning_response_data
+{
+    bcmos_bool ack;         /**< is tuning response received with ack or nack */
+    bcmolt_result result;   /**< result. */
+} bcmolt_xgpon_onu_tuning_response_data;
+
+/** Transport message definition for "tuning_response" group of "xgpon_onu" 
+ * object. 
+ */
+typedef struct bcmolt_xgpon_onu_tuning_response
+{
+    bcmolt_auto hdr;            /**< Transport header. */
+    bcmolt_xgpon_onu_key key;   /**< Object key. */
+    bcmolt_xgpon_onu_tuning_response_data data; /**< All properties that must be set by the user. */
+} bcmolt_xgpon_onu_tuning_response;
+
+/** Structure definition for the "auto_cfg" group of the "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_auto_cfg_data
+{
+    bcmos_bool dfi;                     /**< If true, indications of type "dfi" will be generated. */
+    bcmos_bool dgi;                     /**< If true, indications of type "dgi" will be generated. */
+    bcmos_bool dowi;                    /**< If true, indications of type "dowi" will be generated. */
+    bcmos_bool invalid_dbru_report;     /**< If true, indications of type "invalid_dbru_report" will be generated. */
+    bcmos_bool key_exchange_completed;  /**< If true, indications of type "key_exchange_completed" will be generated. */
+    bcmos_bool key_exchange_cycle_skipped;          /**< If true, indications of type "key_exchange_cycle_skipped" will be generated. */
+    bcmos_bool key_exchange_key_mismatch;           /**< If true, indications of type "key_exchange_key_mismatch" will be generated. */
+    bcmos_bool key_exchange_key_request_timeout;    /**< If true, indications of type "key_exchange_key_request_timeout" will be generated. */
+    bcmos_bool looci;                       /**< If true, indications of type "looci" will be generated. */
+    bcmos_bool onu_activation_completed;    /**< If true, indications of type "onu_activation_completed" will be generated. */
+    bcmos_bool onu_alarm;                   /**< If true, indications of type "onu_alarm" will be generated. */
+    bcmos_bool onu_deactivation_completed;  /**< If true, indications of type "onu_deactivation_completed" will be generated. */
+    bcmos_bool onu_disable_completed;       /**< If true, indications of type "onu_disable_completed" will be generated. */
+    bcmos_bool onu_enable_completed;        /**< If true, indications of type "onu_enable_completed" will be generated. */
+    bcmos_bool onu_tuning_in_completed;     /**< If true, indications of type "onu_tuning_in_completed" will be generated. */
+    bcmos_bool onu_tuning_out_completed;    /**< If true, indications of type "onu_tuning_out_completed" will be generated. */
+    bcmos_bool optical_reflection;          /**< If true, indications of type "optical_reflection" will be generated. */
+    bcmos_bool possible_drift;              /**< If true, indications of type "possible_drift" will be generated. */
+    bcmos_bool power_consumption_report;    /**< If true, indications of type "power_consumption_report" will be generated. */
+    bcmos_bool power_level_report;          /**< If true, indications of type "power_level_report" will be generated. */
+    bcmos_bool power_management_state_change;   /**< If true, indications of type "power_management_state_change" will be generated. */
+    bcmos_bool pqsi;                        /**< If true, indications of type "pqsi" will be generated. */
+    bcmos_bool ranging_completed;           /**< If true, indications of type "ranging_completed" will be generated. */
+    bcmos_bool registration_id;             /**< If true, indications of type "registration_id" will be generated. */
+    bcmos_bool rssi_measurement_completed;  /**< If true, indications of type "rssi_measurement_completed" will be generated. */
+    bcmos_bool sdi; /**< If true, indications of type "sdi" will be generated. */
+    bcmos_bool secure_mutual_authentication_failure;    /**< If true, indications of type "secure_mutual_authentication_failure" will be generated. */
+    bcmos_bool sfi;                 /**< If true, indications of type "sfi" will be generated. */
+    bcmos_bool stat_alarm_cleared;  /**< If true, indications of type "stat_alarm_cleared" will be generated. */
+    bcmos_bool stat_alarm_raised;   /**< If true, indications of type "stat_alarm_raised" will be generated. */
+    bcmos_bool sufi;                /**< If true, indications of type "sufi" will be generated. */
+    bcmos_bool tiwi;                /**< If true, indications of type "tiwi" will be generated. */
+    bcmos_bool tuning_response;     /**< If true, indications of type "tuning_response" will be generated. */
+} bcmolt_xgpon_onu_auto_cfg_data;
+
+/** Transport message definition for "auto_cfg" group of "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_auto_cfg
+{
+    bcmolt_auto_cfg hdr;        /**< Transport header. */
+    bcmolt_xgpon_onu_key key;   /**< Object key. */
+    bcmolt_xgpon_onu_auto_cfg_data data;    /**< All properties that must be set by the user. */
+} bcmolt_xgpon_onu_auto_cfg;
+
+/** Structure definition for the "adjust_tx_wavelength" group of the "xgpon_onu" 
+ * object. 
+ *
+ * Instruct the ONU to adjust its upstream transmitter wavelength 
+ */
+typedef struct bcmolt_xgpon_onu_adjust_tx_wavelength_data
+{
+    bcmolt_frequency_adjustment_direction frequency_adjustment_direction;   /**< Frequency adjustment direction. */
+    uint8_t frequency_adjustment_size;  /**< The size of the frequency adjustment in units of 0.1GHz */
+} bcmolt_xgpon_onu_adjust_tx_wavelength_data;
+
+/** Transport message definition for "adjust_tx_wavelength" group of "xgpon_onu" 
+ * object. 
+ */
+typedef struct bcmolt_xgpon_onu_adjust_tx_wavelength
+{
+    bcmolt_oper hdr;            /**< Transport header. */
+    bcmolt_xgpon_onu_key key;   /**< Object key. */
+    bcmolt_xgpon_onu_adjust_tx_wavelength_data data;    /**< All properties that must be set by the user. */
+} bcmolt_xgpon_onu_adjust_tx_wavelength;
+
+/** Structure definition for the "change_power_levelling" group of the 
+ * "xgpon_onu" object. 
+ *
+ * Change power levelling 
+ */
+typedef struct bcmolt_xgpon_onu_change_power_levelling_data
+{
+    bcmolt_power_levelling_control control; /**< control. */
+    uint8_t attenuation;                    /**< The requested attenuation in steps of 3dB as part of power levelling instruction */
+} bcmolt_xgpon_onu_change_power_levelling_data;
+
+/** Transport message definition for "change_power_levelling" group of 
+ * "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_change_power_levelling
+{
+    bcmolt_oper hdr;            /**< Transport header. */
+    bcmolt_xgpon_onu_key key;   /**< Object key. */
+    bcmolt_xgpon_onu_change_power_levelling_data data;  /**< All properties that must be set by the user. */
+} bcmolt_xgpon_onu_change_power_levelling;
+
+/** Transport message definition for "get_power_consumption" group of 
+ * "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_get_power_consumption
+{
+    bcmolt_oper hdr;            /**< Transport header. */
+    bcmolt_xgpon_onu_key key;   /**< Object key. */
+} bcmolt_xgpon_onu_get_power_consumption;
+
+/** Transport message definition for "get_power_level" group of "xgpon_onu" 
+ * object. 
+ */
+typedef struct bcmolt_xgpon_onu_get_power_level
+{
+    bcmolt_oper hdr;            /**< Transport header. */
+    bcmolt_xgpon_onu_key key;   /**< Object key. */
+} bcmolt_xgpon_onu_get_power_level;
+
+/** Transport message definition for "onu_tuning_in" group of "xgpon_onu" 
+ * object. 
+ */
+typedef struct bcmolt_xgpon_onu_onu_tuning_in
+{
+    bcmolt_oper hdr;            /**< Transport header. */
+    bcmolt_xgpon_onu_key key;   /**< Object key. */
+} bcmolt_xgpon_onu_onu_tuning_in;
+
+/** Structure definition for the "onu_tuning_out" group of the "xgpon_onu" 
+ * object. 
+ */
+typedef struct bcmolt_xgpon_onu_onu_tuning_out_data
+{
+    bcmolt_pon_id target_ds_pon_id; /**< target ds pon id. */
+    bcmolt_pon_id target_us_pon_id; /**< target us pon id. */
+    uint32_t time_to_switch;        /**< Time to switch in ms */
+    bcmos_bool rollback;            /**< rollback. */
+    bcmolt_status status;           /**< on- to start tuning out off- to stop tuning out */
+} bcmolt_xgpon_onu_onu_tuning_out_data;
+
+/** Transport message definition for "onu_tuning_out" group of "xgpon_onu" 
+ * object. 
+ */
+typedef struct bcmolt_xgpon_onu_onu_tuning_out
+{
+    bcmolt_oper hdr;            /**< Transport header. */
+    bcmolt_xgpon_onu_key key;   /**< Object key. */
+    bcmolt_xgpon_onu_onu_tuning_out_data data;  /**< All properties that must be set by the user. */
+} bcmolt_xgpon_onu_onu_tuning_out;
+
+/** Structure definition for the "request_registration" group of the "xgpon_onu" 
+ * object. 
+ *
+ * Request the ONU to send its Registration ID 
+ */
+typedef struct bcmolt_xgpon_onu_request_registration_data
+{
+    bcmos_bool sma_flag;    /**< Is the request registration process is part of the SMA process */
+} bcmolt_xgpon_onu_request_registration_data;
+
+/** Transport message definition for "request_registration" group of "xgpon_onu" 
+ * object. 
+ */
+typedef struct bcmolt_xgpon_onu_request_registration
+{
+    bcmolt_oper hdr;            /**< Transport header. */
+    bcmolt_xgpon_onu_key key;   /**< Object key. */
+    bcmolt_xgpon_onu_request_registration_data data;    /**< All properties that must be set by the user. */
+} bcmolt_xgpon_onu_request_registration;
+
+/** Transport message definition for "rssi_measurement" group of "xgpon_onu" 
+ * object. 
+ */
+typedef struct bcmolt_xgpon_onu_rssi_measurement
+{
+    bcmolt_oper hdr;            /**< Transport header. */
+    bcmolt_xgpon_onu_key key;   /**< Object key. */
+} bcmolt_xgpon_onu_rssi_measurement;
+
+/** Structure definition for the "secure_mutual_authentication" group of the 
+ * "xgpon_onu" object. 
+ *
+ * OMCI base secure mutual authentication 
+ */
+typedef struct bcmolt_xgpon_onu_secure_mutual_authentication_data
+{
+    bcmolt_aes_key master_key;          /**< master key. */
+    bcmolt_u8_list_u32_max_2048 buffer; /**< OMCI data buffer. */
+    uint32_t mic;                       /**< mic. */
+} bcmolt_xgpon_onu_secure_mutual_authentication_data;
+
+/** Transport message definition for "secure_mutual_authentication" group of 
+ * "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_secure_mutual_authentication
+{
+    bcmolt_oper hdr;            /**< Transport header. */
+    bcmolt_xgpon_onu_key key;   /**< Object key. */
+    bcmolt_xgpon_onu_secure_mutual_authentication_data data;    /**< All properties that must be set by the user. */
+} bcmolt_xgpon_onu_secure_mutual_authentication;
+
+/** Structure definition for the "set_onu_state" group of the "xgpon_onu" 
+ * object. 
+ */
+typedef struct bcmolt_xgpon_onu_set_onu_state_data
+{
+    bcmolt_onu_operation onu_state; /**< ONU state. */
+} bcmolt_xgpon_onu_set_onu_state_data;
+
+/** Transport message definition for "set_onu_state" group of "xgpon_onu" 
+ * object. 
+ */
+typedef struct bcmolt_xgpon_onu_set_onu_state
+{
+    bcmolt_oper hdr;            /**< Transport header. */
+    bcmolt_xgpon_onu_key key;   /**< Object key. */
+    bcmolt_xgpon_onu_set_onu_state_data data;   /**< All properties that must be set by the user. */
+} bcmolt_xgpon_onu_set_onu_state;
+
+/** Structure definition for the "cpu_packets" group of the "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_cpu_packets_data
+{
+    bcmolt_packet_type packet_type;     /**< packet type. */
+    bcmos_bool calc_crc;                /**< calc crc. */
+    uint8_t number_of_packets;          /**< number of packets. */
+    uint16_t packet_size;               /**< Single packet size. */
+    bcmolt_u8_list_u32_max_2048 buffer; /**< buffer. */
+} bcmolt_xgpon_onu_cpu_packets_data;
+
+/** Transport message definition for "cpu_packets" group of "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_cpu_packets
+{
+    bcmolt_proxy hdr;                       /**< Transport header. */
+    bcmolt_xgpon_onu_key key;               /**< Object key. */
+    bcmolt_xgpon_onu_cpu_packets_data data; /**< All properties that must be set by the user. */
+} bcmolt_xgpon_onu_cpu_packets;
+
+/** Structure definition for the "ploam_packet" group of the "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_ploam_packet_data
+{
+    bcmos_bool default_key; /**< default key. */
+#define BCMOLT_XGPON_ONU_PLOAM_PACKET_DATA_PLOAM_LEN    40
+    bcmolt_arr_u8_40 ploam; /**< ploam. */
+} bcmolt_xgpon_onu_ploam_packet_data;
+
+/** Transport message definition for "ploam_packet" group of "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_ploam_packet
+{
+    bcmolt_proxy hdr;           /**< Transport header. */
+    bcmolt_xgpon_onu_key key;   /**< Object key. */
+    bcmolt_xgpon_onu_ploam_packet_data data;    /**< All properties that must be set by the user. */
+} bcmolt_xgpon_onu_ploam_packet;
+
+/** Structure definition for the "cpu_packet" group of the "xgpon_onu" object. 
+ *
+ * Indicates CPU packet was received on the US from this ONU id 
+ */
+typedef struct bcmolt_xgpon_onu_cpu_packet_data
+{
+    uint16_t port_id;           /**< port id. */
+    bcmos_bool crc_ok;          /**< crc ok. */
+    uint32_t packet_size;       /**< packet size. */
+    bcmolt_u8_list_u32 buffer;  /**< buffer. */
+} bcmolt_xgpon_onu_cpu_packet_data;
+
+/** Transport message definition for "cpu_packet" group of "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_cpu_packet
+{
+    bcmolt_proxy_rx hdr;                    /**< Transport header. */
+    bcmolt_xgpon_onu_key key;               /**< Object key. */
+    bcmolt_xgpon_onu_cpu_packet_data data;  /**< All properties that must be set by the user. */
+} bcmolt_xgpon_onu_cpu_packet;
+
+/** Structure definition for the "omci_packet" group of the "xgpon_onu" object. 
+ *
+ * Indicates OMCI packet was received on the US from this ONU id 
+ */
+typedef struct bcmolt_xgpon_onu_omci_packet_data
+{
+    uint16_t port_id;           /**< port id. */
+    bcmos_bool crc_ok;          /**< crc ok. */
+    uint32_t packet_size;       /**< packet size. */
+    bcmolt_u8_list_u32 buffer;  /**< buffer. */
+} bcmolt_xgpon_onu_omci_packet_data;
+
+/** Transport message definition for "omci_packet" group of "xgpon_onu" object. 
+ */
+typedef struct bcmolt_xgpon_onu_omci_packet
+{
+    bcmolt_proxy_rx hdr;                    /**< Transport header. */
+    bcmolt_xgpon_onu_key key;               /**< Object key. */
+    bcmolt_xgpon_onu_omci_packet_data data; /**< All properties that must be set by the user. */
+} bcmolt_xgpon_onu_omci_packet;
+
+/** Structure definition for the "key" group of the "xgpon_trx" object. 
+ */
+typedef struct bcmolt_xgpon_trx_key
+{
+    bcmolt_xgpon_ni pon_ni; /**< PON network interface. */
+} bcmolt_xgpon_trx_key;
+
+/** Structure definition for the "cfg" group of the "xgpon_trx" object. 
+ */
+typedef struct bcmolt_xgpon_trx_cfg_data
+{
+#define BCMOLT_XGPON_TRX_CFG_DATA_BURST_PROFILE_LEN 4
+    bcmolt_arr_xgpon_burst_profile_4 burst_profile;             /**< burst profile. */
+#define BCMOLT_XGPON_TRX_CFG_DATA_TRANSCEIVER_CONFIG_LEN    4
+    bcmolt_arr_xgpon_trx_configuration_4 transceiver_config;    /**< transceiver config. */
+    bcmolt_xgpon_trx_type transceiver_type;                     /**< trx type. */
+    bcmolt_xgpon_trx_debug debug;                       /**< debug. */
+    bcmolt_xgpon_rssi_normal_config rssi_normal_config; /**< rssi normal config. */
+    bcmolt_xgpon_rssi_ranging_config rssi_ranging_config;               /**< rssi ranging config. */
+    bcmolt_xgpon_serdes_configuration serdes_configuration;             /**< serdes configuration. */
+#define BCMOLT_XGPON_TRX_CFG_DATA_BURST_PROFILE_DELIMITER_MAX_ERRORS_LEN    4
+    bcmolt_arr_u8_4 burst_profile_delimiter_max_errors;                 /**< burst profile delimiter max errors. */
+    bcmolt_xgpon_rx_ranging_sm_pattern ranging_sm_patterns_at_init;     /**< Reset patterns used at Init of Ranging-Window and after Access */
+    bcmolt_xgpon_rx_ranging_sm_pattern ranging_sm_patterns_ed_failure;  /**< ranging sm patterns ED failure. */
+    bcmos_bool reset_on_del_miss;   /**< reset on del miss. */
+    bcmolt_xgpon_ed_state ed_state; /**< ed state. */
+    bcmos_bool invert_ed;           /**< invert ED. */
+    bcmos_bool end_of_burst_reset;  /**< end of burst reset. */
+    bcmos_bool trx_rst_polarity;    /**< TRX reset polarity. */
+} bcmolt_xgpon_trx_cfg_data;
+
+/** Transport message definition for "cfg" group of "xgpon_trx" object. 
+ */
+typedef struct bcmolt_xgpon_trx_cfg
+{
+    bcmolt_cfg hdr;                 /**< Transport header. */
+    bcmolt_xgpon_trx_key key;       /**< Object key. */
+    bcmolt_xgpon_trx_cfg_data data; /**< All properties that must be set by the user. */
+} bcmolt_xgpon_trx_cfg;
+
+/** Structure definition for the "key" group of the "xpon_serdes" object. 
+ */
+typedef struct bcmolt_xpon_serdes_key
+{
+    bcmolt_pon_ni pon_ni;               /**< PON NI. */
+    bcmolt_serdes_instance instance;    /**< SerDes instance: */
+} bcmolt_xpon_serdes_key;
+
+/** Structure definition for the "cfg" group of the "xpon_serdes" object. 
+ */
+typedef struct bcmolt_xpon_serdes_cfg_data
+{
+    uint8_t rx_vga;     /**< Rx Vga. */
+    uint8_t rx_pf;      /**< Peaking Filter */
+    uint8_t rx_lfpf;    /**< Low Frequency Peaking Filter */
+    uint8_t rx_dfe1;    /**< Rx DFE1. */
+    int8_t rx_dfe2;     /**< Rx DFE2. */
+    int8_t rx_dfe3;     /**< Rx DFE3. */
+    int8_t rx_dfe4;     /**< Rx DFE4. */
+    int8_t rx_dfe5;     /**< Rx DFE5. */
+    uint8_t tx_pre;     /**< Tx Pre. */
+    uint8_t tx_main;    /**< Tx Main. */
+    uint8_t tx_post1;   /**< Tx Post1. */
+    int8_t tx_post2;    /**< Tx Post2. */
+    int8_t tx_post3;    /**< Tx Post3. */
+    uint8_t tx_amp;     /**< Tx Amp. */
+} bcmolt_xpon_serdes_cfg_data;
+
+/** Transport message definition for "cfg" group of "xpon_serdes" object. 
+ */
+typedef struct bcmolt_xpon_serdes_cfg
+{
+    bcmolt_cfg hdr;                     /**< Transport header. */
+    bcmolt_xpon_serdes_key key;         /**< Object key. */
+    bcmolt_xpon_serdes_cfg_data data;   /**< All properties that must be set by the user. */
+} bcmolt_xpon_serdes_cfg;
+
+/** @} */
+
+/** Packs a bcmolt_activation_fail_reason to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_activation_fail_reason_pack(bcmolt_activation_fail_reason this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_activation_fail_reason from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_activation_fail_reason_unpack(bcmolt_activation_fail_reason *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_additional_bw_eligibility to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_additional_bw_eligibility_pack(bcmolt_additional_bw_eligibility this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_additional_bw_eligibility from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_additional_bw_eligibility_unpack(bcmolt_additional_bw_eligibility *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_ae_ni_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_ae_ni_cfg_id_pack(bcmolt_ae_ni_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_ae_ni_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_ae_ni_cfg_id_unpack(bcmolt_ae_ni_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_ae_ni_en_state to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_ae_ni_en_state_pack(bcmolt_ae_ni_en_state this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_ae_ni_en_state from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_ae_ni_en_state_unpack(bcmolt_ae_ni_en_state *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_ae_ni_key_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_ae_ni_key_id_pack(bcmolt_ae_ni_key_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_ae_ni_key_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_ae_ni_key_id_unpack(bcmolt_ae_ni_key_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_ae_ni_set_ae_ni_en_state_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_ae_ni_set_ae_ni_en_state_id_pack(bcmolt_ae_ni_set_ae_ni_en_state_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_ae_ni_set_ae_ni_en_state_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_ae_ni_set_ae_ni_en_state_id_unpack(bcmolt_ae_ni_set_ae_ni_en_state_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_ae_path_ds_auto_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_ae_path_ds_auto_cfg_id_pack(bcmolt_ae_path_ds_auto_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_ae_path_ds_auto_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_ae_path_ds_auto_cfg_id_unpack(bcmolt_ae_path_ds_auto_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_ae_path_ds_key_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_ae_path_ds_key_id_pack(bcmolt_ae_path_ds_key_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_ae_path_ds_key_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_ae_path_ds_key_id_unpack(bcmolt_ae_path_ds_key_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_ae_path_ds_stat_alarm_cleared_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_ae_path_ds_stat_alarm_cleared_id_pack(bcmolt_ae_path_ds_stat_alarm_cleared_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_ae_path_ds_stat_alarm_cleared_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_ae_path_ds_stat_alarm_cleared_id_unpack(bcmolt_ae_path_ds_stat_alarm_cleared_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_ae_path_ds_stat_alarm_raised_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_ae_path_ds_stat_alarm_raised_id_pack(bcmolt_ae_path_ds_stat_alarm_raised_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_ae_path_ds_stat_alarm_raised_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_ae_path_ds_stat_alarm_raised_id_unpack(bcmolt_ae_path_ds_stat_alarm_raised_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_ae_path_ds_stat_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_ae_path_ds_stat_cfg_id_pack(bcmolt_ae_path_ds_stat_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_ae_path_ds_stat_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_ae_path_ds_stat_cfg_id_unpack(bcmolt_ae_path_ds_stat_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_ae_path_ds_stat_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_ae_path_ds_stat_id_pack(bcmolt_ae_path_ds_stat_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_ae_path_ds_stat_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_ae_path_ds_stat_id_unpack(bcmolt_ae_path_ds_stat_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_ae_path_us_auto_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_ae_path_us_auto_cfg_id_pack(bcmolt_ae_path_us_auto_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_ae_path_us_auto_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_ae_path_us_auto_cfg_id_unpack(bcmolt_ae_path_us_auto_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_ae_path_us_key_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_ae_path_us_key_id_pack(bcmolt_ae_path_us_key_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_ae_path_us_key_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_ae_path_us_key_id_unpack(bcmolt_ae_path_us_key_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_ae_path_us_stat_alarm_cleared_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_ae_path_us_stat_alarm_cleared_id_pack(bcmolt_ae_path_us_stat_alarm_cleared_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_ae_path_us_stat_alarm_cleared_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_ae_path_us_stat_alarm_cleared_id_unpack(bcmolt_ae_path_us_stat_alarm_cleared_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_ae_path_us_stat_alarm_raised_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_ae_path_us_stat_alarm_raised_id_pack(bcmolt_ae_path_us_stat_alarm_raised_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_ae_path_us_stat_alarm_raised_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_ae_path_us_stat_alarm_raised_id_unpack(bcmolt_ae_path_us_stat_alarm_raised_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_ae_path_us_stat_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_ae_path_us_stat_cfg_id_pack(bcmolt_ae_path_us_stat_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_ae_path_us_stat_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_ae_path_us_stat_cfg_id_unpack(bcmolt_ae_path_us_stat_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_ae_path_us_stat_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_ae_path_us_stat_id_pack(bcmolt_ae_path_us_stat_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_ae_path_us_stat_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_ae_path_us_stat_id_unpack(bcmolt_ae_path_us_stat_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_alloc_operation to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_alloc_operation_pack(bcmolt_alloc_operation this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_alloc_operation from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_alloc_operation_unpack(bcmolt_alloc_operation *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_alloc_state to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_alloc_state_pack(bcmolt_alloc_state this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_alloc_state from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_alloc_state_unpack(bcmolt_alloc_state *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_alloc_type to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_alloc_type_pack(bcmolt_alloc_type this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_alloc_type from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_alloc_type_unpack(bcmolt_alloc_type *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_alloc_type_to_scan to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_alloc_type_to_scan_pack(bcmolt_alloc_type_to_scan this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_alloc_type_to_scan from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_alloc_type_to_scan_unpack(bcmolt_alloc_type_to_scan *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_api_capture_buffer_mode to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_api_capture_buffer_mode_pack(bcmolt_api_capture_buffer_mode this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_api_capture_buffer_mode from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_api_capture_buffer_mode_unpack(bcmolt_api_capture_buffer_mode *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_api_capture_location to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_api_capture_location_pack(bcmolt_api_capture_location this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_api_capture_location from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_api_capture_location_unpack(bcmolt_api_capture_location *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_calibration_record to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_calibration_record_pack(bcmolt_calibration_record this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_calibration_record from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_calibration_record_unpack(bcmolt_calibration_record *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_sign to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_sign_pack(bcmolt_sign this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_sign from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_sign_unpack(bcmolt_sign *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_upstream_line_rate_capabilities to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_upstream_line_rate_capabilities_pack(bcmolt_upstream_line_rate_capabilities this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_upstream_line_rate_capabilities from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_upstream_line_rate_capabilities_unpack(bcmolt_upstream_line_rate_capabilities *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_link_type to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_link_type_pack(bcmolt_link_type this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_link_type from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_link_type_unpack(bcmolt_link_type *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_capture_strobe_signal to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_capture_strobe_signal_pack(bcmolt_capture_strobe_signal this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_capture_strobe_signal from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_capture_strobe_signal_unpack(bcmolt_capture_strobe_signal *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_channel_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_channel_cfg_id_pack(bcmolt_channel_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_channel_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_channel_cfg_id_unpack(bcmolt_channel_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_channel_key_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_channel_key_id_pack(bcmolt_channel_key_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_channel_key_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_channel_key_id_unpack(bcmolt_channel_key_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_console_redirection to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_console_redirection_pack(bcmolt_console_redirection this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_console_redirection from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_console_redirection_unpack(bcmolt_console_redirection *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_control_state to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_control_state_pack(bcmolt_control_state this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_control_state from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_control_state_unpack(bcmolt_control_state *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_dba_mode to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_dba_mode_pack(bcmolt_dba_mode this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_dba_mode from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_dba_mode_unpack(bcmolt_dba_mode *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_dba_ram to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_dba_ram_pack(bcmolt_dba_ram this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_dba_ram from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_dba_ram_unpack(bcmolt_dba_ram *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_dba_type to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_dba_type_pack(bcmolt_dba_type this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_dba_type from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_dba_type_unpack(bcmolt_dba_type *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_ddr_test_status to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_ddr_test_status_pack(bcmolt_ddr_test_status this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_ddr_test_status from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_ddr_test_status_unpack(bcmolt_ddr_test_status *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_ddr_test_result to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_ddr_test_result_pack(bcmolt_ddr_test_result this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_ddr_test_result from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_ddr_test_result_unpack(bcmolt_ddr_test_result *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_host_connection_fail_reason to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_host_connection_fail_reason_pack(bcmolt_host_connection_fail_reason this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_host_connection_fail_reason from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_host_connection_fail_reason_unpack(bcmolt_host_connection_fail_reason *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_deactivation_reason to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_deactivation_reason_pack(bcmolt_deactivation_reason this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_deactivation_reason from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_deactivation_reason_unpack(bcmolt_deactivation_reason *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_debug_auto_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_debug_auto_cfg_id_pack(bcmolt_debug_auto_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_debug_auto_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_debug_auto_cfg_id_unpack(bcmolt_debug_auto_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_debug_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_debug_cfg_id_pack(bcmolt_debug_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_debug_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_debug_cfg_id_unpack(bcmolt_debug_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_debug_cli_input_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_debug_cli_input_id_pack(bcmolt_debug_cli_input_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_debug_cli_input_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_debug_cli_input_id_unpack(bcmolt_debug_cli_input_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_debug_cli_output_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_debug_cli_output_id_pack(bcmolt_debug_cli_output_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_debug_cli_output_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_debug_cli_output_id_unpack(bcmolt_debug_cli_output_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_debug_file_almost_full_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_debug_file_almost_full_id_pack(bcmolt_debug_file_almost_full_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_debug_file_almost_full_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_debug_file_almost_full_id_unpack(bcmolt_debug_file_almost_full_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_debug_key_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_debug_key_id_pack(bcmolt_debug_key_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_debug_key_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_debug_key_id_unpack(bcmolt_debug_key_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_debug_reset_api_capture_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_debug_reset_api_capture_id_pack(bcmolt_debug_reset_api_capture_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_debug_reset_api_capture_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_debug_reset_api_capture_id_unpack(bcmolt_debug_reset_api_capture_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_debug_start_api_capture_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_debug_start_api_capture_id_pack(bcmolt_debug_start_api_capture_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_debug_start_api_capture_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_debug_start_api_capture_id_unpack(bcmolt_debug_start_api_capture_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_debug_stop_api_capture_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_debug_stop_api_capture_id_pack(bcmolt_debug_stop_api_capture_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_debug_stop_api_capture_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_debug_stop_api_capture_id_unpack(bcmolt_debug_stop_api_capture_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_device_auto_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_device_auto_cfg_id_pack(bcmolt_device_auto_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_device_auto_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_device_auto_cfg_id_unpack(bcmolt_device_auto_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_device_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_device_cfg_id_pack(bcmolt_device_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_device_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_device_cfg_id_unpack(bcmolt_device_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_device_chip_revision to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_device_chip_revision_pack(bcmolt_device_chip_revision this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_device_chip_revision from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_device_chip_revision_unpack(bcmolt_device_chip_revision *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_device_connect_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_device_connect_id_pack(bcmolt_device_connect_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_device_connect_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_device_connect_id_unpack(bcmolt_device_connect_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_device_connection_complete_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_device_connection_complete_id_pack(bcmolt_device_connection_complete_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_device_connection_complete_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_device_connection_complete_id_unpack(bcmolt_device_connection_complete_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_device_connection_established_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_device_connection_established_id_pack(bcmolt_device_connection_established_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_device_connection_established_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_device_connection_established_id_unpack(bcmolt_device_connection_established_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_device_connection_failure_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_device_connection_failure_id_pack(bcmolt_device_connection_failure_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_device_connection_failure_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_device_connection_failure_id_unpack(bcmolt_device_connection_failure_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_device_ddr_test_complete_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_device_ddr_test_complete_id_pack(bcmolt_device_ddr_test_complete_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_device_ddr_test_complete_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_device_ddr_test_complete_id_unpack(bcmolt_device_ddr_test_complete_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_device_device_keep_alive_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_device_device_keep_alive_id_pack(bcmolt_device_device_keep_alive_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_device_device_keep_alive_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_device_device_keep_alive_id_unpack(bcmolt_device_device_keep_alive_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_device_device_ready_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_device_device_ready_id_pack(bcmolt_device_device_ready_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_device_device_ready_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_device_device_ready_id_unpack(bcmolt_device_device_ready_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_device_disconnect_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_device_disconnect_id_pack(bcmolt_device_disconnect_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_device_disconnect_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_device_disconnect_id_unpack(bcmolt_device_disconnect_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_device_disconnection_complete_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_device_disconnection_complete_id_pack(bcmolt_device_disconnection_complete_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_device_disconnection_complete_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_device_disconnection_complete_id_unpack(bcmolt_device_disconnection_complete_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_device_host_keep_alive_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_device_host_keep_alive_id_pack(bcmolt_device_host_keep_alive_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_device_host_keep_alive_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_device_host_keep_alive_id_unpack(bcmolt_device_host_keep_alive_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_device_image_transfer_complete_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_device_image_transfer_complete_id_pack(bcmolt_device_image_transfer_complete_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_device_image_transfer_complete_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_device_image_transfer_complete_id_unpack(bcmolt_device_image_transfer_complete_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_device_image_transfer_data_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_device_image_transfer_data_id_pack(bcmolt_device_image_transfer_data_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_device_image_transfer_data_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_device_image_transfer_data_id_unpack(bcmolt_device_image_transfer_data_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_device_image_transfer_start_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_device_image_transfer_start_id_pack(bcmolt_device_image_transfer_start_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_device_image_transfer_start_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_device_image_transfer_start_id_unpack(bcmolt_device_image_transfer_start_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_device_image_type to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_device_image_type_pack(bcmolt_device_image_type this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_device_image_type from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_device_image_type_unpack(bcmolt_device_image_type *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_device_indications_dropped_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_device_indications_dropped_id_pack(bcmolt_device_indications_dropped_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_device_indications_dropped_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_device_indications_dropped_id_unpack(bcmolt_device_indications_dropped_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_device_key_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_device_key_id_pack(bcmolt_device_key_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_device_key_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_device_key_id_unpack(bcmolt_device_key_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_nni_speed to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_nni_speed_pack(bcmolt_nni_speed this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_nni_speed from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_nni_speed_unpack(bcmolt_nni_speed *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_device_reset_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_device_reset_id_pack(bcmolt_device_reset_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_device_reset_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_device_reset_id_unpack(bcmolt_device_reset_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_device_reset_mode to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_device_reset_mode_pack(bcmolt_device_reset_mode this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_device_reset_mode from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_device_reset_mode_unpack(bcmolt_device_reset_mode *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_device_run_ddr_test_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_device_run_ddr_test_id_pack(bcmolt_device_run_ddr_test_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_device_run_ddr_test_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_device_run_ddr_test_id_unpack(bcmolt_device_run_ddr_test_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_device_state to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_device_state_pack(bcmolt_device_state this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_device_state from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_device_state_unpack(bcmolt_device_state *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_device_sw_error_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_device_sw_error_id_pack(bcmolt_device_sw_error_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_device_sw_error_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_device_sw_error_id_unpack(bcmolt_device_sw_error_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_device_sw_exception_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_device_sw_exception_id_pack(bcmolt_device_sw_exception_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_device_sw_exception_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_device_sw_exception_id_unpack(bcmolt_device_sw_exception_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_device_sw_upgrade_activate_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_device_sw_upgrade_activate_id_pack(bcmolt_device_sw_upgrade_activate_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_device_sw_upgrade_activate_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_device_sw_upgrade_activate_id_unpack(bcmolt_device_sw_upgrade_activate_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_disable_serial_number_control to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_disable_serial_number_control_pack(bcmolt_disable_serial_number_control this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_disable_serial_number_control from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_disable_serial_number_control_unpack(bcmolt_disable_serial_number_control *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_drv_icf_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_drv_icf_id_pack(bcmolt_drv_icf_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_drv_icf_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_drv_icf_id_unpack(bcmolt_drv_icf_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_drv_sgb_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_drv_sgb_id_pack(bcmolt_drv_sgb_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_drv_sgb_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_drv_sgb_id_unpack(bcmolt_drv_sgb_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_ds_vlan_action to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_ds_vlan_action_pack(bcmolt_ds_vlan_action this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_ds_vlan_action from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_ds_vlan_action_unpack(bcmolt_ds_vlan_action *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_tfb_trap_behavior to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_tfb_trap_behavior_pack(bcmolt_tfb_trap_behavior this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_tfb_trap_behavior from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_tfb_trap_behavior_unpack(bcmolt_tfb_trap_behavior *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_tfb_mode to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_tfb_mode_pack(bcmolt_tfb_mode this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_tfb_mode from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_tfb_mode_unpack(bcmolt_tfb_mode *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_lim_sec_mode_up to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_lim_sec_mode_up_pack(bcmolt_lim_sec_mode_up this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_lim_sec_mode_up from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_lim_sec_mode_up_unpack(bcmolt_lim_sec_mode_up *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_lim_sec_mode_dn to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_lim_sec_mode_dn_pack(bcmolt_lim_sec_mode_dn this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_lim_sec_mode_dn from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_lim_sec_mode_dn_unpack(bcmolt_lim_sec_mode_dn *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xim_sec_mode to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xim_sec_mode_pack(bcmolt_xim_sec_mode this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xim_sec_mode from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xim_sec_mode_unpack(bcmolt_xim_sec_mode *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_hsc_ram to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_hsc_ram_pack(bcmolt_hsc_ram this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_hsc_ram from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_hsc_ram_unpack(bcmolt_hsc_ram *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_lim_ram to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_lim_ram_pack(bcmolt_lim_ram this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_lim_ram from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_lim_ram_unpack(bcmolt_lim_ram *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_lky_ram to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_lky_ram_pack(bcmolt_lky_ram this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_lky_ram from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_lky_ram_unpack(bcmolt_lky_ram *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_mic_ram to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_mic_ram_pack(bcmolt_mic_ram this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_mic_ram from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_mic_ram_unpack(bcmolt_mic_ram *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xpcsrm_ram to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xpcsrm_ram_pack(bcmolt_xpcsrm_ram this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xpcsrm_ram from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xpcsrm_ram_unpack(bcmolt_xpcsrm_ram *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_embedded_image_transfer_status to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_embedded_image_transfer_status_pack(bcmolt_embedded_image_transfer_status this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_embedded_image_transfer_status from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_embedded_image_transfer_status_unpack(bcmolt_embedded_image_transfer_status *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_encryption_information_format to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_encryption_information_format_pack(bcmolt_epon_encryption_information_format this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_encryption_information_format from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_encryption_information_format_unpack(bcmolt_epon_encryption_information_format *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_energy_detect_source to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_energy_detect_source_pack(bcmolt_energy_detect_source this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_energy_detect_source from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_energy_detect_source_unpack(bcmolt_energy_detect_source *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_1g_turbo_mode to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_1g_turbo_mode_pack(bcmolt_epon_1g_turbo_mode this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_1g_turbo_mode from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_1g_turbo_mode_unpack(bcmolt_epon_1g_turbo_mode *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_clock_transport_mode to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_clock_transport_mode_pack(bcmolt_epon_clock_transport_mode this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_clock_transport_mode from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_clock_transport_mode_unpack(bcmolt_epon_clock_transport_mode *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_dba_reporting_mode to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_dba_reporting_mode_pack(bcmolt_epon_dba_reporting_mode this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_dba_reporting_mode from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_dba_reporting_mode_unpack(bcmolt_epon_dba_reporting_mode *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_link_rate to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_link_rate_pack(bcmolt_epon_link_rate this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_link_rate from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_link_rate_unpack(bcmolt_epon_link_rate *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_status to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_status_pack(bcmolt_status this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_status from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_status_unpack(bcmolt_status *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_denied_link_auto_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_denied_link_auto_cfg_id_pack(bcmolt_epon_denied_link_auto_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_denied_link_auto_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_denied_link_auto_cfg_id_unpack(bcmolt_epon_denied_link_auto_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_denied_link_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_denied_link_cfg_id_pack(bcmolt_epon_denied_link_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_denied_link_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_denied_link_cfg_id_unpack(bcmolt_epon_denied_link_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_denied_link_key_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_denied_link_key_id_pack(bcmolt_epon_denied_link_key_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_denied_link_key_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_denied_link_key_id_unpack(bcmolt_epon_denied_link_key_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_denied_link_laser_on_off_violation_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_denied_link_laser_on_off_violation_id_pack(bcmolt_epon_denied_link_laser_on_off_violation_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_denied_link_laser_on_off_violation_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_denied_link_laser_on_off_violation_id_unpack(bcmolt_epon_denied_link_laser_on_off_violation_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_denied_link_llid_pool_empty_violation_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_denied_link_llid_pool_empty_violation_id_pack(bcmolt_epon_denied_link_llid_pool_empty_violation_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_denied_link_llid_pool_empty_violation_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_denied_link_llid_pool_empty_violation_id_unpack(bcmolt_epon_denied_link_llid_pool_empty_violation_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_denied_link_max_link_violation_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_denied_link_max_link_violation_id_pack(bcmolt_epon_denied_link_max_link_violation_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_denied_link_max_link_violation_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_denied_link_max_link_violation_id_unpack(bcmolt_epon_denied_link_max_link_violation_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_denied_link_overhead_profile_violation_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_denied_link_overhead_profile_violation_id_pack(bcmolt_epon_denied_link_overhead_profile_violation_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_denied_link_overhead_profile_violation_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_denied_link_overhead_profile_violation_id_unpack(bcmolt_epon_denied_link_overhead_profile_violation_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_denied_link_range_violation_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_denied_link_range_violation_id_pack(bcmolt_epon_denied_link_range_violation_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_denied_link_range_violation_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_denied_link_range_violation_id_unpack(bcmolt_epon_denied_link_range_violation_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_denied_link_rogue_violation_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_denied_link_rogue_violation_id_pack(bcmolt_epon_denied_link_rogue_violation_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_denied_link_rogue_violation_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_denied_link_rogue_violation_id_unpack(bcmolt_epon_denied_link_rogue_violation_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_denied_link_system_resource_violation_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_denied_link_system_resource_violation_id_pack(bcmolt_epon_denied_link_system_resource_violation_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_denied_link_system_resource_violation_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_denied_link_system_resource_violation_id_unpack(bcmolt_epon_denied_link_system_resource_violation_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_denied_link_tdm_channels_exhausted_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_denied_link_tdm_channels_exhausted_id_pack(bcmolt_epon_denied_link_tdm_channels_exhausted_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_denied_link_tdm_channels_exhausted_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_denied_link_tdm_channels_exhausted_id_unpack(bcmolt_epon_denied_link_tdm_channels_exhausted_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_denied_link_unknown_link_violation_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_denied_link_unknown_link_violation_id_pack(bcmolt_epon_denied_link_unknown_link_violation_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_denied_link_unknown_link_violation_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_denied_link_unknown_link_violation_id_unpack(bcmolt_epon_denied_link_unknown_link_violation_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_denied_link_upstream_bandwidth_violation_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_denied_link_upstream_bandwidth_violation_id_pack(bcmolt_epon_denied_link_upstream_bandwidth_violation_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_denied_link_upstream_bandwidth_violation_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_denied_link_upstream_bandwidth_violation_id_unpack(bcmolt_epon_denied_link_upstream_bandwidth_violation_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_encryption_mode to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_encryption_mode_pack(bcmolt_epon_encryption_mode this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_encryption_mode from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_encryption_mode_unpack(bcmolt_epon_encryption_mode *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_key_choice to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_key_choice_pack(bcmolt_epon_key_choice this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_key_choice from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_key_choice_unpack(bcmolt_epon_key_choice *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_encryption_direction to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_encryption_direction_pack(bcmolt_epon_encryption_direction this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_encryption_direction from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_encryption_direction_unpack(bcmolt_epon_encryption_direction *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_fec_en_state to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_fec_en_state_pack(bcmolt_epon_fec_en_state this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_fec_en_state from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_fec_en_state_unpack(bcmolt_epon_fec_en_state *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_oam_type to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_oam_type_pack(bcmolt_epon_oam_type this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_oam_type from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_oam_type_unpack(bcmolt_epon_oam_type *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_link_auto_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_link_auto_cfg_id_pack(bcmolt_epon_link_auto_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_link_auto_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_link_auto_cfg_id_unpack(bcmolt_epon_link_auto_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_link_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_link_cfg_id_pack(bcmolt_epon_link_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_link_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_link_cfg_id_unpack(bcmolt_epon_link_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_link_delete_link_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_link_delete_link_id_pack(bcmolt_epon_link_delete_link_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_link_delete_link_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_link_delete_link_id_unpack(bcmolt_epon_link_delete_link_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_link_duplicate_mpcp_registration_request_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_link_duplicate_mpcp_registration_request_id_pack(bcmolt_epon_link_duplicate_mpcp_registration_request_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_link_duplicate_mpcp_registration_request_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_link_duplicate_mpcp_registration_request_id_unpack(bcmolt_epon_link_duplicate_mpcp_registration_request_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_link_encryption_enabled_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_link_encryption_enabled_id_pack(bcmolt_epon_link_encryption_enabled_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_link_encryption_enabled_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_link_encryption_enabled_id_unpack(bcmolt_epon_link_encryption_enabled_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_link_fec_state to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_link_fec_state_pack(bcmolt_epon_link_fec_state this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_link_fec_state from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_link_fec_state_unpack(bcmolt_epon_link_fec_state *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_link_force_rediscovery_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_link_force_rediscovery_id_pack(bcmolt_epon_link_force_rediscovery_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_link_force_rediscovery_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_link_force_rediscovery_id_unpack(bcmolt_epon_link_force_rediscovery_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_link_frame_captured_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_link_frame_captured_id_pack(bcmolt_epon_link_frame_captured_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_link_frame_captured_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_link_frame_captured_id_unpack(bcmolt_epon_link_frame_captured_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_link_status to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_link_status_pack(bcmolt_epon_link_status this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_link_status from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_link_status_unpack(bcmolt_epon_link_status *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_mpcp_discovery_info to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_mpcp_discovery_info_pack(bcmolt_mpcp_discovery_info this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_mpcp_discovery_info from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_mpcp_discovery_info_unpack(bcmolt_mpcp_discovery_info *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_link_inject_frame_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_link_inject_frame_id_pack(bcmolt_epon_link_inject_frame_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_link_inject_frame_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_link_inject_frame_id_unpack(bcmolt_epon_link_inject_frame_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_link_key_exchange_failure_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_link_key_exchange_failure_id_pack(bcmolt_epon_link_key_exchange_failure_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_link_key_exchange_failure_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_link_key_exchange_failure_id_unpack(bcmolt_epon_link_key_exchange_failure_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_link_key_exchange_start_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_link_key_exchange_start_id_pack(bcmolt_epon_link_key_exchange_start_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_link_key_exchange_start_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_link_key_exchange_start_id_unpack(bcmolt_epon_link_key_exchange_start_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_link_key_exchange_started_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_link_key_exchange_started_id_pack(bcmolt_epon_link_key_exchange_started_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_link_key_exchange_started_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_link_key_exchange_started_id_unpack(bcmolt_epon_link_key_exchange_started_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_link_key_exchange_stop_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_link_key_exchange_stop_id_pack(bcmolt_epon_link_key_exchange_stop_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_link_key_exchange_stop_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_link_key_exchange_stop_id_unpack(bcmolt_epon_link_key_exchange_stop_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_link_key_exchange_stopped_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_link_key_exchange_stopped_id_pack(bcmolt_epon_link_key_exchange_stopped_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_link_key_exchange_stopped_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_link_key_exchange_stopped_id_unpack(bcmolt_epon_link_key_exchange_stopped_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_link_key_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_link_key_id_pack(bcmolt_epon_link_key_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_link_key_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_link_key_id_unpack(bcmolt_epon_link_key_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_link_link_deleted_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_link_link_deleted_id_pack(bcmolt_epon_link_link_deleted_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_link_link_deleted_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_link_link_deleted_id_unpack(bcmolt_epon_link_link_deleted_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_link_link_speed_mismatch_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_link_link_speed_mismatch_id_pack(bcmolt_epon_link_link_speed_mismatch_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_link_link_speed_mismatch_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_link_link_speed_mismatch_id_unpack(bcmolt_epon_link_link_speed_mismatch_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_link_mpcp_deregistered_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_link_mpcp_deregistered_id_pack(bcmolt_epon_link_mpcp_deregistered_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_link_mpcp_deregistered_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_link_mpcp_deregistered_id_unpack(bcmolt_epon_link_mpcp_deregistered_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_link_mpcp_discovered_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_link_mpcp_discovered_id_pack(bcmolt_epon_link_mpcp_discovered_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_link_mpcp_discovered_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_link_mpcp_discovered_id_unpack(bcmolt_epon_link_mpcp_discovered_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_link_mpcp_reg_ack_timeout_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_link_mpcp_reg_ack_timeout_id_pack(bcmolt_epon_link_mpcp_reg_ack_timeout_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_link_mpcp_reg_ack_timeout_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_link_mpcp_reg_ack_timeout_id_unpack(bcmolt_epon_link_mpcp_reg_ack_timeout_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_link_mpcp_report_timeout_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_link_mpcp_report_timeout_id_pack(bcmolt_epon_link_mpcp_report_timeout_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_link_mpcp_report_timeout_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_link_mpcp_report_timeout_id_unpack(bcmolt_epon_link_mpcp_report_timeout_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_link_oam_keepalive_timeout_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_link_oam_keepalive_timeout_id_pack(bcmolt_epon_link_oam_keepalive_timeout_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_link_oam_keepalive_timeout_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_link_oam_keepalive_timeout_id_unpack(bcmolt_epon_link_oam_keepalive_timeout_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_link_oam_keepalive_timer_start_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_link_oam_keepalive_timer_start_id_pack(bcmolt_epon_link_oam_keepalive_timer_start_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_link_oam_keepalive_timer_start_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_link_oam_keepalive_timer_start_id_unpack(bcmolt_epon_link_oam_keepalive_timer_start_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_link_oam_keepalive_timer_started_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_link_oam_keepalive_timer_started_id_pack(bcmolt_epon_link_oam_keepalive_timer_started_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_link_oam_keepalive_timer_started_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_link_oam_keepalive_timer_started_id_unpack(bcmolt_epon_link_oam_keepalive_timer_started_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_link_oam_keepalive_timer_stop_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_link_oam_keepalive_timer_stop_id_pack(bcmolt_epon_link_oam_keepalive_timer_stop_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_link_oam_keepalive_timer_stop_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_link_oam_keepalive_timer_stop_id_unpack(bcmolt_epon_link_oam_keepalive_timer_stop_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_link_oam_keepalive_timer_stopped_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_link_oam_keepalive_timer_stopped_id_pack(bcmolt_epon_link_oam_keepalive_timer_stopped_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_link_oam_keepalive_timer_stopped_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_link_oam_keepalive_timer_stopped_id_unpack(bcmolt_epon_link_oam_keepalive_timer_stopped_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_link_preprovisioned_link_created_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_link_preprovisioned_link_created_id_pack(bcmolt_epon_link_preprovisioned_link_created_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_link_preprovisioned_link_created_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_link_preprovisioned_link_created_id_unpack(bcmolt_epon_link_preprovisioned_link_created_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_link_protection_switch_occurred_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_link_protection_switch_occurred_id_pack(bcmolt_epon_link_protection_switch_occurred_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_link_protection_switch_occurred_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_link_protection_switch_occurred_id_unpack(bcmolt_epon_link_protection_switch_occurred_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_link_range_value_changed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_link_range_value_changed_id_pack(bcmolt_epon_link_range_value_changed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_link_range_value_changed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_link_range_value_changed_id_unpack(bcmolt_epon_link_range_value_changed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_link_rerange_failure_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_link_rerange_failure_id_pack(bcmolt_epon_link_rerange_failure_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_link_rerange_failure_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_link_rerange_failure_id_unpack(bcmolt_epon_link_rerange_failure_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_link_stat_alarm_cleared_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_link_stat_alarm_cleared_id_pack(bcmolt_epon_link_stat_alarm_cleared_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_link_stat_alarm_cleared_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_link_stat_alarm_cleared_id_unpack(bcmolt_epon_link_stat_alarm_cleared_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_link_stat_alarm_raised_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_link_stat_alarm_raised_id_pack(bcmolt_epon_link_stat_alarm_raised_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_link_stat_alarm_raised_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_link_stat_alarm_raised_id_unpack(bcmolt_epon_link_stat_alarm_raised_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_link_stat_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_link_stat_cfg_id_pack(bcmolt_epon_link_stat_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_link_stat_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_link_stat_cfg_id_unpack(bcmolt_epon_link_stat_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_link_stat_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_link_stat_id_pack(bcmolt_epon_link_stat_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_link_stat_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_link_stat_id_unpack(bcmolt_epon_link_stat_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_link_state_flags to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_link_state_flags_pack(bcmolt_epon_link_state_flags this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_link_state_flags from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_link_state_flags_unpack(bcmolt_epon_link_state_flags *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_link_static_registration_done_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_link_static_registration_done_id_pack(bcmolt_epon_link_static_registration_done_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_link_static_registration_done_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_link_static_registration_done_id_unpack(bcmolt_epon_link_static_registration_done_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_link_static_registration_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_link_static_registration_id_pack(bcmolt_epon_link_static_registration_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_link_static_registration_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_link_static_registration_id_unpack(bcmolt_epon_link_static_registration_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_link_type to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_link_type_pack(bcmolt_epon_link_type this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_link_type from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_link_type_unpack(bcmolt_epon_link_type *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_mpcp_gate_mode to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_mpcp_gate_mode_pack(bcmolt_mpcp_gate_mode this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_mpcp_gate_mode from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_mpcp_gate_mode_unpack(bcmolt_mpcp_gate_mode *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_mpcp_registration_gate_flags to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_mpcp_registration_gate_flags_pack(bcmolt_mpcp_registration_gate_flags this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_mpcp_registration_gate_flags from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_mpcp_registration_gate_flags_unpack(bcmolt_mpcp_registration_gate_flags *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_ni_add_link_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_ni_add_link_id_pack(bcmolt_epon_ni_add_link_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_ni_add_link_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_ni_add_link_id_unpack(bcmolt_epon_ni_add_link_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_ni_add_multicast_link_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_ni_add_multicast_link_id_pack(bcmolt_epon_ni_add_multicast_link_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_ni_add_multicast_link_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_ni_add_multicast_link_id_unpack(bcmolt_epon_ni_add_multicast_link_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_ni_add_protected_standby_link_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_ni_add_protected_standby_link_id_pack(bcmolt_epon_ni_add_protected_standby_link_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_ni_add_protected_standby_link_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_ni_add_protected_standby_link_id_unpack(bcmolt_epon_ni_add_protected_standby_link_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_ni_auto_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_ni_auto_cfg_id_pack(bcmolt_epon_ni_auto_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_ni_auto_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_ni_auto_cfg_id_unpack(bcmolt_epon_ni_auto_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_ni_auto_rogue_scan_10g_failure_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_ni_auto_rogue_scan_10g_failure_id_pack(bcmolt_epon_ni_auto_rogue_scan_10g_failure_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_ni_auto_rogue_scan_10g_failure_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_ni_auto_rogue_scan_10g_failure_id_unpack(bcmolt_epon_ni_auto_rogue_scan_10g_failure_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_ni_auto_rogue_scan_1g_failure_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_ni_auto_rogue_scan_1g_failure_id_pack(bcmolt_epon_ni_auto_rogue_scan_1g_failure_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_ni_auto_rogue_scan_1g_failure_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_ni_auto_rogue_scan_1g_failure_id_unpack(bcmolt_epon_ni_auto_rogue_scan_1g_failure_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_ni_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_ni_cfg_id_pack(bcmolt_epon_ni_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_ni_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_ni_cfg_id_unpack(bcmolt_epon_ni_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_ni_en_state to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_ni_en_state_pack(bcmolt_epon_ni_en_state this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_ni_en_state from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_ni_en_state_unpack(bcmolt_epon_ni_en_state *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_ni_issue_rssi_grant_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_ni_issue_rssi_grant_id_pack(bcmolt_epon_ni_issue_rssi_grant_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_ni_issue_rssi_grant_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_ni_issue_rssi_grant_id_unpack(bcmolt_epon_ni_issue_rssi_grant_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_ni_key_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_ni_key_id_pack(bcmolt_epon_ni_key_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_ni_key_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_ni_key_id_unpack(bcmolt_epon_ni_key_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_ni_llid_quarantined_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_ni_llid_quarantined_id_pack(bcmolt_epon_ni_llid_quarantined_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_ni_llid_quarantined_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_ni_llid_quarantined_id_unpack(bcmolt_epon_ni_llid_quarantined_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_ni_mpcp_timestamp_changed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_ni_mpcp_timestamp_changed_id_pack(bcmolt_epon_ni_mpcp_timestamp_changed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_ni_mpcp_timestamp_changed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_ni_mpcp_timestamp_changed_id_unpack(bcmolt_epon_ni_mpcp_timestamp_changed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_ni_no_reports_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_ni_no_reports_id_pack(bcmolt_epon_ni_no_reports_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_ni_no_reports_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_ni_no_reports_id_unpack(bcmolt_epon_ni_no_reports_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_ni_onu_upgrade_complete_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_ni_onu_upgrade_complete_id_pack(bcmolt_epon_ni_onu_upgrade_complete_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_ni_onu_upgrade_complete_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_ni_onu_upgrade_complete_id_unpack(bcmolt_epon_ni_onu_upgrade_complete_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_ni_protection_switching_apply_rerange_delta_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_ni_protection_switching_apply_rerange_delta_id_pack(bcmolt_epon_ni_protection_switching_apply_rerange_delta_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_ni_protection_switching_apply_rerange_delta_id from 
+ * bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_ni_protection_switching_apply_rerange_delta_id_unpack(bcmolt_epon_ni_protection_switching_apply_rerange_delta_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_ni_rerange_failure_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_ni_rerange_failure_id_pack(bcmolt_epon_ni_rerange_failure_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_ni_rerange_failure_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_ni_rerange_failure_id_unpack(bcmolt_epon_ni_rerange_failure_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_ni_rogue_llid_scan_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_ni_rogue_llid_scan_id_pack(bcmolt_epon_ni_rogue_llid_scan_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_ni_rogue_llid_scan_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_ni_rogue_llid_scan_id_unpack(bcmolt_epon_ni_rogue_llid_scan_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_ni_rogue_scan_complete_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_ni_rogue_scan_complete_id_pack(bcmolt_epon_ni_rogue_scan_complete_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_ni_rogue_scan_complete_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_ni_rogue_scan_complete_id_unpack(bcmolt_epon_ni_rogue_scan_complete_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_ni_rssi_measurement_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_ni_rssi_measurement_completed_id_pack(bcmolt_epon_ni_rssi_measurement_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_ni_rssi_measurement_completed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_ni_rssi_measurement_completed_id_unpack(bcmolt_epon_ni_rssi_measurement_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_ni_set_epon_ni_en_state_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_ni_set_epon_ni_en_state_id_pack(bcmolt_epon_ni_set_epon_ni_en_state_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_ni_set_epon_ni_en_state_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_ni_set_epon_ni_en_state_id_unpack(bcmolt_epon_ni_set_epon_ni_en_state_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_ni_start_onu_upgrade_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_ni_start_onu_upgrade_id_pack(bcmolt_epon_ni_start_onu_upgrade_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_ni_start_onu_upgrade_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_ni_start_onu_upgrade_id_unpack(bcmolt_epon_ni_start_onu_upgrade_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_ni_state_change_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_ni_state_change_completed_id_pack(bcmolt_epon_ni_state_change_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_ni_state_change_completed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_ni_state_change_completed_id_unpack(bcmolt_epon_ni_state_change_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_oam_extension_type to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_oam_extension_type_pack(bcmolt_epon_oam_extension_type this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_oam_extension_type from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_oam_extension_type_unpack(bcmolt_epon_oam_extension_type *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_onu_10g_us_auto_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_onu_10g_us_auto_cfg_id_pack(bcmolt_epon_onu_10g_us_auto_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_onu_10g_us_auto_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_onu_10g_us_auto_cfg_id_unpack(bcmolt_epon_onu_10g_us_auto_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_onu_10g_us_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_onu_10g_us_cfg_id_pack(bcmolt_epon_onu_10g_us_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_onu_10g_us_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_onu_10g_us_cfg_id_unpack(bcmolt_epon_onu_10g_us_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_onu_10g_us_key_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_onu_10g_us_key_id_pack(bcmolt_epon_onu_10g_us_key_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_onu_10g_us_key_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_onu_10g_us_key_id_unpack(bcmolt_epon_onu_10g_us_key_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_onu_10g_us_stat_alarm_cleared_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_onu_10g_us_stat_alarm_cleared_id_pack(bcmolt_epon_onu_10g_us_stat_alarm_cleared_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_onu_10g_us_stat_alarm_cleared_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_onu_10g_us_stat_alarm_cleared_id_unpack(bcmolt_epon_onu_10g_us_stat_alarm_cleared_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_onu_10g_us_stat_alarm_raised_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_onu_10g_us_stat_alarm_raised_id_pack(bcmolt_epon_onu_10g_us_stat_alarm_raised_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_onu_10g_us_stat_alarm_raised_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_onu_10g_us_stat_alarm_raised_id_unpack(bcmolt_epon_onu_10g_us_stat_alarm_raised_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_onu_10g_us_stat_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_onu_10g_us_stat_cfg_id_pack(bcmolt_epon_onu_10g_us_stat_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_onu_10g_us_stat_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_onu_10g_us_stat_cfg_id_unpack(bcmolt_epon_onu_10g_us_stat_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_onu_10g_us_stat_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_onu_10g_us_stat_id_pack(bcmolt_epon_onu_10g_us_stat_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_onu_10g_us_stat_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_onu_10g_us_stat_id_unpack(bcmolt_epon_onu_10g_us_stat_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_onu_1g_us_auto_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_onu_1g_us_auto_cfg_id_pack(bcmolt_epon_onu_1g_us_auto_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_onu_1g_us_auto_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_onu_1g_us_auto_cfg_id_unpack(bcmolt_epon_onu_1g_us_auto_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_onu_1g_us_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_onu_1g_us_cfg_id_pack(bcmolt_epon_onu_1g_us_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_onu_1g_us_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_onu_1g_us_cfg_id_unpack(bcmolt_epon_onu_1g_us_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_onu_1g_us_key_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_onu_1g_us_key_id_pack(bcmolt_epon_onu_1g_us_key_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_onu_1g_us_key_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_onu_1g_us_key_id_unpack(bcmolt_epon_onu_1g_us_key_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_onu_1g_us_stat_alarm_cleared_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_onu_1g_us_stat_alarm_cleared_id_pack(bcmolt_epon_onu_1g_us_stat_alarm_cleared_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_onu_1g_us_stat_alarm_cleared_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_onu_1g_us_stat_alarm_cleared_id_unpack(bcmolt_epon_onu_1g_us_stat_alarm_cleared_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_onu_1g_us_stat_alarm_raised_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_onu_1g_us_stat_alarm_raised_id_pack(bcmolt_epon_onu_1g_us_stat_alarm_raised_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_onu_1g_us_stat_alarm_raised_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_onu_1g_us_stat_alarm_raised_id_unpack(bcmolt_epon_onu_1g_us_stat_alarm_raised_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_onu_1g_us_stat_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_onu_1g_us_stat_cfg_id_pack(bcmolt_epon_onu_1g_us_stat_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_onu_1g_us_stat_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_onu_1g_us_stat_cfg_id_unpack(bcmolt_epon_onu_1g_us_stat_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_onu_1g_us_stat_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_onu_1g_us_stat_id_pack(bcmolt_epon_onu_1g_us_stat_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_onu_1g_us_stat_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_onu_1g_us_stat_id_unpack(bcmolt_epon_onu_1g_us_stat_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_onu_upgrade_onu_response_code to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_onu_upgrade_onu_response_code_pack(bcmolt_epon_onu_upgrade_onu_response_code this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_onu_upgrade_onu_response_code from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_onu_upgrade_onu_response_code_unpack(bcmolt_epon_onu_upgrade_onu_response_code *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_onu_upgrade_return_code to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_onu_upgrade_return_code_pack(bcmolt_epon_onu_upgrade_return_code this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_onu_upgrade_return_code from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_onu_upgrade_return_code_unpack(bcmolt_epon_onu_upgrade_return_code *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_path_10g_ds_auto_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_path_10g_ds_auto_cfg_id_pack(bcmolt_epon_path_10g_ds_auto_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_path_10g_ds_auto_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_path_10g_ds_auto_cfg_id_unpack(bcmolt_epon_path_10g_ds_auto_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_path_10g_ds_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_path_10g_ds_cfg_id_pack(bcmolt_epon_path_10g_ds_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_path_10g_ds_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_path_10g_ds_cfg_id_unpack(bcmolt_epon_path_10g_ds_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_path_10g_ds_key_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_path_10g_ds_key_id_pack(bcmolt_epon_path_10g_ds_key_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_path_10g_ds_key_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_path_10g_ds_key_id_unpack(bcmolt_epon_path_10g_ds_key_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_path_10g_ds_stat_alarm_cleared_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_path_10g_ds_stat_alarm_cleared_id_pack(bcmolt_epon_path_10g_ds_stat_alarm_cleared_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_path_10g_ds_stat_alarm_cleared_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_path_10g_ds_stat_alarm_cleared_id_unpack(bcmolt_epon_path_10g_ds_stat_alarm_cleared_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_path_10g_ds_stat_alarm_raised_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_path_10g_ds_stat_alarm_raised_id_pack(bcmolt_epon_path_10g_ds_stat_alarm_raised_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_path_10g_ds_stat_alarm_raised_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_path_10g_ds_stat_alarm_raised_id_unpack(bcmolt_epon_path_10g_ds_stat_alarm_raised_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_path_10g_ds_stat_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_path_10g_ds_stat_cfg_id_pack(bcmolt_epon_path_10g_ds_stat_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_path_10g_ds_stat_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_path_10g_ds_stat_cfg_id_unpack(bcmolt_epon_path_10g_ds_stat_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_path_10g_ds_stat_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_path_10g_ds_stat_id_pack(bcmolt_epon_path_10g_ds_stat_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_path_10g_ds_stat_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_path_10g_ds_stat_id_unpack(bcmolt_epon_path_10g_ds_stat_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_path_10g_us_auto_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_path_10g_us_auto_cfg_id_pack(bcmolt_epon_path_10g_us_auto_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_path_10g_us_auto_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_path_10g_us_auto_cfg_id_unpack(bcmolt_epon_path_10g_us_auto_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_path_10g_us_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_path_10g_us_cfg_id_pack(bcmolt_epon_path_10g_us_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_path_10g_us_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_path_10g_us_cfg_id_unpack(bcmolt_epon_path_10g_us_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_path_10g_us_key_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_path_10g_us_key_id_pack(bcmolt_epon_path_10g_us_key_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_path_10g_us_key_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_path_10g_us_key_id_unpack(bcmolt_epon_path_10g_us_key_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_path_10g_us_stat_alarm_cleared_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_path_10g_us_stat_alarm_cleared_id_pack(bcmolt_epon_path_10g_us_stat_alarm_cleared_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_path_10g_us_stat_alarm_cleared_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_path_10g_us_stat_alarm_cleared_id_unpack(bcmolt_epon_path_10g_us_stat_alarm_cleared_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_path_10g_us_stat_alarm_raised_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_path_10g_us_stat_alarm_raised_id_pack(bcmolt_epon_path_10g_us_stat_alarm_raised_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_path_10g_us_stat_alarm_raised_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_path_10g_us_stat_alarm_raised_id_unpack(bcmolt_epon_path_10g_us_stat_alarm_raised_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_path_10g_us_stat_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_path_10g_us_stat_cfg_id_pack(bcmolt_epon_path_10g_us_stat_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_path_10g_us_stat_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_path_10g_us_stat_cfg_id_unpack(bcmolt_epon_path_10g_us_stat_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_path_10g_us_stat_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_path_10g_us_stat_id_pack(bcmolt_epon_path_10g_us_stat_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_path_10g_us_stat_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_path_10g_us_stat_id_unpack(bcmolt_epon_path_10g_us_stat_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_path_1g_ds_auto_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_path_1g_ds_auto_cfg_id_pack(bcmolt_epon_path_1g_ds_auto_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_path_1g_ds_auto_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_path_1g_ds_auto_cfg_id_unpack(bcmolt_epon_path_1g_ds_auto_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_path_1g_ds_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_path_1g_ds_cfg_id_pack(bcmolt_epon_path_1g_ds_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_path_1g_ds_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_path_1g_ds_cfg_id_unpack(bcmolt_epon_path_1g_ds_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_path_1g_ds_key_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_path_1g_ds_key_id_pack(bcmolt_epon_path_1g_ds_key_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_path_1g_ds_key_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_path_1g_ds_key_id_unpack(bcmolt_epon_path_1g_ds_key_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_path_1g_ds_stat_alarm_cleared_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_path_1g_ds_stat_alarm_cleared_id_pack(bcmolt_epon_path_1g_ds_stat_alarm_cleared_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_path_1g_ds_stat_alarm_cleared_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_path_1g_ds_stat_alarm_cleared_id_unpack(bcmolt_epon_path_1g_ds_stat_alarm_cleared_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_path_1g_ds_stat_alarm_raised_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_path_1g_ds_stat_alarm_raised_id_pack(bcmolt_epon_path_1g_ds_stat_alarm_raised_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_path_1g_ds_stat_alarm_raised_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_path_1g_ds_stat_alarm_raised_id_unpack(bcmolt_epon_path_1g_ds_stat_alarm_raised_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_path_1g_ds_stat_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_path_1g_ds_stat_cfg_id_pack(bcmolt_epon_path_1g_ds_stat_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_path_1g_ds_stat_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_path_1g_ds_stat_cfg_id_unpack(bcmolt_epon_path_1g_ds_stat_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_path_1g_ds_stat_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_path_1g_ds_stat_id_pack(bcmolt_epon_path_1g_ds_stat_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_path_1g_ds_stat_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_path_1g_ds_stat_id_unpack(bcmolt_epon_path_1g_ds_stat_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_path_1g_us_auto_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_path_1g_us_auto_cfg_id_pack(bcmolt_epon_path_1g_us_auto_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_path_1g_us_auto_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_path_1g_us_auto_cfg_id_unpack(bcmolt_epon_path_1g_us_auto_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_path_1g_us_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_path_1g_us_cfg_id_pack(bcmolt_epon_path_1g_us_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_path_1g_us_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_path_1g_us_cfg_id_unpack(bcmolt_epon_path_1g_us_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_path_1g_us_key_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_path_1g_us_key_id_pack(bcmolt_epon_path_1g_us_key_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_path_1g_us_key_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_path_1g_us_key_id_unpack(bcmolt_epon_path_1g_us_key_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_path_1g_us_stat_alarm_cleared_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_path_1g_us_stat_alarm_cleared_id_pack(bcmolt_epon_path_1g_us_stat_alarm_cleared_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_path_1g_us_stat_alarm_cleared_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_path_1g_us_stat_alarm_cleared_id_unpack(bcmolt_epon_path_1g_us_stat_alarm_cleared_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_path_1g_us_stat_alarm_raised_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_path_1g_us_stat_alarm_raised_id_pack(bcmolt_epon_path_1g_us_stat_alarm_raised_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_path_1g_us_stat_alarm_raised_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_path_1g_us_stat_alarm_raised_id_unpack(bcmolt_epon_path_1g_us_stat_alarm_raised_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_path_1g_us_stat_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_path_1g_us_stat_cfg_id_pack(bcmolt_epon_path_1g_us_stat_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_path_1g_us_stat_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_path_1g_us_stat_cfg_id_unpack(bcmolt_epon_path_1g_us_stat_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_path_1g_us_stat_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_path_1g_us_stat_id_pack(bcmolt_epon_path_1g_us_stat_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_path_1g_us_stat_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_path_1g_us_stat_id_unpack(bcmolt_epon_path_1g_us_stat_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_protection_state to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_protection_state_pack(bcmolt_epon_protection_state this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_protection_state from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_protection_state_unpack(bcmolt_epon_protection_state *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_protection_switching_type to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_protection_switching_type_pack(bcmolt_epon_protection_switching_type this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_protection_switching_type from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_protection_switching_type_unpack(bcmolt_epon_protection_switching_type *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_protection_switching_detection_options to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_protection_switching_detection_options_pack(bcmolt_protection_switching_detection_options this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_protection_switching_detection_options from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_protection_switching_detection_options_unpack(bcmolt_protection_switching_detection_options *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_protection_switching_reranging_options to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_protection_switching_reranging_options_pack(bcmolt_epon_protection_switching_reranging_options this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_protection_switching_reranging_options from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_protection_switching_reranging_options_unpack(bcmolt_epon_protection_switching_reranging_options *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpio_pin to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpio_pin_pack(bcmolt_gpio_pin this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpio_pin from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpio_pin_unpack(bcmolt_gpio_pin *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpio_polarity to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpio_polarity_pack(bcmolt_gpio_polarity this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpio_polarity from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpio_polarity_unpack(bcmolt_gpio_polarity *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_rp_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_rp_cfg_id_pack(bcmolt_epon_rp_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_rp_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_rp_cfg_id_unpack(bcmolt_epon_rp_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_epon_rp_key_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_epon_rp_key_id_pack(bcmolt_epon_rp_key_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_rp_key_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_epon_rp_key_id_unpack(bcmolt_epon_rp_key_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_ext_irq to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_ext_irq_pack(bcmolt_ext_irq this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_ext_irq from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_ext_irq_unpack(bcmolt_ext_irq *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_flush_mac_table_option to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_flush_mac_table_option_pack(bcmolt_flush_mac_table_option this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_flush_mac_table_option from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_flush_mac_table_option_unpack(bcmolt_flush_mac_table_option *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_frequency_adjustment_direction to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_frequency_adjustment_direction_pack(bcmolt_frequency_adjustment_direction this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_frequency_adjustment_direction from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_frequency_adjustment_direction_unpack(bcmolt_frequency_adjustment_direction *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gem_port_direction to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gem_port_direction_pack(bcmolt_gem_port_direction this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gem_port_direction from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gem_port_direction_unpack(bcmolt_gem_port_direction *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gem_port_type to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gem_port_type_pack(bcmolt_gem_port_type this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gem_port_type from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gem_port_type_unpack(bcmolt_gem_port_type *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gem_port_operation to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gem_port_operation_pack(bcmolt_gem_port_operation this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gem_port_operation from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gem_port_operation_unpack(bcmolt_gem_port_operation *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpio_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpio_cfg_id_pack(bcmolt_gpio_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpio_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpio_cfg_id_unpack(bcmolt_gpio_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpio_key_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpio_key_id_pack(bcmolt_gpio_key_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpio_key_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpio_key_id_unpack(bcmolt_gpio_key_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpio_pin_dir to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpio_pin_dir_pack(bcmolt_gpio_pin_dir this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpio_pin_dir from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpio_pin_dir_unpack(bcmolt_gpio_pin_dir *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpio_value to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpio_value_pack(bcmolt_gpio_value this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpio_value from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpio_value_unpack(bcmolt_gpio_value *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_alloc_auto_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_alloc_auto_cfg_id_pack(bcmolt_gpon_alloc_auto_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_alloc_auto_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_alloc_auto_cfg_id_unpack(bcmolt_gpon_alloc_auto_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_alloc_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_alloc_cfg_id_pack(bcmolt_gpon_alloc_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_alloc_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_alloc_cfg_id_unpack(bcmolt_gpon_alloc_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_alloc_configuration_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_alloc_configuration_completed_id_pack(bcmolt_gpon_alloc_configuration_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_alloc_configuration_completed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_alloc_configuration_completed_id_unpack(bcmolt_gpon_alloc_configuration_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_alloc_get_alloc_stats_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_alloc_get_alloc_stats_completed_id_pack(bcmolt_gpon_alloc_get_alloc_stats_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_alloc_get_alloc_stats_completed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_alloc_get_alloc_stats_completed_id_unpack(bcmolt_gpon_alloc_get_alloc_stats_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_alloc_get_stats_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_alloc_get_stats_id_pack(bcmolt_gpon_alloc_get_stats_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_alloc_get_stats_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_alloc_get_stats_id_unpack(bcmolt_gpon_alloc_get_stats_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_alloc_key_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_alloc_key_id_pack(bcmolt_gpon_alloc_key_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_alloc_key_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_alloc_key_id_unpack(bcmolt_gpon_alloc_key_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_alloc_set_state_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_alloc_set_state_id_pack(bcmolt_gpon_alloc_set_state_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_alloc_set_state_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_alloc_set_state_id_unpack(bcmolt_gpon_alloc_set_state_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_alloc_stat_alarm_cleared_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_alloc_stat_alarm_cleared_id_pack(bcmolt_gpon_alloc_stat_alarm_cleared_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_alloc_stat_alarm_cleared_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_alloc_stat_alarm_cleared_id_unpack(bcmolt_gpon_alloc_stat_alarm_cleared_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_alloc_stat_alarm_raised_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_alloc_stat_alarm_raised_id_pack(bcmolt_gpon_alloc_stat_alarm_raised_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_alloc_stat_alarm_raised_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_alloc_stat_alarm_raised_id_unpack(bcmolt_gpon_alloc_stat_alarm_raised_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_alloc_stat_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_alloc_stat_cfg_id_pack(bcmolt_gpon_alloc_stat_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_alloc_stat_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_alloc_stat_cfg_id_unpack(bcmolt_gpon_alloc_stat_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_alloc_stat_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_alloc_stat_id_pack(bcmolt_gpon_alloc_stat_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_alloc_stat_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_alloc_stat_id_unpack(bcmolt_gpon_alloc_stat_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_gem_port_auto_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_gem_port_auto_cfg_id_pack(bcmolt_gpon_gem_port_auto_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_gem_port_auto_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_gem_port_auto_cfg_id_unpack(bcmolt_gpon_gem_port_auto_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_gem_port_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_gem_port_cfg_id_pack(bcmolt_gpon_gem_port_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_gem_port_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_gem_port_cfg_id_unpack(bcmolt_gpon_gem_port_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_gem_port_configuration_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_gem_port_configuration_completed_id_pack(bcmolt_gpon_gem_port_configuration_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_gem_port_configuration_completed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_gem_port_configuration_completed_id_unpack(bcmolt_gpon_gem_port_configuration_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_gem_port_key_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_gem_port_key_id_pack(bcmolt_gpon_gem_port_key_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_gem_port_key_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_gem_port_key_id_unpack(bcmolt_gpon_gem_port_key_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_gem_port_set_state_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_gem_port_set_state_id_pack(bcmolt_gpon_gem_port_set_state_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_gem_port_set_state_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_gem_port_set_state_id_unpack(bcmolt_gpon_gem_port_set_state_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_gem_port_stat_alarm_cleared_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_gem_port_stat_alarm_cleared_id_pack(bcmolt_gpon_gem_port_stat_alarm_cleared_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_gem_port_stat_alarm_cleared_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_gem_port_stat_alarm_cleared_id_unpack(bcmolt_gpon_gem_port_stat_alarm_cleared_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_gem_port_stat_alarm_raised_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_gem_port_stat_alarm_raised_id_pack(bcmolt_gpon_gem_port_stat_alarm_raised_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_gem_port_stat_alarm_raised_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_gem_port_stat_alarm_raised_id_unpack(bcmolt_gpon_gem_port_stat_alarm_raised_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_gem_port_stat_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_gem_port_stat_cfg_id_pack(bcmolt_gpon_gem_port_stat_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_gem_port_stat_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_gem_port_stat_cfg_id_unpack(bcmolt_gpon_gem_port_stat_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_gem_port_stat_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_gem_port_stat_id_pack(bcmolt_gpon_gem_port_stat_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_gem_port_stat_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_gem_port_stat_id_unpack(bcmolt_gpon_gem_port_stat_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_gem_port_state to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_gem_port_state_pack(bcmolt_gpon_gem_port_state this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_gem_port_state from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_gem_port_state_unpack(bcmolt_gpon_gem_port_state *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_iwf_auto_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_auto_cfg_id_pack(bcmolt_gpon_iwf_auto_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_iwf_auto_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_auto_cfg_id_unpack(bcmolt_gpon_iwf_auto_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_iwf_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_cfg_id_pack(bcmolt_gpon_iwf_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_iwf_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_cfg_id_unpack(bcmolt_gpon_iwf_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_iwf_ds_egress_flow_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_ds_egress_flow_cfg_id_pack(bcmolt_gpon_iwf_ds_egress_flow_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_iwf_ds_egress_flow_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_ds_egress_flow_cfg_id_unpack(bcmolt_gpon_iwf_ds_egress_flow_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_iwf_ds_egress_flow_key_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_ds_egress_flow_key_id_pack(bcmolt_gpon_iwf_ds_egress_flow_key_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_iwf_ds_egress_flow_key_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_ds_egress_flow_key_id_unpack(bcmolt_gpon_iwf_ds_egress_flow_key_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_iwf_ds_ingress_flow_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_ds_ingress_flow_cfg_id_pack(bcmolt_gpon_iwf_ds_ingress_flow_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_iwf_ds_ingress_flow_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_ds_ingress_flow_cfg_id_unpack(bcmolt_gpon_iwf_ds_ingress_flow_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_iwf_ds_ingress_flow_key_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_ds_ingress_flow_key_id_pack(bcmolt_gpon_iwf_ds_ingress_flow_key_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_iwf_ds_ingress_flow_key_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_ds_ingress_flow_key_id_unpack(bcmolt_gpon_iwf_ds_ingress_flow_key_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_iwf_flush_mac_table_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_flush_mac_table_completed_id_pack(bcmolt_gpon_iwf_flush_mac_table_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_iwf_flush_mac_table_completed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_flush_mac_table_completed_id_unpack(bcmolt_gpon_iwf_flush_mac_table_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_iwf_flush_mac_table_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_flush_mac_table_id_pack(bcmolt_gpon_iwf_flush_mac_table_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_iwf_flush_mac_table_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_flush_mac_table_id_unpack(bcmolt_gpon_iwf_flush_mac_table_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_iwf_key_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_key_id_pack(bcmolt_gpon_iwf_key_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_iwf_key_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_key_id_unpack(bcmolt_gpon_iwf_key_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_iwf_mac_table_auto_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_mac_table_auto_cfg_id_pack(bcmolt_gpon_iwf_mac_table_auto_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_iwf_mac_table_auto_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_mac_table_auto_cfg_id_unpack(bcmolt_gpon_iwf_mac_table_auto_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_iwf_mac_table_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_mac_table_cfg_id_pack(bcmolt_gpon_iwf_mac_table_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_iwf_mac_table_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_mac_table_cfg_id_unpack(bcmolt_gpon_iwf_mac_table_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_iwf_mac_table_key_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_mac_table_key_id_pack(bcmolt_gpon_iwf_mac_table_key_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_iwf_mac_table_key_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_mac_table_key_id_unpack(bcmolt_gpon_iwf_mac_table_key_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_iwf_mac_table_mac_aged_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_mac_table_mac_aged_id_pack(bcmolt_gpon_iwf_mac_table_mac_aged_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_iwf_mac_table_mac_aged_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_mac_table_mac_aged_id_unpack(bcmolt_gpon_iwf_mac_table_mac_aged_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_iwf_mac_table_mac_dropped_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_mac_table_mac_dropped_id_pack(bcmolt_gpon_iwf_mac_table_mac_dropped_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_iwf_mac_table_mac_dropped_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_mac_table_mac_dropped_id_unpack(bcmolt_gpon_iwf_mac_table_mac_dropped_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_iwf_mac_table_mac_move_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_mac_table_mac_move_id_pack(bcmolt_gpon_iwf_mac_table_mac_move_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_iwf_mac_table_mac_move_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_mac_table_mac_move_id_unpack(bcmolt_gpon_iwf_mac_table_mac_move_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_iwf_mac_table_new_mac_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_mac_table_new_mac_id_pack(bcmolt_gpon_iwf_mac_table_new_mac_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_iwf_mac_table_new_mac_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_mac_table_new_mac_id_unpack(bcmolt_gpon_iwf_mac_table_new_mac_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_iwf_scan_mac_table_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_scan_mac_table_completed_id_pack(bcmolt_gpon_iwf_scan_mac_table_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_iwf_scan_mac_table_completed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_scan_mac_table_completed_id_unpack(bcmolt_gpon_iwf_scan_mac_table_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_iwf_scan_mac_table_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_scan_mac_table_id_pack(bcmolt_gpon_iwf_scan_mac_table_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_iwf_scan_mac_table_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_scan_mac_table_id_unpack(bcmolt_gpon_iwf_scan_mac_table_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_iwf_stat_alarm_cleared_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_stat_alarm_cleared_id_pack(bcmolt_gpon_iwf_stat_alarm_cleared_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_iwf_stat_alarm_cleared_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_stat_alarm_cleared_id_unpack(bcmolt_gpon_iwf_stat_alarm_cleared_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_iwf_stat_alarm_raised_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_stat_alarm_raised_id_pack(bcmolt_gpon_iwf_stat_alarm_raised_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_iwf_stat_alarm_raised_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_stat_alarm_raised_id_unpack(bcmolt_gpon_iwf_stat_alarm_raised_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_iwf_stat_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_stat_cfg_id_pack(bcmolt_gpon_iwf_stat_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_iwf_stat_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_stat_cfg_id_unpack(bcmolt_gpon_iwf_stat_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_iwf_stat_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_stat_id_pack(bcmolt_gpon_iwf_stat_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_iwf_stat_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_stat_id_unpack(bcmolt_gpon_iwf_stat_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_iwf_us_flow_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_us_flow_cfg_id_pack(bcmolt_gpon_iwf_us_flow_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_iwf_us_flow_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_us_flow_cfg_id_unpack(bcmolt_gpon_iwf_us_flow_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_iwf_us_flow_key_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_us_flow_key_id_pack(bcmolt_gpon_iwf_us_flow_key_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_iwf_us_flow_key_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_iwf_us_flow_key_id_unpack(bcmolt_gpon_iwf_us_flow_key_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_key_exchange_mode to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_key_exchange_mode_pack(bcmolt_key_exchange_mode this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_key_exchange_mode from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_key_exchange_mode_unpack(bcmolt_key_exchange_mode *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_ni_activate_all_onus_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_activate_all_onus_completed_id_pack(bcmolt_gpon_ni_activate_all_onus_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_ni_activate_all_onus_completed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_activate_all_onus_completed_id_unpack(bcmolt_gpon_ni_activate_all_onus_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_ni_auto_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_auto_cfg_id_pack(bcmolt_gpon_ni_auto_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_ni_auto_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_auto_cfg_id_unpack(bcmolt_gpon_ni_auto_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_ni_broadcast_ploam_packet_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_broadcast_ploam_packet_id_pack(bcmolt_gpon_ni_broadcast_ploam_packet_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_ni_broadcast_ploam_packet_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_broadcast_ploam_packet_id_unpack(bcmolt_gpon_ni_broadcast_ploam_packet_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_ni_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_cfg_id_pack(bcmolt_gpon_ni_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_ni_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_cfg_id_unpack(bcmolt_gpon_ni_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_ni_cpu_packets_failure_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_cpu_packets_failure_id_pack(bcmolt_gpon_ni_cpu_packets_failure_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_ni_cpu_packets_failure_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_cpu_packets_failure_id_unpack(bcmolt_gpon_ni_cpu_packets_failure_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_ni_cpu_packets_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_cpu_packets_id_pack(bcmolt_gpon_ni_cpu_packets_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_ni_cpu_packets_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_cpu_packets_id_unpack(bcmolt_gpon_ni_cpu_packets_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_ni_deactivate_all_onus_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_deactivate_all_onus_completed_id_pack(bcmolt_gpon_ni_deactivate_all_onus_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_ni_deactivate_all_onus_completed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_deactivate_all_onus_completed_id_unpack(bcmolt_gpon_ni_deactivate_all_onus_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_ni_disable_all_onus_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_disable_all_onus_completed_id_pack(bcmolt_gpon_ni_disable_all_onus_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_ni_disable_all_onus_completed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_disable_all_onus_completed_id_unpack(bcmolt_gpon_ni_disable_all_onus_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_ni_disable_serial_number_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_disable_serial_number_id_pack(bcmolt_gpon_ni_disable_serial_number_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_ni_disable_serial_number_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_disable_serial_number_id_unpack(bcmolt_gpon_ni_disable_serial_number_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_ni_enable_all_onus_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_enable_all_onus_completed_id_pack(bcmolt_gpon_ni_enable_all_onus_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_ni_enable_all_onus_completed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_enable_all_onus_completed_id_unpack(bcmolt_gpon_ni_enable_all_onus_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_ni_key_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_key_id_pack(bcmolt_gpon_ni_key_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_ni_key_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_key_id_unpack(bcmolt_gpon_ni_key_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_ni_los_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_los_id_pack(bcmolt_gpon_ni_los_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_ni_los_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_los_id_unpack(bcmolt_gpon_ni_los_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_ni_onu_discovered_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_onu_discovered_id_pack(bcmolt_gpon_ni_onu_discovered_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_ni_onu_discovered_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_onu_discovered_id_unpack(bcmolt_gpon_ni_onu_discovered_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_ni_onu_upgrade_complete_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_onu_upgrade_complete_id_pack(bcmolt_gpon_ni_onu_upgrade_complete_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_ni_onu_upgrade_complete_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_onu_upgrade_complete_id_unpack(bcmolt_gpon_ni_onu_upgrade_complete_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_ni_protection_switching_onus_ranged_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_protection_switching_onus_ranged_id_pack(bcmolt_gpon_ni_protection_switching_onus_ranged_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_ni_protection_switching_onus_ranged_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_protection_switching_onus_ranged_id_unpack(bcmolt_gpon_ni_protection_switching_onus_ranged_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_ni_protection_switching_switchover_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_protection_switching_switchover_completed_id_pack(bcmolt_gpon_ni_protection_switching_switchover_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_ni_protection_switching_switchover_completed_id from 
+ * bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_protection_switching_switchover_completed_id_unpack(bcmolt_gpon_ni_protection_switching_switchover_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_ni_protection_switching_traffic_resume_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_protection_switching_traffic_resume_id_pack(bcmolt_gpon_ni_protection_switching_traffic_resume_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_ni_protection_switching_traffic_resume_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_protection_switching_traffic_resume_id_unpack(bcmolt_gpon_ni_protection_switching_traffic_resume_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_id 
+ * to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_id_pack(bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_id this, bcmolt_buf *buf);
+
+/** Unpacks a 
+ * bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_id from 
+ * bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_id_unpack(bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_ni_reset_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_reset_id_pack(bcmolt_gpon_ni_reset_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_ni_reset_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_reset_id_unpack(bcmolt_gpon_ni_reset_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_ni_rogue_detection_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_rogue_detection_completed_id_pack(bcmolt_gpon_ni_rogue_detection_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_ni_rogue_detection_completed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_rogue_detection_completed_id_unpack(bcmolt_gpon_ni_rogue_detection_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_ni_rogue_detection_window_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_rogue_detection_window_id_pack(bcmolt_gpon_ni_rogue_detection_window_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_ni_rogue_detection_window_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_rogue_detection_window_id_unpack(bcmolt_gpon_ni_rogue_detection_window_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_ni_rogue_onu_special_map_cycle_start_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_rogue_onu_special_map_cycle_start_id_pack(bcmolt_gpon_ni_rogue_onu_special_map_cycle_start_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_ni_rogue_onu_special_map_cycle_start_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_rogue_onu_special_map_cycle_start_id_unpack(bcmolt_gpon_ni_rogue_onu_special_map_cycle_start_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_ni_serial_number_acquisition_cycle_start_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_serial_number_acquisition_cycle_start_id_pack(bcmolt_gpon_ni_serial_number_acquisition_cycle_start_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_ni_serial_number_acquisition_cycle_start_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_serial_number_acquisition_cycle_start_id_unpack(bcmolt_gpon_ni_serial_number_acquisition_cycle_start_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_ni_set_onu_state_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_set_onu_state_id_pack(bcmolt_gpon_ni_set_onu_state_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_ni_set_onu_state_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_set_onu_state_id_unpack(bcmolt_gpon_ni_set_onu_state_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_ni_set_pon_state_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_set_pon_state_id_pack(bcmolt_gpon_ni_set_pon_state_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_ni_set_pon_state_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_set_pon_state_id_unpack(bcmolt_gpon_ni_set_pon_state_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_ni_single_request_standby_pon_monitoring_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_single_request_standby_pon_monitoring_id_pack(bcmolt_gpon_ni_single_request_standby_pon_monitoring_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_ni_single_request_standby_pon_monitoring_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_single_request_standby_pon_monitoring_id_unpack(bcmolt_gpon_ni_single_request_standby_pon_monitoring_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_id_pack(bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_id from 
+ * bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_id_unpack(bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_ni_start_onu_upgrade_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_start_onu_upgrade_id_pack(bcmolt_gpon_ni_start_onu_upgrade_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_ni_start_onu_upgrade_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_start_onu_upgrade_id_unpack(bcmolt_gpon_ni_start_onu_upgrade_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_ni_stat_alarm_cleared_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_stat_alarm_cleared_id_pack(bcmolt_gpon_ni_stat_alarm_cleared_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_ni_stat_alarm_cleared_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_stat_alarm_cleared_id_unpack(bcmolt_gpon_ni_stat_alarm_cleared_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_ni_stat_alarm_raised_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_stat_alarm_raised_id_pack(bcmolt_gpon_ni_stat_alarm_raised_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_ni_stat_alarm_raised_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_stat_alarm_raised_id_unpack(bcmolt_gpon_ni_stat_alarm_raised_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_ni_stat_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_stat_cfg_id_pack(bcmolt_gpon_ni_stat_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_ni_stat_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_stat_cfg_id_unpack(bcmolt_gpon_ni_stat_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_ni_stat_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_stat_id_pack(bcmolt_gpon_ni_stat_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_ni_stat_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_stat_id_unpack(bcmolt_gpon_ni_stat_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_ni_state_change_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_state_change_completed_id_pack(bcmolt_gpon_ni_state_change_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_ni_state_change_completed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_state_change_completed_id_unpack(bcmolt_gpon_ni_state_change_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_ni_tod_request_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_tod_request_completed_id_pack(bcmolt_gpon_ni_tod_request_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_ni_tod_request_completed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_tod_request_completed_id_unpack(bcmolt_gpon_ni_tod_request_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_ni_tod_request_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_tod_request_id_pack(bcmolt_gpon_ni_tod_request_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_ni_tod_request_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_ni_tod_request_id_unpack(bcmolt_gpon_ni_tod_request_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_auto_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_auto_cfg_id_pack(bcmolt_gpon_onu_auto_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_auto_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_auto_cfg_id_unpack(bcmolt_gpon_onu_auto_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_ber_interval_configuration_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_ber_interval_configuration_completed_id_pack(bcmolt_gpon_onu_ber_interval_configuration_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_ber_interval_configuration_completed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_ber_interval_configuration_completed_id_unpack(bcmolt_gpon_onu_ber_interval_configuration_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_cfg_id_pack(bcmolt_gpon_onu_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_cfg_id_unpack(bcmolt_gpon_onu_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_change_power_level_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_change_power_level_id_pack(bcmolt_gpon_onu_change_power_level_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_change_power_level_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_change_power_level_id_unpack(bcmolt_gpon_onu_change_power_level_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_cpu_packet_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_cpu_packet_id_pack(bcmolt_gpon_onu_cpu_packet_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_cpu_packet_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_cpu_packet_id_unpack(bcmolt_gpon_onu_cpu_packet_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_cpu_packets_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_cpu_packets_id_pack(bcmolt_gpon_onu_cpu_packets_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_cpu_packets_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_cpu_packets_id_unpack(bcmolt_gpon_onu_cpu_packets_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_dfi_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_dfi_id_pack(bcmolt_gpon_onu_dfi_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_dfi_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_dfi_id_unpack(bcmolt_gpon_onu_dfi_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_dgi_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_dgi_id_pack(bcmolt_gpon_onu_dgi_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_dgi_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_dgi_id_unpack(bcmolt_gpon_onu_dgi_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_dowi_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_dowi_id_pack(bcmolt_gpon_onu_dowi_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_dowi_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_dowi_id_unpack(bcmolt_gpon_onu_dowi_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_err_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_err_id_pack(bcmolt_gpon_onu_err_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_err_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_err_id_unpack(bcmolt_gpon_onu_err_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_invalid_dbru_report_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_invalid_dbru_report_id_pack(bcmolt_gpon_onu_invalid_dbru_report_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_invalid_dbru_report_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_invalid_dbru_report_id_unpack(bcmolt_gpon_onu_invalid_dbru_report_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_key_exchange_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_key_exchange_completed_id_pack(bcmolt_gpon_onu_key_exchange_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_key_exchange_completed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_key_exchange_completed_id_unpack(bcmolt_gpon_onu_key_exchange_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_key_exchange_cycle_skipped_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_key_exchange_cycle_skipped_id_pack(bcmolt_gpon_onu_key_exchange_cycle_skipped_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_key_exchange_cycle_skipped_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_key_exchange_cycle_skipped_id_unpack(bcmolt_gpon_onu_key_exchange_cycle_skipped_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_key_exchange_decrypt_required_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_key_exchange_decrypt_required_id_pack(bcmolt_gpon_onu_key_exchange_decrypt_required_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_key_exchange_decrypt_required_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_key_exchange_decrypt_required_id_unpack(bcmolt_gpon_onu_key_exchange_decrypt_required_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_key_exchange_key_mismatch_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_key_exchange_key_mismatch_id_pack(bcmolt_gpon_onu_key_exchange_key_mismatch_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_key_exchange_key_mismatch_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_key_exchange_key_mismatch_id_unpack(bcmolt_gpon_onu_key_exchange_key_mismatch_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_key_exchange_key_request_timeout_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_key_exchange_key_request_timeout_id_pack(bcmolt_gpon_onu_key_exchange_key_request_timeout_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_key_exchange_key_request_timeout_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_key_exchange_key_request_timeout_id_unpack(bcmolt_gpon_onu_key_exchange_key_request_timeout_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_key_exchange_unconsecutive_index_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_key_exchange_unconsecutive_index_id_pack(bcmolt_gpon_onu_key_exchange_unconsecutive_index_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_key_exchange_unconsecutive_index_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_key_exchange_unconsecutive_index_id_unpack(bcmolt_gpon_onu_key_exchange_unconsecutive_index_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_key_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_key_id_pack(bcmolt_gpon_onu_key_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_key_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_key_id_unpack(bcmolt_gpon_onu_key_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_loai_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_loai_id_pack(bcmolt_gpon_onu_loai_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_loai_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_loai_id_unpack(bcmolt_gpon_onu_loai_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_loki_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_loki_id_pack(bcmolt_gpon_onu_loki_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_loki_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_loki_id_unpack(bcmolt_gpon_onu_loki_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_memi_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_memi_id_pack(bcmolt_gpon_onu_memi_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_memi_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_memi_id_unpack(bcmolt_gpon_onu_memi_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_omci_packet_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_omci_packet_id_pack(bcmolt_gpon_onu_omci_packet_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_omci_packet_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_omci_packet_id_unpack(bcmolt_gpon_onu_omci_packet_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_omci_port_id_configuration_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_omci_port_id_configuration_completed_id_pack(bcmolt_gpon_onu_omci_port_id_configuration_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_omci_port_id_configuration_completed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_omci_port_id_configuration_completed_id_unpack(bcmolt_gpon_onu_omci_port_id_configuration_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_onu_activation_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_onu_activation_completed_id_pack(bcmolt_gpon_onu_onu_activation_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_onu_activation_completed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_onu_activation_completed_id_unpack(bcmolt_gpon_onu_onu_activation_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_onu_activation_standby_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_onu_activation_standby_completed_id_pack(bcmolt_gpon_onu_onu_activation_standby_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_onu_activation_standby_completed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_onu_activation_standby_completed_id_unpack(bcmolt_gpon_onu_onu_activation_standby_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_onu_alarm_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_onu_alarm_id_pack(bcmolt_gpon_onu_onu_alarm_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_onu_alarm_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_onu_alarm_id_unpack(bcmolt_gpon_onu_onu_alarm_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_onu_deactivation_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_onu_deactivation_completed_id_pack(bcmolt_gpon_onu_onu_deactivation_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_onu_deactivation_completed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_onu_deactivation_completed_id_unpack(bcmolt_gpon_onu_onu_deactivation_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_onu_disable_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_onu_disable_completed_id_pack(bcmolt_gpon_onu_onu_disable_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_onu_disable_completed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_onu_disable_completed_id_unpack(bcmolt_gpon_onu_onu_disable_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_onu_enable_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_onu_enable_completed_id_pack(bcmolt_gpon_onu_onu_enable_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_onu_enable_completed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_onu_enable_completed_id_unpack(bcmolt_gpon_onu_onu_enable_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_optical_reflection_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_optical_reflection_id_pack(bcmolt_gpon_onu_optical_reflection_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_optical_reflection_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_optical_reflection_id_unpack(bcmolt_gpon_onu_optical_reflection_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_password_authentication_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_password_authentication_completed_id_pack(bcmolt_gpon_onu_password_authentication_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_password_authentication_completed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_password_authentication_completed_id_unpack(bcmolt_gpon_onu_password_authentication_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_pee_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_pee_id_pack(bcmolt_gpon_onu_pee_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_pee_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_pee_id_unpack(bcmolt_gpon_onu_pee_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_ploam_packet_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_ploam_packet_id_pack(bcmolt_gpon_onu_ploam_packet_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_ploam_packet_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_ploam_packet_id_unpack(bcmolt_gpon_onu_ploam_packet_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_possible_drift_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_possible_drift_id_pack(bcmolt_gpon_onu_possible_drift_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_possible_drift_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_possible_drift_id_unpack(bcmolt_gpon_onu_possible_drift_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_power_management_state_change_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_power_management_state_change_id_pack(bcmolt_gpon_onu_power_management_state_change_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_power_management_state_change_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_power_management_state_change_id_unpack(bcmolt_gpon_onu_power_management_state_change_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_pst_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_pst_id_pack(bcmolt_gpon_onu_pst_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_pst_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_pst_id_unpack(bcmolt_gpon_onu_pst_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_ranging_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_ranging_completed_id_pack(bcmolt_gpon_onu_ranging_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_ranging_completed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_ranging_completed_id_unpack(bcmolt_gpon_onu_ranging_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_rei_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_rei_id_pack(bcmolt_gpon_onu_rei_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_rei_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_rei_id_unpack(bcmolt_gpon_onu_rei_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_rssi_measurement_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_rssi_measurement_completed_id_pack(bcmolt_gpon_onu_rssi_measurement_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_rssi_measurement_completed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_rssi_measurement_completed_id_unpack(bcmolt_gpon_onu_rssi_measurement_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_rssi_measurement_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_rssi_measurement_id_pack(bcmolt_gpon_onu_rssi_measurement_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_rssi_measurement_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_rssi_measurement_id_unpack(bcmolt_gpon_onu_rssi_measurement_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_sdi_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_sdi_id_pack(bcmolt_gpon_onu_sdi_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_sdi_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_sdi_id_unpack(bcmolt_gpon_onu_sdi_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_set_onu_state_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_set_onu_state_id_pack(bcmolt_gpon_onu_set_onu_state_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_set_onu_state_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_set_onu_state_id_unpack(bcmolt_gpon_onu_set_onu_state_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_sfi_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_sfi_id_pack(bcmolt_gpon_onu_sfi_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_sfi_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_sfi_id_unpack(bcmolt_gpon_onu_sfi_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_stat_alarm_cleared_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_stat_alarm_cleared_id_pack(bcmolt_gpon_onu_stat_alarm_cleared_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_stat_alarm_cleared_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_stat_alarm_cleared_id_unpack(bcmolt_gpon_onu_stat_alarm_cleared_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_stat_alarm_raised_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_stat_alarm_raised_id_pack(bcmolt_gpon_onu_stat_alarm_raised_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_stat_alarm_raised_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_stat_alarm_raised_id_unpack(bcmolt_gpon_onu_stat_alarm_raised_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_stat_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_stat_cfg_id_pack(bcmolt_gpon_onu_stat_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_stat_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_stat_cfg_id_unpack(bcmolt_gpon_onu_stat_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_stat_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_stat_id_pack(bcmolt_gpon_onu_stat_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_stat_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_stat_id_unpack(bcmolt_gpon_onu_stat_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_sufi_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_sufi_id_pack(bcmolt_gpon_onu_sufi_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_sufi_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_sufi_id_unpack(bcmolt_gpon_onu_sufi_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_tiwi_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_tiwi_id_pack(bcmolt_gpon_onu_tiwi_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_tiwi_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_tiwi_id_unpack(bcmolt_gpon_onu_tiwi_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_omci_device_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_omci_device_id_pack(bcmolt_omci_device_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_omci_device_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_omci_device_id_unpack(bcmolt_omci_device_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_onu_upgrade_return_code to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_upgrade_return_code_pack(bcmolt_gpon_onu_upgrade_return_code this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_upgrade_return_code from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_onu_upgrade_return_code_unpack(bcmolt_gpon_onu_upgrade_return_code *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_omci_result_code to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_omci_result_code_pack(bcmolt_omci_result_code this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_omci_result_code from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_omci_result_code_unpack(bcmolt_omci_result_code *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_onu_state to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_onu_state_pack(bcmolt_onu_state this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_onu_state from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_onu_state_unpack(bcmolt_onu_state *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_rssi_location_sign to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_rssi_location_sign_pack(bcmolt_rssi_location_sign this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_rssi_location_sign from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_rssi_location_sign_unpack(bcmolt_rssi_location_sign *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_onu_post_discovery_mode to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_onu_post_discovery_mode_pack(bcmolt_onu_post_discovery_mode this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_onu_post_discovery_mode from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_onu_post_discovery_mode_unpack(bcmolt_onu_post_discovery_mode *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_trx_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_trx_cfg_id_pack(bcmolt_gpon_trx_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_trx_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_trx_cfg_id_unpack(bcmolt_gpon_trx_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_gpon_trx_key_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_gpon_trx_key_id_pack(bcmolt_gpon_trx_key_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_trx_key_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_gpon_trx_key_id_unpack(bcmolt_gpon_trx_key_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_image_transfer_status to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_image_transfer_status_pack(bcmolt_image_transfer_status this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_image_transfer_status from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_image_transfer_status_unpack(bcmolt_image_transfer_status *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_iwf_mode to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_iwf_mode_pack(bcmolt_iwf_mode this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_iwf_mode from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_iwf_mode_unpack(bcmolt_iwf_mode *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_log_entry_auto_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_log_entry_auto_cfg_id_pack(bcmolt_log_entry_auto_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_log_entry_auto_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_log_entry_auto_cfg_id_unpack(bcmolt_log_entry_auto_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_log_entry_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_log_entry_cfg_id_pack(bcmolt_log_entry_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_log_entry_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_log_entry_cfg_id_unpack(bcmolt_log_entry_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_log_entry_key_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_log_entry_key_id_pack(bcmolt_log_entry_key_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_log_entry_key_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_log_entry_key_id_unpack(bcmolt_log_entry_key_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_log_entry_stat_alarm_cleared_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_log_entry_stat_alarm_cleared_id_pack(bcmolt_log_entry_stat_alarm_cleared_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_log_entry_stat_alarm_cleared_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_log_entry_stat_alarm_cleared_id_unpack(bcmolt_log_entry_stat_alarm_cleared_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_log_entry_stat_alarm_raised_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_log_entry_stat_alarm_raised_id_pack(bcmolt_log_entry_stat_alarm_raised_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_log_entry_stat_alarm_raised_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_log_entry_stat_alarm_raised_id_unpack(bcmolt_log_entry_stat_alarm_raised_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_log_entry_stat_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_log_entry_stat_cfg_id_pack(bcmolt_log_entry_stat_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_log_entry_stat_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_log_entry_stat_cfg_id_unpack(bcmolt_log_entry_stat_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_log_entry_stat_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_log_entry_stat_id_pack(bcmolt_log_entry_stat_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_log_entry_stat_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_log_entry_stat_id_unpack(bcmolt_log_entry_stat_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_log_file_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_log_file_id_pack(bcmolt_log_file_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_log_file_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_log_file_id_unpack(bcmolt_log_file_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_log_level to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_log_level_pack(bcmolt_log_level this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_log_level from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_log_level_unpack(bcmolt_log_level *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_log_style to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_log_style_pack(bcmolt_log_style this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_log_style from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_log_style_unpack(bcmolt_log_style *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_log_type to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_log_type_pack(bcmolt_log_type this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_log_type from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_log_type_unpack(bcmolt_log_type *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_logger_auto_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_logger_auto_cfg_id_pack(bcmolt_logger_auto_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_logger_auto_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_logger_auto_cfg_id_unpack(bcmolt_logger_auto_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_logger_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_logger_cfg_id_pack(bcmolt_logger_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_logger_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_logger_cfg_id_unpack(bcmolt_logger_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_logger_clear_log_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_logger_clear_log_id_pack(bcmolt_logger_clear_log_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_logger_clear_log_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_logger_clear_log_id_unpack(bcmolt_logger_clear_log_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_logger_key_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_logger_key_id_pack(bcmolt_logger_key_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_logger_key_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_logger_key_id_unpack(bcmolt_logger_key_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_logger_stat_alarm_cleared_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_logger_stat_alarm_cleared_id_pack(bcmolt_logger_stat_alarm_cleared_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_logger_stat_alarm_cleared_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_logger_stat_alarm_cleared_id_unpack(bcmolt_logger_stat_alarm_cleared_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_logger_stat_alarm_raised_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_logger_stat_alarm_raised_id_pack(bcmolt_logger_stat_alarm_raised_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_logger_stat_alarm_raised_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_logger_stat_alarm_raised_id_unpack(bcmolt_logger_stat_alarm_raised_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_logger_stat_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_logger_stat_cfg_id_pack(bcmolt_logger_stat_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_logger_stat_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_logger_stat_cfg_id_unpack(bcmolt_logger_stat_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_logger_stat_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_logger_stat_id_pack(bcmolt_logger_stat_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_logger_stat_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_logger_stat_id_unpack(bcmolt_logger_stat_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_mac_table_miss_fallback to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_mac_table_miss_fallback_pack(bcmolt_mac_table_miss_fallback this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_mac_table_miss_fallback from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_mac_table_miss_fallback_unpack(bcmolt_mac_table_miss_fallback *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_mac_table_learning_mode to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_mac_table_learning_mode_pack(bcmolt_mac_table_learning_mode this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_mac_table_learning_mode from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_mac_table_learning_mode_unpack(bcmolt_mac_table_learning_mode *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_mapping_tag_method to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_mapping_tag_method_pack(bcmolt_mapping_tag_method this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_mapping_tag_method from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_mapping_tag_method_unpack(bcmolt_mapping_tag_method *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_nni_auto_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_nni_auto_cfg_id_pack(bcmolt_nni_auto_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_nni_auto_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_nni_auto_cfg_id_unpack(bcmolt_nni_auto_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_nni_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_nni_cfg_id_pack(bcmolt_nni_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_nni_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_nni_cfg_id_unpack(bcmolt_nni_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_nni_connection to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_nni_connection_pack(bcmolt_nni_connection this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_nni_connection from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_nni_connection_unpack(bcmolt_nni_connection *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_nni_key_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_nni_key_id_pack(bcmolt_nni_key_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_nni_key_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_nni_key_id_unpack(bcmolt_nni_key_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_trivalent to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_trivalent_pack(bcmolt_trivalent this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_trivalent from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_trivalent_unpack(bcmolt_trivalent *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_nni_serdes_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_nni_serdes_cfg_id_pack(bcmolt_nni_serdes_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_nni_serdes_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_nni_serdes_cfg_id_unpack(bcmolt_nni_serdes_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_nni_serdes_key_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_nni_serdes_key_id_pack(bcmolt_nni_serdes_key_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_nni_serdes_key_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_nni_serdes_key_id_unpack(bcmolt_nni_serdes_key_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_nni_stat_alarm_cleared_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_nni_stat_alarm_cleared_id_pack(bcmolt_nni_stat_alarm_cleared_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_nni_stat_alarm_cleared_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_nni_stat_alarm_cleared_id_unpack(bcmolt_nni_stat_alarm_cleared_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_nni_stat_alarm_raised_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_nni_stat_alarm_raised_id_pack(bcmolt_nni_stat_alarm_raised_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_nni_stat_alarm_raised_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_nni_stat_alarm_raised_id_unpack(bcmolt_nni_stat_alarm_raised_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_nni_stat_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_nni_stat_cfg_id_pack(bcmolt_nni_stat_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_nni_stat_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_nni_stat_cfg_id_unpack(bcmolt_nni_stat_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_nni_stat_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_nni_stat_id_pack(bcmolt_nni_stat_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_nni_stat_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_nni_stat_id_unpack(bcmolt_nni_stat_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_nni_status_changed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_nni_status_changed_id_pack(bcmolt_nni_status_changed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_nni_status_changed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_nni_status_changed_id_unpack(bcmolt_nni_status_changed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_odn_class to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_odn_class_pack(bcmolt_odn_class this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_odn_class from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_odn_class_unpack(bcmolt_odn_class *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_omci_port_id_operation to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_omci_port_id_operation_pack(bcmolt_omci_port_id_operation this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_omci_port_id_operation from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_omci_port_id_operation_unpack(bcmolt_omci_port_id_operation *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_onu_operation to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_onu_operation_pack(bcmolt_onu_operation this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_onu_operation from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_onu_operation_unpack(bcmolt_onu_operation *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_onu_power_level to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_onu_power_level_pack(bcmolt_onu_power_level this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_onu_power_level from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_onu_power_level_unpack(bcmolt_onu_power_level *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_tc_protocol to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_tc_protocol_pack(bcmolt_tc_protocol this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_tc_protocol from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_tc_protocol_unpack(bcmolt_tc_protocol *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_packet_injection_error to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_packet_injection_error_pack(bcmolt_packet_injection_error this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_packet_injection_error from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_packet_injection_error_unpack(bcmolt_packet_injection_error *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_packet_type to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_packet_type_pack(bcmolt_packet_type this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_packet_type from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_packet_type_unpack(bcmolt_packet_type *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_password_authentication_fail_reason to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_password_authentication_fail_reason_pack(bcmolt_password_authentication_fail_reason this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_password_authentication_fail_reason from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_password_authentication_fail_reason_unpack(bcmolt_password_authentication_fail_reason *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_polarity to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_polarity_pack(bcmolt_polarity this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_polarity from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_polarity_unpack(bcmolt_polarity *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_polling_interval to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_polling_interval_pack(bcmolt_polling_interval this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_polling_interval from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_polling_interval_unpack(bcmolt_polling_interval *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_pon_operation to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_pon_operation_pack(bcmolt_pon_operation this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_pon_operation from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_pon_operation_unpack(bcmolt_pon_operation *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_pon_protection_switching_options to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_pon_protection_switching_options_pack(bcmolt_pon_protection_switching_options this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_pon_protection_switching_options from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_pon_protection_switching_options_unpack(bcmolt_pon_protection_switching_options *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_pon_state to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_pon_state_pack(bcmolt_pon_state this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_pon_state from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_pon_state_unpack(bcmolt_pon_state *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_power_levelling_control to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_power_levelling_control_pack(bcmolt_power_levelling_control this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_power_levelling_control from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_power_levelling_control_unpack(bcmolt_power_levelling_control *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_power_management_transition_reason to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_power_management_transition_reason_pack(bcmolt_power_management_transition_reason this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_power_management_transition_reason from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_power_management_transition_reason_unpack(bcmolt_power_management_transition_reason *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_prbs_polynomial to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_prbs_polynomial_pack(bcmolt_prbs_polynomial this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_prbs_polynomial from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_prbs_polynomial_unpack(bcmolt_prbs_polynomial *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_prbs_checker_mode to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_prbs_checker_mode_pack(bcmolt_prbs_checker_mode this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_prbs_checker_mode from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_prbs_checker_mode_unpack(bcmolt_prbs_checker_mode *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_prbs_lock_state to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_prbs_lock_state_pack(bcmolt_prbs_lock_state this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_prbs_lock_state from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_prbs_lock_state_unpack(bcmolt_prbs_lock_state *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_raman_mitigation_mode to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_raman_mitigation_mode_pack(bcmolt_raman_mitigation_mode this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_raman_mitigation_mode from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_raman_mitigation_mode_unpack(bcmolt_raman_mitigation_mode *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_ranging_fail_reason to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_ranging_fail_reason_pack(bcmolt_ranging_fail_reason this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_ranging_fail_reason from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_ranging_fail_reason_unpack(bcmolt_ranging_fail_reason *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_registration_behavior to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_registration_behavior_pack(bcmolt_registration_behavior this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_registration_behavior from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_registration_behavior_unpack(bcmolt_registration_behavior *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_request_registration_fail_reason to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_request_registration_fail_reason_pack(bcmolt_request_registration_fail_reason this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_request_registration_fail_reason from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_request_registration_fail_reason_unpack(bcmolt_request_registration_fail_reason *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_result to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_result_pack(bcmolt_result this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_result from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_result_unpack(bcmolt_result *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_rogue_detection_algorithm_type to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_rogue_detection_algorithm_type_pack(bcmolt_rogue_detection_algorithm_type this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_rogue_detection_algorithm_type from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_rogue_detection_algorithm_type_unpack(bcmolt_rogue_detection_algorithm_type *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_rogue_detection_window to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_rogue_detection_window_pack(bcmolt_rogue_detection_window this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_rogue_detection_window from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_rogue_detection_window_unpack(bcmolt_rogue_detection_window *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_rogue_measurement_result to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_rogue_measurement_result_pack(bcmolt_rogue_measurement_result this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_rogue_measurement_result from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_rogue_measurement_result_unpack(bcmolt_rogue_measurement_result *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_rogue_scan_status to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_rogue_scan_status_pack(bcmolt_rogue_scan_status this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_rogue_scan_status from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_rogue_scan_status_unpack(bcmolt_rogue_scan_status *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_rssi_measurement_fail_reason to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_rssi_measurement_fail_reason_pack(bcmolt_rssi_measurement_fail_reason this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_rssi_measurement_fail_reason from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_rssi_measurement_fail_reason_unpack(bcmolt_rssi_measurement_fail_reason *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_secure_mutual_authentication_fail_reason to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_secure_mutual_authentication_fail_reason_pack(bcmolt_secure_mutual_authentication_fail_reason this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_secure_mutual_authentication_fail_reason from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_secure_mutual_authentication_fail_reason_unpack(bcmolt_secure_mutual_authentication_fail_reason *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_serdes_ranging_mode to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_serdes_ranging_mode_pack(bcmolt_serdes_ranging_mode this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_serdes_ranging_mode from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_serdes_ranging_mode_unpack(bcmolt_serdes_ranging_mode *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_serdes_instance to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_serdes_instance_pack(bcmolt_serdes_instance this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_serdes_instance from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_serdes_instance_unpack(bcmolt_serdes_instance *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_shaper_mode to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_shaper_mode_pack(bcmolt_shaper_mode this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_shaper_mode from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_shaper_mode_unpack(bcmolt_shaper_mode *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_software_error_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_software_error_cfg_id_pack(bcmolt_software_error_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_software_error_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_software_error_cfg_id_unpack(bcmolt_software_error_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_software_error_key_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_software_error_key_id_pack(bcmolt_software_error_key_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_software_error_key_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_software_error_key_id_unpack(bcmolt_software_error_key_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_stat_condition_type to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_stat_condition_type_pack(bcmolt_stat_condition_type this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_stat_condition_type from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_stat_condition_type_unpack(bcmolt_stat_condition_type *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_switch_over_type_c_onu_state to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_switch_over_type_c_onu_state_pack(bcmolt_switch_over_type_c_onu_state this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_switch_over_type_c_onu_state from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_switch_over_type_c_onu_state_unpack(bcmolt_switch_over_type_c_onu_state *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_system_mode to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_system_mode_pack(bcmolt_system_mode this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_system_mode from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_system_mode_unpack(bcmolt_system_mode *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_us_operating_wavelength_bands to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_us_operating_wavelength_bands_pack(bcmolt_us_operating_wavelength_bands this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_us_operating_wavelength_bands from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_us_operating_wavelength_bands_unpack(bcmolt_us_operating_wavelength_bands *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_traffic_resume_result to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_traffic_resume_result_pack(bcmolt_traffic_resume_result this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_traffic_resume_result from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_traffic_resume_result_unpack(bcmolt_traffic_resume_result *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_trx_calibration_auto_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_trx_calibration_auto_cfg_id_pack(bcmolt_trx_calibration_auto_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_trx_calibration_auto_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_trx_calibration_auto_cfg_id_unpack(bcmolt_trx_calibration_auto_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_trx_calibration_capture_window_and_statistic_completed_id to 
+ * bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_trx_calibration_capture_window_and_statistic_completed_id_pack(bcmolt_trx_calibration_capture_window_and_statistic_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_trx_calibration_capture_window_and_statistic_completed_id 
+ * from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_trx_calibration_capture_window_and_statistic_completed_id_unpack(bcmolt_trx_calibration_capture_window_and_statistic_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_trx_calibration_key_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_trx_calibration_key_id_pack(bcmolt_trx_calibration_key_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_trx_calibration_key_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_trx_calibration_key_id_unpack(bcmolt_trx_calibration_key_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_trx_calibration_start_capture_window_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_trx_calibration_start_capture_window_id_pack(bcmolt_trx_calibration_start_capture_window_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_trx_calibration_start_capture_window_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_trx_calibration_start_capture_window_id_unpack(bcmolt_trx_calibration_start_capture_window_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_trx_calibration_stop_capture_window_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_trx_calibration_stop_capture_window_id_pack(bcmolt_trx_calibration_stop_capture_window_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_trx_calibration_stop_capture_window_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_trx_calibration_stop_capture_window_id_unpack(bcmolt_trx_calibration_stop_capture_window_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_trx_calibration_trigger to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_trx_calibration_trigger_pack(bcmolt_trx_calibration_trigger this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_trx_calibration_trigger from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_trx_calibration_trigger_unpack(bcmolt_trx_calibration_trigger *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_trx_calibration_trigger_position to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_trx_calibration_trigger_position_pack(bcmolt_trx_calibration_trigger_position this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_trx_calibration_trigger_position from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_trx_calibration_trigger_position_unpack(bcmolt_trx_calibration_trigger_position *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_trx_calibration_window_mode to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_trx_calibration_window_mode_pack(bcmolt_trx_calibration_window_mode this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_trx_calibration_window_mode from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_trx_calibration_window_mode_unpack(bcmolt_trx_calibration_window_mode *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_trx_type to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_trx_type_pack(bcmolt_trx_type this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_trx_type from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_trx_type_unpack(bcmolt_trx_type *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_tune_in_fail_reason to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_tune_in_fail_reason_pack(bcmolt_tune_in_fail_reason this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_tune_in_fail_reason from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_tune_in_fail_reason_unpack(bcmolt_tune_in_fail_reason *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_tune_out_fail_reason to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_tune_out_fail_reason_pack(bcmolt_tune_out_fail_reason this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_tune_out_fail_reason from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_tune_out_fail_reason_unpack(bcmolt_tune_out_fail_reason *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_uart_baudrate to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_uart_baudrate_pack(bcmolt_uart_baudrate this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_uart_baudrate from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_uart_baudrate_unpack(bcmolt_uart_baudrate *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_us_gem_port_destination to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_us_gem_port_destination_pack(bcmolt_us_gem_port_destination this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_us_gem_port_destination from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_us_gem_port_destination_unpack(bcmolt_us_gem_port_destination *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_us_vlan_action to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_us_vlan_action_pack(bcmolt_us_vlan_action this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_us_vlan_action from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_us_vlan_action_unpack(bcmolt_us_vlan_action *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_vlan_to_flow_mapping_method to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_vlan_to_flow_mapping_method_pack(bcmolt_vlan_to_flow_mapping_method this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_vlan_to_flow_mapping_method from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_vlan_to_flow_mapping_method_unpack(bcmolt_vlan_to_flow_mapping_method *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_alloc_auto_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_alloc_auto_cfg_id_pack(bcmolt_xgpon_alloc_auto_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_alloc_auto_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_alloc_auto_cfg_id_unpack(bcmolt_xgpon_alloc_auto_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_alloc_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_alloc_cfg_id_pack(bcmolt_xgpon_alloc_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_alloc_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_alloc_cfg_id_unpack(bcmolt_xgpon_alloc_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_alloc_configuration_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_alloc_configuration_completed_id_pack(bcmolt_xgpon_alloc_configuration_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_alloc_configuration_completed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_alloc_configuration_completed_id_unpack(bcmolt_xgpon_alloc_configuration_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_alloc_get_alloc_stats_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_alloc_get_alloc_stats_completed_id_pack(bcmolt_xgpon_alloc_get_alloc_stats_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_alloc_get_alloc_stats_completed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_alloc_get_alloc_stats_completed_id_unpack(bcmolt_xgpon_alloc_get_alloc_stats_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_alloc_get_stats_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_alloc_get_stats_id_pack(bcmolt_xgpon_alloc_get_stats_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_alloc_get_stats_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_alloc_get_stats_id_unpack(bcmolt_xgpon_alloc_get_stats_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_alloc_key_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_alloc_key_id_pack(bcmolt_xgpon_alloc_key_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_alloc_key_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_alloc_key_id_unpack(bcmolt_xgpon_alloc_key_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_alloc_set_state_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_alloc_set_state_id_pack(bcmolt_xgpon_alloc_set_state_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_alloc_set_state_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_alloc_set_state_id_unpack(bcmolt_xgpon_alloc_set_state_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_alloc_stat_alarm_cleared_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_alloc_stat_alarm_cleared_id_pack(bcmolt_xgpon_alloc_stat_alarm_cleared_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_alloc_stat_alarm_cleared_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_alloc_stat_alarm_cleared_id_unpack(bcmolt_xgpon_alloc_stat_alarm_cleared_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_alloc_stat_alarm_raised_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_alloc_stat_alarm_raised_id_pack(bcmolt_xgpon_alloc_stat_alarm_raised_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_alloc_stat_alarm_raised_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_alloc_stat_alarm_raised_id_unpack(bcmolt_xgpon_alloc_stat_alarm_raised_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_alloc_stat_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_alloc_stat_cfg_id_pack(bcmolt_xgpon_alloc_stat_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_alloc_stat_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_alloc_stat_cfg_id_unpack(bcmolt_xgpon_alloc_stat_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_alloc_stat_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_alloc_stat_id_pack(bcmolt_xgpon_alloc_stat_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_alloc_stat_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_alloc_stat_id_unpack(bcmolt_xgpon_alloc_stat_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_gem_port_auto_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_auto_cfg_id_pack(bcmolt_xgpon_gem_port_auto_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_gem_port_auto_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_auto_cfg_id_unpack(bcmolt_xgpon_gem_port_auto_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_gem_port_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_cfg_id_pack(bcmolt_xgpon_gem_port_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_gem_port_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_cfg_id_unpack(bcmolt_xgpon_gem_port_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_gem_port_key_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_key_id_pack(bcmolt_xgpon_gem_port_key_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_gem_port_key_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_key_id_unpack(bcmolt_xgpon_gem_port_key_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_gem_port_stat_alarm_cleared_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_stat_alarm_cleared_id_pack(bcmolt_xgpon_gem_port_stat_alarm_cleared_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_gem_port_stat_alarm_cleared_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_stat_alarm_cleared_id_unpack(bcmolt_xgpon_gem_port_stat_alarm_cleared_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_gem_port_stat_alarm_raised_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_stat_alarm_raised_id_pack(bcmolt_xgpon_gem_port_stat_alarm_raised_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_gem_port_stat_alarm_raised_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_stat_alarm_raised_id_unpack(bcmolt_xgpon_gem_port_stat_alarm_raised_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_gem_port_stat_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_stat_cfg_id_pack(bcmolt_xgpon_gem_port_stat_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_gem_port_stat_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_stat_cfg_id_unpack(bcmolt_xgpon_gem_port_stat_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_gem_port_stat_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_stat_id_pack(bcmolt_xgpon_gem_port_stat_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_gem_port_stat_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_stat_id_unpack(bcmolt_xgpon_gem_port_stat_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_gem_port_state to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_state_pack(bcmolt_xgpon_gem_port_state this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_gem_port_state from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_state_unpack(bcmolt_xgpon_gem_port_state *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_iwf_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_iwf_cfg_id_pack(bcmolt_xgpon_iwf_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_iwf_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_iwf_cfg_id_unpack(bcmolt_xgpon_iwf_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_iwf_key_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_iwf_key_id_pack(bcmolt_xgpon_iwf_key_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_iwf_key_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_iwf_key_id_unpack(bcmolt_xgpon_iwf_key_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_ni_activate_all_onus_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_activate_all_onus_completed_id_pack(bcmolt_xgpon_ni_activate_all_onus_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_ni_activate_all_onus_completed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_activate_all_onus_completed_id_unpack(bcmolt_xgpon_ni_activate_all_onus_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_ni_adjust_tx_wavelength_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_adjust_tx_wavelength_id_pack(bcmolt_xgpon_ni_adjust_tx_wavelength_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_ni_adjust_tx_wavelength_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_adjust_tx_wavelength_id_unpack(bcmolt_xgpon_ni_adjust_tx_wavelength_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_ni_auto_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_auto_cfg_id_pack(bcmolt_xgpon_ni_auto_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_ni_auto_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_auto_cfg_id_unpack(bcmolt_xgpon_ni_auto_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_ni_broadcast_ploam_packet_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_broadcast_ploam_packet_id_pack(bcmolt_xgpon_ni_broadcast_ploam_packet_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_ni_broadcast_ploam_packet_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_broadcast_ploam_packet_id_unpack(bcmolt_xgpon_ni_broadcast_ploam_packet_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_ni_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_cfg_id_pack(bcmolt_xgpon_ni_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_ni_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_cfg_id_unpack(bcmolt_xgpon_ni_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_ni_cpu_packets_failure_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_cpu_packets_failure_id_pack(bcmolt_xgpon_ni_cpu_packets_failure_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_ni_cpu_packets_failure_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_cpu_packets_failure_id_unpack(bcmolt_xgpon_ni_cpu_packets_failure_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_ni_cpu_packets_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_cpu_packets_id_pack(bcmolt_xgpon_ni_cpu_packets_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_ni_cpu_packets_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_cpu_packets_id_unpack(bcmolt_xgpon_ni_cpu_packets_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_ni_deactivate_all_onus_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_deactivate_all_onus_completed_id_pack(bcmolt_xgpon_ni_deactivate_all_onus_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_ni_deactivate_all_onus_completed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_deactivate_all_onus_completed_id_unpack(bcmolt_xgpon_ni_deactivate_all_onus_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_ni_disable_all_onus_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_disable_all_onus_completed_id_pack(bcmolt_xgpon_ni_disable_all_onus_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_ni_disable_all_onus_completed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_disable_all_onus_completed_id_unpack(bcmolt_xgpon_ni_disable_all_onus_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_ni_disable_serial_number_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_disable_serial_number_id_pack(bcmolt_xgpon_ni_disable_serial_number_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_ni_disable_serial_number_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_disable_serial_number_id_unpack(bcmolt_xgpon_ni_disable_serial_number_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_ni_enable_all_onus_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_enable_all_onus_completed_id_pack(bcmolt_xgpon_ni_enable_all_onus_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_ni_enable_all_onus_completed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_enable_all_onus_completed_id_unpack(bcmolt_xgpon_ni_enable_all_onus_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_ni_key_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_key_id_pack(bcmolt_xgpon_ni_key_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_ni_key_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_key_id_unpack(bcmolt_xgpon_ni_key_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_ni_los_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_los_id_pack(bcmolt_xgpon_ni_los_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_ni_los_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_los_id_unpack(bcmolt_xgpon_ni_los_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_ni_onu_discovered_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_onu_discovered_id_pack(bcmolt_xgpon_ni_onu_discovered_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_ni_onu_discovered_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_onu_discovered_id_unpack(bcmolt_xgpon_ni_onu_discovered_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_ni_onu_upgrade_complete_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_onu_upgrade_complete_id_pack(bcmolt_xgpon_ni_onu_upgrade_complete_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_ni_onu_upgrade_complete_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_onu_upgrade_complete_id_unpack(bcmolt_xgpon_ni_onu_upgrade_complete_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_ni_protection_switching_onus_ranged_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_protection_switching_onus_ranged_id_pack(bcmolt_xgpon_ni_protection_switching_onus_ranged_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_ni_protection_switching_onus_ranged_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_protection_switching_onus_ranged_id_unpack(bcmolt_xgpon_ni_protection_switching_onus_ranged_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_ni_protection_switching_switchover_completed_id to 
+ * bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_protection_switching_switchover_completed_id_pack(bcmolt_xgpon_ni_protection_switching_switchover_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_ni_protection_switching_switchover_completed_id from 
+ * bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_protection_switching_switchover_completed_id_unpack(bcmolt_xgpon_ni_protection_switching_switchover_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_ni_protection_switching_traffic_resume_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_protection_switching_traffic_resume_id_pack(bcmolt_xgpon_ni_protection_switching_traffic_resume_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_ni_protection_switching_traffic_resume_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_protection_switching_traffic_resume_id_unpack(bcmolt_xgpon_ni_protection_switching_traffic_resume_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_ni_reset_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_reset_id_pack(bcmolt_xgpon_ni_reset_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_ni_reset_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_reset_id_unpack(bcmolt_xgpon_ni_reset_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_ni_rogue_detection_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_rogue_detection_completed_id_pack(bcmolt_xgpon_ni_rogue_detection_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_ni_rogue_detection_completed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_rogue_detection_completed_id_unpack(bcmolt_xgpon_ni_rogue_detection_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_ni_rogue_detection_window_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_rogue_detection_window_id_pack(bcmolt_xgpon_ni_rogue_detection_window_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_ni_rogue_detection_window_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_rogue_detection_window_id_unpack(bcmolt_xgpon_ni_rogue_detection_window_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_ni_rogue_onu_special_map_cycle_start_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_rogue_onu_special_map_cycle_start_id_pack(bcmolt_xgpon_ni_rogue_onu_special_map_cycle_start_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_ni_rogue_onu_special_map_cycle_start_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_rogue_onu_special_map_cycle_start_id_unpack(bcmolt_xgpon_ni_rogue_onu_special_map_cycle_start_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_ni_run_special_bw_map_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_run_special_bw_map_id_pack(bcmolt_xgpon_ni_run_special_bw_map_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_ni_run_special_bw_map_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_run_special_bw_map_id_unpack(bcmolt_xgpon_ni_run_special_bw_map_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_ni_serial_number_acquisition_cycle_start_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_serial_number_acquisition_cycle_start_id_pack(bcmolt_xgpon_ni_serial_number_acquisition_cycle_start_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_ni_serial_number_acquisition_cycle_start_id from 
+ * bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_serial_number_acquisition_cycle_start_id_unpack(bcmolt_xgpon_ni_serial_number_acquisition_cycle_start_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_ni_set_onu_state_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_set_onu_state_id_pack(bcmolt_xgpon_ni_set_onu_state_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_ni_set_onu_state_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_set_onu_state_id_unpack(bcmolt_xgpon_ni_set_onu_state_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_ni_set_pon_state_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_set_pon_state_id_pack(bcmolt_xgpon_ni_set_pon_state_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_ni_set_pon_state_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_set_pon_state_id_unpack(bcmolt_xgpon_ni_set_pon_state_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_ni_single_request_standby_pon_monitoring_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_single_request_standby_pon_monitoring_id_pack(bcmolt_xgpon_ni_single_request_standby_pon_monitoring_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_ni_single_request_standby_pon_monitoring_id from 
+ * bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_single_request_standby_pon_monitoring_id_unpack(bcmolt_xgpon_ni_single_request_standby_pon_monitoring_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_id_pack(bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_id from 
+ * bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_id_unpack(bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_ni_start_onu_upgrade_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_start_onu_upgrade_id_pack(bcmolt_xgpon_ni_start_onu_upgrade_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_ni_start_onu_upgrade_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_start_onu_upgrade_id_unpack(bcmolt_xgpon_ni_start_onu_upgrade_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_ni_stat_alarm_cleared_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_stat_alarm_cleared_id_pack(bcmolt_xgpon_ni_stat_alarm_cleared_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_ni_stat_alarm_cleared_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_stat_alarm_cleared_id_unpack(bcmolt_xgpon_ni_stat_alarm_cleared_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_ni_stat_alarm_raised_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_stat_alarm_raised_id_pack(bcmolt_xgpon_ni_stat_alarm_raised_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_ni_stat_alarm_raised_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_stat_alarm_raised_id_unpack(bcmolt_xgpon_ni_stat_alarm_raised_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_ni_stat_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_stat_cfg_id_pack(bcmolt_xgpon_ni_stat_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_ni_stat_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_stat_cfg_id_unpack(bcmolt_xgpon_ni_stat_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_ni_stat_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_stat_id_pack(bcmolt_xgpon_ni_stat_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_ni_stat_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_stat_id_unpack(bcmolt_xgpon_ni_stat_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_ni_state_change_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_state_change_completed_id_pack(bcmolt_xgpon_ni_state_change_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_ni_state_change_completed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_state_change_completed_id_unpack(bcmolt_xgpon_ni_state_change_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_ni_tod_request_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_tod_request_completed_id_pack(bcmolt_xgpon_ni_tod_request_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_ni_tod_request_completed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_tod_request_completed_id_unpack(bcmolt_xgpon_ni_tod_request_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_ni_tod_request_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_tod_request_id_pack(bcmolt_xgpon_ni_tod_request_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_ni_tod_request_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_ni_tod_request_id_unpack(bcmolt_xgpon_ni_tod_request_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_num_of_onus to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_num_of_onus_pack(bcmolt_xgpon_num_of_onus this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_num_of_onus from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_num_of_onus_unpack(bcmolt_xgpon_num_of_onus *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_adjust_tx_wavelength_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_adjust_tx_wavelength_id_pack(bcmolt_xgpon_onu_adjust_tx_wavelength_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_adjust_tx_wavelength_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_adjust_tx_wavelength_id_unpack(bcmolt_xgpon_onu_adjust_tx_wavelength_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_auto_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_auto_cfg_id_pack(bcmolt_xgpon_onu_auto_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_auto_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_auto_cfg_id_unpack(bcmolt_xgpon_onu_auto_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_cfg_id_pack(bcmolt_xgpon_onu_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_cfg_id_unpack(bcmolt_xgpon_onu_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_change_power_levelling_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_change_power_levelling_id_pack(bcmolt_xgpon_onu_change_power_levelling_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_change_power_levelling_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_change_power_levelling_id_unpack(bcmolt_xgpon_onu_change_power_levelling_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_cpu_packet_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_cpu_packet_id_pack(bcmolt_xgpon_onu_cpu_packet_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_cpu_packet_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_cpu_packet_id_unpack(bcmolt_xgpon_onu_cpu_packet_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_cpu_packets_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_cpu_packets_id_pack(bcmolt_xgpon_onu_cpu_packets_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_cpu_packets_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_cpu_packets_id_unpack(bcmolt_xgpon_onu_cpu_packets_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_dfi_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_dfi_id_pack(bcmolt_xgpon_onu_dfi_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_dfi_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_dfi_id_unpack(bcmolt_xgpon_onu_dfi_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_dgi_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_dgi_id_pack(bcmolt_xgpon_onu_dgi_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_dgi_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_dgi_id_unpack(bcmolt_xgpon_onu_dgi_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_dowi_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_dowi_id_pack(bcmolt_xgpon_onu_dowi_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_dowi_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_dowi_id_unpack(bcmolt_xgpon_onu_dowi_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_get_power_consumption_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_get_power_consumption_id_pack(bcmolt_xgpon_onu_get_power_consumption_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_get_power_consumption_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_get_power_consumption_id_unpack(bcmolt_xgpon_onu_get_power_consumption_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_get_power_level_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_get_power_level_id_pack(bcmolt_xgpon_onu_get_power_level_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_get_power_level_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_get_power_level_id_unpack(bcmolt_xgpon_onu_get_power_level_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_invalid_dbru_report_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_invalid_dbru_report_id_pack(bcmolt_xgpon_onu_invalid_dbru_report_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_invalid_dbru_report_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_invalid_dbru_report_id_unpack(bcmolt_xgpon_onu_invalid_dbru_report_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_key_exchange_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_key_exchange_completed_id_pack(bcmolt_xgpon_onu_key_exchange_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_key_exchange_completed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_key_exchange_completed_id_unpack(bcmolt_xgpon_onu_key_exchange_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_key_exchange_cycle_skipped_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_key_exchange_cycle_skipped_id_pack(bcmolt_xgpon_onu_key_exchange_cycle_skipped_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_key_exchange_cycle_skipped_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_key_exchange_cycle_skipped_id_unpack(bcmolt_xgpon_onu_key_exchange_cycle_skipped_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_key_exchange_key_mismatch_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_key_exchange_key_mismatch_id_pack(bcmolt_xgpon_onu_key_exchange_key_mismatch_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_key_exchange_key_mismatch_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_key_exchange_key_mismatch_id_unpack(bcmolt_xgpon_onu_key_exchange_key_mismatch_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_key_exchange_key_request_timeout_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_key_exchange_key_request_timeout_id_pack(bcmolt_xgpon_onu_key_exchange_key_request_timeout_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_key_exchange_key_request_timeout_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_key_exchange_key_request_timeout_id_unpack(bcmolt_xgpon_onu_key_exchange_key_request_timeout_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_key_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_key_id_pack(bcmolt_xgpon_onu_key_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_key_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_key_id_unpack(bcmolt_xgpon_onu_key_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_looci_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_looci_id_pack(bcmolt_xgpon_onu_looci_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_looci_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_looci_id_unpack(bcmolt_xgpon_onu_looci_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_omci_packet_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_omci_packet_id_pack(bcmolt_xgpon_onu_omci_packet_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_omci_packet_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_omci_packet_id_unpack(bcmolt_xgpon_onu_omci_packet_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_onu_activation_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_activation_completed_id_pack(bcmolt_xgpon_onu_onu_activation_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_onu_activation_completed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_activation_completed_id_unpack(bcmolt_xgpon_onu_onu_activation_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_onu_alarm_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_alarm_id_pack(bcmolt_xgpon_onu_onu_alarm_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_onu_alarm_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_alarm_id_unpack(bcmolt_xgpon_onu_onu_alarm_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_onu_deactivation_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_deactivation_completed_id_pack(bcmolt_xgpon_onu_onu_deactivation_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_onu_deactivation_completed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_deactivation_completed_id_unpack(bcmolt_xgpon_onu_onu_deactivation_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_onu_disable_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_disable_completed_id_pack(bcmolt_xgpon_onu_onu_disable_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_onu_disable_completed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_disable_completed_id_unpack(bcmolt_xgpon_onu_onu_disable_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_onu_enable_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_enable_completed_id_pack(bcmolt_xgpon_onu_onu_enable_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_onu_enable_completed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_enable_completed_id_unpack(bcmolt_xgpon_onu_onu_enable_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_onu_tuning_in_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_tuning_in_completed_id_pack(bcmolt_xgpon_onu_onu_tuning_in_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_onu_tuning_in_completed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_tuning_in_completed_id_unpack(bcmolt_xgpon_onu_onu_tuning_in_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_onu_tuning_in_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_tuning_in_id_pack(bcmolt_xgpon_onu_onu_tuning_in_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_onu_tuning_in_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_tuning_in_id_unpack(bcmolt_xgpon_onu_onu_tuning_in_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_onu_tuning_out_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_tuning_out_completed_id_pack(bcmolt_xgpon_onu_onu_tuning_out_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_onu_tuning_out_completed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_tuning_out_completed_id_unpack(bcmolt_xgpon_onu_onu_tuning_out_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_onu_tuning_out_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_tuning_out_id_pack(bcmolt_xgpon_onu_onu_tuning_out_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_onu_tuning_out_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_tuning_out_id_unpack(bcmolt_xgpon_onu_onu_tuning_out_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_optical_reflection_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_optical_reflection_id_pack(bcmolt_xgpon_onu_optical_reflection_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_optical_reflection_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_optical_reflection_id_unpack(bcmolt_xgpon_onu_optical_reflection_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_ploam_packet_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_ploam_packet_id_pack(bcmolt_xgpon_onu_ploam_packet_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_ploam_packet_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_ploam_packet_id_unpack(bcmolt_xgpon_onu_ploam_packet_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_possible_drift_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_possible_drift_id_pack(bcmolt_xgpon_onu_possible_drift_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_possible_drift_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_possible_drift_id_unpack(bcmolt_xgpon_onu_possible_drift_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_power_consumption_report_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_power_consumption_report_id_pack(bcmolt_xgpon_onu_power_consumption_report_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_power_consumption_report_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_power_consumption_report_id_unpack(bcmolt_xgpon_onu_power_consumption_report_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_power_level_report_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_power_level_report_id_pack(bcmolt_xgpon_onu_power_level_report_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_power_level_report_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_power_level_report_id_unpack(bcmolt_xgpon_onu_power_level_report_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_power_management_state_change_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_power_management_state_change_id_pack(bcmolt_xgpon_onu_power_management_state_change_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_power_management_state_change_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_power_management_state_change_id_unpack(bcmolt_xgpon_onu_power_management_state_change_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_pqsi_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_pqsi_id_pack(bcmolt_xgpon_onu_pqsi_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_pqsi_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_pqsi_id_unpack(bcmolt_xgpon_onu_pqsi_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_ranging_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_ranging_completed_id_pack(bcmolt_xgpon_onu_ranging_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_ranging_completed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_ranging_completed_id_unpack(bcmolt_xgpon_onu_ranging_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_registration_id_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_registration_id_id_pack(bcmolt_xgpon_onu_registration_id_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_registration_id_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_registration_id_id_unpack(bcmolt_xgpon_onu_registration_id_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_request_registration_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_request_registration_id_pack(bcmolt_xgpon_onu_request_registration_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_request_registration_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_request_registration_id_unpack(bcmolt_xgpon_onu_request_registration_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_rssi_measurement_completed_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_rssi_measurement_completed_id_pack(bcmolt_xgpon_onu_rssi_measurement_completed_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_rssi_measurement_completed_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_rssi_measurement_completed_id_unpack(bcmolt_xgpon_onu_rssi_measurement_completed_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_rssi_measurement_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_rssi_measurement_id_pack(bcmolt_xgpon_onu_rssi_measurement_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_rssi_measurement_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_rssi_measurement_id_unpack(bcmolt_xgpon_onu_rssi_measurement_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_sdi_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_sdi_id_pack(bcmolt_xgpon_onu_sdi_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_sdi_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_sdi_id_unpack(bcmolt_xgpon_onu_sdi_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_secure_mutual_authentication_failure_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_secure_mutual_authentication_failure_id_pack(bcmolt_xgpon_onu_secure_mutual_authentication_failure_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_secure_mutual_authentication_failure_id from 
+ * bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_secure_mutual_authentication_failure_id_unpack(bcmolt_xgpon_onu_secure_mutual_authentication_failure_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_secure_mutual_authentication_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_secure_mutual_authentication_id_pack(bcmolt_xgpon_onu_secure_mutual_authentication_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_secure_mutual_authentication_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_secure_mutual_authentication_id_unpack(bcmolt_xgpon_onu_secure_mutual_authentication_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_set_onu_state_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_set_onu_state_id_pack(bcmolt_xgpon_onu_set_onu_state_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_set_onu_state_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_set_onu_state_id_unpack(bcmolt_xgpon_onu_set_onu_state_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_sfi_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_sfi_id_pack(bcmolt_xgpon_onu_sfi_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_sfi_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_sfi_id_unpack(bcmolt_xgpon_onu_sfi_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_stat_alarm_cleared_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_stat_alarm_cleared_id_pack(bcmolt_xgpon_onu_stat_alarm_cleared_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_stat_alarm_cleared_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_stat_alarm_cleared_id_unpack(bcmolt_xgpon_onu_stat_alarm_cleared_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_stat_alarm_raised_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_stat_alarm_raised_id_pack(bcmolt_xgpon_onu_stat_alarm_raised_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_stat_alarm_raised_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_stat_alarm_raised_id_unpack(bcmolt_xgpon_onu_stat_alarm_raised_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_stat_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_stat_cfg_id_pack(bcmolt_xgpon_onu_stat_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_stat_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_stat_cfg_id_unpack(bcmolt_xgpon_onu_stat_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_stat_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_stat_id_pack(bcmolt_xgpon_onu_stat_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_stat_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_stat_id_unpack(bcmolt_xgpon_onu_stat_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_sufi_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_sufi_id_pack(bcmolt_xgpon_onu_sufi_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_sufi_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_sufi_id_unpack(bcmolt_xgpon_onu_sufi_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_tiwi_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_tiwi_id_pack(bcmolt_xgpon_onu_tiwi_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_tiwi_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_tiwi_id_unpack(bcmolt_xgpon_onu_tiwi_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_onu_tuning_response_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_tuning_response_id_pack(bcmolt_xgpon_onu_tuning_response_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_tuning_response_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_onu_tuning_response_id_unpack(bcmolt_xgpon_onu_tuning_response_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_serdes_ranging_mode to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_serdes_ranging_mode_pack(bcmolt_xgpon_serdes_ranging_mode this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_serdes_ranging_mode from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_serdes_ranging_mode_unpack(bcmolt_xgpon_serdes_ranging_mode *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_trx_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_trx_cfg_id_pack(bcmolt_xgpon_trx_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_trx_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_trx_cfg_id_unpack(bcmolt_xgpon_trx_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_trx_key_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_trx_key_id_pack(bcmolt_xgpon_trx_key_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_trx_key_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_trx_key_id_unpack(bcmolt_xgpon_trx_key_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xgpon_trx_type to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xgpon_trx_type_pack(bcmolt_xgpon_trx_type this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_trx_type from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xgpon_trx_type_unpack(bcmolt_xgpon_trx_type *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xpon_serdes_cfg_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xpon_serdes_cfg_id_pack(bcmolt_xpon_serdes_cfg_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xpon_serdes_cfg_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xpon_serdes_cfg_id_unpack(bcmolt_xpon_serdes_cfg_id *this, bcmolt_buf *buf);
+
+/** Packs a bcmolt_xpon_serdes_key_id to bytes 
+ *
+ * \param this The enumeration to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the pack was successful 
+ */
+bcmos_bool bcmolt_xpon_serdes_key_id_pack(bcmolt_xpon_serdes_key_id this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xpon_serdes_key_id from bytes 
+ *
+ * \param this Pointer to the enumeration to unpack 
+ * \param buf Pointer to the buffer to write to 
+ * \return Whether or not the unpack was successful 
+ */
+bcmos_bool bcmolt_xpon_serdes_key_id_unpack(bcmolt_xpon_serdes_key_id *this, bcmolt_buf *buf);
+
+/** Initializes a bcmolt_actual_schedulershaper struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_actual_schedulershaper_set_default(bcmolt_actual_schedulershaper *this);
+
+/** Packs a bcmolt_actual_schedulershaper to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_actual_schedulershaper_pack(const bcmolt_actual_schedulershaper *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_actual_schedulershaper from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_actual_schedulershaper_unpack(bcmolt_actual_schedulershaper *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_actual_schedulershaper struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_actual_schedulershaper_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_actual_schedulershaper is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_actual_schedulershaper_bounds_check(const bcmolt_actual_schedulershaper *this);
+
+/** Initializes a bcmolt_aes_key struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_aes_key_set_default(bcmolt_aes_key *this);
+
+/** Packs a bcmolt_aes_key to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_aes_key_pack(const bcmolt_aes_key *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_aes_key from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_aes_key_unpack(bcmolt_aes_key *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_aes_key struct and collects memory requirements 
+ * above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_aes_key_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_aes_key is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_aes_key_bounds_check(const bcmolt_aes_key *this);
+
+/** Initializes a bcmolt_api_capture_buffer_reader struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_api_capture_buffer_reader_set_default(bcmolt_api_capture_buffer_reader *this);
+
+/** Packs a bcmolt_api_capture_buffer_reader to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_api_capture_buffer_reader_pack(const bcmolt_api_capture_buffer_reader *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_api_capture_buffer_reader from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_api_capture_buffer_reader_unpack(bcmolt_api_capture_buffer_reader *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_api_capture_buffer_reader struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_api_capture_buffer_reader_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_api_capture_buffer_reader is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_api_capture_buffer_reader_bounds_check(const bcmolt_api_capture_buffer_reader *this);
+
+/** Initializes a bcmolt_api_capture_config struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_api_capture_config_set_default(bcmolt_api_capture_config *this);
+
+/** Packs a bcmolt_api_capture_config to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_api_capture_config_pack(const bcmolt_api_capture_config *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_api_capture_config from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_api_capture_config_unpack(bcmolt_api_capture_config *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_api_capture_config struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_api_capture_config_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_api_capture_config is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_api_capture_config_bounds_check(const bcmolt_api_capture_config *this);
+
+/** Initializes a bcmolt_api_capture_stats struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_api_capture_stats_set_default(bcmolt_api_capture_stats *this);
+
+/** Packs a bcmolt_api_capture_stats to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_api_capture_stats_pack(const bcmolt_api_capture_stats *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_api_capture_stats from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_api_capture_stats_unpack(bcmolt_api_capture_stats *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_api_capture_stats struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_api_capture_stats_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_api_capture_stats is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_api_capture_stats_bounds_check(const bcmolt_api_capture_stats *this);
+
+/** Initializes a bcmolt_bounds struct.  This sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_bounds_set_default(bcmolt_bounds *this);
+
+/** Packs a bcmolt_bounds to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_bounds_pack(const bcmolt_bounds *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_bounds from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_bounds_unpack(bcmolt_bounds *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_bounds struct and collects memory requirements 
+ * above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_bounds_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_bounds is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_bounds_bounds_check(const bcmolt_bounds *this);
+
+/** Initializes a bcmolt_arr_bounds_8 struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_arr_bounds_8_set_default(bcmolt_arr_bounds_8 *this);
+
+/** Packs a bcmolt_arr_bounds_8 to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_bounds_8_pack(const bcmolt_arr_bounds_8 *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_arr_bounds_8 from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_bounds_8_unpack(bcmolt_arr_bounds_8 *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_arr_bounds_8 struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_arr_bounds_8_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_arr_bounds_8 is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_bounds_8_bounds_check(const bcmolt_arr_bounds_8 *this);
+
+/** Initializes a bcmolt_arr_calibration_record_8 struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_arr_calibration_record_8_set_default(bcmolt_arr_calibration_record_8 *this);
+
+/** Packs a bcmolt_arr_calibration_record_8 to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_calibration_record_8_pack(const bcmolt_arr_calibration_record_8 *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_arr_calibration_record_8 from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_calibration_record_8_unpack(bcmolt_arr_calibration_record_8 *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_arr_calibration_record_8 struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_arr_calibration_record_8_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_arr_calibration_record_8 is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_calibration_record_8_bounds_check(const bcmolt_arr_calibration_record_8 *this);
+
+/** Initializes a bcmolt_ds_frequency_offset struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_ds_frequency_offset_set_default(bcmolt_ds_frequency_offset *this);
+
+/** Packs a bcmolt_ds_frequency_offset to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ds_frequency_offset_pack(const bcmolt_ds_frequency_offset *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_ds_frequency_offset from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ds_frequency_offset_unpack(bcmolt_ds_frequency_offset *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_ds_frequency_offset struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_ds_frequency_offset_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_ds_frequency_offset is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ds_frequency_offset_bounds_check(const bcmolt_ds_frequency_offset *this);
+
+/** Initializes a bcmolt_channel_profile struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_channel_profile_set_default(bcmolt_channel_profile *this);
+
+/** Packs a bcmolt_channel_profile to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_channel_profile_pack(const bcmolt_channel_profile *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_channel_profile from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_channel_profile_unpack(bcmolt_channel_profile *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_channel_profile struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_channel_profile_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_channel_profile is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_channel_profile_bounds_check(const bcmolt_channel_profile *this);
+
+/** Initializes a bcmolt_arr_channel_profile_8 struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_arr_channel_profile_8_set_default(bcmolt_arr_channel_profile_8 *this);
+
+/** Packs a bcmolt_arr_channel_profile_8 to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_channel_profile_8_pack(const bcmolt_arr_channel_profile_8 *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_arr_channel_profile_8 from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_channel_profile_8_unpack(bcmolt_arr_channel_profile_8 *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_arr_channel_profile_8 struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_arr_channel_profile_8_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_arr_channel_profile_8 is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_channel_profile_8_bounds_check(const bcmolt_arr_channel_profile_8 *this);
+
+/** Initializes a bcmolt_power_consumption_channel_report struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_power_consumption_channel_report_set_default(bcmolt_power_consumption_channel_report *this);
+
+/** Packs a bcmolt_power_consumption_channel_report to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_power_consumption_channel_report_pack(const bcmolt_power_consumption_channel_report *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_power_consumption_channel_report from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_power_consumption_channel_report_unpack(bcmolt_power_consumption_channel_report *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_power_consumption_channel_report struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_power_consumption_channel_report_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_power_consumption_channel_report is out of 
+ * bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_power_consumption_channel_report_bounds_check(const bcmolt_power_consumption_channel_report *this);
+
+/** Initializes a bcmolt_arr_power_consumption_channel_report_8 struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_arr_power_consumption_channel_report_8_set_default(bcmolt_arr_power_consumption_channel_report_8 *this);
+
+/** Packs a bcmolt_arr_power_consumption_channel_report_8 to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_power_consumption_channel_report_8_pack(const bcmolt_arr_power_consumption_channel_report_8 *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_arr_power_consumption_channel_report_8 from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_power_consumption_channel_report_8_unpack(bcmolt_arr_power_consumption_channel_report_8 *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_arr_power_consumption_channel_report_8 struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_arr_power_consumption_channel_report_8_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_arr_power_consumption_channel_report_8 is 
+ * out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_power_consumption_channel_report_8_bounds_check(const bcmolt_arr_power_consumption_channel_report_8 *this);
+
+/** Initializes a bcmolt_arr_u16_2 struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_arr_u16_2_set_default(bcmolt_arr_u16_2 *this);
+
+/** Packs a bcmolt_arr_u16_2 to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_u16_2_pack(const bcmolt_arr_u16_2 *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_arr_u16_2 from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_u16_2_unpack(bcmolt_arr_u16_2 *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_arr_u16_2 struct and collects memory requirements 
+ * above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_arr_u16_2_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_arr_u16_2 is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_u16_2_bounds_check(const bcmolt_arr_u16_2 *this);
+
+/** Initializes a bcmolt_arr_u16_2_hex struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_arr_u16_2_hex_set_default(bcmolt_arr_u16_2_hex *this);
+
+/** Packs a bcmolt_arr_u16_2_hex to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_u16_2_hex_pack(const bcmolt_arr_u16_2_hex *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_arr_u16_2_hex from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_u16_2_hex_unpack(bcmolt_arr_u16_2_hex *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_arr_u16_2_hex struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_arr_u16_2_hex_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_arr_u16_2_hex is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_u16_2_hex_bounds_check(const bcmolt_arr_u16_2_hex *this);
+
+/** Initializes a bcmolt_arr_u16_5_hex struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_arr_u16_5_hex_set_default(bcmolt_arr_u16_5_hex *this);
+
+/** Packs a bcmolt_arr_u16_5_hex to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_u16_5_hex_pack(const bcmolt_arr_u16_5_hex *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_arr_u16_5_hex from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_u16_5_hex_unpack(bcmolt_arr_u16_5_hex *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_arr_u16_5_hex struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_arr_u16_5_hex_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_arr_u16_5_hex is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_u16_5_hex_bounds_check(const bcmolt_arr_u16_5_hex *this);
+
+/** Initializes a bcmolt_arr_u16_7 struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_arr_u16_7_set_default(bcmolt_arr_u16_7 *this);
+
+/** Packs a bcmolt_arr_u16_7 to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_u16_7_pack(const bcmolt_arr_u16_7 *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_arr_u16_7 from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_u16_7_unpack(bcmolt_arr_u16_7 *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_arr_u16_7 struct and collects memory requirements 
+ * above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_arr_u16_7_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_arr_u16_7 is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_u16_7_bounds_check(const bcmolt_arr_u16_7 *this);
+
+/** Initializes a bcmolt_arr_u32_6 struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_arr_u32_6_set_default(bcmolt_arr_u32_6 *this);
+
+/** Packs a bcmolt_arr_u32_6 to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_u32_6_pack(const bcmolt_arr_u32_6 *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_arr_u32_6 from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_u32_6_unpack(bcmolt_arr_u32_6 *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_arr_u32_6 struct and collects memory requirements 
+ * above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_arr_u32_6_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_arr_u32_6 is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_u32_6_bounds_check(const bcmolt_arr_u32_6 *this);
+
+/** Initializes a bcmolt_arr_u8_10 struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_arr_u8_10_set_default(bcmolt_arr_u8_10 *this);
+
+/** Packs a bcmolt_arr_u8_10 to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_u8_10_pack(const bcmolt_arr_u8_10 *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_arr_u8_10 from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_u8_10_unpack(bcmolt_arr_u8_10 *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_arr_u8_10 struct and collects memory requirements 
+ * above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_arr_u8_10_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_arr_u8_10 is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_u8_10_bounds_check(const bcmolt_arr_u8_10 *this);
+
+/** Initializes a bcmolt_arr_u8_12 struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_arr_u8_12_set_default(bcmolt_arr_u8_12 *this);
+
+/** Packs a bcmolt_arr_u8_12 to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_u8_12_pack(const bcmolt_arr_u8_12 *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_arr_u8_12 from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_u8_12_unpack(bcmolt_arr_u8_12 *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_arr_u8_12 struct and collects memory requirements 
+ * above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_arr_u8_12_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_arr_u8_12 is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_u8_12_bounds_check(const bcmolt_arr_u8_12 *this);
+
+/** Initializes a bcmolt_arr_u8_13 struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_arr_u8_13_set_default(bcmolt_arr_u8_13 *this);
+
+/** Packs a bcmolt_arr_u8_13 to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_u8_13_pack(const bcmolt_arr_u8_13 *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_arr_u8_13 from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_u8_13_unpack(bcmolt_arr_u8_13 *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_arr_u8_13 struct and collects memory requirements 
+ * above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_arr_u8_13_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_arr_u8_13 is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_u8_13_bounds_check(const bcmolt_arr_u8_13 *this);
+
+/** Initializes a bcmolt_arr_u8_36 struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_arr_u8_36_set_default(bcmolt_arr_u8_36 *this);
+
+/** Packs a bcmolt_arr_u8_36 to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_u8_36_pack(const bcmolt_arr_u8_36 *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_arr_u8_36 from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_u8_36_unpack(bcmolt_arr_u8_36 *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_arr_u8_36 struct and collects memory requirements 
+ * above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_arr_u8_36_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_arr_u8_36 is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_u8_36_bounds_check(const bcmolt_arr_u8_36 *this);
+
+/** Initializes a bcmolt_arr_u8_4 struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_arr_u8_4_set_default(bcmolt_arr_u8_4 *this);
+
+/** Packs a bcmolt_arr_u8_4 to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_u8_4_pack(const bcmolt_arr_u8_4 *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_arr_u8_4 from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_u8_4_unpack(bcmolt_arr_u8_4 *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_arr_u8_4 struct and collects memory requirements 
+ * above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_arr_u8_4_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_arr_u8_4 is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_u8_4_bounds_check(const bcmolt_arr_u8_4 *this);
+
+/** Initializes a bcmolt_arr_u8_40 struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_arr_u8_40_set_default(bcmolt_arr_u8_40 *this);
+
+/** Packs a bcmolt_arr_u8_40 to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_u8_40_pack(const bcmolt_arr_u8_40 *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_arr_u8_40 from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_u8_40_unpack(bcmolt_arr_u8_40 *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_arr_u8_40 struct and collects memory requirements 
+ * above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_arr_u8_40_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_arr_u8_40 is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_u8_40_bounds_check(const bcmolt_arr_u8_40 *this);
+
+/** Initializes a bcmolt_xgpon_burst_profile struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_xgpon_burst_profile_set_default(bcmolt_xgpon_burst_profile *this);
+
+/** Packs a bcmolt_xgpon_burst_profile to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_burst_profile_pack(const bcmolt_xgpon_burst_profile *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_burst_profile from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_burst_profile_unpack(bcmolt_xgpon_burst_profile *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_xgpon_burst_profile struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_burst_profile_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_xgpon_burst_profile is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_burst_profile_bounds_check(const bcmolt_xgpon_burst_profile *this);
+
+/** Initializes a bcmolt_arr_xgpon_burst_profile_4 struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_arr_xgpon_burst_profile_4_set_default(bcmolt_arr_xgpon_burst_profile_4 *this);
+
+/** Packs a bcmolt_arr_xgpon_burst_profile_4 to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_xgpon_burst_profile_4_pack(const bcmolt_arr_xgpon_burst_profile_4 *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_arr_xgpon_burst_profile_4 from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_xgpon_burst_profile_4_unpack(bcmolt_arr_xgpon_burst_profile_4 *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_arr_xgpon_burst_profile_4 struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_arr_xgpon_burst_profile_4_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_arr_xgpon_burst_profile_4 is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_xgpon_burst_profile_4_bounds_check(const bcmolt_arr_xgpon_burst_profile_4 *this);
+
+/** Initializes a bcmolt_xgpon_trx_configuration struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_xgpon_trx_configuration_set_default(bcmolt_xgpon_trx_configuration *this);
+
+/** Packs a bcmolt_xgpon_trx_configuration to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_trx_configuration_pack(const bcmolt_xgpon_trx_configuration *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_trx_configuration from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_trx_configuration_unpack(bcmolt_xgpon_trx_configuration *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_xgpon_trx_configuration struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_trx_configuration_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_xgpon_trx_configuration is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_trx_configuration_bounds_check(const bcmolt_xgpon_trx_configuration *this);
+
+/** Initializes a bcmolt_arr_xgpon_trx_configuration_4 struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_arr_xgpon_trx_configuration_4_set_default(bcmolt_arr_xgpon_trx_configuration_4 *this);
+
+/** Packs a bcmolt_arr_xgpon_trx_configuration_4 to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_xgpon_trx_configuration_4_pack(const bcmolt_arr_xgpon_trx_configuration_4 *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_arr_xgpon_trx_configuration_4 from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_xgpon_trx_configuration_4_unpack(bcmolt_arr_xgpon_trx_configuration_4 *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_arr_xgpon_trx_configuration_4 struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_arr_xgpon_trx_configuration_4_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_arr_xgpon_trx_configuration_4 is out of 
+ * bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_arr_xgpon_trx_configuration_4_bounds_check(const bcmolt_arr_xgpon_trx_configuration_4 *this);
+
+/** Initializes a bcmolt_automatic_onu_deactivation struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_automatic_onu_deactivation_set_default(bcmolt_automatic_onu_deactivation *this);
+
+/** Packs a bcmolt_automatic_onu_deactivation to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_automatic_onu_deactivation_pack(const bcmolt_automatic_onu_deactivation *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_automatic_onu_deactivation from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_automatic_onu_deactivation_unpack(bcmolt_automatic_onu_deactivation *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_automatic_onu_deactivation struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_automatic_onu_deactivation_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_automatic_onu_deactivation is out of 
+ * bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_automatic_onu_deactivation_bounds_check(const bcmolt_automatic_onu_deactivation *this);
+
+/** Initializes a bcmolt_resync_control struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_resync_control_set_default(bcmolt_resync_control *this);
+
+/** Packs a bcmolt_resync_control to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_resync_control_pack(const bcmolt_resync_control *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_resync_control from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_resync_control_unpack(bcmolt_resync_control *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_resync_control struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_resync_control_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_resync_control is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_resync_control_bounds_check(const bcmolt_resync_control *this);
+
+/** Initializes a bcmolt_bcdr_resync_pattern_configuration struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_bcdr_resync_pattern_configuration_set_default(bcmolt_bcdr_resync_pattern_configuration *this);
+
+/** Packs a bcmolt_bcdr_resync_pattern_configuration to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_bcdr_resync_pattern_configuration_pack(const bcmolt_bcdr_resync_pattern_configuration *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_bcdr_resync_pattern_configuration from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_bcdr_resync_pattern_configuration_unpack(bcmolt_bcdr_resync_pattern_configuration *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_bcdr_resync_pattern_configuration struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_bcdr_resync_pattern_configuration_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_bcdr_resync_pattern_configuration is out 
+ * of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_bcdr_resync_pattern_configuration_bounds_check(const bcmolt_bcdr_resync_pattern_configuration *this);
+
+/** Initializes a bcmolt_ber_monitor_params struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_ber_monitor_params_set_default(bcmolt_ber_monitor_params *this);
+
+/** Packs a bcmolt_ber_monitor_params to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ber_monitor_params_pack(const bcmolt_ber_monitor_params *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_ber_monitor_params from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ber_monitor_params_unpack(bcmolt_ber_monitor_params *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_ber_monitor_params struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_ber_monitor_params_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_ber_monitor_params is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ber_monitor_params_bounds_check(const bcmolt_ber_monitor_params *this);
+
+/** Initializes a bcmolt_cbr_rt_allocation_profile struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_cbr_rt_allocation_profile_set_default(bcmolt_cbr_rt_allocation_profile *this);
+
+/** Packs a bcmolt_cbr_rt_allocation_profile to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_cbr_rt_allocation_profile_pack(const bcmolt_cbr_rt_allocation_profile *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_cbr_rt_allocation_profile from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_cbr_rt_allocation_profile_unpack(bcmolt_cbr_rt_allocation_profile *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_cbr_rt_allocation_profile struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_cbr_rt_allocation_profile_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_cbr_rt_allocation_profile is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_cbr_rt_allocation_profile_bounds_check(const bcmolt_cbr_rt_allocation_profile *this);
+
+/** Initializes a bcmolt_ddr_test_completed struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_ddr_test_completed_set_default(bcmolt_ddr_test_completed *this);
+
+/** Packs a bcmolt_ddr_test_completed to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ddr_test_completed_pack(const bcmolt_ddr_test_completed *this, bcmolt_buf *buf);
+
+/** Gets the number of bytes that a bcmolt_ddr_test_completed would occupy on 
+ * the wire 
+ *
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_ddr_test_completed_get_packed_length(const bcmolt_ddr_test_completed *this);
+
+/** Unpacks a bcmolt_ddr_test_completed from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ddr_test_completed_unpack(bcmolt_ddr_test_completed *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_ddr_test_completed struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_ddr_test_completed_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_ddr_test_completed is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ddr_test_completed_bounds_check(const bcmolt_ddr_test_completed *this);
+
+/** Initializes a bcmolt_debug_device_cfg struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_debug_device_cfg_set_default(bcmolt_debug_device_cfg *this);
+
+/** Packs a bcmolt_debug_device_cfg to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_debug_device_cfg_pack(const bcmolt_debug_device_cfg *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_debug_device_cfg from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_debug_device_cfg_unpack(bcmolt_debug_device_cfg *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_debug_device_cfg struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_debug_device_cfg_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_debug_device_cfg is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_debug_device_cfg_bounds_check(const bcmolt_debug_device_cfg *this);
+
+/** Initializes a bcmolt_device_nni_speed struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_device_nni_speed_set_default(bcmolt_device_nni_speed *this);
+
+/** Packs a bcmolt_device_nni_speed to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_nni_speed_pack(const bcmolt_device_nni_speed *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_device_nni_speed from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_nni_speed_unpack(bcmolt_device_nni_speed *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_device_nni_speed struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_device_nni_speed_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_device_nni_speed is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_nni_speed_bounds_check(const bcmolt_device_nni_speed *this);
+
+/* \cond UNDOCUMENTED_SYMBOLS */
+
+/** Initializes a bcmolt_dummy_struct_for_embedded_types struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_dummy_struct_for_embedded_types_set_default(bcmolt_dummy_struct_for_embedded_types *this);
+
+/** Packs a bcmolt_dummy_struct_for_embedded_types to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_dummy_struct_for_embedded_types_pack(const bcmolt_dummy_struct_for_embedded_types *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_dummy_struct_for_embedded_types from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_dummy_struct_for_embedded_types_unpack(bcmolt_dummy_struct_for_embedded_types *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_dummy_struct_for_embedded_types struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_dummy_struct_for_embedded_types_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_dummy_struct_for_embedded_types is out of 
+ * bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_dummy_struct_for_embedded_types_bounds_check(const bcmolt_dummy_struct_for_embedded_types *this);
+
+/* \endcond */
+
+/** Initializes a bcmolt_embedded_image_entry struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_embedded_image_entry_set_default(bcmolt_embedded_image_entry *this);
+
+/** Packs a bcmolt_embedded_image_entry to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_embedded_image_entry_pack(const bcmolt_embedded_image_entry *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_embedded_image_entry from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_embedded_image_entry_unpack(bcmolt_embedded_image_entry *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_embedded_image_entry struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_embedded_image_entry_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_embedded_image_entry is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_embedded_image_entry_bounds_check(const bcmolt_embedded_image_entry *this);
+
+/** Initializes a bcmolt_embedded_image_entry_list_u8 struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_embedded_image_entry_list_u8_set_default(bcmolt_embedded_image_entry_list_u8 *this);
+
+/** Packs a bcmolt_embedded_image_entry_list_u8 to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_embedded_image_entry_list_u8_pack(const bcmolt_embedded_image_entry_list_u8 *this, bcmolt_buf *buf);
+
+/** Gets the number of bytes that a bcmolt_embedded_image_entry_list_u8 would 
+ * occupy on the wire 
+ *
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_embedded_image_entry_list_u8_get_packed_length(const bcmolt_embedded_image_entry_list_u8 *this);
+
+/** Unpacks a bcmolt_embedded_image_entry_list_u8 from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_embedded_image_entry_list_u8_unpack(bcmolt_embedded_image_entry_list_u8 *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_embedded_image_entry_list_u8 struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_embedded_image_entry_list_u8_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_embedded_image_entry_list_u8 is out of 
+ * bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_embedded_image_entry_list_u8_bounds_check(const bcmolt_embedded_image_entry_list_u8 *this);
+
+/** Initializes a bcmolt_encryption_information_container struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_encryption_information_container_set_default(bcmolt_encryption_information_container *this);
+
+/** Packs a bcmolt_encryption_information_container to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_encryption_information_container_pack(const bcmolt_encryption_information_container *this, bcmolt_buf *buf);
+
+/** Gets the number of bytes that a bcmolt_encryption_information_container 
+ * would occupy on the wire 
+ *
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_encryption_information_container_get_packed_length(const bcmolt_encryption_information_container *this);
+
+/** Unpacks a bcmolt_encryption_information_container from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_encryption_information_container_unpack(bcmolt_encryption_information_container *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_encryption_information_container struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_encryption_information_container_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_encryption_information_container is out of 
+ * bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_encryption_information_container_bounds_check(const bcmolt_encryption_information_container *this);
+
+/** Initializes a bcmolt_epon_clock_transport_configuration struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_epon_clock_transport_configuration_set_default(bcmolt_epon_clock_transport_configuration *this);
+
+/** Packs a bcmolt_epon_clock_transport_configuration to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_clock_transport_configuration_pack(const bcmolt_epon_clock_transport_configuration *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_clock_transport_configuration from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_clock_transport_configuration_unpack(bcmolt_epon_clock_transport_configuration *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_epon_clock_transport_configuration struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_clock_transport_configuration_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_epon_clock_transport_configuration is out 
+ * of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_clock_transport_configuration_bounds_check(const bcmolt_epon_clock_transport_configuration *this);
+
+/** Initializes a bcmolt_unknown_link_status struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_unknown_link_status_set_default(bcmolt_unknown_link_status *this);
+
+/** Packs a bcmolt_unknown_link_status to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_unknown_link_status_pack(const bcmolt_unknown_link_status *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_unknown_link_status from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_unknown_link_status_unpack(bcmolt_unknown_link_status *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_unknown_link_status struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_unknown_link_status_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_unknown_link_status is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_unknown_link_status_bounds_check(const bcmolt_unknown_link_status *this);
+
+/** Initializes a bcmolt_laser_on_off_status struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_laser_on_off_status_set_default(bcmolt_laser_on_off_status *this);
+
+/** Packs a bcmolt_laser_on_off_status to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_laser_on_off_status_pack(const bcmolt_laser_on_off_status *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_laser_on_off_status from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_laser_on_off_status_unpack(bcmolt_laser_on_off_status *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_laser_on_off_status struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_laser_on_off_status_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_laser_on_off_status is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_laser_on_off_status_bounds_check(const bcmolt_laser_on_off_status *this);
+
+/** Initializes a bcmolt_range_status struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_range_status_set_default(bcmolt_range_status *this);
+
+/** Packs a bcmolt_range_status to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_range_status_pack(const bcmolt_range_status *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_range_status from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_range_status_unpack(bcmolt_range_status *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_range_status struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_range_status_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_range_status is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_range_status_bounds_check(const bcmolt_range_status *this);
+
+/** Initializes a bcmolt_rogue_status struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_rogue_status_set_default(bcmolt_rogue_status *this);
+
+/** Packs a bcmolt_rogue_status to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_rogue_status_pack(const bcmolt_rogue_status *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_rogue_status from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_rogue_status_unpack(bcmolt_rogue_status *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_rogue_status struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_rogue_status_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_rogue_status is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_rogue_status_bounds_check(const bcmolt_rogue_status *this);
+
+/** Initializes a bcmolt_epon_denied_link_alarm_state struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_epon_denied_link_alarm_state_set_default(bcmolt_epon_denied_link_alarm_state *this);
+
+/** Packs a bcmolt_epon_denied_link_alarm_state to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_denied_link_alarm_state_pack(const bcmolt_epon_denied_link_alarm_state *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_denied_link_alarm_state from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_denied_link_alarm_state_unpack(bcmolt_epon_denied_link_alarm_state *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_epon_denied_link_alarm_state struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_denied_link_alarm_state_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_epon_denied_link_alarm_state is out of 
+ * bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_denied_link_alarm_state_bounds_check(const bcmolt_epon_denied_link_alarm_state *this);
+
+/** Initializes a bcmolt_epon_encryption_config struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_epon_encryption_config_set_default(bcmolt_epon_encryption_config *this);
+
+/** Packs a bcmolt_epon_encryption_config to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_encryption_config_pack(const bcmolt_epon_encryption_config *this, bcmolt_buf *buf);
+
+/** Gets the number of bytes that a bcmolt_epon_encryption_config would occupy 
+ * on the wire 
+ *
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_encryption_config_get_packed_length(const bcmolt_epon_encryption_config *this);
+
+/** Unpacks a bcmolt_epon_encryption_config from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_encryption_config_unpack(bcmolt_epon_encryption_config *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_epon_encryption_config struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_encryption_config_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_epon_encryption_config is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_encryption_config_bounds_check(const bcmolt_epon_encryption_config *this);
+
+/** Initializes a bcmolt_epon_key_exchange_config struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_epon_key_exchange_config_set_default(bcmolt_epon_key_exchange_config *this);
+
+/** Packs a bcmolt_epon_key_exchange_config to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_key_exchange_config_pack(const bcmolt_epon_key_exchange_config *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_key_exchange_config from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_key_exchange_config_unpack(bcmolt_epon_key_exchange_config *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_epon_key_exchange_config struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_key_exchange_config_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_epon_key_exchange_config is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_key_exchange_config_bounds_check(const bcmolt_epon_key_exchange_config *this);
+
+/** Initializes a bcmolt_epon_laser_overhead_parameters struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_epon_laser_overhead_parameters_set_default(bcmolt_epon_laser_overhead_parameters *this);
+
+/** Packs a bcmolt_epon_laser_overhead_parameters to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_laser_overhead_parameters_pack(const bcmolt_epon_laser_overhead_parameters *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_laser_overhead_parameters from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_laser_overhead_parameters_unpack(bcmolt_epon_laser_overhead_parameters *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_epon_laser_overhead_parameters struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_laser_overhead_parameters_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_epon_laser_overhead_parameters is out of 
+ * bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_laser_overhead_parameters_bounds_check(const bcmolt_epon_laser_overhead_parameters *this);
+
+/** Initializes a bcmolt_epon_link_alarm_state struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_epon_link_alarm_state_set_default(bcmolt_epon_link_alarm_state *this);
+
+/** Packs a bcmolt_epon_link_alarm_state to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_alarm_state_pack(const bcmolt_epon_link_alarm_state *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_link_alarm_state from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_alarm_state_unpack(bcmolt_epon_link_alarm_state *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_epon_link_alarm_state struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_link_alarm_state_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_epon_link_alarm_state is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_alarm_state_bounds_check(const bcmolt_epon_link_alarm_state *this);
+
+/** Initializes a bcmolt_epon_link_fec_en struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_epon_link_fec_en_set_default(bcmolt_epon_link_fec_en *this);
+
+/** Packs a bcmolt_epon_link_fec_en to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_fec_en_pack(const bcmolt_epon_link_fec_en *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_link_fec_en from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_fec_en_unpack(bcmolt_epon_link_fec_en *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_epon_link_fec_en struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_link_fec_en_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_epon_link_fec_en is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_fec_en_bounds_check(const bcmolt_epon_link_fec_en *this);
+
+/** Initializes a bcmolt_epon_link_info struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_epon_link_info_set_default(bcmolt_epon_link_info *this);
+
+/** Packs a bcmolt_epon_link_info to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_info_pack(const bcmolt_epon_link_info *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_link_info from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_info_unpack(bcmolt_epon_link_info *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_epon_link_info struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_link_info_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_epon_link_info is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_info_bounds_check(const bcmolt_epon_link_info *this);
+
+/** Initializes a bcmolt_gate_parameters struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_gate_parameters_set_default(bcmolt_gate_parameters *this);
+
+/** Packs a bcmolt_gate_parameters to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gate_parameters_pack(const bcmolt_gate_parameters *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gate_parameters from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gate_parameters_unpack(bcmolt_gate_parameters *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_gate_parameters struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gate_parameters_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_gate_parameters is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gate_parameters_bounds_check(const bcmolt_gate_parameters *this);
+
+/** Initializes a bcmolt_gate_parameters_list_u32 struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_gate_parameters_list_u32_set_default(bcmolt_gate_parameters_list_u32 *this);
+
+/** Packs a bcmolt_gate_parameters_list_u32 to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gate_parameters_list_u32_pack(const bcmolt_gate_parameters_list_u32 *this, bcmolt_buf *buf);
+
+/** Gets the number of bytes that a bcmolt_gate_parameters_list_u32 would occupy 
+ * on the wire 
+ *
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gate_parameters_list_u32_get_packed_length(const bcmolt_gate_parameters_list_u32 *this);
+
+/** Unpacks a bcmolt_gate_parameters_list_u32 from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gate_parameters_list_u32_unpack(bcmolt_gate_parameters_list_u32 *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_gate_parameters_list_u32 struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gate_parameters_list_u32_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_gate_parameters_list_u32 is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gate_parameters_list_u32_bounds_check(const bcmolt_gate_parameters_list_u32 *this);
+
+/** Initializes a bcmolt_epon_registration_gate_mode struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_epon_registration_gate_mode_set_default(bcmolt_epon_registration_gate_mode *this);
+
+/** Packs a bcmolt_epon_registration_gate_mode to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_registration_gate_mode_pack(const bcmolt_epon_registration_gate_mode *this, bcmolt_buf *buf);
+
+/** Gets the number of bytes that a bcmolt_epon_registration_gate_mode would 
+ * occupy on the wire 
+ *
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_registration_gate_mode_get_packed_length(const bcmolt_epon_registration_gate_mode *this);
+
+/** Unpacks a bcmolt_epon_registration_gate_mode from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_registration_gate_mode_unpack(bcmolt_epon_registration_gate_mode *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_epon_registration_gate_mode struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_registration_gate_mode_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_epon_registration_gate_mode is out of 
+ * bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_registration_gate_mode_bounds_check(const bcmolt_epon_registration_gate_mode *this);
+
+/** Initializes a bcmolt_epon_logical_link_options struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_epon_logical_link_options_set_default(bcmolt_epon_logical_link_options *this);
+
+/** Packs a bcmolt_epon_logical_link_options to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_logical_link_options_pack(const bcmolt_epon_logical_link_options *this, bcmolt_buf *buf);
+
+/** Gets the number of bytes that a bcmolt_epon_logical_link_options would 
+ * occupy on the wire 
+ *
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_logical_link_options_get_packed_length(const bcmolt_epon_logical_link_options *this);
+
+/** Unpacks a bcmolt_epon_logical_link_options from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_logical_link_options_unpack(bcmolt_epon_logical_link_options *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_epon_logical_link_options struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_logical_link_options_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_epon_logical_link_options is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_logical_link_options_bounds_check(const bcmolt_epon_logical_link_options *this);
+
+/** Initializes a bcmolt_epon_ni_alarm_state struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_epon_ni_alarm_state_set_default(bcmolt_epon_ni_alarm_state *this);
+
+/** Packs a bcmolt_epon_ni_alarm_state to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_alarm_state_pack(const bcmolt_epon_ni_alarm_state *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_ni_alarm_state from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_alarm_state_unpack(bcmolt_epon_ni_alarm_state *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_epon_ni_alarm_state struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_ni_alarm_state_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_epon_ni_alarm_state is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_alarm_state_bounds_check(const bcmolt_epon_ni_alarm_state *this);
+
+/** Initializes a bcmolt_epon_ni_encryption_cfg struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_epon_ni_encryption_cfg_set_default(bcmolt_epon_ni_encryption_cfg *this);
+
+/** Packs a bcmolt_epon_ni_encryption_cfg to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_encryption_cfg_pack(const bcmolt_epon_ni_encryption_cfg *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_ni_encryption_cfg from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_encryption_cfg_unpack(bcmolt_epon_ni_encryption_cfg *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_epon_ni_encryption_cfg struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_ni_encryption_cfg_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_epon_ni_encryption_cfg is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_encryption_cfg_bounds_check(const bcmolt_epon_ni_encryption_cfg *this);
+
+/** Initializes a bcmolt_epon_onu_upgrade_params struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_epon_onu_upgrade_params_set_default(bcmolt_epon_onu_upgrade_params *this);
+
+/** Packs a bcmolt_epon_onu_upgrade_params to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_upgrade_params_pack(const bcmolt_epon_onu_upgrade_params *this, bcmolt_buf *buf);
+
+/** Gets the number of bytes that a bcmolt_epon_onu_upgrade_params would occupy 
+ * on the wire 
+ *
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_onu_upgrade_params_get_packed_length(const bcmolt_epon_onu_upgrade_params *this);
+
+/** Unpacks a bcmolt_epon_onu_upgrade_params from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_upgrade_params_unpack(bcmolt_epon_onu_upgrade_params *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_epon_onu_upgrade_params struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_onu_upgrade_params_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_epon_onu_upgrade_params is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_upgrade_params_bounds_check(const bcmolt_epon_onu_upgrade_params *this);
+
+/** Initializes a bcmolt_epon_onu_upgrade_status struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_epon_onu_upgrade_status_set_default(bcmolt_epon_onu_upgrade_status *this);
+
+/** Packs a bcmolt_epon_onu_upgrade_status to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_upgrade_status_pack(const bcmolt_epon_onu_upgrade_status *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_onu_upgrade_status from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_upgrade_status_unpack(bcmolt_epon_onu_upgrade_status *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_epon_onu_upgrade_status struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_onu_upgrade_status_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_epon_onu_upgrade_status is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_upgrade_status_bounds_check(const bcmolt_epon_onu_upgrade_status *this);
+
+/** Initializes a bcmolt_epon_onu_upgrade_status_list_u32 struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_epon_onu_upgrade_status_list_u32_set_default(bcmolt_epon_onu_upgrade_status_list_u32 *this);
+
+/** Packs a bcmolt_epon_onu_upgrade_status_list_u32 to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_upgrade_status_list_u32_pack(const bcmolt_epon_onu_upgrade_status_list_u32 *this, bcmolt_buf *buf);
+
+/** Gets the number of bytes that a bcmolt_epon_onu_upgrade_status_list_u32 
+ * would occupy on the wire 
+ *
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_onu_upgrade_status_list_u32_get_packed_length(const bcmolt_epon_onu_upgrade_status_list_u32 *this);
+
+/** Unpacks a bcmolt_epon_onu_upgrade_status_list_u32 from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_upgrade_status_list_u32_unpack(bcmolt_epon_onu_upgrade_status_list_u32 *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_epon_onu_upgrade_status_list_u32 struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_onu_upgrade_status_list_u32_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_epon_onu_upgrade_status_list_u32 is out of 
+ * bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_upgrade_status_list_u32_bounds_check(const bcmolt_epon_onu_upgrade_status_list_u32 *this);
+
+/** Initializes a bcmolt_epon_protection_switching_configuration struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_epon_protection_switching_configuration_set_default(bcmolt_epon_protection_switching_configuration *this);
+
+/** Packs a bcmolt_epon_protection_switching_configuration to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_protection_switching_configuration_pack(const bcmolt_epon_protection_switching_configuration *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_epon_protection_switching_configuration from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_protection_switching_configuration_unpack(bcmolt_epon_protection_switching_configuration *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_epon_protection_switching_configuration struct 
+ * and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_protection_switching_configuration_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_epon_protection_switching_configuration is 
+ * out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_protection_switching_configuration_bounds_check(const bcmolt_epon_protection_switching_configuration *this);
+
+/** Initializes a bcmolt_u8_list_u16 struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_u8_list_u16_set_default(bcmolt_u8_list_u16 *this);
+
+/** Packs a bcmolt_u8_list_u16 to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_u8_list_u16_pack(const bcmolt_u8_list_u16 *this, bcmolt_buf *buf);
+
+/** Gets the number of bytes that a bcmolt_u8_list_u16 would occupy on the wire 
+ *
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_u8_list_u16_get_packed_length(const bcmolt_u8_list_u16 *this);
+
+/** Unpacks a bcmolt_u8_list_u16 from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_u8_list_u16_unpack(bcmolt_u8_list_u16 *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_u8_list_u16 struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_u8_list_u16_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_u8_list_u16 is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_u8_list_u16_bounds_check(const bcmolt_u8_list_u16 *this);
+
+/** Initializes a bcmolt_ethernet_frame_masked struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_ethernet_frame_masked_set_default(bcmolt_ethernet_frame_masked *this);
+
+/** Packs a bcmolt_ethernet_frame_masked to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ethernet_frame_masked_pack(const bcmolt_ethernet_frame_masked *this, bcmolt_buf *buf);
+
+/** Gets the number of bytes that a bcmolt_ethernet_frame_masked would occupy on 
+ * the wire 
+ *
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_ethernet_frame_masked_get_packed_length(const bcmolt_ethernet_frame_masked *this);
+
+/** Unpacks a bcmolt_ethernet_frame_masked from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ethernet_frame_masked_unpack(bcmolt_ethernet_frame_masked *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_ethernet_frame_masked struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_ethernet_frame_masked_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_ethernet_frame_masked is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ethernet_frame_masked_bounds_check(const bcmolt_ethernet_frame_masked *this);
+
+/** Initializes a bcmolt_ethernet_frame_unmasked struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_ethernet_frame_unmasked_set_default(bcmolt_ethernet_frame_unmasked *this);
+
+/** Packs a bcmolt_ethernet_frame_unmasked to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ethernet_frame_unmasked_pack(const bcmolt_ethernet_frame_unmasked *this, bcmolt_buf *buf);
+
+/** Gets the number of bytes that a bcmolt_ethernet_frame_unmasked would occupy 
+ * on the wire 
+ *
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_ethernet_frame_unmasked_get_packed_length(const bcmolt_ethernet_frame_unmasked *this);
+
+/** Unpacks a bcmolt_ethernet_frame_unmasked from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ethernet_frame_unmasked_unpack(bcmolt_ethernet_frame_unmasked *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_ethernet_frame_unmasked struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_ethernet_frame_unmasked_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_ethernet_frame_unmasked is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ethernet_frame_unmasked_bounds_check(const bcmolt_ethernet_frame_unmasked *this);
+
+/** Initializes a bcmolt_extended_guard_time struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_extended_guard_time_set_default(bcmolt_extended_guard_time *this);
+
+/** Packs a bcmolt_extended_guard_time to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_extended_guard_time_pack(const bcmolt_extended_guard_time *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_extended_guard_time from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_extended_guard_time_unpack(bcmolt_extended_guard_time *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_extended_guard_time struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_extended_guard_time_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_extended_guard_time is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_extended_guard_time_bounds_check(const bcmolt_extended_guard_time *this);
+
+/** Initializes a bcmolt_firmware_sw_version struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_firmware_sw_version_set_default(bcmolt_firmware_sw_version *this);
+
+/** Packs a bcmolt_firmware_sw_version to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_firmware_sw_version_pack(const bcmolt_firmware_sw_version *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_firmware_sw_version from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_firmware_sw_version_unpack(bcmolt_firmware_sw_version *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_firmware_sw_version struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_firmware_sw_version_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_firmware_sw_version is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_firmware_sw_version_bounds_check(const bcmolt_firmware_sw_version *this);
+
+/** Initializes a bcmolt_gem_port_configuration struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_gem_port_configuration_set_default(bcmolt_gem_port_configuration *this);
+
+/** Packs a bcmolt_gem_port_configuration to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gem_port_configuration_pack(const bcmolt_gem_port_configuration *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gem_port_configuration from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gem_port_configuration_unpack(bcmolt_gem_port_configuration *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_gem_port_configuration struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gem_port_configuration_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_gem_port_configuration is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gem_port_configuration_bounds_check(const bcmolt_gem_port_configuration *this);
+
+/** Initializes a bcmolt_gpon_alloc_with_state struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_gpon_alloc_with_state_set_default(bcmolt_gpon_alloc_with_state *this);
+
+/** Packs a bcmolt_gpon_alloc_with_state to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_alloc_with_state_pack(const bcmolt_gpon_alloc_with_state *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_alloc_with_state from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_alloc_with_state_unpack(bcmolt_gpon_alloc_with_state *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_gpon_alloc_with_state struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_alloc_with_state_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_gpon_alloc_with_state is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_alloc_with_state_bounds_check(const bcmolt_gpon_alloc_with_state *this);
+
+/** Initializes a bcmolt_gpon_alloc_with_state_list_u16_max_32 struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_gpon_alloc_with_state_list_u16_max_32_set_default(bcmolt_gpon_alloc_with_state_list_u16_max_32 *this);
+
+/** Packs a bcmolt_gpon_alloc_with_state_list_u16_max_32 to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_alloc_with_state_list_u16_max_32_pack(const bcmolt_gpon_alloc_with_state_list_u16_max_32 *this, bcmolt_buf *buf);
+
+/** Gets the number of bytes that a bcmolt_gpon_alloc_with_state_list_u16_max_32 
+ * would occupy on the wire 
+ *
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_alloc_with_state_list_u16_max_32_get_packed_length(const bcmolt_gpon_alloc_with_state_list_u16_max_32 *this);
+
+/** Unpacks a bcmolt_gpon_alloc_with_state_list_u16_max_32 from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_alloc_with_state_list_u16_max_32_unpack(bcmolt_gpon_alloc_with_state_list_u16_max_32 *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_gpon_alloc_with_state_list_u16_max_32 struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_alloc_with_state_list_u16_max_32_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_gpon_alloc_with_state_list_u16_max_32 is 
+ * out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_alloc_with_state_list_u16_max_32_bounds_check(const bcmolt_gpon_alloc_with_state_list_u16_max_32 *this);
+
+/** Initializes a bcmolt_gpon_debug_flow_config struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_gpon_debug_flow_config_set_default(bcmolt_gpon_debug_flow_config *this);
+
+/** Packs a bcmolt_gpon_debug_flow_config to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_debug_flow_config_pack(const bcmolt_gpon_debug_flow_config *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_debug_flow_config from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_debug_flow_config_unpack(bcmolt_gpon_debug_flow_config *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_gpon_debug_flow_config struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_debug_flow_config_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_gpon_debug_flow_config is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_debug_flow_config_bounds_check(const bcmolt_gpon_debug_flow_config *this);
+
+/** Initializes a bcmolt_gpon_gem_id_list_u8_max_16 struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_gpon_gem_id_list_u8_max_16_set_default(bcmolt_gpon_gem_id_list_u8_max_16 *this);
+
+/** Packs a bcmolt_gpon_gem_id_list_u8_max_16 to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_gem_id_list_u8_max_16_pack(const bcmolt_gpon_gem_id_list_u8_max_16 *this, bcmolt_buf *buf);
+
+/** Gets the number of bytes that a bcmolt_gpon_gem_id_list_u8_max_16 would 
+ * occupy on the wire 
+ *
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_gem_id_list_u8_max_16_get_packed_length(const bcmolt_gpon_gem_id_list_u8_max_16 *this);
+
+/** Unpacks a bcmolt_gpon_gem_id_list_u8_max_16 from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_gem_id_list_u8_max_16_unpack(bcmolt_gpon_gem_id_list_u8_max_16 *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_gpon_gem_id_list_u8_max_16 struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_gem_id_list_u8_max_16_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_gpon_gem_id_list_u8_max_16 is out of 
+ * bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_gem_id_list_u8_max_16_bounds_check(const bcmolt_gpon_gem_id_list_u8_max_16 *this);
+
+/** Initializes a bcmolt_gpon_gem_port_with_state struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_gpon_gem_port_with_state_set_default(bcmolt_gpon_gem_port_with_state *this);
+
+/** Packs a bcmolt_gpon_gem_port_with_state to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_gem_port_with_state_pack(const bcmolt_gpon_gem_port_with_state *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_gem_port_with_state from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_gem_port_with_state_unpack(bcmolt_gpon_gem_port_with_state *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_gpon_gem_port_with_state struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_gem_port_with_state_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_gpon_gem_port_with_state is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_gem_port_with_state_bounds_check(const bcmolt_gpon_gem_port_with_state *this);
+
+/** Initializes a bcmolt_gpon_gem_port_with_state_list_u16_max_128 struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_gpon_gem_port_with_state_list_u16_max_128_set_default(bcmolt_gpon_gem_port_with_state_list_u16_max_128 *this);
+
+/** Packs a bcmolt_gpon_gem_port_with_state_list_u16_max_128 to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_gem_port_with_state_list_u16_max_128_pack(const bcmolt_gpon_gem_port_with_state_list_u16_max_128 *this, bcmolt_buf *buf);
+
+/** Gets the number of bytes that a 
+ * bcmolt_gpon_gem_port_with_state_list_u16_max_128 would occupy on the wire 
+ *
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_gem_port_with_state_list_u16_max_128_get_packed_length(const bcmolt_gpon_gem_port_with_state_list_u16_max_128 *this);
+
+/** Unpacks a bcmolt_gpon_gem_port_with_state_list_u16_max_128 from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_gem_port_with_state_list_u16_max_128_unpack(bcmolt_gpon_gem_port_with_state_list_u16_max_128 *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_gpon_gem_port_with_state_list_u16_max_128 struct 
+ * and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_gem_port_with_state_list_u16_max_128_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_gpon_gem_port_with_state_list_u16_max_128 
+ * is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_gem_port_with_state_list_u16_max_128_bounds_check(const bcmolt_gpon_gem_port_with_state_list_u16_max_128 *this);
+
+/** Initializes a bcmolt_gpon_gem_port_with_state_list_u16_max_256 struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_gpon_gem_port_with_state_list_u16_max_256_set_default(bcmolt_gpon_gem_port_with_state_list_u16_max_256 *this);
+
+/** Packs a bcmolt_gpon_gem_port_with_state_list_u16_max_256 to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_gem_port_with_state_list_u16_max_256_pack(const bcmolt_gpon_gem_port_with_state_list_u16_max_256 *this, bcmolt_buf *buf);
+
+/** Gets the number of bytes that a 
+ * bcmolt_gpon_gem_port_with_state_list_u16_max_256 would occupy on the wire 
+ *
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_gem_port_with_state_list_u16_max_256_get_packed_length(const bcmolt_gpon_gem_port_with_state_list_u16_max_256 *this);
+
+/** Unpacks a bcmolt_gpon_gem_port_with_state_list_u16_max_256 from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_gem_port_with_state_list_u16_max_256_unpack(bcmolt_gpon_gem_port_with_state_list_u16_max_256 *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_gpon_gem_port_with_state_list_u16_max_256 struct 
+ * and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_gem_port_with_state_list_u16_max_256_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_gpon_gem_port_with_state_list_u16_max_256 
+ * is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_gem_port_with_state_list_u16_max_256_bounds_check(const bcmolt_gpon_gem_port_with_state_list_u16_max_256 *this);
+
+/** Initializes a bcmolt_gpon_iwf_debug_flow_config struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_gpon_iwf_debug_flow_config_set_default(bcmolt_gpon_iwf_debug_flow_config *this);
+
+/** Packs a bcmolt_gpon_iwf_debug_flow_config to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_debug_flow_config_pack(const bcmolt_gpon_iwf_debug_flow_config *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_iwf_debug_flow_config from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_debug_flow_config_unpack(bcmolt_gpon_iwf_debug_flow_config *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_gpon_iwf_debug_flow_config struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_iwf_debug_flow_config_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_gpon_iwf_debug_flow_config is out of 
+ * bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_debug_flow_config_bounds_check(const bcmolt_gpon_iwf_debug_flow_config *this);
+
+/** Initializes a bcmolt_gpon_key_exchange struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_gpon_key_exchange_set_default(bcmolt_gpon_key_exchange *this);
+
+/** Packs a bcmolt_gpon_key_exchange to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_key_exchange_pack(const bcmolt_gpon_key_exchange *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_key_exchange from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_key_exchange_unpack(bcmolt_gpon_key_exchange *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_gpon_key_exchange struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_key_exchange_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_gpon_key_exchange is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_key_exchange_bounds_check(const bcmolt_gpon_key_exchange *this);
+
+/** Initializes a bcmolt_gpon_mac_table_scan_result struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_gpon_mac_table_scan_result_set_default(bcmolt_gpon_mac_table_scan_result *this);
+
+/** Packs a bcmolt_gpon_mac_table_scan_result to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_mac_table_scan_result_pack(const bcmolt_gpon_mac_table_scan_result *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_mac_table_scan_result from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_mac_table_scan_result_unpack(bcmolt_gpon_mac_table_scan_result *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_gpon_mac_table_scan_result struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_mac_table_scan_result_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_gpon_mac_table_scan_result is out of 
+ * bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_mac_table_scan_result_bounds_check(const bcmolt_gpon_mac_table_scan_result *this);
+
+/** Initializes a bcmolt_gpon_mac_table_scan_result_list_u16 struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_gpon_mac_table_scan_result_list_u16_set_default(bcmolt_gpon_mac_table_scan_result_list_u16 *this);
+
+/** Packs a bcmolt_gpon_mac_table_scan_result_list_u16 to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_mac_table_scan_result_list_u16_pack(const bcmolt_gpon_mac_table_scan_result_list_u16 *this, bcmolt_buf *buf);
+
+/** Gets the number of bytes that a bcmolt_gpon_mac_table_scan_result_list_u16 
+ * would occupy on the wire 
+ *
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_mac_table_scan_result_list_u16_get_packed_length(const bcmolt_gpon_mac_table_scan_result_list_u16 *this);
+
+/** Unpacks a bcmolt_gpon_mac_table_scan_result_list_u16 from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_mac_table_scan_result_list_u16_unpack(bcmolt_gpon_mac_table_scan_result_list_u16 *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_gpon_mac_table_scan_result_list_u16 struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_mac_table_scan_result_list_u16_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_gpon_mac_table_scan_result_list_u16 is out 
+ * of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_mac_table_scan_result_list_u16_bounds_check(const bcmolt_gpon_mac_table_scan_result_list_u16 *this);
+
+/** Initializes a bcmolt_gpon_ni_debug struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_gpon_ni_debug_set_default(bcmolt_gpon_ni_debug *this);
+
+/** Packs a bcmolt_gpon_ni_debug to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_debug_pack(const bcmolt_gpon_ni_debug *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_ni_debug from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_debug_unpack(bcmolt_gpon_ni_debug *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_gpon_ni_debug struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_ni_debug_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_gpon_ni_debug is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_debug_bounds_check(const bcmolt_gpon_ni_debug *this);
+
+/** Initializes a bcmolt_gpon_onu_activation struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_gpon_onu_activation_set_default(bcmolt_gpon_onu_activation *this);
+
+/** Packs a bcmolt_gpon_onu_activation to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_activation_pack(const bcmolt_gpon_onu_activation *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_activation from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_activation_unpack(bcmolt_gpon_onu_activation *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_gpon_onu_activation struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_activation_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_gpon_onu_activation is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_activation_bounds_check(const bcmolt_gpon_onu_activation *this);
+
+/** Initializes a bcmolt_gpon_onu_alarm_state struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_gpon_onu_alarm_state_set_default(bcmolt_gpon_onu_alarm_state *this);
+
+/** Packs a bcmolt_gpon_onu_alarm_state to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_alarm_state_pack(const bcmolt_gpon_onu_alarm_state *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_alarm_state from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_alarm_state_unpack(bcmolt_gpon_onu_alarm_state *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_gpon_onu_alarm_state struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_alarm_state_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_gpon_onu_alarm_state is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_alarm_state_bounds_check(const bcmolt_gpon_onu_alarm_state *this);
+
+/** Initializes a bcmolt_gpon_onu_alarms struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_gpon_onu_alarms_set_default(bcmolt_gpon_onu_alarms *this);
+
+/** Packs a bcmolt_gpon_onu_alarms to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_alarms_pack(const bcmolt_gpon_onu_alarms *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_alarms from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_alarms_unpack(bcmolt_gpon_onu_alarms *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_gpon_onu_alarms struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_alarms_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_gpon_onu_alarms is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_alarms_bounds_check(const bcmolt_gpon_onu_alarms *this);
+
+/** Initializes a bcmolt_gpon_onu_alarms_thresholds struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_gpon_onu_alarms_thresholds_set_default(bcmolt_gpon_onu_alarms_thresholds *this);
+
+/** Packs a bcmolt_gpon_onu_alarms_thresholds to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_alarms_thresholds_pack(const bcmolt_gpon_onu_alarms_thresholds *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_alarms_thresholds from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_alarms_thresholds_unpack(bcmolt_gpon_onu_alarms_thresholds *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_gpon_onu_alarms_thresholds struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_alarms_thresholds_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_gpon_onu_alarms_thresholds is out of 
+ * bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_alarms_thresholds_bounds_check(const bcmolt_gpon_onu_alarms_thresholds *this);
+
+/** Initializes a bcmolt_gpon_onu_eqd struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_gpon_onu_eqd_set_default(bcmolt_gpon_onu_eqd *this);
+
+/** Packs a bcmolt_gpon_onu_eqd to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_eqd_pack(const bcmolt_gpon_onu_eqd *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_eqd from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_eqd_unpack(bcmolt_gpon_onu_eqd *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_gpon_onu_eqd struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_eqd_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_gpon_onu_eqd is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_eqd_bounds_check(const bcmolt_gpon_onu_eqd *this);
+
+/** Initializes a bcmolt_gpon_onu_eqd_list_u32 struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_gpon_onu_eqd_list_u32_set_default(bcmolt_gpon_onu_eqd_list_u32 *this);
+
+/** Packs a bcmolt_gpon_onu_eqd_list_u32 to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_eqd_list_u32_pack(const bcmolt_gpon_onu_eqd_list_u32 *this, bcmolt_buf *buf);
+
+/** Gets the number of bytes that a bcmolt_gpon_onu_eqd_list_u32 would occupy on 
+ * the wire 
+ *
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_eqd_list_u32_get_packed_length(const bcmolt_gpon_onu_eqd_list_u32 *this);
+
+/** Unpacks a bcmolt_gpon_onu_eqd_list_u32 from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_eqd_list_u32_unpack(bcmolt_gpon_onu_eqd_list_u32 *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_gpon_onu_eqd_list_u32 struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_eqd_list_u32_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_gpon_onu_eqd_list_u32 is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_eqd_list_u32_bounds_check(const bcmolt_gpon_onu_eqd_list_u32 *this);
+
+/** Initializes a bcmolt_gpon_onu_id_list_u32_max_256 struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_gpon_onu_id_list_u32_max_256_set_default(bcmolt_gpon_onu_id_list_u32_max_256 *this);
+
+/** Packs a bcmolt_gpon_onu_id_list_u32_max_256 to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_id_list_u32_max_256_pack(const bcmolt_gpon_onu_id_list_u32_max_256 *this, bcmolt_buf *buf);
+
+/** Gets the number of bytes that a bcmolt_gpon_onu_id_list_u32_max_256 would 
+ * occupy on the wire 
+ *
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_id_list_u32_max_256_get_packed_length(const bcmolt_gpon_onu_id_list_u32_max_256 *this);
+
+/** Unpacks a bcmolt_gpon_onu_id_list_u32_max_256 from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_id_list_u32_max_256_unpack(bcmolt_gpon_onu_id_list_u32_max_256 *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_gpon_onu_id_list_u32_max_256 struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_id_list_u32_max_256_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_gpon_onu_id_list_u32_max_256 is out of 
+ * bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_id_list_u32_max_256_bounds_check(const bcmolt_gpon_onu_id_list_u32_max_256 *this);
+
+/** Initializes a bcmolt_gpon_onu_upgrade_params struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_gpon_onu_upgrade_params_set_default(bcmolt_gpon_onu_upgrade_params *this);
+
+/** Packs a bcmolt_gpon_onu_upgrade_params to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_upgrade_params_pack(const bcmolt_gpon_onu_upgrade_params *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_upgrade_params from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_upgrade_params_unpack(bcmolt_gpon_onu_upgrade_params *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_gpon_onu_upgrade_params struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_upgrade_params_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_gpon_onu_upgrade_params is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_upgrade_params_bounds_check(const bcmolt_gpon_onu_upgrade_params *this);
+
+/** Initializes a bcmolt_gpon_onu_upgrade_status struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_gpon_onu_upgrade_status_set_default(bcmolt_gpon_onu_upgrade_status *this);
+
+/** Packs a bcmolt_gpon_onu_upgrade_status to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_upgrade_status_pack(const bcmolt_gpon_onu_upgrade_status *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_upgrade_status from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_upgrade_status_unpack(bcmolt_gpon_onu_upgrade_status *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_gpon_onu_upgrade_status struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_upgrade_status_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_gpon_onu_upgrade_status is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_upgrade_status_bounds_check(const bcmolt_gpon_onu_upgrade_status *this);
+
+/** Initializes a bcmolt_gpon_onu_upgrade_status_list_u32 struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_gpon_onu_upgrade_status_list_u32_set_default(bcmolt_gpon_onu_upgrade_status_list_u32 *this);
+
+/** Packs a bcmolt_gpon_onu_upgrade_status_list_u32 to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_upgrade_status_list_u32_pack(const bcmolt_gpon_onu_upgrade_status_list_u32 *this, bcmolt_buf *buf);
+
+/** Gets the number of bytes that a bcmolt_gpon_onu_upgrade_status_list_u32 
+ * would occupy on the wire 
+ *
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_upgrade_status_list_u32_get_packed_length(const bcmolt_gpon_onu_upgrade_status_list_u32 *this);
+
+/** Unpacks a bcmolt_gpon_onu_upgrade_status_list_u32 from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_upgrade_status_list_u32_unpack(bcmolt_gpon_onu_upgrade_status_list_u32 *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_gpon_onu_upgrade_status_list_u32 struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_upgrade_status_list_u32_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_gpon_onu_upgrade_status_list_u32 is out of 
+ * bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_upgrade_status_list_u32_bounds_check(const bcmolt_gpon_onu_upgrade_status_list_u32 *this);
+
+/** Initializes a bcmolt_gpon_onu_with_state struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_gpon_onu_with_state_set_default(bcmolt_gpon_onu_with_state *this);
+
+/** Packs a bcmolt_gpon_onu_with_state to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_with_state_pack(const bcmolt_gpon_onu_with_state *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_onu_with_state from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_with_state_unpack(bcmolt_gpon_onu_with_state *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_gpon_onu_with_state struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_with_state_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_gpon_onu_with_state is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_with_state_bounds_check(const bcmolt_gpon_onu_with_state *this);
+
+/** Initializes a bcmolt_gpon_onu_with_state_list_u16_max_128 struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_gpon_onu_with_state_list_u16_max_128_set_default(bcmolt_gpon_onu_with_state_list_u16_max_128 *this);
+
+/** Packs a bcmolt_gpon_onu_with_state_list_u16_max_128 to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_with_state_list_u16_max_128_pack(const bcmolt_gpon_onu_with_state_list_u16_max_128 *this, bcmolt_buf *buf);
+
+/** Gets the number of bytes that a bcmolt_gpon_onu_with_state_list_u16_max_128 
+ * would occupy on the wire 
+ *
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_with_state_list_u16_max_128_get_packed_length(const bcmolt_gpon_onu_with_state_list_u16_max_128 *this);
+
+/** Unpacks a bcmolt_gpon_onu_with_state_list_u16_max_128 from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_with_state_list_u16_max_128_unpack(bcmolt_gpon_onu_with_state_list_u16_max_128 *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_gpon_onu_with_state_list_u16_max_128 struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_with_state_list_u16_max_128_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_gpon_onu_with_state_list_u16_max_128 is 
+ * out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_with_state_list_u16_max_128_bounds_check(const bcmolt_gpon_onu_with_state_list_u16_max_128 *this);
+
+/** Initializes a bcmolt_gpon_rssi_general_configuration struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_gpon_rssi_general_configuration_set_default(bcmolt_gpon_rssi_general_configuration *this);
+
+/** Packs a bcmolt_gpon_rssi_general_configuration to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_rssi_general_configuration_pack(const bcmolt_gpon_rssi_general_configuration *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_rssi_general_configuration from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_rssi_general_configuration_unpack(bcmolt_gpon_rssi_general_configuration *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_gpon_rssi_general_configuration struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_rssi_general_configuration_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_gpon_rssi_general_configuration is out of 
+ * bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_rssi_general_configuration_bounds_check(const bcmolt_gpon_rssi_general_configuration *this);
+
+/** Initializes a bcmolt_gpon_sn_acquisition struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_gpon_sn_acquisition_set_default(bcmolt_gpon_sn_acquisition *this);
+
+/** Packs a bcmolt_gpon_sn_acquisition to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_sn_acquisition_pack(const bcmolt_gpon_sn_acquisition *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_gpon_sn_acquisition from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_sn_acquisition_unpack(bcmolt_gpon_sn_acquisition *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_gpon_sn_acquisition struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_sn_acquisition_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_gpon_sn_acquisition is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_sn_acquisition_bounds_check(const bcmolt_gpon_sn_acquisition *this);
+
+/** Initializes a bcmolt_host_sw_version struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_host_sw_version_set_default(bcmolt_host_sw_version *this);
+
+/** Packs a bcmolt_host_sw_version to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_host_sw_version_pack(const bcmolt_host_sw_version *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_host_sw_version from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_host_sw_version_unpack(bcmolt_host_sw_version *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_host_sw_version struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_host_sw_version_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_host_sw_version is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_host_sw_version_bounds_check(const bcmolt_host_sw_version *this);
+
+/** Initializes a bcmolt_hw_pon_id struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_hw_pon_id_set_default(bcmolt_hw_pon_id *this);
+
+/** Packs a bcmolt_hw_pon_id to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_hw_pon_id_pack(const bcmolt_hw_pon_id *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_hw_pon_id from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_hw_pon_id_unpack(bcmolt_hw_pon_id *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_hw_pon_id struct and collects memory requirements 
+ * above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_hw_pon_id_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_hw_pon_id is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_hw_pon_id_bounds_check(const bcmolt_hw_pon_id *this);
+
+/** Initializes a bcmolt_ieee_8021as_port_identity struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_ieee_8021as_port_identity_set_default(bcmolt_ieee_8021as_port_identity *this);
+
+/** Packs a bcmolt_ieee_8021as_port_identity to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ieee_8021as_port_identity_pack(const bcmolt_ieee_8021as_port_identity *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_ieee_8021as_port_identity from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ieee_8021as_port_identity_unpack(bcmolt_ieee_8021as_port_identity *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_ieee_8021as_port_identity struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_ieee_8021as_port_identity_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_ieee_8021as_port_identity is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ieee_8021as_port_identity_bounds_check(const bcmolt_ieee_8021as_port_identity *this);
+
+/** Initializes a bcmolt_ieee_8021as_timestamp struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_ieee_8021as_timestamp_set_default(bcmolt_ieee_8021as_timestamp *this);
+
+/** Packs a bcmolt_ieee_8021as_timestamp to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ieee_8021as_timestamp_pack(const bcmolt_ieee_8021as_timestamp *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_ieee_8021as_timestamp from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ieee_8021as_timestamp_unpack(bcmolt_ieee_8021as_timestamp *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_ieee_8021as_timestamp struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_ieee_8021as_timestamp_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_ieee_8021as_timestamp is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ieee_8021as_timestamp_bounds_check(const bcmolt_ieee_8021as_timestamp *this);
+
+/** Initializes a bcmolt_ieee_8021as_time_sync struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_ieee_8021as_time_sync_set_default(bcmolt_ieee_8021as_time_sync *this);
+
+/** Packs a bcmolt_ieee_8021as_time_sync to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ieee_8021as_time_sync_pack(const bcmolt_ieee_8021as_time_sync *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_ieee_8021as_time_sync from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ieee_8021as_time_sync_unpack(bcmolt_ieee_8021as_time_sync *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_ieee_8021as_time_sync struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_ieee_8021as_time_sync_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_ieee_8021as_time_sync is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ieee_8021as_time_sync_bounds_check(const bcmolt_ieee_8021as_time_sync *this);
+
+/** Initializes a bcmolt_indication_shaping struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_indication_shaping_set_default(bcmolt_indication_shaping *this);
+
+/** Packs a bcmolt_indication_shaping to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_indication_shaping_pack(const bcmolt_indication_shaping *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_indication_shaping from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_indication_shaping_unpack(bcmolt_indication_shaping *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_indication_shaping struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_indication_shaping_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_indication_shaping is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_indication_shaping_bounds_check(const bcmolt_indication_shaping *this);
+
+/** Initializes a bcmolt_la_resync_pattern_configuration struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_la_resync_pattern_configuration_set_default(bcmolt_la_resync_pattern_configuration *this);
+
+/** Packs a bcmolt_la_resync_pattern_configuration to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_la_resync_pattern_configuration_pack(const bcmolt_la_resync_pattern_configuration *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_la_resync_pattern_configuration from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_la_resync_pattern_configuration_unpack(bcmolt_la_resync_pattern_configuration *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_la_resync_pattern_configuration struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_la_resync_pattern_configuration_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_la_resync_pattern_configuration is out of 
+ * bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_la_resync_pattern_configuration_bounds_check(const bcmolt_la_resync_pattern_configuration *this);
+
+/** Initializes a bcmolt_log_buffer struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_log_buffer_set_default(bcmolt_log_buffer *this);
+
+/** Packs a bcmolt_log_buffer to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_log_buffer_pack(const bcmolt_log_buffer *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_log_buffer from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_log_buffer_unpack(bcmolt_log_buffer *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_log_buffer struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_log_buffer_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_log_buffer is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_log_buffer_bounds_check(const bcmolt_log_buffer *this);
+
+/** Initializes a bcmolt_mac_table_configuration struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_mac_table_configuration_set_default(bcmolt_mac_table_configuration *this);
+
+/** Packs a bcmolt_mac_table_configuration to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_mac_table_configuration_pack(const bcmolt_mac_table_configuration *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_mac_table_configuration from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_mac_table_configuration_unpack(bcmolt_mac_table_configuration *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_mac_table_configuration struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_mac_table_configuration_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_mac_table_configuration is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_mac_table_configuration_bounds_check(const bcmolt_mac_table_configuration *this);
+
+/** Initializes a bcmolt_macaddress_list_u32 struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_macaddress_list_u32_set_default(bcmolt_macaddress_list_u32 *this);
+
+/** Packs a bcmolt_macaddress_list_u32 to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_macaddress_list_u32_pack(const bcmolt_macaddress_list_u32 *this, bcmolt_buf *buf);
+
+/** Gets the number of bytes that a bcmolt_macaddress_list_u32 would occupy on 
+ * the wire 
+ *
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_macaddress_list_u32_get_packed_length(const bcmolt_macaddress_list_u32 *this);
+
+/** Unpacks a bcmolt_macaddress_list_u32 from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_macaddress_list_u32_unpack(bcmolt_macaddress_list_u32 *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_macaddress_list_u32 struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_macaddress_list_u32_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_macaddress_list_u32 is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_macaddress_list_u32_bounds_check(const bcmolt_macaddress_list_u32 *this);
+
+/** Initializes a bcmolt_macaddress_list_u32_max_2048 struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_macaddress_list_u32_max_2048_set_default(bcmolt_macaddress_list_u32_max_2048 *this);
+
+/** Packs a bcmolt_macaddress_list_u32_max_2048 to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_macaddress_list_u32_max_2048_pack(const bcmolt_macaddress_list_u32_max_2048 *this, bcmolt_buf *buf);
+
+/** Gets the number of bytes that a bcmolt_macaddress_list_u32_max_2048 would 
+ * occupy on the wire 
+ *
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_macaddress_list_u32_max_2048_get_packed_length(const bcmolt_macaddress_list_u32_max_2048 *this);
+
+/** Unpacks a bcmolt_macaddress_list_u32_max_2048 from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_macaddress_list_u32_max_2048_unpack(bcmolt_macaddress_list_u32_max_2048 *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_macaddress_list_u32_max_2048 struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_macaddress_list_u32_max_2048_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_macaddress_list_u32_max_2048 is out of 
+ * bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_macaddress_list_u32_max_2048_bounds_check(const bcmolt_macaddress_list_u32_max_2048 *this);
+
+/** Initializes a bcmolt_nni_link_status struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_nni_link_status_set_default(bcmolt_nni_link_status *this);
+
+/** Packs a bcmolt_nni_link_status to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_nni_link_status_pack(const bcmolt_nni_link_status *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_nni_link_status from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_nni_link_status_unpack(bcmolt_nni_link_status *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_nni_link_status struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_nni_link_status_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_nni_link_status is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_nni_link_status_bounds_check(const bcmolt_nni_link_status *this);
+
+/** Initializes a bcmolt_oam_heartbeat_config struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_oam_heartbeat_config_set_default(bcmolt_oam_heartbeat_config *this);
+
+/** Packs a bcmolt_oam_heartbeat_config to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_oam_heartbeat_config_pack(const bcmolt_oam_heartbeat_config *this, bcmolt_buf *buf);
+
+/** Gets the number of bytes that a bcmolt_oam_heartbeat_config would occupy on 
+ * the wire 
+ *
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_oam_heartbeat_config_get_packed_length(const bcmolt_oam_heartbeat_config *this);
+
+/** Unpacks a bcmolt_oam_heartbeat_config from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_oam_heartbeat_config_unpack(bcmolt_oam_heartbeat_config *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_oam_heartbeat_config struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_oam_heartbeat_config_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_oam_heartbeat_config is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_oam_heartbeat_config_bounds_check(const bcmolt_oam_heartbeat_config *this);
+
+/** Initializes a bcmolt_onu_power_management_configuration struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_onu_power_management_configuration_set_default(bcmolt_onu_power_management_configuration *this);
+
+/** Packs a bcmolt_onu_power_management_configuration to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_onu_power_management_configuration_pack(const bcmolt_onu_power_management_configuration *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_onu_power_management_configuration from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_onu_power_management_configuration_unpack(bcmolt_onu_power_management_configuration *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_onu_power_management_configuration struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_onu_power_management_configuration_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_onu_power_management_configuration is out 
+ * of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_onu_power_management_configuration_bounds_check(const bcmolt_onu_power_management_configuration *this);
+
+/** Initializes a bcmolt_onu_tuning_configuration struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_onu_tuning_configuration_set_default(bcmolt_onu_tuning_configuration *this);
+
+/** Packs a bcmolt_onu_tuning_configuration to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_onu_tuning_configuration_pack(const bcmolt_onu_tuning_configuration *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_onu_tuning_configuration from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_onu_tuning_configuration_unpack(bcmolt_onu_tuning_configuration *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_onu_tuning_configuration struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_onu_tuning_configuration_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_onu_tuning_configuration is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_onu_tuning_configuration_bounds_check(const bcmolt_onu_tuning_configuration *this);
+
+/** Initializes a bcmolt_pon_id struct.  This sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_pon_id_set_default(bcmolt_pon_id *this);
+
+/** Packs a bcmolt_pon_id to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_pon_id_pack(const bcmolt_pon_id *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_pon_id from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_pon_id_unpack(bcmolt_pon_id *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_pon_id struct and collects memory requirements 
+ * above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_pon_id_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_pon_id is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_pon_id_bounds_check(const bcmolt_pon_id *this);
+
+/** Initializes a bcmolt_operation_control struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_operation_control_set_default(bcmolt_operation_control *this);
+
+/** Packs a bcmolt_operation_control to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_operation_control_pack(const bcmolt_operation_control *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_operation_control from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_operation_control_unpack(bcmolt_operation_control *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_operation_control struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_operation_control_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_operation_control is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_operation_control_bounds_check(const bcmolt_operation_control *this);
+
+/** Initializes a bcmolt_periodic_standby_pon_monitoring struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_periodic_standby_pon_monitoring_set_default(bcmolt_periodic_standby_pon_monitoring *this);
+
+/** Packs a bcmolt_periodic_standby_pon_monitoring to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_periodic_standby_pon_monitoring_pack(const bcmolt_periodic_standby_pon_monitoring *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_periodic_standby_pon_monitoring from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_periodic_standby_pon_monitoring_unpack(bcmolt_periodic_standby_pon_monitoring *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_periodic_standby_pon_monitoring struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_periodic_standby_pon_monitoring_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_periodic_standby_pon_monitoring is out of 
+ * bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_periodic_standby_pon_monitoring_bounds_check(const bcmolt_periodic_standby_pon_monitoring *this);
+
+/** Initializes a bcmolt_pon_aggregate_shaper struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_pon_aggregate_shaper_set_default(bcmolt_pon_aggregate_shaper *this);
+
+/** Packs a bcmolt_pon_aggregate_shaper to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_pon_aggregate_shaper_pack(const bcmolt_pon_aggregate_shaper *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_pon_aggregate_shaper from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_pon_aggregate_shaper_unpack(bcmolt_pon_aggregate_shaper *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_pon_aggregate_shaper struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_pon_aggregate_shaper_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_pon_aggregate_shaper is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_pon_aggregate_shaper_bounds_check(const bcmolt_pon_aggregate_shaper *this);
+
+/** Initializes a bcmolt_pon_alloc_sla struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_pon_alloc_sla_set_default(bcmolt_pon_alloc_sla *this);
+
+/** Packs a bcmolt_pon_alloc_sla to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_pon_alloc_sla_pack(const bcmolt_pon_alloc_sla *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_pon_alloc_sla from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_pon_alloc_sla_unpack(bcmolt_pon_alloc_sla *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_pon_alloc_sla struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_pon_alloc_sla_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_pon_alloc_sla is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_pon_alloc_sla_bounds_check(const bcmolt_pon_alloc_sla *this);
+
+/** Initializes a bcmolt_pon_available_bandwidth struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_pon_available_bandwidth_set_default(bcmolt_pon_available_bandwidth *this);
+
+/** Packs a bcmolt_pon_available_bandwidth to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_pon_available_bandwidth_pack(const bcmolt_pon_available_bandwidth *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_pon_available_bandwidth from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_pon_available_bandwidth_unpack(bcmolt_pon_available_bandwidth *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_pon_available_bandwidth struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_pon_available_bandwidth_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_pon_available_bandwidth is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_pon_available_bandwidth_bounds_check(const bcmolt_pon_available_bandwidth *this);
+
+/** Initializes a bcmolt_pon_dba struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_pon_dba_set_default(bcmolt_pon_dba *this);
+
+/** Packs a bcmolt_pon_dba to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_pon_dba_pack(const bcmolt_pon_dba *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_pon_dba from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_pon_dba_unpack(bcmolt_pon_dba *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_pon_dba struct and collects memory requirements 
+ * above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_pon_dba_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_pon_dba is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_pon_dba_bounds_check(const bcmolt_pon_dba *this);
+
+/** Initializes a bcmolt_pon_distance struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_pon_distance_set_default(bcmolt_pon_distance *this);
+
+/** Packs a bcmolt_pon_distance to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_pon_distance_pack(const bcmolt_pon_distance *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_pon_distance from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_pon_distance_unpack(bcmolt_pon_distance *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_pon_distance struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_pon_distance_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_pon_distance is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_pon_distance_bounds_check(const bcmolt_pon_distance *this);
+
+/** Initializes a bcmolt_pon_drift_control struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_pon_drift_control_set_default(bcmolt_pon_drift_control *this);
+
+/** Packs a bcmolt_pon_drift_control to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_pon_drift_control_pack(const bcmolt_pon_drift_control *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_pon_drift_control from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_pon_drift_control_unpack(bcmolt_pon_drift_control *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_pon_drift_control struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_pon_drift_control_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_pon_drift_control is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_pon_drift_control_bounds_check(const bcmolt_pon_drift_control *this);
+
+/** Initializes a bcmolt_pon_onu_id_list_u32 struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_pon_onu_id_list_u32_set_default(bcmolt_pon_onu_id_list_u32 *this);
+
+/** Packs a bcmolt_pon_onu_id_list_u32 to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_pon_onu_id_list_u32_pack(const bcmolt_pon_onu_id_list_u32 *this, bcmolt_buf *buf);
+
+/** Gets the number of bytes that a bcmolt_pon_onu_id_list_u32 would occupy on 
+ * the wire 
+ *
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_pon_onu_id_list_u32_get_packed_length(const bcmolt_pon_onu_id_list_u32 *this);
+
+/** Unpacks a bcmolt_pon_onu_id_list_u32 from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_pon_onu_id_list_u32_unpack(bcmolt_pon_onu_id_list_u32 *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_pon_onu_id_list_u32 struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_pon_onu_id_list_u32_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_pon_onu_id_list_u32 is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_pon_onu_id_list_u32_bounds_check(const bcmolt_pon_onu_id_list_u32 *this);
+
+/** Initializes a bcmolt_pon_power_level struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_pon_power_level_set_default(bcmolt_pon_power_level *this);
+
+/** Packs a bcmolt_pon_power_level to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_pon_power_level_pack(const bcmolt_pon_power_level *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_pon_power_level from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_pon_power_level_unpack(bcmolt_pon_power_level *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_pon_power_level struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_pon_power_level_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_pon_power_level is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_pon_power_level_bounds_check(const bcmolt_pon_power_level *this);
+
+/** Initializes a bcmolt_pon_protection_switching struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_pon_protection_switching_set_default(bcmolt_pon_protection_switching *this);
+
+/** Packs a bcmolt_pon_protection_switching to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_pon_protection_switching_pack(const bcmolt_pon_protection_switching *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_pon_protection_switching from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_pon_protection_switching_unpack(bcmolt_pon_protection_switching *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_pon_protection_switching struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_pon_protection_switching_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_pon_protection_switching is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_pon_protection_switching_bounds_check(const bcmolt_pon_protection_switching *this);
+
+/** Initializes a bcmolt_pon_status struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_pon_status_set_default(bcmolt_pon_status *this);
+
+/** Packs a bcmolt_pon_status to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_pon_status_pack(const bcmolt_pon_status *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_pon_status from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_pon_status_unpack(bcmolt_pon_status *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_pon_status struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_pon_status_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_pon_status is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_pon_status_bounds_check(const bcmolt_pon_status *this);
+
+/** Initializes a bcmolt_prbs_checker_config struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_prbs_checker_config_set_default(bcmolt_prbs_checker_config *this);
+
+/** Packs a bcmolt_prbs_checker_config to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_prbs_checker_config_pack(const bcmolt_prbs_checker_config *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_prbs_checker_config from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_prbs_checker_config_unpack(bcmolt_prbs_checker_config *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_prbs_checker_config struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_prbs_checker_config_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_prbs_checker_config is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_prbs_checker_config_bounds_check(const bcmolt_prbs_checker_config *this);
+
+/** Initializes a bcmolt_prbs_generator_config struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_prbs_generator_config_set_default(bcmolt_prbs_generator_config *this);
+
+/** Packs a bcmolt_prbs_generator_config to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_prbs_generator_config_pack(const bcmolt_prbs_generator_config *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_prbs_generator_config from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_prbs_generator_config_unpack(bcmolt_prbs_generator_config *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_prbs_generator_config struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_prbs_generator_config_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_prbs_generator_config is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_prbs_generator_config_bounds_check(const bcmolt_prbs_generator_config *this);
+
+/** Initializes a bcmolt_prbs_status struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_prbs_status_set_default(bcmolt_prbs_status *this);
+
+/** Packs a bcmolt_prbs_status to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_prbs_status_pack(const bcmolt_prbs_status *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_prbs_status from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_prbs_status_unpack(bcmolt_prbs_status *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_prbs_status struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_prbs_status_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_prbs_status is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_prbs_status_bounds_check(const bcmolt_prbs_status *this);
+
+/** Initializes a bcmolt_ranging_control_configuration struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_ranging_control_configuration_set_default(bcmolt_ranging_control_configuration *this);
+
+/** Packs a bcmolt_ranging_control_configuration to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ranging_control_configuration_pack(const bcmolt_ranging_control_configuration *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_ranging_control_configuration from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ranging_control_configuration_unpack(bcmolt_ranging_control_configuration *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_ranging_control_configuration struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_ranging_control_configuration_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_ranging_control_configuration is out of 
+ * bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ranging_control_configuration_bounds_check(const bcmolt_ranging_control_configuration *this);
+
+/** Initializes a bcmolt_ranging_resync_conditions struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_ranging_resync_conditions_set_default(bcmolt_ranging_resync_conditions *this);
+
+/** Packs a bcmolt_ranging_resync_conditions to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ranging_resync_conditions_pack(const bcmolt_ranging_resync_conditions *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_ranging_resync_conditions from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ranging_resync_conditions_unpack(bcmolt_ranging_resync_conditions *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_ranging_resync_conditions struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_ranging_resync_conditions_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_ranging_resync_conditions is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ranging_resync_conditions_bounds_check(const bcmolt_ranging_resync_conditions *this);
+
+/** Initializes a bcmolt_ranging_rssi_control struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_ranging_rssi_control_set_default(bcmolt_ranging_rssi_control *this);
+
+/** Packs a bcmolt_ranging_rssi_control to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ranging_rssi_control_pack(const bcmolt_ranging_rssi_control *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_ranging_rssi_control from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ranging_rssi_control_unpack(bcmolt_ranging_rssi_control *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_ranging_rssi_control struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_ranging_rssi_control_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_ranging_rssi_control is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ranging_rssi_control_bounds_check(const bcmolt_ranging_rssi_control *this);
+
+/** Initializes a bcmolt_request_registration_status struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_request_registration_status_set_default(bcmolt_request_registration_status *this);
+
+/** Packs a bcmolt_request_registration_status to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_request_registration_status_pack(const bcmolt_request_registration_status *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_request_registration_status from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_request_registration_status_unpack(bcmolt_request_registration_status *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_request_registration_status struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_request_registration_status_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_request_registration_status is out of 
+ * bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_request_registration_status_bounds_check(const bcmolt_request_registration_status *this);
+
+/** Initializes a bcmolt_rogue_detection_special_map struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_rogue_detection_special_map_set_default(bcmolt_rogue_detection_special_map *this);
+
+/** Packs a bcmolt_rogue_detection_special_map to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_rogue_detection_special_map_pack(const bcmolt_rogue_detection_special_map *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_rogue_detection_special_map from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_rogue_detection_special_map_unpack(bcmolt_rogue_detection_special_map *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_rogue_detection_special_map struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_rogue_detection_special_map_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_rogue_detection_special_map is out of 
+ * bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_rogue_detection_special_map_bounds_check(const bcmolt_rogue_detection_special_map *this);
+
+/** Initializes a bcmolt_rogue_detection_special_map_list_u32_max_8 struct.  
+ * This sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_rogue_detection_special_map_list_u32_max_8_set_default(bcmolt_rogue_detection_special_map_list_u32_max_8 *this);
+
+/** Packs a bcmolt_rogue_detection_special_map_list_u32_max_8 to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_rogue_detection_special_map_list_u32_max_8_pack(const bcmolt_rogue_detection_special_map_list_u32_max_8 *this, bcmolt_buf *buf);
+
+/** Gets the number of bytes that a 
+ * bcmolt_rogue_detection_special_map_list_u32_max_8 would occupy on the wire 
+ *
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_rogue_detection_special_map_list_u32_max_8_get_packed_length(const bcmolt_rogue_detection_special_map_list_u32_max_8 *this);
+
+/** Unpacks a bcmolt_rogue_detection_special_map_list_u32_max_8 from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_rogue_detection_special_map_list_u32_max_8_unpack(bcmolt_rogue_detection_special_map_list_u32_max_8 *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_rogue_detection_special_map_list_u32_max_8 struct 
+ * and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_rogue_detection_special_map_list_u32_max_8_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_rogue_detection_special_map_list_u32_max_8 
+ * is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_rogue_detection_special_map_list_u32_max_8_bounds_check(const bcmolt_rogue_detection_special_map_list_u32_max_8 *this);
+
+/** Initializes a bcmolt_rogue_detection_algorithm struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_rogue_detection_algorithm_set_default(bcmolt_rogue_detection_algorithm *this);
+
+/** Packs a bcmolt_rogue_detection_algorithm to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_rogue_detection_algorithm_pack(const bcmolt_rogue_detection_algorithm *this, bcmolt_buf *buf);
+
+/** Gets the number of bytes that a bcmolt_rogue_detection_algorithm would 
+ * occupy on the wire 
+ *
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_rogue_detection_algorithm_get_packed_length(const bcmolt_rogue_detection_algorithm *this);
+
+/** Unpacks a bcmolt_rogue_detection_algorithm from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_rogue_detection_algorithm_unpack(bcmolt_rogue_detection_algorithm *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_rogue_detection_algorithm struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_rogue_detection_algorithm_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_rogue_detection_algorithm is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_rogue_detection_algorithm_bounds_check(const bcmolt_rogue_detection_algorithm *this);
+
+/** Initializes a bcmolt_rogue_onu_detection_process struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_rogue_onu_detection_process_set_default(bcmolt_rogue_onu_detection_process *this);
+
+/** Packs a bcmolt_rogue_onu_detection_process to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_rogue_onu_detection_process_pack(const bcmolt_rogue_onu_detection_process *this, bcmolt_buf *buf);
+
+/** Gets the number of bytes that a bcmolt_rogue_onu_detection_process would 
+ * occupy on the wire 
+ *
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_rogue_onu_detection_process_get_packed_length(const bcmolt_rogue_onu_detection_process *this);
+
+/** Unpacks a bcmolt_rogue_onu_detection_process from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_rogue_onu_detection_process_unpack(bcmolt_rogue_onu_detection_process *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_rogue_onu_detection_process struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_rogue_onu_detection_process_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_rogue_onu_detection_process is out of 
+ * bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_rogue_onu_detection_process_bounds_check(const bcmolt_rogue_onu_detection_process *this);
+
+/** Initializes a bcmolt_serdes_configuration struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_serdes_configuration_set_default(bcmolt_serdes_configuration *this);
+
+/** Packs a bcmolt_serdes_configuration to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_serdes_configuration_pack(const bcmolt_serdes_configuration *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_serdes_configuration from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_serdes_configuration_unpack(bcmolt_serdes_configuration *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_serdes_configuration struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_serdes_configuration_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_serdes_configuration is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_serdes_configuration_bounds_check(const bcmolt_serdes_configuration *this);
+
+/** Initializes a bcmolt_serial_number struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_serial_number_set_default(bcmolt_serial_number *this);
+
+/** Packs a bcmolt_serial_number to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_serial_number_pack(const bcmolt_serial_number *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_serial_number from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_serial_number_unpack(bcmolt_serial_number *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_serial_number struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_serial_number_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_serial_number is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_serial_number_bounds_check(const bcmolt_serial_number *this);
+
+/** Initializes a bcmolt_solicited_scheduler struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_solicited_scheduler_set_default(bcmolt_solicited_scheduler *this);
+
+/** Packs a bcmolt_solicited_scheduler to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_solicited_scheduler_pack(const bcmolt_solicited_scheduler *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_solicited_scheduler from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_solicited_scheduler_unpack(bcmolt_solicited_scheduler *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_solicited_scheduler struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_solicited_scheduler_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_solicited_scheduler is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_solicited_scheduler_bounds_check(const bcmolt_solicited_scheduler *this);
+
+/** Initializes a bcmolt_stat_alarm_trigger_config struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_stat_alarm_trigger_config_set_default(bcmolt_stat_alarm_trigger_config *this);
+
+/** Packs a bcmolt_stat_alarm_trigger_config to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_stat_alarm_trigger_config_pack(const bcmolt_stat_alarm_trigger_config *this, bcmolt_buf *buf);
+
+/** Gets the number of bytes that a bcmolt_stat_alarm_trigger_config would 
+ * occupy on the wire 
+ *
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_stat_alarm_trigger_config_get_packed_length(const bcmolt_stat_alarm_trigger_config *this);
+
+/** Unpacks a bcmolt_stat_alarm_trigger_config from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_stat_alarm_trigger_config_unpack(bcmolt_stat_alarm_trigger_config *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_stat_alarm_trigger_config struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_stat_alarm_trigger_config_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_stat_alarm_trigger_config is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_stat_alarm_trigger_config_bounds_check(const bcmolt_stat_alarm_trigger_config *this);
+
+/** Initializes a bcmolt_stat_alarm_soak_config struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_stat_alarm_soak_config_set_default(bcmolt_stat_alarm_soak_config *this);
+
+/** Packs a bcmolt_stat_alarm_soak_config to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_stat_alarm_soak_config_pack(const bcmolt_stat_alarm_soak_config *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_stat_alarm_soak_config from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_stat_alarm_soak_config_unpack(bcmolt_stat_alarm_soak_config *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_stat_alarm_soak_config struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_stat_alarm_soak_config_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_stat_alarm_soak_config is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_stat_alarm_soak_config_bounds_check(const bcmolt_stat_alarm_soak_config *this);
+
+/** Initializes a bcmolt_stat_alarm_config struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_stat_alarm_config_set_default(bcmolt_stat_alarm_config *this);
+
+/** Packs a bcmolt_stat_alarm_config to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_stat_alarm_config_pack(const bcmolt_stat_alarm_config *this, bcmolt_buf *buf);
+
+/** Gets the number of bytes that a bcmolt_stat_alarm_config would occupy on the 
+ * wire 
+ *
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_stat_alarm_config_get_packed_length(const bcmolt_stat_alarm_config *this);
+
+/** Unpacks a bcmolt_stat_alarm_config from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_stat_alarm_config_unpack(bcmolt_stat_alarm_config *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_stat_alarm_config struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_stat_alarm_config_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_stat_alarm_config is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_stat_alarm_config_bounds_check(const bcmolt_stat_alarm_config *this);
+
+/** Initializes a bcmolt_str_100 struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_str_100_set_default(bcmolt_str_100 *this);
+
+/** Packs a bcmolt_str_100 to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_str_100_pack(const bcmolt_str_100 *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_str_100 from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_str_100_unpack(bcmolt_str_100 *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_str_100 struct and collects memory requirements 
+ * above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_str_100_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_str_100 is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_str_100_bounds_check(const bcmolt_str_100 *this);
+
+/** Initializes a bcmolt_str_1000 struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_str_1000_set_default(bcmolt_str_1000 *this);
+
+/** Packs a bcmolt_str_1000 to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_str_1000_pack(const bcmolt_str_1000 *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_str_1000 from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_str_1000_unpack(bcmolt_str_1000 *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_str_1000 struct and collects memory requirements 
+ * above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_str_1000_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_str_1000 is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_str_1000_bounds_check(const bcmolt_str_1000 *this);
+
+/** Initializes a bcmolt_str_2000 struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_str_2000_set_default(bcmolt_str_2000 *this);
+
+/** Packs a bcmolt_str_2000 to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_str_2000_pack(const bcmolt_str_2000 *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_str_2000 from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_str_2000_unpack(bcmolt_str_2000 *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_str_2000 struct and collects memory requirements 
+ * above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_str_2000_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_str_2000 is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_str_2000_bounds_check(const bcmolt_str_2000 *this);
+
+/** Initializes a bcmolt_str_256 struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_str_256_set_default(bcmolt_str_256 *this);
+
+/** Packs a bcmolt_str_256 to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_str_256_pack(const bcmolt_str_256 *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_str_256 from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_str_256_unpack(bcmolt_str_256 *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_str_256 struct and collects memory requirements 
+ * above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_str_256_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_str_256 is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_str_256_bounds_check(const bcmolt_str_256 *this);
+
+/** Initializes a bcmolt_str_64 struct.  This sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_str_64_set_default(bcmolt_str_64 *this);
+
+/** Packs a bcmolt_str_64 to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_str_64_pack(const bcmolt_str_64 *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_str_64 from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_str_64_unpack(bcmolt_str_64 *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_str_64 struct and collects memory requirements 
+ * above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_str_64_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_str_64 is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_str_64_bounds_check(const bcmolt_str_64 *this);
+
+/** Initializes a bcmolt_sw_error struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_sw_error_set_default(bcmolt_sw_error *this);
+
+/** Packs a bcmolt_sw_error to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_sw_error_pack(const bcmolt_sw_error *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_sw_error from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_sw_error_unpack(bcmolt_sw_error *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_sw_error struct and collects memory requirements 
+ * above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_sw_error_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_sw_error is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_sw_error_bounds_check(const bcmolt_sw_error *this);
+
+/** Initializes a bcmolt_system_profile struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_system_profile_set_default(bcmolt_system_profile *this);
+
+/** Packs a bcmolt_system_profile to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_system_profile_pack(const bcmolt_system_profile *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_system_profile from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_system_profile_unpack(bcmolt_system_profile *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_system_profile struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_system_profile_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_system_profile is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_system_profile_bounds_check(const bcmolt_system_profile *this);
+
+/** Initializes a bcmolt_trx_delimiter struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_trx_delimiter_set_default(bcmolt_trx_delimiter *this);
+
+/** Packs a bcmolt_trx_delimiter to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_trx_delimiter_pack(const bcmolt_trx_delimiter *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_trx_delimiter from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_trx_delimiter_unpack(bcmolt_trx_delimiter *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_trx_delimiter struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_trx_delimiter_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_trx_delimiter is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_trx_delimiter_bounds_check(const bcmolt_trx_delimiter *this);
+
+/** Initializes a bcmolt_trx_energy_detect struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_trx_energy_detect_set_default(bcmolt_trx_energy_detect *this);
+
+/** Packs a bcmolt_trx_energy_detect to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_trx_energy_detect_pack(const bcmolt_trx_energy_detect *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_trx_energy_detect from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_trx_energy_detect_unpack(bcmolt_trx_energy_detect *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_trx_energy_detect struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_trx_energy_detect_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_trx_energy_detect is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_trx_energy_detect_bounds_check(const bcmolt_trx_energy_detect *this);
+
+/** Initializes a bcmolt_trx_preamble struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_trx_preamble_set_default(bcmolt_trx_preamble *this);
+
+/** Packs a bcmolt_trx_preamble to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_trx_preamble_pack(const bcmolt_trx_preamble *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_trx_preamble from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_trx_preamble_unpack(bcmolt_trx_preamble *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_trx_preamble struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_trx_preamble_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_trx_preamble is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_trx_preamble_bounds_check(const bcmolt_trx_preamble *this);
+
+/** Initializes a bcmolt_trx_rx_configuration struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_trx_rx_configuration_set_default(bcmolt_trx_rx_configuration *this);
+
+/** Packs a bcmolt_trx_rx_configuration to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_trx_rx_configuration_pack(const bcmolt_trx_rx_configuration *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_trx_rx_configuration from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_trx_rx_configuration_unpack(bcmolt_trx_rx_configuration *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_trx_rx_configuration struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_trx_rx_configuration_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_trx_rx_configuration is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_trx_rx_configuration_bounds_check(const bcmolt_trx_rx_configuration *this);
+
+/** Initializes a bcmolt_u32_list_u32_max_500_hex struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_u32_list_u32_max_500_hex_set_default(bcmolt_u32_list_u32_max_500_hex *this);
+
+/** Packs a bcmolt_u32_list_u32_max_500_hex to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_u32_list_u32_max_500_hex_pack(const bcmolt_u32_list_u32_max_500_hex *this, bcmolt_buf *buf);
+
+/** Gets the number of bytes that a bcmolt_u32_list_u32_max_500_hex would occupy 
+ * on the wire 
+ *
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_u32_list_u32_max_500_hex_get_packed_length(const bcmolt_u32_list_u32_max_500_hex *this);
+
+/** Unpacks a bcmolt_u32_list_u32_max_500_hex from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_u32_list_u32_max_500_hex_unpack(bcmolt_u32_list_u32_max_500_hex *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_u32_list_u32_max_500_hex struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_u32_list_u32_max_500_hex_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_u32_list_u32_max_500_hex is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_u32_list_u32_max_500_hex_bounds_check(const bcmolt_u32_list_u32_max_500_hex *this);
+
+/** Initializes a bcmolt_u8_list_u16_hex struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_u8_list_u16_hex_set_default(bcmolt_u8_list_u16_hex *this);
+
+/** Packs a bcmolt_u8_list_u16_hex to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_u8_list_u16_hex_pack(const bcmolt_u8_list_u16_hex *this, bcmolt_buf *buf);
+
+/** Gets the number of bytes that a bcmolt_u8_list_u16_hex would occupy on the 
+ * wire 
+ *
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_u8_list_u16_hex_get_packed_length(const bcmolt_u8_list_u16_hex *this);
+
+/** Unpacks a bcmolt_u8_list_u16_hex from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_u8_list_u16_hex_unpack(bcmolt_u8_list_u16_hex *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_u8_list_u16_hex struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_u8_list_u16_hex_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_u8_list_u16_hex is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_u8_list_u16_hex_bounds_check(const bcmolt_u8_list_u16_hex *this);
+
+/** Initializes a bcmolt_u8_list_u32 struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_u8_list_u32_set_default(bcmolt_u8_list_u32 *this);
+
+/** Packs a bcmolt_u8_list_u32 to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_u8_list_u32_pack(const bcmolt_u8_list_u32 *this, bcmolt_buf *buf);
+
+/** Gets the number of bytes that a bcmolt_u8_list_u32 would occupy on the wire 
+ *
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_u8_list_u32_get_packed_length(const bcmolt_u8_list_u32 *this);
+
+/** Unpacks a bcmolt_u8_list_u32 from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_u8_list_u32_unpack(bcmolt_u8_list_u32 *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_u8_list_u32 struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_u8_list_u32_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_u8_list_u32 is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_u8_list_u32_bounds_check(const bcmolt_u8_list_u32 *this);
+
+/** Initializes a bcmolt_u8_list_u32_max_2048 struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_u8_list_u32_max_2048_set_default(bcmolt_u8_list_u32_max_2048 *this);
+
+/** Packs a bcmolt_u8_list_u32_max_2048 to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_u8_list_u32_max_2048_pack(const bcmolt_u8_list_u32_max_2048 *this, bcmolt_buf *buf);
+
+/** Gets the number of bytes that a bcmolt_u8_list_u32_max_2048 would occupy on 
+ * the wire 
+ *
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_u8_list_u32_max_2048_get_packed_length(const bcmolt_u8_list_u32_max_2048 *this);
+
+/** Unpacks a bcmolt_u8_list_u32_max_2048 from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_u8_list_u32_max_2048_unpack(bcmolt_u8_list_u32_max_2048 *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_u8_list_u32_max_2048 struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_u8_list_u32_max_2048_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_u8_list_u32_max_2048 is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_u8_list_u32_max_2048_bounds_check(const bcmolt_u8_list_u32_max_2048 *this);
+
+/** Initializes a bcmolt_ubd_info struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_ubd_info_set_default(bcmolt_ubd_info *this);
+
+/** Packs a bcmolt_ubd_info to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ubd_info_pack(const bcmolt_ubd_info *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_ubd_info from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ubd_info_unpack(bcmolt_ubd_info *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_ubd_info struct and collects memory requirements 
+ * above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_ubd_info_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_ubd_info is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ubd_info_bounds_check(const bcmolt_ubd_info *this);
+
+/** Initializes a bcmolt_upstream_bandwidth_distribution struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_upstream_bandwidth_distribution_set_default(bcmolt_upstream_bandwidth_distribution *this);
+
+/** Packs a bcmolt_upstream_bandwidth_distribution to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_upstream_bandwidth_distribution_pack(const bcmolt_upstream_bandwidth_distribution *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_upstream_bandwidth_distribution from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_upstream_bandwidth_distribution_unpack(bcmolt_upstream_bandwidth_distribution *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_upstream_bandwidth_distribution struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_upstream_bandwidth_distribution_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_upstream_bandwidth_distribution is out of 
+ * bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_upstream_bandwidth_distribution_bounds_check(const bcmolt_upstream_bandwidth_distribution *this);
+
+/** Initializes a bcmolt_vlan_tag struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_vlan_tag_set_default(bcmolt_vlan_tag *this);
+
+/** Packs a bcmolt_vlan_tag to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_vlan_tag_pack(const bcmolt_vlan_tag *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_vlan_tag from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_vlan_tag_unpack(bcmolt_vlan_tag *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_vlan_tag struct and collects memory requirements 
+ * above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_vlan_tag_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_vlan_tag is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_vlan_tag_bounds_check(const bcmolt_vlan_tag *this);
+
+/** Initializes a bcmolt_xgpon_alloc_with_state struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_xgpon_alloc_with_state_set_default(bcmolt_xgpon_alloc_with_state *this);
+
+/** Packs a bcmolt_xgpon_alloc_with_state to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_alloc_with_state_pack(const bcmolt_xgpon_alloc_with_state *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_alloc_with_state from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_alloc_with_state_unpack(bcmolt_xgpon_alloc_with_state *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_xgpon_alloc_with_state struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_alloc_with_state_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_xgpon_alloc_with_state is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_alloc_with_state_bounds_check(const bcmolt_xgpon_alloc_with_state *this);
+
+/** Initializes a bcmolt_xgpon_alloc_with_state_list_u16_max_32 struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_xgpon_alloc_with_state_list_u16_max_32_set_default(bcmolt_xgpon_alloc_with_state_list_u16_max_32 *this);
+
+/** Packs a bcmolt_xgpon_alloc_with_state_list_u16_max_32 to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_alloc_with_state_list_u16_max_32_pack(const bcmolt_xgpon_alloc_with_state_list_u16_max_32 *this, bcmolt_buf *buf);
+
+/** Gets the number of bytes that a 
+ * bcmolt_xgpon_alloc_with_state_list_u16_max_32 would occupy on the wire 
+ *
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_alloc_with_state_list_u16_max_32_get_packed_length(const bcmolt_xgpon_alloc_with_state_list_u16_max_32 *this);
+
+/** Unpacks a bcmolt_xgpon_alloc_with_state_list_u16_max_32 from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_alloc_with_state_list_u16_max_32_unpack(bcmolt_xgpon_alloc_with_state_list_u16_max_32 *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_xgpon_alloc_with_state_list_u16_max_32 struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_alloc_with_state_list_u16_max_32_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_xgpon_alloc_with_state_list_u16_max_32 is 
+ * out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_alloc_with_state_list_u16_max_32_bounds_check(const bcmolt_xgpon_alloc_with_state_list_u16_max_32 *this);
+
+/** Initializes a bcmolt_xgpon_ed_state struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_xgpon_ed_state_set_default(bcmolt_xgpon_ed_state *this);
+
+/** Packs a bcmolt_xgpon_ed_state to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ed_state_pack(const bcmolt_xgpon_ed_state *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_ed_state from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ed_state_unpack(bcmolt_xgpon_ed_state *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_xgpon_ed_state struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_ed_state_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_xgpon_ed_state is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ed_state_bounds_check(const bcmolt_xgpon_ed_state *this);
+
+/** Initializes a bcmolt_xgpon_gem_id_list_u8_max_16 struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_xgpon_gem_id_list_u8_max_16_set_default(bcmolt_xgpon_gem_id_list_u8_max_16 *this);
+
+/** Packs a bcmolt_xgpon_gem_id_list_u8_max_16 to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_gem_id_list_u8_max_16_pack(const bcmolt_xgpon_gem_id_list_u8_max_16 *this, bcmolt_buf *buf);
+
+/** Gets the number of bytes that a bcmolt_xgpon_gem_id_list_u8_max_16 would 
+ * occupy on the wire 
+ *
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_gem_id_list_u8_max_16_get_packed_length(const bcmolt_xgpon_gem_id_list_u8_max_16 *this);
+
+/** Unpacks a bcmolt_xgpon_gem_id_list_u8_max_16 from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_gem_id_list_u8_max_16_unpack(bcmolt_xgpon_gem_id_list_u8_max_16 *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_xgpon_gem_id_list_u8_max_16 struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_gem_id_list_u8_max_16_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_xgpon_gem_id_list_u8_max_16 is out of 
+ * bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_gem_id_list_u8_max_16_bounds_check(const bcmolt_xgpon_gem_id_list_u8_max_16 *this);
+
+/** Initializes a bcmolt_xgpon_gem_port_with_state struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_xgpon_gem_port_with_state_set_default(bcmolt_xgpon_gem_port_with_state *this);
+
+/** Packs a bcmolt_xgpon_gem_port_with_state to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_with_state_pack(const bcmolt_xgpon_gem_port_with_state *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_gem_port_with_state from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_with_state_unpack(bcmolt_xgpon_gem_port_with_state *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_xgpon_gem_port_with_state struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_with_state_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_xgpon_gem_port_with_state is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_with_state_bounds_check(const bcmolt_xgpon_gem_port_with_state *this);
+
+/** Initializes a bcmolt_xgpon_gem_port_with_state_list_u16_max_128 struct.  
+ * This sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_xgpon_gem_port_with_state_list_u16_max_128_set_default(bcmolt_xgpon_gem_port_with_state_list_u16_max_128 *this);
+
+/** Packs a bcmolt_xgpon_gem_port_with_state_list_u16_max_128 to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_with_state_list_u16_max_128_pack(const bcmolt_xgpon_gem_port_with_state_list_u16_max_128 *this, bcmolt_buf *buf);
+
+/** Gets the number of bytes that a 
+ * bcmolt_xgpon_gem_port_with_state_list_u16_max_128 would occupy on the wire 
+ *
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_gem_port_with_state_list_u16_max_128_get_packed_length(const bcmolt_xgpon_gem_port_with_state_list_u16_max_128 *this);
+
+/** Unpacks a bcmolt_xgpon_gem_port_with_state_list_u16_max_128 from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_with_state_list_u16_max_128_unpack(bcmolt_xgpon_gem_port_with_state_list_u16_max_128 *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_xgpon_gem_port_with_state_list_u16_max_128 struct 
+ * and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_with_state_list_u16_max_128_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_xgpon_gem_port_with_state_list_u16_max_128 
+ * is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_with_state_list_u16_max_128_bounds_check(const bcmolt_xgpon_gem_port_with_state_list_u16_max_128 *this);
+
+/** Initializes a bcmolt_xgpon_gem_port_with_state_list_u16_max_256 struct.  
+ * This sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_xgpon_gem_port_with_state_list_u16_max_256_set_default(bcmolt_xgpon_gem_port_with_state_list_u16_max_256 *this);
+
+/** Packs a bcmolt_xgpon_gem_port_with_state_list_u16_max_256 to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_with_state_list_u16_max_256_pack(const bcmolt_xgpon_gem_port_with_state_list_u16_max_256 *this, bcmolt_buf *buf);
+
+/** Gets the number of bytes that a 
+ * bcmolt_xgpon_gem_port_with_state_list_u16_max_256 would occupy on the wire 
+ *
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_gem_port_with_state_list_u16_max_256_get_packed_length(const bcmolt_xgpon_gem_port_with_state_list_u16_max_256 *this);
+
+/** Unpacks a bcmolt_xgpon_gem_port_with_state_list_u16_max_256 from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_with_state_list_u16_max_256_unpack(bcmolt_xgpon_gem_port_with_state_list_u16_max_256 *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_xgpon_gem_port_with_state_list_u16_max_256 struct 
+ * and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_with_state_list_u16_max_256_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_xgpon_gem_port_with_state_list_u16_max_256 
+ * is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_with_state_list_u16_max_256_bounds_check(const bcmolt_xgpon_gem_port_with_state_list_u16_max_256 *this);
+
+/** Initializes a bcmolt_xgpon_key_exchange struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_xgpon_key_exchange_set_default(bcmolt_xgpon_key_exchange *this);
+
+/** Packs a bcmolt_xgpon_key_exchange to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_key_exchange_pack(const bcmolt_xgpon_key_exchange *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_key_exchange from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_key_exchange_unpack(bcmolt_xgpon_key_exchange *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_xgpon_key_exchange struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_key_exchange_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_xgpon_key_exchange is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_key_exchange_bounds_check(const bcmolt_xgpon_key_exchange *this);
+
+/** Initializes a bcmolt_xgpon_multicast_key struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_xgpon_multicast_key_set_default(bcmolt_xgpon_multicast_key *this);
+
+/** Packs a bcmolt_xgpon_multicast_key to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_multicast_key_pack(const bcmolt_xgpon_multicast_key *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_multicast_key from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_multicast_key_unpack(bcmolt_xgpon_multicast_key *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_xgpon_multicast_key struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_multicast_key_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_xgpon_multicast_key is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_multicast_key_bounds_check(const bcmolt_xgpon_multicast_key *this);
+
+/** Initializes a bcmolt_xgpon_ni_debug struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_xgpon_ni_debug_set_default(bcmolt_xgpon_ni_debug *this);
+
+/** Packs a bcmolt_xgpon_ni_debug to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_debug_pack(const bcmolt_xgpon_ni_debug *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_ni_debug from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_debug_unpack(bcmolt_xgpon_ni_debug *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_xgpon_ni_debug struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_ni_debug_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_xgpon_ni_debug is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_debug_bounds_check(const bcmolt_xgpon_ni_debug *this);
+
+/** Initializes a bcmolt_xgpon_onu_activation struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_xgpon_onu_activation_set_default(bcmolt_xgpon_onu_activation *this);
+
+/** Packs a bcmolt_xgpon_onu_activation to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_activation_pack(const bcmolt_xgpon_onu_activation *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_activation from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_activation_unpack(bcmolt_xgpon_onu_activation *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_xgpon_onu_activation struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_activation_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_xgpon_onu_activation is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_activation_bounds_check(const bcmolt_xgpon_onu_activation *this);
+
+/** Initializes a bcmolt_xgpon_onu_aes_key struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_xgpon_onu_aes_key_set_default(bcmolt_xgpon_onu_aes_key *this);
+
+/** Packs a bcmolt_xgpon_onu_aes_key to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_aes_key_pack(const bcmolt_xgpon_onu_aes_key *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_aes_key from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_aes_key_unpack(bcmolt_xgpon_onu_aes_key *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_xgpon_onu_aes_key struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_aes_key_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_xgpon_onu_aes_key is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_aes_key_bounds_check(const bcmolt_xgpon_onu_aes_key *this);
+
+/** Initializes a bcmolt_xgpon_onu_alarm_state struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_xgpon_onu_alarm_state_set_default(bcmolt_xgpon_onu_alarm_state *this);
+
+/** Packs a bcmolt_xgpon_onu_alarm_state to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_alarm_state_pack(const bcmolt_xgpon_onu_alarm_state *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_alarm_state from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_alarm_state_unpack(bcmolt_xgpon_onu_alarm_state *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_xgpon_onu_alarm_state struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_alarm_state_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_xgpon_onu_alarm_state is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_alarm_state_bounds_check(const bcmolt_xgpon_onu_alarm_state *this);
+
+/** Initializes a bcmolt_xgpon_onu_alarms struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_xgpon_onu_alarms_set_default(bcmolt_xgpon_onu_alarms *this);
+
+/** Packs a bcmolt_xgpon_onu_alarms to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_alarms_pack(const bcmolt_xgpon_onu_alarms *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_alarms from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_alarms_unpack(bcmolt_xgpon_onu_alarms *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_xgpon_onu_alarms struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_alarms_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_xgpon_onu_alarms is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_alarms_bounds_check(const bcmolt_xgpon_onu_alarms *this);
+
+/** Initializes a bcmolt_xgpon_onu_alarms_thresholds struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_xgpon_onu_alarms_thresholds_set_default(bcmolt_xgpon_onu_alarms_thresholds *this);
+
+/** Packs a bcmolt_xgpon_onu_alarms_thresholds to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_alarms_thresholds_pack(const bcmolt_xgpon_onu_alarms_thresholds *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_alarms_thresholds from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_alarms_thresholds_unpack(bcmolt_xgpon_onu_alarms_thresholds *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_xgpon_onu_alarms_thresholds struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_alarms_thresholds_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_xgpon_onu_alarms_thresholds is out of 
+ * bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_alarms_thresholds_bounds_check(const bcmolt_xgpon_onu_alarms_thresholds *this);
+
+/** Initializes a bcmolt_xgpon_onu_eqd struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_xgpon_onu_eqd_set_default(bcmolt_xgpon_onu_eqd *this);
+
+/** Packs a bcmolt_xgpon_onu_eqd to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_eqd_pack(const bcmolt_xgpon_onu_eqd *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_eqd from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_eqd_unpack(bcmolt_xgpon_onu_eqd *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_xgpon_onu_eqd struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_eqd_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_xgpon_onu_eqd is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_eqd_bounds_check(const bcmolt_xgpon_onu_eqd *this);
+
+/** Initializes a bcmolt_xgpon_onu_eqd_list_u32 struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_xgpon_onu_eqd_list_u32_set_default(bcmolt_xgpon_onu_eqd_list_u32 *this);
+
+/** Packs a bcmolt_xgpon_onu_eqd_list_u32 to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_eqd_list_u32_pack(const bcmolt_xgpon_onu_eqd_list_u32 *this, bcmolt_buf *buf);
+
+/** Gets the number of bytes that a bcmolt_xgpon_onu_eqd_list_u32 would occupy 
+ * on the wire 
+ *
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_eqd_list_u32_get_packed_length(const bcmolt_xgpon_onu_eqd_list_u32 *this);
+
+/** Unpacks a bcmolt_xgpon_onu_eqd_list_u32 from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_eqd_list_u32_unpack(bcmolt_xgpon_onu_eqd_list_u32 *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_xgpon_onu_eqd_list_u32 struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_eqd_list_u32_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_xgpon_onu_eqd_list_u32 is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_eqd_list_u32_bounds_check(const bcmolt_xgpon_onu_eqd_list_u32 *this);
+
+/** Initializes a bcmolt_xgpon_onu_registration_keys struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_xgpon_onu_registration_keys_set_default(bcmolt_xgpon_onu_registration_keys *this);
+
+/** Packs a bcmolt_xgpon_onu_registration_keys to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_registration_keys_pack(const bcmolt_xgpon_onu_registration_keys *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_registration_keys from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_registration_keys_unpack(bcmolt_xgpon_onu_registration_keys *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_xgpon_onu_registration_keys struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_registration_keys_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_xgpon_onu_registration_keys is out of 
+ * bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_registration_keys_bounds_check(const bcmolt_xgpon_onu_registration_keys *this);
+
+/** Initializes a bcmolt_xgpon_onu_with_state struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_xgpon_onu_with_state_set_default(bcmolt_xgpon_onu_with_state *this);
+
+/** Packs a bcmolt_xgpon_onu_with_state to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_with_state_pack(const bcmolt_xgpon_onu_with_state *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_onu_with_state from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_with_state_unpack(bcmolt_xgpon_onu_with_state *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_xgpon_onu_with_state struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_with_state_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_xgpon_onu_with_state is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_with_state_bounds_check(const bcmolt_xgpon_onu_with_state *this);
+
+/** Initializes a bcmolt_xgpon_onu_with_state_list_u16_max_510 struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_xgpon_onu_with_state_list_u16_max_510_set_default(bcmolt_xgpon_onu_with_state_list_u16_max_510 *this);
+
+/** Packs a bcmolt_xgpon_onu_with_state_list_u16_max_510 to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_with_state_list_u16_max_510_pack(const bcmolt_xgpon_onu_with_state_list_u16_max_510 *this, bcmolt_buf *buf);
+
+/** Gets the number of bytes that a bcmolt_xgpon_onu_with_state_list_u16_max_510 
+ * would occupy on the wire 
+ *
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_with_state_list_u16_max_510_get_packed_length(const bcmolt_xgpon_onu_with_state_list_u16_max_510 *this);
+
+/** Unpacks a bcmolt_xgpon_onu_with_state_list_u16_max_510 from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_with_state_list_u16_max_510_unpack(bcmolt_xgpon_onu_with_state_list_u16_max_510 *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_xgpon_onu_with_state_list_u16_max_510 struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_with_state_list_u16_max_510_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_xgpon_onu_with_state_list_u16_max_510 is 
+ * out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_with_state_list_u16_max_510_bounds_check(const bcmolt_xgpon_onu_with_state_list_u16_max_510 *this);
+
+/** Initializes a bcmolt_xgpon_ploam_handling struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_xgpon_ploam_handling_set_default(bcmolt_xgpon_ploam_handling *this);
+
+/** Packs a bcmolt_xgpon_ploam_handling to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ploam_handling_pack(const bcmolt_xgpon_ploam_handling *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_ploam_handling from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ploam_handling_unpack(bcmolt_xgpon_ploam_handling *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_xgpon_ploam_handling struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_ploam_handling_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_xgpon_ploam_handling is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ploam_handling_bounds_check(const bcmolt_xgpon_ploam_handling *this);
+
+/** Initializes a bcmolt_xgpon_protection_switching struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_xgpon_protection_switching_set_default(bcmolt_xgpon_protection_switching *this);
+
+/** Packs a bcmolt_xgpon_protection_switching to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_protection_switching_pack(const bcmolt_xgpon_protection_switching *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_protection_switching from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_protection_switching_unpack(bcmolt_xgpon_protection_switching *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_xgpon_protection_switching struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_protection_switching_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_xgpon_protection_switching is out of 
+ * bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_protection_switching_bounds_check(const bcmolt_xgpon_protection_switching *this);
+
+/** Initializes a bcmolt_xgpon_protection_switching_debug struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_xgpon_protection_switching_debug_set_default(bcmolt_xgpon_protection_switching_debug *this);
+
+/** Packs a bcmolt_xgpon_protection_switching_debug to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_protection_switching_debug_pack(const bcmolt_xgpon_protection_switching_debug *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_protection_switching_debug from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_protection_switching_debug_unpack(bcmolt_xgpon_protection_switching_debug *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_xgpon_protection_switching_debug struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_protection_switching_debug_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_xgpon_protection_switching_debug is out of 
+ * bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_protection_switching_debug_bounds_check(const bcmolt_xgpon_protection_switching_debug *this);
+
+/** Initializes a bcmolt_xgpon_rssi_normal_config struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_xgpon_rssi_normal_config_set_default(bcmolt_xgpon_rssi_normal_config *this);
+
+/** Packs a bcmolt_xgpon_rssi_normal_config to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_rssi_normal_config_pack(const bcmolt_xgpon_rssi_normal_config *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_rssi_normal_config from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_rssi_normal_config_unpack(bcmolt_xgpon_rssi_normal_config *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_xgpon_rssi_normal_config struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_rssi_normal_config_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_xgpon_rssi_normal_config is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_rssi_normal_config_bounds_check(const bcmolt_xgpon_rssi_normal_config *this);
+
+/** Initializes a bcmolt_xgpon_rssi_ranging_config struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_xgpon_rssi_ranging_config_set_default(bcmolt_xgpon_rssi_ranging_config *this);
+
+/** Packs a bcmolt_xgpon_rssi_ranging_config to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_rssi_ranging_config_pack(const bcmolt_xgpon_rssi_ranging_config *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_rssi_ranging_config from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_rssi_ranging_config_unpack(bcmolt_xgpon_rssi_ranging_config *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_xgpon_rssi_ranging_config struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_rssi_ranging_config_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_xgpon_rssi_ranging_config is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_rssi_ranging_config_bounds_check(const bcmolt_xgpon_rssi_ranging_config *this);
+
+/** Initializes a bcmolt_xgpon_rx_ranging_sm_pattern struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_xgpon_rx_ranging_sm_pattern_set_default(bcmolt_xgpon_rx_ranging_sm_pattern *this);
+
+/** Packs a bcmolt_xgpon_rx_ranging_sm_pattern to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_rx_ranging_sm_pattern_pack(const bcmolt_xgpon_rx_ranging_sm_pattern *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_rx_ranging_sm_pattern from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_rx_ranging_sm_pattern_unpack(bcmolt_xgpon_rx_ranging_sm_pattern *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_xgpon_rx_ranging_sm_pattern struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_rx_ranging_sm_pattern_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_xgpon_rx_ranging_sm_pattern is out of 
+ * bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_rx_ranging_sm_pattern_bounds_check(const bcmolt_xgpon_rx_ranging_sm_pattern *this);
+
+/** Initializes a bcmolt_xgpon_serdes_configuration struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_xgpon_serdes_configuration_set_default(bcmolt_xgpon_serdes_configuration *this);
+
+/** Packs a bcmolt_xgpon_serdes_configuration to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_serdes_configuration_pack(const bcmolt_xgpon_serdes_configuration *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_serdes_configuration from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_serdes_configuration_unpack(bcmolt_xgpon_serdes_configuration *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_xgpon_serdes_configuration struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_serdes_configuration_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_xgpon_serdes_configuration is out of 
+ * bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_serdes_configuration_bounds_check(const bcmolt_xgpon_serdes_configuration *this);
+
+/** Initializes a bcmolt_xgpon_sn_acquisition struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_xgpon_sn_acquisition_set_default(bcmolt_xgpon_sn_acquisition *this);
+
+/** Packs a bcmolt_xgpon_sn_acquisition to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_sn_acquisition_pack(const bcmolt_xgpon_sn_acquisition *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_sn_acquisition from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_sn_acquisition_unpack(bcmolt_xgpon_sn_acquisition *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_xgpon_sn_acquisition struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_sn_acquisition_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_xgpon_sn_acquisition is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_sn_acquisition_bounds_check(const bcmolt_xgpon_sn_acquisition *this);
+
+/** Initializes a bcmolt_xgpon_trx_debug struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ */
+void bcmolt_xgpon_trx_debug_set_default(bcmolt_xgpon_trx_debug *this);
+
+/** Packs a bcmolt_xgpon_trx_debug to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_trx_debug_pack(const bcmolt_xgpon_trx_debug *this, bcmolt_buf *buf);
+
+/** Unpacks a bcmolt_xgpon_trx_debug from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_trx_debug_unpack(bcmolt_xgpon_trx_debug *this, bcmolt_buf *buf, void **extra_mem);
+
+/** Scans past a packed bcmolt_xgpon_trx_debug struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_trx_debug_scan(bcmolt_buf *packed, uint32_t *extra_mem);
+
+/** Checks if any field in the bcmolt_xgpon_trx_debug is out of bounds 
+ *
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_trx_debug_bounds_check(const bcmolt_xgpon_trx_debug *this);
+
+/** Initializes a bcmolt_ae_ni_key struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_ae_ni_key_set_default(bcmolt_ae_ni_key *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_ae_ni_key to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ae_ni_key_pack(const bcmolt_ae_ni_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_ae_ni_key would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_ae_ni_key_get_packed_length(const bcmolt_ae_ni_key *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_ae_ni_key from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ae_ni_key_unpack(bcmolt_ae_ni_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_ae_ni_key struct and collects memory requirements 
+ * above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_ae_ni_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_ae_ni_key is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ae_ni_key_bounds_check(const bcmolt_ae_ni_key *this, bcmolt_presence_mask fields_present, bcmolt_ae_ni_key_id *failed_prop);
+
+/** Initializes a bcmolt_ae_ni_cfg_data struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_ae_ni_cfg_data_set_default(bcmolt_ae_ni_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_ae_ni_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ae_ni_cfg_data_pack(const bcmolt_ae_ni_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_ae_ni_cfg_data would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_ae_ni_cfg_data_get_packed_length(const bcmolt_ae_ni_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_ae_ni_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ae_ni_cfg_data_unpack(bcmolt_ae_ni_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_ae_ni_cfg_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_ae_ni_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_ae_ni_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ae_ni_cfg_data_bounds_check(const bcmolt_ae_ni_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_ae_ni_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_ae_ni_set_ae_ni_en_state_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_ae_ni_set_ae_ni_en_state_data_set_default(bcmolt_ae_ni_set_ae_ni_en_state_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_ae_ni_set_ae_ni_en_state_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ae_ni_set_ae_ni_en_state_data_pack(const bcmolt_ae_ni_set_ae_ni_en_state_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_ae_ni_set_ae_ni_en_state_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_ae_ni_set_ae_ni_en_state_data_get_packed_length(const bcmolt_ae_ni_set_ae_ni_en_state_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_ae_ni_set_ae_ni_en_state_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ae_ni_set_ae_ni_en_state_data_unpack(bcmolt_ae_ni_set_ae_ni_en_state_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_ae_ni_set_ae_ni_en_state_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_ae_ni_set_ae_ni_en_state_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_ae_ni_set_ae_ni_en_state_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ae_ni_set_ae_ni_en_state_data_bounds_check(const bcmolt_ae_ni_set_ae_ni_en_state_data *this, bcmolt_presence_mask fields_present, bcmolt_ae_ni_set_ae_ni_en_state_id *failed_prop);
+
+/** Initializes a bcmolt_ae_path_ds_key struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_ae_path_ds_key_set_default(bcmolt_ae_path_ds_key *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_ae_path_ds_key to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ae_path_ds_key_pack(const bcmolt_ae_path_ds_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_ae_path_ds_key would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_ae_path_ds_key_get_packed_length(const bcmolt_ae_path_ds_key *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_ae_path_ds_key from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ae_path_ds_key_unpack(bcmolt_ae_path_ds_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_ae_path_ds_key struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_ae_path_ds_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_ae_path_ds_key is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ae_path_ds_key_bounds_check(const bcmolt_ae_path_ds_key *this, bcmolt_presence_mask fields_present, bcmolt_ae_path_ds_key_id *failed_prop);
+
+/** Initializes a bcmolt_ae_path_ds_stat_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_ae_path_ds_stat_data_set_default(bcmolt_ae_path_ds_stat_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_ae_path_ds_stat_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ae_path_ds_stat_data_pack(const bcmolt_ae_path_ds_stat_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_ae_path_ds_stat_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_ae_path_ds_stat_data_get_packed_length(const bcmolt_ae_path_ds_stat_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_ae_path_ds_stat_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ae_path_ds_stat_data_unpack(bcmolt_ae_path_ds_stat_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_ae_path_ds_stat_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_ae_path_ds_stat_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_ae_path_ds_stat_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ae_path_ds_stat_data_bounds_check(const bcmolt_ae_path_ds_stat_data *this, bcmolt_presence_mask fields_present, bcmolt_ae_path_ds_stat_id *failed_prop);
+
+/** Initializes a bcmolt_ae_path_ds_stat_cfg_data struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_ae_path_ds_stat_cfg_data_set_default(bcmolt_ae_path_ds_stat_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_ae_path_ds_stat_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ae_path_ds_stat_cfg_data_pack(const bcmolt_ae_path_ds_stat_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_ae_path_ds_stat_cfg_data would occupy 
+ * on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_ae_path_ds_stat_cfg_data_get_packed_length(const bcmolt_ae_path_ds_stat_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_ae_path_ds_stat_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ae_path_ds_stat_cfg_data_unpack(bcmolt_ae_path_ds_stat_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_ae_path_ds_stat_cfg_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_ae_path_ds_stat_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_ae_path_ds_stat_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ae_path_ds_stat_cfg_data_bounds_check(const bcmolt_ae_path_ds_stat_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_ae_path_ds_stat_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_ae_path_ds_stat_alarm_cleared_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_ae_path_ds_stat_alarm_cleared_data_set_default(bcmolt_ae_path_ds_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_ae_path_ds_stat_alarm_cleared_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ae_path_ds_stat_alarm_cleared_data_pack(const bcmolt_ae_path_ds_stat_alarm_cleared_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_ae_path_ds_stat_alarm_cleared_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_ae_path_ds_stat_alarm_cleared_data_get_packed_length(const bcmolt_ae_path_ds_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_ae_path_ds_stat_alarm_cleared_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ae_path_ds_stat_alarm_cleared_data_unpack(bcmolt_ae_path_ds_stat_alarm_cleared_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_ae_path_ds_stat_alarm_cleared_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_ae_path_ds_stat_alarm_cleared_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_ae_path_ds_stat_alarm_cleared_data is out 
+ * of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ae_path_ds_stat_alarm_cleared_data_bounds_check(const bcmolt_ae_path_ds_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present, bcmolt_ae_path_ds_stat_alarm_cleared_id *failed_prop);
+
+/** Initializes a bcmolt_ae_path_ds_stat_alarm_raised_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_ae_path_ds_stat_alarm_raised_data_set_default(bcmolt_ae_path_ds_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_ae_path_ds_stat_alarm_raised_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ae_path_ds_stat_alarm_raised_data_pack(const bcmolt_ae_path_ds_stat_alarm_raised_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_ae_path_ds_stat_alarm_raised_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_ae_path_ds_stat_alarm_raised_data_get_packed_length(const bcmolt_ae_path_ds_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_ae_path_ds_stat_alarm_raised_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ae_path_ds_stat_alarm_raised_data_unpack(bcmolt_ae_path_ds_stat_alarm_raised_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_ae_path_ds_stat_alarm_raised_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_ae_path_ds_stat_alarm_raised_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_ae_path_ds_stat_alarm_raised_data is out 
+ * of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ae_path_ds_stat_alarm_raised_data_bounds_check(const bcmolt_ae_path_ds_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present, bcmolt_ae_path_ds_stat_alarm_raised_id *failed_prop);
+
+/** Initializes a bcmolt_ae_path_ds_auto_cfg_data struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_ae_path_ds_auto_cfg_data_set_default(bcmolt_ae_path_ds_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_ae_path_ds_auto_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ae_path_ds_auto_cfg_data_pack(const bcmolt_ae_path_ds_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_ae_path_ds_auto_cfg_data would occupy 
+ * on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_ae_path_ds_auto_cfg_data_get_packed_length(const bcmolt_ae_path_ds_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_ae_path_ds_auto_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ae_path_ds_auto_cfg_data_unpack(bcmolt_ae_path_ds_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_ae_path_ds_auto_cfg_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_ae_path_ds_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_ae_path_ds_auto_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ae_path_ds_auto_cfg_data_bounds_check(const bcmolt_ae_path_ds_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_ae_path_ds_auto_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_ae_path_us_key struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_ae_path_us_key_set_default(bcmolt_ae_path_us_key *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_ae_path_us_key to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ae_path_us_key_pack(const bcmolt_ae_path_us_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_ae_path_us_key would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_ae_path_us_key_get_packed_length(const bcmolt_ae_path_us_key *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_ae_path_us_key from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ae_path_us_key_unpack(bcmolt_ae_path_us_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_ae_path_us_key struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_ae_path_us_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_ae_path_us_key is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ae_path_us_key_bounds_check(const bcmolt_ae_path_us_key *this, bcmolt_presence_mask fields_present, bcmolt_ae_path_us_key_id *failed_prop);
+
+/** Initializes a bcmolt_ae_path_us_stat_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_ae_path_us_stat_data_set_default(bcmolt_ae_path_us_stat_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_ae_path_us_stat_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ae_path_us_stat_data_pack(const bcmolt_ae_path_us_stat_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_ae_path_us_stat_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_ae_path_us_stat_data_get_packed_length(const bcmolt_ae_path_us_stat_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_ae_path_us_stat_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ae_path_us_stat_data_unpack(bcmolt_ae_path_us_stat_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_ae_path_us_stat_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_ae_path_us_stat_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_ae_path_us_stat_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ae_path_us_stat_data_bounds_check(const bcmolt_ae_path_us_stat_data *this, bcmolt_presence_mask fields_present, bcmolt_ae_path_us_stat_id *failed_prop);
+
+/** Initializes a bcmolt_ae_path_us_stat_cfg_data struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_ae_path_us_stat_cfg_data_set_default(bcmolt_ae_path_us_stat_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_ae_path_us_stat_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ae_path_us_stat_cfg_data_pack(const bcmolt_ae_path_us_stat_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_ae_path_us_stat_cfg_data would occupy 
+ * on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_ae_path_us_stat_cfg_data_get_packed_length(const bcmolt_ae_path_us_stat_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_ae_path_us_stat_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ae_path_us_stat_cfg_data_unpack(bcmolt_ae_path_us_stat_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_ae_path_us_stat_cfg_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_ae_path_us_stat_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_ae_path_us_stat_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ae_path_us_stat_cfg_data_bounds_check(const bcmolt_ae_path_us_stat_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_ae_path_us_stat_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_ae_path_us_stat_alarm_cleared_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_ae_path_us_stat_alarm_cleared_data_set_default(bcmolt_ae_path_us_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_ae_path_us_stat_alarm_cleared_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ae_path_us_stat_alarm_cleared_data_pack(const bcmolt_ae_path_us_stat_alarm_cleared_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_ae_path_us_stat_alarm_cleared_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_ae_path_us_stat_alarm_cleared_data_get_packed_length(const bcmolt_ae_path_us_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_ae_path_us_stat_alarm_cleared_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ae_path_us_stat_alarm_cleared_data_unpack(bcmolt_ae_path_us_stat_alarm_cleared_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_ae_path_us_stat_alarm_cleared_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_ae_path_us_stat_alarm_cleared_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_ae_path_us_stat_alarm_cleared_data is out 
+ * of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ae_path_us_stat_alarm_cleared_data_bounds_check(const bcmolt_ae_path_us_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present, bcmolt_ae_path_us_stat_alarm_cleared_id *failed_prop);
+
+/** Initializes a bcmolt_ae_path_us_stat_alarm_raised_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_ae_path_us_stat_alarm_raised_data_set_default(bcmolt_ae_path_us_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_ae_path_us_stat_alarm_raised_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ae_path_us_stat_alarm_raised_data_pack(const bcmolt_ae_path_us_stat_alarm_raised_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_ae_path_us_stat_alarm_raised_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_ae_path_us_stat_alarm_raised_data_get_packed_length(const bcmolt_ae_path_us_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_ae_path_us_stat_alarm_raised_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ae_path_us_stat_alarm_raised_data_unpack(bcmolt_ae_path_us_stat_alarm_raised_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_ae_path_us_stat_alarm_raised_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_ae_path_us_stat_alarm_raised_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_ae_path_us_stat_alarm_raised_data is out 
+ * of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ae_path_us_stat_alarm_raised_data_bounds_check(const bcmolt_ae_path_us_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present, bcmolt_ae_path_us_stat_alarm_raised_id *failed_prop);
+
+/** Initializes a bcmolt_ae_path_us_auto_cfg_data struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_ae_path_us_auto_cfg_data_set_default(bcmolt_ae_path_us_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_ae_path_us_auto_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ae_path_us_auto_cfg_data_pack(const bcmolt_ae_path_us_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_ae_path_us_auto_cfg_data would occupy 
+ * on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_ae_path_us_auto_cfg_data_get_packed_length(const bcmolt_ae_path_us_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_ae_path_us_auto_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ae_path_us_auto_cfg_data_unpack(bcmolt_ae_path_us_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_ae_path_us_auto_cfg_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_ae_path_us_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_ae_path_us_auto_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_ae_path_us_auto_cfg_data_bounds_check(const bcmolt_ae_path_us_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_ae_path_us_auto_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_channel_key struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_channel_key_set_default(bcmolt_channel_key *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_channel_key to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_channel_key_pack(const bcmolt_channel_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_channel_key would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_channel_key_get_packed_length(const bcmolt_channel_key *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_channel_key from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_channel_key_unpack(bcmolt_channel_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_channel_key struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_channel_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_channel_key is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_channel_key_bounds_check(const bcmolt_channel_key *this, bcmolt_presence_mask fields_present, bcmolt_channel_key_id *failed_prop);
+
+/** Initializes a bcmolt_channel_cfg_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_channel_cfg_data_set_default(bcmolt_channel_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_channel_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_channel_cfg_data_pack(const bcmolt_channel_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_channel_cfg_data would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_channel_cfg_data_get_packed_length(const bcmolt_channel_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_channel_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_channel_cfg_data_unpack(bcmolt_channel_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_channel_cfg_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_channel_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_channel_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_channel_cfg_data_bounds_check(const bcmolt_channel_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_channel_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_debug_key struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_debug_key_set_default(bcmolt_debug_key *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_debug_key to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_debug_key_pack(const bcmolt_debug_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_debug_key would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_debug_key_get_packed_length(const bcmolt_debug_key *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_debug_key from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_debug_key_unpack(bcmolt_debug_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_debug_key struct and collects memory requirements 
+ * above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_debug_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_debug_key is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_debug_key_bounds_check(const bcmolt_debug_key *this, bcmolt_presence_mask fields_present, bcmolt_debug_key_id *failed_prop);
+
+/** Initializes a bcmolt_debug_cfg_data struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_debug_cfg_data_set_default(bcmolt_debug_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_debug_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_debug_cfg_data_pack(const bcmolt_debug_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_debug_cfg_data would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_debug_cfg_data_get_packed_length(const bcmolt_debug_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_debug_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_debug_cfg_data_unpack(bcmolt_debug_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_debug_cfg_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_debug_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_debug_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_debug_cfg_data_bounds_check(const bcmolt_debug_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_debug_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_debug_cli_output_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_debug_cli_output_data_set_default(bcmolt_debug_cli_output_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_debug_cli_output_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_debug_cli_output_data_pack(const bcmolt_debug_cli_output_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_debug_cli_output_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_debug_cli_output_data_get_packed_length(const bcmolt_debug_cli_output_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_debug_cli_output_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_debug_cli_output_data_unpack(bcmolt_debug_cli_output_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_debug_cli_output_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_debug_cli_output_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_debug_cli_output_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_debug_cli_output_data_bounds_check(const bcmolt_debug_cli_output_data *this, bcmolt_presence_mask fields_present, bcmolt_debug_cli_output_id *failed_prop);
+
+/** Initializes a bcmolt_debug_auto_cfg_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_debug_auto_cfg_data_set_default(bcmolt_debug_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_debug_auto_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_debug_auto_cfg_data_pack(const bcmolt_debug_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_debug_auto_cfg_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_debug_auto_cfg_data_get_packed_length(const bcmolt_debug_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_debug_auto_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_debug_auto_cfg_data_unpack(bcmolt_debug_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_debug_auto_cfg_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_debug_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_debug_auto_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_debug_auto_cfg_data_bounds_check(const bcmolt_debug_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_debug_auto_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_debug_cli_input_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_debug_cli_input_data_set_default(bcmolt_debug_cli_input_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_debug_cli_input_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_debug_cli_input_data_pack(const bcmolt_debug_cli_input_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_debug_cli_input_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_debug_cli_input_data_get_packed_length(const bcmolt_debug_cli_input_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_debug_cli_input_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_debug_cli_input_data_unpack(bcmolt_debug_cli_input_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_debug_cli_input_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_debug_cli_input_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_debug_cli_input_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_debug_cli_input_data_bounds_check(const bcmolt_debug_cli_input_data *this, bcmolt_presence_mask fields_present, bcmolt_debug_cli_input_id *failed_prop);
+
+/** Initializes a bcmolt_device_key struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_device_key_set_default(bcmolt_device_key *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_device_key to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_key_pack(const bcmolt_device_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_device_key would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_device_key_get_packed_length(const bcmolt_device_key *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_device_key from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_key_unpack(bcmolt_device_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_device_key struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_device_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_device_key is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_key_bounds_check(const bcmolt_device_key *this, bcmolt_presence_mask fields_present, bcmolt_device_key_id *failed_prop);
+
+/** Initializes a bcmolt_device_cfg_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_device_cfg_data_set_default(bcmolt_device_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_device_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_cfg_data_pack(const bcmolt_device_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_device_cfg_data would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_device_cfg_data_get_packed_length(const bcmolt_device_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_device_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_cfg_data_unpack(bcmolt_device_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_device_cfg_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_device_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_device_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_cfg_data_bounds_check(const bcmolt_device_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_device_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_device_connection_complete_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_device_connection_complete_data_set_default(bcmolt_device_connection_complete_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_device_connection_complete_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_connection_complete_data_pack(const bcmolt_device_connection_complete_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_device_connection_complete_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_device_connection_complete_data_get_packed_length(const bcmolt_device_connection_complete_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_device_connection_complete_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_connection_complete_data_unpack(bcmolt_device_connection_complete_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_device_connection_complete_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_device_connection_complete_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_device_connection_complete_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_connection_complete_data_bounds_check(const bcmolt_device_connection_complete_data *this, bcmolt_presence_mask fields_present, bcmolt_device_connection_complete_id *failed_prop);
+
+/** Initializes a bcmolt_device_connection_failure_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_device_connection_failure_data_set_default(bcmolt_device_connection_failure_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_device_connection_failure_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_connection_failure_data_pack(const bcmolt_device_connection_failure_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_device_connection_failure_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_device_connection_failure_data_get_packed_length(const bcmolt_device_connection_failure_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_device_connection_failure_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_connection_failure_data_unpack(bcmolt_device_connection_failure_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_device_connection_failure_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_device_connection_failure_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_device_connection_failure_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_connection_failure_data_bounds_check(const bcmolt_device_connection_failure_data *this, bcmolt_presence_mask fields_present, bcmolt_device_connection_failure_id *failed_prop);
+
+/** Initializes a bcmolt_device_ddr_test_complete_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_device_ddr_test_complete_data_set_default(bcmolt_device_ddr_test_complete_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_device_ddr_test_complete_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_ddr_test_complete_data_pack(const bcmolt_device_ddr_test_complete_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_device_ddr_test_complete_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_device_ddr_test_complete_data_get_packed_length(const bcmolt_device_ddr_test_complete_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_device_ddr_test_complete_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_ddr_test_complete_data_unpack(bcmolt_device_ddr_test_complete_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_device_ddr_test_complete_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_device_ddr_test_complete_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_device_ddr_test_complete_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_ddr_test_complete_data_bounds_check(const bcmolt_device_ddr_test_complete_data *this, bcmolt_presence_mask fields_present, bcmolt_device_ddr_test_complete_id *failed_prop);
+
+/** Initializes a bcmolt_device_device_keep_alive_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_device_device_keep_alive_data_set_default(bcmolt_device_device_keep_alive_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_device_device_keep_alive_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_device_keep_alive_data_pack(const bcmolt_device_device_keep_alive_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_device_device_keep_alive_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_device_device_keep_alive_data_get_packed_length(const bcmolt_device_device_keep_alive_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_device_device_keep_alive_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_device_keep_alive_data_unpack(bcmolt_device_device_keep_alive_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_device_device_keep_alive_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_device_device_keep_alive_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_device_device_keep_alive_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_device_keep_alive_data_bounds_check(const bcmolt_device_device_keep_alive_data *this, bcmolt_presence_mask fields_present, bcmolt_device_device_keep_alive_id *failed_prop);
+
+/** Initializes a bcmolt_device_device_ready_data struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_device_device_ready_data_set_default(bcmolt_device_device_ready_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_device_device_ready_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_device_ready_data_pack(const bcmolt_device_device_ready_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_device_device_ready_data would occupy 
+ * on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_device_device_ready_data_get_packed_length(const bcmolt_device_device_ready_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_device_device_ready_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_device_ready_data_unpack(bcmolt_device_device_ready_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_device_device_ready_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_device_device_ready_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_device_device_ready_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_device_ready_data_bounds_check(const bcmolt_device_device_ready_data *this, bcmolt_presence_mask fields_present, bcmolt_device_device_ready_id *failed_prop);
+
+/** Initializes a bcmolt_device_image_transfer_complete_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_device_image_transfer_complete_data_set_default(bcmolt_device_image_transfer_complete_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_device_image_transfer_complete_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_image_transfer_complete_data_pack(const bcmolt_device_image_transfer_complete_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_device_image_transfer_complete_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_device_image_transfer_complete_data_get_packed_length(const bcmolt_device_image_transfer_complete_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_device_image_transfer_complete_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_image_transfer_complete_data_unpack(bcmolt_device_image_transfer_complete_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_device_image_transfer_complete_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_device_image_transfer_complete_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_device_image_transfer_complete_data is out 
+ * of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_image_transfer_complete_data_bounds_check(const bcmolt_device_image_transfer_complete_data *this, bcmolt_presence_mask fields_present, bcmolt_device_image_transfer_complete_id *failed_prop);
+
+/** Initializes a bcmolt_device_indications_dropped_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_device_indications_dropped_data_set_default(bcmolt_device_indications_dropped_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_device_indications_dropped_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_indications_dropped_data_pack(const bcmolt_device_indications_dropped_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_device_indications_dropped_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_device_indications_dropped_data_get_packed_length(const bcmolt_device_indications_dropped_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_device_indications_dropped_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_indications_dropped_data_unpack(bcmolt_device_indications_dropped_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_device_indications_dropped_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_device_indications_dropped_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_device_indications_dropped_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_indications_dropped_data_bounds_check(const bcmolt_device_indications_dropped_data *this, bcmolt_presence_mask fields_present, bcmolt_device_indications_dropped_id *failed_prop);
+
+/** Initializes a bcmolt_device_sw_error_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_device_sw_error_data_set_default(bcmolt_device_sw_error_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_device_sw_error_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_sw_error_data_pack(const bcmolt_device_sw_error_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_device_sw_error_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_device_sw_error_data_get_packed_length(const bcmolt_device_sw_error_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_device_sw_error_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_sw_error_data_unpack(bcmolt_device_sw_error_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_device_sw_error_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_device_sw_error_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_device_sw_error_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_sw_error_data_bounds_check(const bcmolt_device_sw_error_data *this, bcmolt_presence_mask fields_present, bcmolt_device_sw_error_id *failed_prop);
+
+/** Initializes a bcmolt_device_sw_exception_data struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_device_sw_exception_data_set_default(bcmolt_device_sw_exception_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_device_sw_exception_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_sw_exception_data_pack(const bcmolt_device_sw_exception_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_device_sw_exception_data would occupy 
+ * on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_device_sw_exception_data_get_packed_length(const bcmolt_device_sw_exception_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_device_sw_exception_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_sw_exception_data_unpack(bcmolt_device_sw_exception_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_device_sw_exception_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_device_sw_exception_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_device_sw_exception_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_sw_exception_data_bounds_check(const bcmolt_device_sw_exception_data *this, bcmolt_presence_mask fields_present, bcmolt_device_sw_exception_id *failed_prop);
+
+/** Initializes a bcmolt_device_auto_cfg_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_device_auto_cfg_data_set_default(bcmolt_device_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_device_auto_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_auto_cfg_data_pack(const bcmolt_device_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_device_auto_cfg_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_device_auto_cfg_data_get_packed_length(const bcmolt_device_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_device_auto_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_auto_cfg_data_unpack(bcmolt_device_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_device_auto_cfg_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_device_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_device_auto_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_auto_cfg_data_bounds_check(const bcmolt_device_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_device_auto_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_device_host_keep_alive_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_device_host_keep_alive_data_set_default(bcmolt_device_host_keep_alive_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_device_host_keep_alive_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_host_keep_alive_data_pack(const bcmolt_device_host_keep_alive_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_device_host_keep_alive_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_device_host_keep_alive_data_get_packed_length(const bcmolt_device_host_keep_alive_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_device_host_keep_alive_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_host_keep_alive_data_unpack(bcmolt_device_host_keep_alive_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_device_host_keep_alive_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_device_host_keep_alive_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_device_host_keep_alive_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_host_keep_alive_data_bounds_check(const bcmolt_device_host_keep_alive_data *this, bcmolt_presence_mask fields_present, bcmolt_device_host_keep_alive_id *failed_prop);
+
+/** Initializes a bcmolt_device_image_transfer_data_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_device_image_transfer_data_data_set_default(bcmolt_device_image_transfer_data_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_device_image_transfer_data_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_image_transfer_data_data_pack(const bcmolt_device_image_transfer_data_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_device_image_transfer_data_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_device_image_transfer_data_data_get_packed_length(const bcmolt_device_image_transfer_data_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_device_image_transfer_data_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_image_transfer_data_data_unpack(bcmolt_device_image_transfer_data_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_device_image_transfer_data_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_device_image_transfer_data_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_device_image_transfer_data_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_image_transfer_data_data_bounds_check(const bcmolt_device_image_transfer_data_data *this, bcmolt_presence_mask fields_present, bcmolt_device_image_transfer_data_id *failed_prop);
+
+/** Initializes a bcmolt_device_image_transfer_start_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_device_image_transfer_start_data_set_default(bcmolt_device_image_transfer_start_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_device_image_transfer_start_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_image_transfer_start_data_pack(const bcmolt_device_image_transfer_start_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_device_image_transfer_start_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_device_image_transfer_start_data_get_packed_length(const bcmolt_device_image_transfer_start_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_device_image_transfer_start_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_image_transfer_start_data_unpack(bcmolt_device_image_transfer_start_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_device_image_transfer_start_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_device_image_transfer_start_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_device_image_transfer_start_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_image_transfer_start_data_bounds_check(const bcmolt_device_image_transfer_start_data *this, bcmolt_presence_mask fields_present, bcmolt_device_image_transfer_start_id *failed_prop);
+
+/** Initializes a bcmolt_device_reset_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_device_reset_data_set_default(bcmolt_device_reset_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_device_reset_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_reset_data_pack(const bcmolt_device_reset_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_device_reset_data would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_device_reset_data_get_packed_length(const bcmolt_device_reset_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_device_reset_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_reset_data_unpack(bcmolt_device_reset_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_device_reset_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_device_reset_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_device_reset_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_reset_data_bounds_check(const bcmolt_device_reset_data *this, bcmolt_presence_mask fields_present, bcmolt_device_reset_id *failed_prop);
+
+/** Initializes a bcmolt_device_run_ddr_test_data struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_device_run_ddr_test_data_set_default(bcmolt_device_run_ddr_test_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_device_run_ddr_test_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_run_ddr_test_data_pack(const bcmolt_device_run_ddr_test_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_device_run_ddr_test_data would occupy 
+ * on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_device_run_ddr_test_data_get_packed_length(const bcmolt_device_run_ddr_test_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_device_run_ddr_test_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_run_ddr_test_data_unpack(bcmolt_device_run_ddr_test_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_device_run_ddr_test_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_device_run_ddr_test_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_device_run_ddr_test_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_device_run_ddr_test_data_bounds_check(const bcmolt_device_run_ddr_test_data *this, bcmolt_presence_mask fields_present, bcmolt_device_run_ddr_test_id *failed_prop);
+
+/** Initializes a bcmolt_epon_denied_link_key struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_denied_link_key_set_default(bcmolt_epon_denied_link_key *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_denied_link_key to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_denied_link_key_pack(const bcmolt_epon_denied_link_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_denied_link_key would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_denied_link_key_get_packed_length(const bcmolt_epon_denied_link_key *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_denied_link_key from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_denied_link_key_unpack(bcmolt_epon_denied_link_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_denied_link_key struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_denied_link_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_denied_link_key is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_denied_link_key_bounds_check(const bcmolt_epon_denied_link_key *this, bcmolt_presence_mask fields_present, bcmolt_epon_denied_link_key_id *failed_prop);
+
+/** Initializes a bcmolt_epon_denied_link_cfg_data struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_denied_link_cfg_data_set_default(bcmolt_epon_denied_link_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_denied_link_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_denied_link_cfg_data_pack(const bcmolt_epon_denied_link_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_denied_link_cfg_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_denied_link_cfg_data_get_packed_length(const bcmolt_epon_denied_link_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_denied_link_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_denied_link_cfg_data_unpack(bcmolt_epon_denied_link_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_denied_link_cfg_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_denied_link_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_denied_link_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_denied_link_cfg_data_bounds_check(const bcmolt_epon_denied_link_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_denied_link_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_epon_denied_link_laser_on_off_violation_data struct.  
+ * This sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_denied_link_laser_on_off_violation_data_set_default(bcmolt_epon_denied_link_laser_on_off_violation_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_denied_link_laser_on_off_violation_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_denied_link_laser_on_off_violation_data_pack(const bcmolt_epon_denied_link_laser_on_off_violation_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_epon_denied_link_laser_on_off_violation_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_denied_link_laser_on_off_violation_data_get_packed_length(const bcmolt_epon_denied_link_laser_on_off_violation_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_denied_link_laser_on_off_violation_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_denied_link_laser_on_off_violation_data_unpack(bcmolt_epon_denied_link_laser_on_off_violation_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_denied_link_laser_on_off_violation_data 
+ * struct and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_denied_link_laser_on_off_violation_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the 
+ * bcmolt_epon_denied_link_laser_on_off_violation_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_denied_link_laser_on_off_violation_data_bounds_check(const bcmolt_epon_denied_link_laser_on_off_violation_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_denied_link_laser_on_off_violation_id *failed_prop);
+
+/** Initializes a bcmolt_epon_denied_link_llid_pool_empty_violation_data struct. 
+ *  This sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_denied_link_llid_pool_empty_violation_data_set_default(bcmolt_epon_denied_link_llid_pool_empty_violation_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_denied_link_llid_pool_empty_violation_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_denied_link_llid_pool_empty_violation_data_pack(const bcmolt_epon_denied_link_llid_pool_empty_violation_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_epon_denied_link_llid_pool_empty_violation_data would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_denied_link_llid_pool_empty_violation_data_get_packed_length(const bcmolt_epon_denied_link_llid_pool_empty_violation_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_denied_link_llid_pool_empty_violation_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_denied_link_llid_pool_empty_violation_data_unpack(bcmolt_epon_denied_link_llid_pool_empty_violation_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_denied_link_llid_pool_empty_violation_data 
+ * struct and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_denied_link_llid_pool_empty_violation_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the 
+ * bcmolt_epon_denied_link_llid_pool_empty_violation_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_denied_link_llid_pool_empty_violation_data_bounds_check(const bcmolt_epon_denied_link_llid_pool_empty_violation_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_denied_link_llid_pool_empty_violation_id *failed_prop);
+
+/** Initializes a bcmolt_epon_denied_link_max_link_violation_data struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_denied_link_max_link_violation_data_set_default(bcmolt_epon_denied_link_max_link_violation_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_denied_link_max_link_violation_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_denied_link_max_link_violation_data_pack(const bcmolt_epon_denied_link_max_link_violation_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_epon_denied_link_max_link_violation_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_denied_link_max_link_violation_data_get_packed_length(const bcmolt_epon_denied_link_max_link_violation_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_denied_link_max_link_violation_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_denied_link_max_link_violation_data_unpack(bcmolt_epon_denied_link_max_link_violation_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_denied_link_max_link_violation_data struct 
+ * and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_denied_link_max_link_violation_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_denied_link_max_link_violation_data 
+ * is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_denied_link_max_link_violation_data_bounds_check(const bcmolt_epon_denied_link_max_link_violation_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_denied_link_max_link_violation_id *failed_prop);
+
+/** Initializes a bcmolt_epon_denied_link_overhead_profile_violation_data 
+ * struct.  This sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_denied_link_overhead_profile_violation_data_set_default(bcmolt_epon_denied_link_overhead_profile_violation_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_denied_link_overhead_profile_violation_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_denied_link_overhead_profile_violation_data_pack(const bcmolt_epon_denied_link_overhead_profile_violation_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_epon_denied_link_overhead_profile_violation_data would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_denied_link_overhead_profile_violation_data_get_packed_length(const bcmolt_epon_denied_link_overhead_profile_violation_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_denied_link_overhead_profile_violation_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_denied_link_overhead_profile_violation_data_unpack(bcmolt_epon_denied_link_overhead_profile_violation_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_denied_link_overhead_profile_violation_data 
+ * struct and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_denied_link_overhead_profile_violation_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the 
+ * bcmolt_epon_denied_link_overhead_profile_violation_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_denied_link_overhead_profile_violation_data_bounds_check(const bcmolt_epon_denied_link_overhead_profile_violation_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_denied_link_overhead_profile_violation_id *failed_prop);
+
+/** Initializes a bcmolt_epon_denied_link_range_violation_data struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_denied_link_range_violation_data_set_default(bcmolt_epon_denied_link_range_violation_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_denied_link_range_violation_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_denied_link_range_violation_data_pack(const bcmolt_epon_denied_link_range_violation_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_denied_link_range_violation_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_denied_link_range_violation_data_get_packed_length(const bcmolt_epon_denied_link_range_violation_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_denied_link_range_violation_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_denied_link_range_violation_data_unpack(bcmolt_epon_denied_link_range_violation_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_denied_link_range_violation_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_denied_link_range_violation_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_denied_link_range_violation_data is 
+ * out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_denied_link_range_violation_data_bounds_check(const bcmolt_epon_denied_link_range_violation_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_denied_link_range_violation_id *failed_prop);
+
+/** Initializes a bcmolt_epon_denied_link_rogue_violation_data struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_denied_link_rogue_violation_data_set_default(bcmolt_epon_denied_link_rogue_violation_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_denied_link_rogue_violation_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_denied_link_rogue_violation_data_pack(const bcmolt_epon_denied_link_rogue_violation_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_denied_link_rogue_violation_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_denied_link_rogue_violation_data_get_packed_length(const bcmolt_epon_denied_link_rogue_violation_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_denied_link_rogue_violation_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_denied_link_rogue_violation_data_unpack(bcmolt_epon_denied_link_rogue_violation_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_denied_link_rogue_violation_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_denied_link_rogue_violation_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_denied_link_rogue_violation_data is 
+ * out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_denied_link_rogue_violation_data_bounds_check(const bcmolt_epon_denied_link_rogue_violation_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_denied_link_rogue_violation_id *failed_prop);
+
+/** Initializes a bcmolt_epon_denied_link_system_resource_violation_data struct. 
+ *  This sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_denied_link_system_resource_violation_data_set_default(bcmolt_epon_denied_link_system_resource_violation_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_denied_link_system_resource_violation_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_denied_link_system_resource_violation_data_pack(const bcmolt_epon_denied_link_system_resource_violation_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_epon_denied_link_system_resource_violation_data would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_denied_link_system_resource_violation_data_get_packed_length(const bcmolt_epon_denied_link_system_resource_violation_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_denied_link_system_resource_violation_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_denied_link_system_resource_violation_data_unpack(bcmolt_epon_denied_link_system_resource_violation_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_denied_link_system_resource_violation_data 
+ * struct and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_denied_link_system_resource_violation_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the 
+ * bcmolt_epon_denied_link_system_resource_violation_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_denied_link_system_resource_violation_data_bounds_check(const bcmolt_epon_denied_link_system_resource_violation_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_denied_link_system_resource_violation_id *failed_prop);
+
+/** Initializes a bcmolt_epon_denied_link_tdm_channels_exhausted_data struct.  
+ * This sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_denied_link_tdm_channels_exhausted_data_set_default(bcmolt_epon_denied_link_tdm_channels_exhausted_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_denied_link_tdm_channels_exhausted_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_denied_link_tdm_channels_exhausted_data_pack(const bcmolt_epon_denied_link_tdm_channels_exhausted_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_epon_denied_link_tdm_channels_exhausted_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_denied_link_tdm_channels_exhausted_data_get_packed_length(const bcmolt_epon_denied_link_tdm_channels_exhausted_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_denied_link_tdm_channels_exhausted_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_denied_link_tdm_channels_exhausted_data_unpack(bcmolt_epon_denied_link_tdm_channels_exhausted_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_denied_link_tdm_channels_exhausted_data 
+ * struct and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_denied_link_tdm_channels_exhausted_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the 
+ * bcmolt_epon_denied_link_tdm_channels_exhausted_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_denied_link_tdm_channels_exhausted_data_bounds_check(const bcmolt_epon_denied_link_tdm_channels_exhausted_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_denied_link_tdm_channels_exhausted_id *failed_prop);
+
+/** Initializes a bcmolt_epon_denied_link_unknown_link_violation_data struct.  
+ * This sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_denied_link_unknown_link_violation_data_set_default(bcmolt_epon_denied_link_unknown_link_violation_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_denied_link_unknown_link_violation_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_denied_link_unknown_link_violation_data_pack(const bcmolt_epon_denied_link_unknown_link_violation_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_epon_denied_link_unknown_link_violation_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_denied_link_unknown_link_violation_data_get_packed_length(const bcmolt_epon_denied_link_unknown_link_violation_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_denied_link_unknown_link_violation_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_denied_link_unknown_link_violation_data_unpack(bcmolt_epon_denied_link_unknown_link_violation_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_denied_link_unknown_link_violation_data 
+ * struct and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_denied_link_unknown_link_violation_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the 
+ * bcmolt_epon_denied_link_unknown_link_violation_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_denied_link_unknown_link_violation_data_bounds_check(const bcmolt_epon_denied_link_unknown_link_violation_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_denied_link_unknown_link_violation_id *failed_prop);
+
+/** Initializes a bcmolt_epon_denied_link_upstream_bandwidth_violation_data 
+ * struct.  This sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_denied_link_upstream_bandwidth_violation_data_set_default(bcmolt_epon_denied_link_upstream_bandwidth_violation_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_denied_link_upstream_bandwidth_violation_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_denied_link_upstream_bandwidth_violation_data_pack(const bcmolt_epon_denied_link_upstream_bandwidth_violation_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_epon_denied_link_upstream_bandwidth_violation_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_denied_link_upstream_bandwidth_violation_data_get_packed_length(const bcmolt_epon_denied_link_upstream_bandwidth_violation_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_denied_link_upstream_bandwidth_violation_data from 
+ * bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_denied_link_upstream_bandwidth_violation_data_unpack(bcmolt_epon_denied_link_upstream_bandwidth_violation_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed 
+ * bcmolt_epon_denied_link_upstream_bandwidth_violation_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_denied_link_upstream_bandwidth_violation_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the 
+ * bcmolt_epon_denied_link_upstream_bandwidth_violation_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_denied_link_upstream_bandwidth_violation_data_bounds_check(const bcmolt_epon_denied_link_upstream_bandwidth_violation_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_denied_link_upstream_bandwidth_violation_id *failed_prop);
+
+/** Initializes a bcmolt_epon_denied_link_auto_cfg_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_denied_link_auto_cfg_data_set_default(bcmolt_epon_denied_link_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_denied_link_auto_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_denied_link_auto_cfg_data_pack(const bcmolt_epon_denied_link_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_denied_link_auto_cfg_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_denied_link_auto_cfg_data_get_packed_length(const bcmolt_epon_denied_link_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_denied_link_auto_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_denied_link_auto_cfg_data_unpack(bcmolt_epon_denied_link_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_denied_link_auto_cfg_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_denied_link_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_denied_link_auto_cfg_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_denied_link_auto_cfg_data_bounds_check(const bcmolt_epon_denied_link_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_denied_link_auto_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_epon_link_key struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_link_key_set_default(bcmolt_epon_link_key *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_link_key to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_key_pack(const bcmolt_epon_link_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_link_key would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_link_key_get_packed_length(const bcmolt_epon_link_key *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_link_key from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_key_unpack(bcmolt_epon_link_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_link_key struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_link_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_link_key is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_key_bounds_check(const bcmolt_epon_link_key *this, bcmolt_presence_mask fields_present, bcmolt_epon_link_key_id *failed_prop);
+
+/** Initializes a bcmolt_epon_link_cfg_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_link_cfg_data_set_default(bcmolt_epon_link_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_link_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_cfg_data_pack(const bcmolt_epon_link_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_link_cfg_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_link_cfg_data_get_packed_length(const bcmolt_epon_link_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_link_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_cfg_data_unpack(bcmolt_epon_link_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_link_cfg_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_link_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_link_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_cfg_data_bounds_check(const bcmolt_epon_link_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_link_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_epon_link_stat_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_link_stat_data_set_default(bcmolt_epon_link_stat_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_link_stat_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_stat_data_pack(const bcmolt_epon_link_stat_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_link_stat_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_link_stat_data_get_packed_length(const bcmolt_epon_link_stat_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_link_stat_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_stat_data_unpack(bcmolt_epon_link_stat_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_link_stat_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_link_stat_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_link_stat_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_stat_data_bounds_check(const bcmolt_epon_link_stat_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_link_stat_id *failed_prop);
+
+/** Initializes a bcmolt_epon_link_stat_cfg_data struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_link_stat_cfg_data_set_default(bcmolt_epon_link_stat_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_link_stat_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_stat_cfg_data_pack(const bcmolt_epon_link_stat_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_link_stat_cfg_data would occupy 
+ * on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_link_stat_cfg_data_get_packed_length(const bcmolt_epon_link_stat_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_link_stat_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_stat_cfg_data_unpack(bcmolt_epon_link_stat_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_link_stat_cfg_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_link_stat_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_link_stat_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_stat_cfg_data_bounds_check(const bcmolt_epon_link_stat_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_link_stat_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_epon_link_duplicate_mpcp_registration_request_data 
+ * struct.  This sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_link_duplicate_mpcp_registration_request_data_set_default(bcmolt_epon_link_duplicate_mpcp_registration_request_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_link_duplicate_mpcp_registration_request_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_duplicate_mpcp_registration_request_data_pack(const bcmolt_epon_link_duplicate_mpcp_registration_request_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_epon_link_duplicate_mpcp_registration_request_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_link_duplicate_mpcp_registration_request_data_get_packed_length(const bcmolt_epon_link_duplicate_mpcp_registration_request_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_link_duplicate_mpcp_registration_request_data from 
+ * bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_duplicate_mpcp_registration_request_data_unpack(bcmolt_epon_link_duplicate_mpcp_registration_request_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed 
+ * bcmolt_epon_link_duplicate_mpcp_registration_request_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_link_duplicate_mpcp_registration_request_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the 
+ * bcmolt_epon_link_duplicate_mpcp_registration_request_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_duplicate_mpcp_registration_request_data_bounds_check(const bcmolt_epon_link_duplicate_mpcp_registration_request_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_link_duplicate_mpcp_registration_request_id *failed_prop);
+
+/** Initializes a bcmolt_epon_link_key_exchange_failure_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_link_key_exchange_failure_data_set_default(bcmolt_epon_link_key_exchange_failure_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_link_key_exchange_failure_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_key_exchange_failure_data_pack(const bcmolt_epon_link_key_exchange_failure_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_link_key_exchange_failure_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_link_key_exchange_failure_data_get_packed_length(const bcmolt_epon_link_key_exchange_failure_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_link_key_exchange_failure_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_key_exchange_failure_data_unpack(bcmolt_epon_link_key_exchange_failure_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_link_key_exchange_failure_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_link_key_exchange_failure_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_link_key_exchange_failure_data is out 
+ * of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_key_exchange_failure_data_bounds_check(const bcmolt_epon_link_key_exchange_failure_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_link_key_exchange_failure_id *failed_prop);
+
+/** Initializes a bcmolt_epon_link_link_speed_mismatch_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_link_link_speed_mismatch_data_set_default(bcmolt_epon_link_link_speed_mismatch_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_link_link_speed_mismatch_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_link_speed_mismatch_data_pack(const bcmolt_epon_link_link_speed_mismatch_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_link_link_speed_mismatch_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_link_link_speed_mismatch_data_get_packed_length(const bcmolt_epon_link_link_speed_mismatch_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_link_link_speed_mismatch_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_link_speed_mismatch_data_unpack(bcmolt_epon_link_link_speed_mismatch_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_link_link_speed_mismatch_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_link_link_speed_mismatch_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_link_link_speed_mismatch_data is out 
+ * of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_link_speed_mismatch_data_bounds_check(const bcmolt_epon_link_link_speed_mismatch_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_link_link_speed_mismatch_id *failed_prop);
+
+/** Initializes a bcmolt_epon_link_mpcp_discovered_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_link_mpcp_discovered_data_set_default(bcmolt_epon_link_mpcp_discovered_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_link_mpcp_discovered_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_mpcp_discovered_data_pack(const bcmolt_epon_link_mpcp_discovered_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_link_mpcp_discovered_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_link_mpcp_discovered_data_get_packed_length(const bcmolt_epon_link_mpcp_discovered_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_link_mpcp_discovered_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_mpcp_discovered_data_unpack(bcmolt_epon_link_mpcp_discovered_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_link_mpcp_discovered_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_link_mpcp_discovered_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_link_mpcp_discovered_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_mpcp_discovered_data_bounds_check(const bcmolt_epon_link_mpcp_discovered_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_link_mpcp_discovered_id *failed_prop);
+
+/** Initializes a bcmolt_epon_link_mpcp_report_timeout_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_link_mpcp_report_timeout_data_set_default(bcmolt_epon_link_mpcp_report_timeout_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_link_mpcp_report_timeout_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_mpcp_report_timeout_data_pack(const bcmolt_epon_link_mpcp_report_timeout_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_link_mpcp_report_timeout_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_link_mpcp_report_timeout_data_get_packed_length(const bcmolt_epon_link_mpcp_report_timeout_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_link_mpcp_report_timeout_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_mpcp_report_timeout_data_unpack(bcmolt_epon_link_mpcp_report_timeout_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_link_mpcp_report_timeout_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_link_mpcp_report_timeout_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_link_mpcp_report_timeout_data is out 
+ * of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_mpcp_report_timeout_data_bounds_check(const bcmolt_epon_link_mpcp_report_timeout_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_link_mpcp_report_timeout_id *failed_prop);
+
+/** Initializes a bcmolt_epon_link_oam_keepalive_timeout_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_link_oam_keepalive_timeout_data_set_default(bcmolt_epon_link_oam_keepalive_timeout_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_link_oam_keepalive_timeout_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_oam_keepalive_timeout_data_pack(const bcmolt_epon_link_oam_keepalive_timeout_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_link_oam_keepalive_timeout_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_link_oam_keepalive_timeout_data_get_packed_length(const bcmolt_epon_link_oam_keepalive_timeout_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_link_oam_keepalive_timeout_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_oam_keepalive_timeout_data_unpack(bcmolt_epon_link_oam_keepalive_timeout_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_link_oam_keepalive_timeout_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_link_oam_keepalive_timeout_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_link_oam_keepalive_timeout_data is 
+ * out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_oam_keepalive_timeout_data_bounds_check(const bcmolt_epon_link_oam_keepalive_timeout_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_link_oam_keepalive_timeout_id *failed_prop);
+
+/** Initializes a bcmolt_epon_link_preprovisioned_link_created_data struct.  
+ * This sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_link_preprovisioned_link_created_data_set_default(bcmolt_epon_link_preprovisioned_link_created_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_link_preprovisioned_link_created_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_preprovisioned_link_created_data_pack(const bcmolt_epon_link_preprovisioned_link_created_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_epon_link_preprovisioned_link_created_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_link_preprovisioned_link_created_data_get_packed_length(const bcmolt_epon_link_preprovisioned_link_created_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_link_preprovisioned_link_created_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_preprovisioned_link_created_data_unpack(bcmolt_epon_link_preprovisioned_link_created_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_link_preprovisioned_link_created_data struct 
+ * and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_link_preprovisioned_link_created_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_link_preprovisioned_link_created_data 
+ * is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_preprovisioned_link_created_data_bounds_check(const bcmolt_epon_link_preprovisioned_link_created_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_link_preprovisioned_link_created_id *failed_prop);
+
+/** Initializes a bcmolt_epon_link_protection_switch_occurred_data struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_link_protection_switch_occurred_data_set_default(bcmolt_epon_link_protection_switch_occurred_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_link_protection_switch_occurred_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_protection_switch_occurred_data_pack(const bcmolt_epon_link_protection_switch_occurred_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_epon_link_protection_switch_occurred_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_link_protection_switch_occurred_data_get_packed_length(const bcmolt_epon_link_protection_switch_occurred_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_link_protection_switch_occurred_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_protection_switch_occurred_data_unpack(bcmolt_epon_link_protection_switch_occurred_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_link_protection_switch_occurred_data struct 
+ * and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_link_protection_switch_occurred_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_link_protection_switch_occurred_data 
+ * is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_protection_switch_occurred_data_bounds_check(const bcmolt_epon_link_protection_switch_occurred_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_link_protection_switch_occurred_id *failed_prop);
+
+/** Initializes a bcmolt_epon_link_range_value_changed_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_link_range_value_changed_data_set_default(bcmolt_epon_link_range_value_changed_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_link_range_value_changed_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_range_value_changed_data_pack(const bcmolt_epon_link_range_value_changed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_link_range_value_changed_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_link_range_value_changed_data_get_packed_length(const bcmolt_epon_link_range_value_changed_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_link_range_value_changed_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_range_value_changed_data_unpack(bcmolt_epon_link_range_value_changed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_link_range_value_changed_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_link_range_value_changed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_link_range_value_changed_data is out 
+ * of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_range_value_changed_data_bounds_check(const bcmolt_epon_link_range_value_changed_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_link_range_value_changed_id *failed_prop);
+
+/** Initializes a bcmolt_epon_link_stat_alarm_cleared_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_link_stat_alarm_cleared_data_set_default(bcmolt_epon_link_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_link_stat_alarm_cleared_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_stat_alarm_cleared_data_pack(const bcmolt_epon_link_stat_alarm_cleared_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_link_stat_alarm_cleared_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_link_stat_alarm_cleared_data_get_packed_length(const bcmolt_epon_link_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_link_stat_alarm_cleared_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_stat_alarm_cleared_data_unpack(bcmolt_epon_link_stat_alarm_cleared_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_link_stat_alarm_cleared_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_link_stat_alarm_cleared_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_link_stat_alarm_cleared_data is out 
+ * of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_stat_alarm_cleared_data_bounds_check(const bcmolt_epon_link_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_link_stat_alarm_cleared_id *failed_prop);
+
+/** Initializes a bcmolt_epon_link_stat_alarm_raised_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_link_stat_alarm_raised_data_set_default(bcmolt_epon_link_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_link_stat_alarm_raised_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_stat_alarm_raised_data_pack(const bcmolt_epon_link_stat_alarm_raised_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_link_stat_alarm_raised_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_link_stat_alarm_raised_data_get_packed_length(const bcmolt_epon_link_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_link_stat_alarm_raised_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_stat_alarm_raised_data_unpack(bcmolt_epon_link_stat_alarm_raised_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_link_stat_alarm_raised_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_link_stat_alarm_raised_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_link_stat_alarm_raised_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_stat_alarm_raised_data_bounds_check(const bcmolt_epon_link_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_link_stat_alarm_raised_id *failed_prop);
+
+/** Initializes a bcmolt_epon_link_auto_cfg_data struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_link_auto_cfg_data_set_default(bcmolt_epon_link_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_link_auto_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_auto_cfg_data_pack(const bcmolt_epon_link_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_link_auto_cfg_data would occupy 
+ * on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_link_auto_cfg_data_get_packed_length(const bcmolt_epon_link_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_link_auto_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_auto_cfg_data_unpack(bcmolt_epon_link_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_link_auto_cfg_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_link_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_link_auto_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_auto_cfg_data_bounds_check(const bcmolt_epon_link_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_link_auto_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_epon_link_key_exchange_start_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_link_key_exchange_start_data_set_default(bcmolt_epon_link_key_exchange_start_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_link_key_exchange_start_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_key_exchange_start_data_pack(const bcmolt_epon_link_key_exchange_start_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_link_key_exchange_start_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_link_key_exchange_start_data_get_packed_length(const bcmolt_epon_link_key_exchange_start_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_link_key_exchange_start_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_key_exchange_start_data_unpack(bcmolt_epon_link_key_exchange_start_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_link_key_exchange_start_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_link_key_exchange_start_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_link_key_exchange_start_data is out 
+ * of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_key_exchange_start_data_bounds_check(const bcmolt_epon_link_key_exchange_start_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_link_key_exchange_start_id *failed_prop);
+
+/** Initializes a bcmolt_epon_link_oam_keepalive_timer_start_data struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_link_oam_keepalive_timer_start_data_set_default(bcmolt_epon_link_oam_keepalive_timer_start_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_link_oam_keepalive_timer_start_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_oam_keepalive_timer_start_data_pack(const bcmolt_epon_link_oam_keepalive_timer_start_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_epon_link_oam_keepalive_timer_start_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_link_oam_keepalive_timer_start_data_get_packed_length(const bcmolt_epon_link_oam_keepalive_timer_start_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_link_oam_keepalive_timer_start_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_oam_keepalive_timer_start_data_unpack(bcmolt_epon_link_oam_keepalive_timer_start_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_link_oam_keepalive_timer_start_data struct 
+ * and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_link_oam_keepalive_timer_start_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_link_oam_keepalive_timer_start_data 
+ * is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_oam_keepalive_timer_start_data_bounds_check(const bcmolt_epon_link_oam_keepalive_timer_start_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_link_oam_keepalive_timer_start_id *failed_prop);
+
+/** Initializes a bcmolt_epon_link_static_registration_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_link_static_registration_data_set_default(bcmolt_epon_link_static_registration_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_link_static_registration_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_static_registration_data_pack(const bcmolt_epon_link_static_registration_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_link_static_registration_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_link_static_registration_data_get_packed_length(const bcmolt_epon_link_static_registration_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_link_static_registration_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_static_registration_data_unpack(bcmolt_epon_link_static_registration_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_link_static_registration_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_link_static_registration_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_link_static_registration_data is out 
+ * of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_static_registration_data_bounds_check(const bcmolt_epon_link_static_registration_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_link_static_registration_id *failed_prop);
+
+/** Initializes a bcmolt_epon_link_inject_frame_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_link_inject_frame_data_set_default(bcmolt_epon_link_inject_frame_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_link_inject_frame_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_inject_frame_data_pack(const bcmolt_epon_link_inject_frame_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_link_inject_frame_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_link_inject_frame_data_get_packed_length(const bcmolt_epon_link_inject_frame_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_link_inject_frame_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_inject_frame_data_unpack(bcmolt_epon_link_inject_frame_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_link_inject_frame_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_link_inject_frame_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_link_inject_frame_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_inject_frame_data_bounds_check(const bcmolt_epon_link_inject_frame_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_link_inject_frame_id *failed_prop);
+
+/** Initializes a bcmolt_epon_link_frame_captured_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_link_frame_captured_data_set_default(bcmolt_epon_link_frame_captured_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_link_frame_captured_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_frame_captured_data_pack(const bcmolt_epon_link_frame_captured_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_link_frame_captured_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_link_frame_captured_data_get_packed_length(const bcmolt_epon_link_frame_captured_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_link_frame_captured_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_frame_captured_data_unpack(bcmolt_epon_link_frame_captured_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_link_frame_captured_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_link_frame_captured_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_link_frame_captured_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_link_frame_captured_data_bounds_check(const bcmolt_epon_link_frame_captured_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_link_frame_captured_id *failed_prop);
+
+/** Initializes a bcmolt_epon_ni_key struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_ni_key_set_default(bcmolt_epon_ni_key *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_ni_key to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_key_pack(const bcmolt_epon_ni_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_ni_key would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_ni_key_get_packed_length(const bcmolt_epon_ni_key *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_ni_key from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_key_unpack(bcmolt_epon_ni_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_ni_key struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_ni_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_ni_key is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_key_bounds_check(const bcmolt_epon_ni_key *this, bcmolt_presence_mask fields_present, bcmolt_epon_ni_key_id *failed_prop);
+
+/** Initializes a bcmolt_epon_ni_cfg_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_ni_cfg_data_set_default(bcmolt_epon_ni_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_ni_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_cfg_data_pack(const bcmolt_epon_ni_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_ni_cfg_data would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_ni_cfg_data_get_packed_length(const bcmolt_epon_ni_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_ni_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_cfg_data_unpack(bcmolt_epon_ni_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_ni_cfg_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_ni_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_ni_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_cfg_data_bounds_check(const bcmolt_epon_ni_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_ni_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_epon_ni_llid_quarantined_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_ni_llid_quarantined_data_set_default(bcmolt_epon_ni_llid_quarantined_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_ni_llid_quarantined_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_llid_quarantined_data_pack(const bcmolt_epon_ni_llid_quarantined_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_ni_llid_quarantined_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_ni_llid_quarantined_data_get_packed_length(const bcmolt_epon_ni_llid_quarantined_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_ni_llid_quarantined_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_llid_quarantined_data_unpack(bcmolt_epon_ni_llid_quarantined_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_ni_llid_quarantined_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_ni_llid_quarantined_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_ni_llid_quarantined_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_llid_quarantined_data_bounds_check(const bcmolt_epon_ni_llid_quarantined_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_ni_llid_quarantined_id *failed_prop);
+
+/** Initializes a bcmolt_epon_ni_mpcp_timestamp_changed_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_ni_mpcp_timestamp_changed_data_set_default(bcmolt_epon_ni_mpcp_timestamp_changed_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_ni_mpcp_timestamp_changed_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_mpcp_timestamp_changed_data_pack(const bcmolt_epon_ni_mpcp_timestamp_changed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_ni_mpcp_timestamp_changed_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_ni_mpcp_timestamp_changed_data_get_packed_length(const bcmolt_epon_ni_mpcp_timestamp_changed_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_ni_mpcp_timestamp_changed_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_mpcp_timestamp_changed_data_unpack(bcmolt_epon_ni_mpcp_timestamp_changed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_ni_mpcp_timestamp_changed_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_ni_mpcp_timestamp_changed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_ni_mpcp_timestamp_changed_data is out 
+ * of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_mpcp_timestamp_changed_data_bounds_check(const bcmolt_epon_ni_mpcp_timestamp_changed_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_ni_mpcp_timestamp_changed_id *failed_prop);
+
+/** Initializes a bcmolt_epon_ni_no_reports_data struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_ni_no_reports_data_set_default(bcmolt_epon_ni_no_reports_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_ni_no_reports_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_no_reports_data_pack(const bcmolt_epon_ni_no_reports_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_ni_no_reports_data would occupy 
+ * on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_ni_no_reports_data_get_packed_length(const bcmolt_epon_ni_no_reports_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_ni_no_reports_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_no_reports_data_unpack(bcmolt_epon_ni_no_reports_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_ni_no_reports_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_ni_no_reports_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_ni_no_reports_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_no_reports_data_bounds_check(const bcmolt_epon_ni_no_reports_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_ni_no_reports_id *failed_prop);
+
+/** Initializes a bcmolt_epon_ni_onu_upgrade_complete_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_ni_onu_upgrade_complete_data_set_default(bcmolt_epon_ni_onu_upgrade_complete_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_ni_onu_upgrade_complete_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_onu_upgrade_complete_data_pack(const bcmolt_epon_ni_onu_upgrade_complete_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_ni_onu_upgrade_complete_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_ni_onu_upgrade_complete_data_get_packed_length(const bcmolt_epon_ni_onu_upgrade_complete_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_ni_onu_upgrade_complete_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_onu_upgrade_complete_data_unpack(bcmolt_epon_ni_onu_upgrade_complete_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_ni_onu_upgrade_complete_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_ni_onu_upgrade_complete_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_ni_onu_upgrade_complete_data is out 
+ * of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_onu_upgrade_complete_data_bounds_check(const bcmolt_epon_ni_onu_upgrade_complete_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_ni_onu_upgrade_complete_id *failed_prop);
+
+/** Initializes a bcmolt_epon_ni_rogue_scan_complete_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_ni_rogue_scan_complete_data_set_default(bcmolt_epon_ni_rogue_scan_complete_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_ni_rogue_scan_complete_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_rogue_scan_complete_data_pack(const bcmolt_epon_ni_rogue_scan_complete_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_ni_rogue_scan_complete_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_ni_rogue_scan_complete_data_get_packed_length(const bcmolt_epon_ni_rogue_scan_complete_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_ni_rogue_scan_complete_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_rogue_scan_complete_data_unpack(bcmolt_epon_ni_rogue_scan_complete_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_ni_rogue_scan_complete_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_ni_rogue_scan_complete_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_ni_rogue_scan_complete_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_rogue_scan_complete_data_bounds_check(const bcmolt_epon_ni_rogue_scan_complete_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_ni_rogue_scan_complete_id *failed_prop);
+
+/** Initializes a bcmolt_epon_ni_rssi_measurement_completed_data struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_ni_rssi_measurement_completed_data_set_default(bcmolt_epon_ni_rssi_measurement_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_ni_rssi_measurement_completed_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_rssi_measurement_completed_data_pack(const bcmolt_epon_ni_rssi_measurement_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_epon_ni_rssi_measurement_completed_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_ni_rssi_measurement_completed_data_get_packed_length(const bcmolt_epon_ni_rssi_measurement_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_ni_rssi_measurement_completed_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_rssi_measurement_completed_data_unpack(bcmolt_epon_ni_rssi_measurement_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_ni_rssi_measurement_completed_data struct 
+ * and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_ni_rssi_measurement_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_ni_rssi_measurement_completed_data is 
+ * out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_rssi_measurement_completed_data_bounds_check(const bcmolt_epon_ni_rssi_measurement_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_ni_rssi_measurement_completed_id *failed_prop);
+
+/** Initializes a bcmolt_epon_ni_state_change_completed_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_ni_state_change_completed_data_set_default(bcmolt_epon_ni_state_change_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_ni_state_change_completed_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_state_change_completed_data_pack(const bcmolt_epon_ni_state_change_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_ni_state_change_completed_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_ni_state_change_completed_data_get_packed_length(const bcmolt_epon_ni_state_change_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_ni_state_change_completed_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_state_change_completed_data_unpack(bcmolt_epon_ni_state_change_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_ni_state_change_completed_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_ni_state_change_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_ni_state_change_completed_data is out 
+ * of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_state_change_completed_data_bounds_check(const bcmolt_epon_ni_state_change_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_ni_state_change_completed_id *failed_prop);
+
+/** Initializes a bcmolt_epon_ni_auto_cfg_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_ni_auto_cfg_data_set_default(bcmolt_epon_ni_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_ni_auto_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_auto_cfg_data_pack(const bcmolt_epon_ni_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_ni_auto_cfg_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_ni_auto_cfg_data_get_packed_length(const bcmolt_epon_ni_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_ni_auto_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_auto_cfg_data_unpack(bcmolt_epon_ni_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_ni_auto_cfg_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_ni_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_ni_auto_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_auto_cfg_data_bounds_check(const bcmolt_epon_ni_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_ni_auto_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_epon_ni_add_link_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_ni_add_link_data_set_default(bcmolt_epon_ni_add_link_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_ni_add_link_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_add_link_data_pack(const bcmolt_epon_ni_add_link_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_ni_add_link_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_ni_add_link_data_get_packed_length(const bcmolt_epon_ni_add_link_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_ni_add_link_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_add_link_data_unpack(bcmolt_epon_ni_add_link_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_ni_add_link_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_ni_add_link_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_ni_add_link_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_add_link_data_bounds_check(const bcmolt_epon_ni_add_link_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_ni_add_link_id *failed_prop);
+
+/** Initializes a bcmolt_epon_ni_add_multicast_link_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_ni_add_multicast_link_data_set_default(bcmolt_epon_ni_add_multicast_link_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_ni_add_multicast_link_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_add_multicast_link_data_pack(const bcmolt_epon_ni_add_multicast_link_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_ni_add_multicast_link_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_ni_add_multicast_link_data_get_packed_length(const bcmolt_epon_ni_add_multicast_link_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_ni_add_multicast_link_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_add_multicast_link_data_unpack(bcmolt_epon_ni_add_multicast_link_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_ni_add_multicast_link_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_ni_add_multicast_link_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_ni_add_multicast_link_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_add_multicast_link_data_bounds_check(const bcmolt_epon_ni_add_multicast_link_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_ni_add_multicast_link_id *failed_prop);
+
+/** Initializes a bcmolt_epon_ni_add_protected_standby_link_data struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_ni_add_protected_standby_link_data_set_default(bcmolt_epon_ni_add_protected_standby_link_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_ni_add_protected_standby_link_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_add_protected_standby_link_data_pack(const bcmolt_epon_ni_add_protected_standby_link_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_epon_ni_add_protected_standby_link_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_ni_add_protected_standby_link_data_get_packed_length(const bcmolt_epon_ni_add_protected_standby_link_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_ni_add_protected_standby_link_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_add_protected_standby_link_data_unpack(bcmolt_epon_ni_add_protected_standby_link_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_ni_add_protected_standby_link_data struct 
+ * and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_ni_add_protected_standby_link_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_ni_add_protected_standby_link_data is 
+ * out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_add_protected_standby_link_data_bounds_check(const bcmolt_epon_ni_add_protected_standby_link_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_ni_add_protected_standby_link_id *failed_prop);
+
+/** Initializes a bcmolt_epon_ni_issue_rssi_grant_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_ni_issue_rssi_grant_data_set_default(bcmolt_epon_ni_issue_rssi_grant_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_ni_issue_rssi_grant_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_issue_rssi_grant_data_pack(const bcmolt_epon_ni_issue_rssi_grant_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_ni_issue_rssi_grant_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_ni_issue_rssi_grant_data_get_packed_length(const bcmolt_epon_ni_issue_rssi_grant_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_ni_issue_rssi_grant_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_issue_rssi_grant_data_unpack(bcmolt_epon_ni_issue_rssi_grant_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_ni_issue_rssi_grant_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_ni_issue_rssi_grant_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_ni_issue_rssi_grant_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_issue_rssi_grant_data_bounds_check(const bcmolt_epon_ni_issue_rssi_grant_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_ni_issue_rssi_grant_id *failed_prop);
+
+/** Initializes a bcmolt_epon_ni_protection_switching_apply_rerange_delta_data 
+ * struct.  This sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_ni_protection_switching_apply_rerange_delta_data_set_default(bcmolt_epon_ni_protection_switching_apply_rerange_delta_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_ni_protection_switching_apply_rerange_delta_data to 
+ * bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_protection_switching_apply_rerange_delta_data_pack(const bcmolt_epon_ni_protection_switching_apply_rerange_delta_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_epon_ni_protection_switching_apply_rerange_delta_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_ni_protection_switching_apply_rerange_delta_data_get_packed_length(const bcmolt_epon_ni_protection_switching_apply_rerange_delta_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_ni_protection_switching_apply_rerange_delta_data from 
+ * bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_protection_switching_apply_rerange_delta_data_unpack(bcmolt_epon_ni_protection_switching_apply_rerange_delta_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed 
+ * bcmolt_epon_ni_protection_switching_apply_rerange_delta_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_ni_protection_switching_apply_rerange_delta_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the 
+ * bcmolt_epon_ni_protection_switching_apply_rerange_delta_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_protection_switching_apply_rerange_delta_data_bounds_check(const bcmolt_epon_ni_protection_switching_apply_rerange_delta_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_ni_protection_switching_apply_rerange_delta_id *failed_prop);
+
+/** Initializes a bcmolt_epon_ni_rogue_llid_scan_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_ni_rogue_llid_scan_data_set_default(bcmolt_epon_ni_rogue_llid_scan_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_ni_rogue_llid_scan_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_rogue_llid_scan_data_pack(const bcmolt_epon_ni_rogue_llid_scan_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_ni_rogue_llid_scan_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_ni_rogue_llid_scan_data_get_packed_length(const bcmolt_epon_ni_rogue_llid_scan_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_ni_rogue_llid_scan_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_rogue_llid_scan_data_unpack(bcmolt_epon_ni_rogue_llid_scan_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_ni_rogue_llid_scan_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_ni_rogue_llid_scan_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_ni_rogue_llid_scan_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_rogue_llid_scan_data_bounds_check(const bcmolt_epon_ni_rogue_llid_scan_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_ni_rogue_llid_scan_id *failed_prop);
+
+/** Initializes a bcmolt_epon_ni_set_epon_ni_en_state_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_ni_set_epon_ni_en_state_data_set_default(bcmolt_epon_ni_set_epon_ni_en_state_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_ni_set_epon_ni_en_state_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_set_epon_ni_en_state_data_pack(const bcmolt_epon_ni_set_epon_ni_en_state_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_ni_set_epon_ni_en_state_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_ni_set_epon_ni_en_state_data_get_packed_length(const bcmolt_epon_ni_set_epon_ni_en_state_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_ni_set_epon_ni_en_state_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_set_epon_ni_en_state_data_unpack(bcmolt_epon_ni_set_epon_ni_en_state_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_ni_set_epon_ni_en_state_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_ni_set_epon_ni_en_state_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_ni_set_epon_ni_en_state_data is out 
+ * of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_set_epon_ni_en_state_data_bounds_check(const bcmolt_epon_ni_set_epon_ni_en_state_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_ni_set_epon_ni_en_state_id *failed_prop);
+
+/** Initializes a bcmolt_epon_ni_start_onu_upgrade_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_ni_start_onu_upgrade_data_set_default(bcmolt_epon_ni_start_onu_upgrade_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_ni_start_onu_upgrade_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_start_onu_upgrade_data_pack(const bcmolt_epon_ni_start_onu_upgrade_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_ni_start_onu_upgrade_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_ni_start_onu_upgrade_data_get_packed_length(const bcmolt_epon_ni_start_onu_upgrade_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_ni_start_onu_upgrade_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_start_onu_upgrade_data_unpack(bcmolt_epon_ni_start_onu_upgrade_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_ni_start_onu_upgrade_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_ni_start_onu_upgrade_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_ni_start_onu_upgrade_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_ni_start_onu_upgrade_data_bounds_check(const bcmolt_epon_ni_start_onu_upgrade_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_ni_start_onu_upgrade_id *failed_prop);
+
+/** Initializes a bcmolt_epon_onu_10g_us_key struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_onu_10g_us_key_set_default(bcmolt_epon_onu_10g_us_key *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_onu_10g_us_key to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_10g_us_key_pack(const bcmolt_epon_onu_10g_us_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_onu_10g_us_key would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_onu_10g_us_key_get_packed_length(const bcmolt_epon_onu_10g_us_key *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_onu_10g_us_key from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_10g_us_key_unpack(bcmolt_epon_onu_10g_us_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_onu_10g_us_key struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_onu_10g_us_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_onu_10g_us_key is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_10g_us_key_bounds_check(const bcmolt_epon_onu_10g_us_key *this, bcmolt_presence_mask fields_present, bcmolt_epon_onu_10g_us_key_id *failed_prop);
+
+/** Initializes a bcmolt_epon_onu_10g_us_cfg_data struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_onu_10g_us_cfg_data_set_default(bcmolt_epon_onu_10g_us_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_onu_10g_us_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_10g_us_cfg_data_pack(const bcmolt_epon_onu_10g_us_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_onu_10g_us_cfg_data would occupy 
+ * on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_onu_10g_us_cfg_data_get_packed_length(const bcmolt_epon_onu_10g_us_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_onu_10g_us_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_10g_us_cfg_data_unpack(bcmolt_epon_onu_10g_us_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_onu_10g_us_cfg_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_onu_10g_us_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_onu_10g_us_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_10g_us_cfg_data_bounds_check(const bcmolt_epon_onu_10g_us_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_onu_10g_us_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_epon_onu_10g_us_stat_data struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_onu_10g_us_stat_data_set_default(bcmolt_epon_onu_10g_us_stat_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_onu_10g_us_stat_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_10g_us_stat_data_pack(const bcmolt_epon_onu_10g_us_stat_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_onu_10g_us_stat_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_onu_10g_us_stat_data_get_packed_length(const bcmolt_epon_onu_10g_us_stat_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_onu_10g_us_stat_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_10g_us_stat_data_unpack(bcmolt_epon_onu_10g_us_stat_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_onu_10g_us_stat_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_onu_10g_us_stat_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_onu_10g_us_stat_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_10g_us_stat_data_bounds_check(const bcmolt_epon_onu_10g_us_stat_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_onu_10g_us_stat_id *failed_prop);
+
+/** Initializes a bcmolt_epon_onu_10g_us_stat_cfg_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_onu_10g_us_stat_cfg_data_set_default(bcmolt_epon_onu_10g_us_stat_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_onu_10g_us_stat_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_10g_us_stat_cfg_data_pack(const bcmolt_epon_onu_10g_us_stat_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_onu_10g_us_stat_cfg_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_onu_10g_us_stat_cfg_data_get_packed_length(const bcmolt_epon_onu_10g_us_stat_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_onu_10g_us_stat_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_10g_us_stat_cfg_data_unpack(bcmolt_epon_onu_10g_us_stat_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_onu_10g_us_stat_cfg_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_onu_10g_us_stat_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_onu_10g_us_stat_cfg_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_10g_us_stat_cfg_data_bounds_check(const bcmolt_epon_onu_10g_us_stat_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_onu_10g_us_stat_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_epon_onu_10g_us_stat_alarm_cleared_data struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_onu_10g_us_stat_alarm_cleared_data_set_default(bcmolt_epon_onu_10g_us_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_onu_10g_us_stat_alarm_cleared_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_10g_us_stat_alarm_cleared_data_pack(const bcmolt_epon_onu_10g_us_stat_alarm_cleared_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_epon_onu_10g_us_stat_alarm_cleared_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_onu_10g_us_stat_alarm_cleared_data_get_packed_length(const bcmolt_epon_onu_10g_us_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_onu_10g_us_stat_alarm_cleared_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_10g_us_stat_alarm_cleared_data_unpack(bcmolt_epon_onu_10g_us_stat_alarm_cleared_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_onu_10g_us_stat_alarm_cleared_data struct 
+ * and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_onu_10g_us_stat_alarm_cleared_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_onu_10g_us_stat_alarm_cleared_data is 
+ * out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_10g_us_stat_alarm_cleared_data_bounds_check(const bcmolt_epon_onu_10g_us_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_onu_10g_us_stat_alarm_cleared_id *failed_prop);
+
+/** Initializes a bcmolt_epon_onu_10g_us_stat_alarm_raised_data struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_onu_10g_us_stat_alarm_raised_data_set_default(bcmolt_epon_onu_10g_us_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_onu_10g_us_stat_alarm_raised_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_10g_us_stat_alarm_raised_data_pack(const bcmolt_epon_onu_10g_us_stat_alarm_raised_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_epon_onu_10g_us_stat_alarm_raised_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_onu_10g_us_stat_alarm_raised_data_get_packed_length(const bcmolt_epon_onu_10g_us_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_onu_10g_us_stat_alarm_raised_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_10g_us_stat_alarm_raised_data_unpack(bcmolt_epon_onu_10g_us_stat_alarm_raised_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_onu_10g_us_stat_alarm_raised_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_onu_10g_us_stat_alarm_raised_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_onu_10g_us_stat_alarm_raised_data is 
+ * out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_10g_us_stat_alarm_raised_data_bounds_check(const bcmolt_epon_onu_10g_us_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_onu_10g_us_stat_alarm_raised_id *failed_prop);
+
+/** Initializes a bcmolt_epon_onu_10g_us_auto_cfg_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_onu_10g_us_auto_cfg_data_set_default(bcmolt_epon_onu_10g_us_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_onu_10g_us_auto_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_10g_us_auto_cfg_data_pack(const bcmolt_epon_onu_10g_us_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_onu_10g_us_auto_cfg_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_onu_10g_us_auto_cfg_data_get_packed_length(const bcmolt_epon_onu_10g_us_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_onu_10g_us_auto_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_10g_us_auto_cfg_data_unpack(bcmolt_epon_onu_10g_us_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_onu_10g_us_auto_cfg_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_onu_10g_us_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_onu_10g_us_auto_cfg_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_10g_us_auto_cfg_data_bounds_check(const bcmolt_epon_onu_10g_us_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_onu_10g_us_auto_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_epon_onu_1g_us_key struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_onu_1g_us_key_set_default(bcmolt_epon_onu_1g_us_key *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_onu_1g_us_key to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_1g_us_key_pack(const bcmolt_epon_onu_1g_us_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_onu_1g_us_key would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_onu_1g_us_key_get_packed_length(const bcmolt_epon_onu_1g_us_key *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_onu_1g_us_key from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_1g_us_key_unpack(bcmolt_epon_onu_1g_us_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_onu_1g_us_key struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_onu_1g_us_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_onu_1g_us_key is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_1g_us_key_bounds_check(const bcmolt_epon_onu_1g_us_key *this, bcmolt_presence_mask fields_present, bcmolt_epon_onu_1g_us_key_id *failed_prop);
+
+/** Initializes a bcmolt_epon_onu_1g_us_cfg_data struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_onu_1g_us_cfg_data_set_default(bcmolt_epon_onu_1g_us_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_onu_1g_us_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_1g_us_cfg_data_pack(const bcmolt_epon_onu_1g_us_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_onu_1g_us_cfg_data would occupy 
+ * on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_onu_1g_us_cfg_data_get_packed_length(const bcmolt_epon_onu_1g_us_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_onu_1g_us_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_1g_us_cfg_data_unpack(bcmolt_epon_onu_1g_us_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_onu_1g_us_cfg_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_onu_1g_us_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_onu_1g_us_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_1g_us_cfg_data_bounds_check(const bcmolt_epon_onu_1g_us_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_onu_1g_us_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_epon_onu_1g_us_stat_data struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_onu_1g_us_stat_data_set_default(bcmolt_epon_onu_1g_us_stat_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_onu_1g_us_stat_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_1g_us_stat_data_pack(const bcmolt_epon_onu_1g_us_stat_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_onu_1g_us_stat_data would occupy 
+ * on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_onu_1g_us_stat_data_get_packed_length(const bcmolt_epon_onu_1g_us_stat_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_onu_1g_us_stat_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_1g_us_stat_data_unpack(bcmolt_epon_onu_1g_us_stat_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_onu_1g_us_stat_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_onu_1g_us_stat_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_onu_1g_us_stat_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_1g_us_stat_data_bounds_check(const bcmolt_epon_onu_1g_us_stat_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_onu_1g_us_stat_id *failed_prop);
+
+/** Initializes a bcmolt_epon_onu_1g_us_stat_cfg_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_onu_1g_us_stat_cfg_data_set_default(bcmolt_epon_onu_1g_us_stat_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_onu_1g_us_stat_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_1g_us_stat_cfg_data_pack(const bcmolt_epon_onu_1g_us_stat_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_onu_1g_us_stat_cfg_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_onu_1g_us_stat_cfg_data_get_packed_length(const bcmolt_epon_onu_1g_us_stat_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_onu_1g_us_stat_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_1g_us_stat_cfg_data_unpack(bcmolt_epon_onu_1g_us_stat_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_onu_1g_us_stat_cfg_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_onu_1g_us_stat_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_onu_1g_us_stat_cfg_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_1g_us_stat_cfg_data_bounds_check(const bcmolt_epon_onu_1g_us_stat_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_onu_1g_us_stat_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_epon_onu_1g_us_stat_alarm_cleared_data struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_onu_1g_us_stat_alarm_cleared_data_set_default(bcmolt_epon_onu_1g_us_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_onu_1g_us_stat_alarm_cleared_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_1g_us_stat_alarm_cleared_data_pack(const bcmolt_epon_onu_1g_us_stat_alarm_cleared_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_epon_onu_1g_us_stat_alarm_cleared_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_onu_1g_us_stat_alarm_cleared_data_get_packed_length(const bcmolt_epon_onu_1g_us_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_onu_1g_us_stat_alarm_cleared_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_1g_us_stat_alarm_cleared_data_unpack(bcmolt_epon_onu_1g_us_stat_alarm_cleared_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_onu_1g_us_stat_alarm_cleared_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_onu_1g_us_stat_alarm_cleared_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_onu_1g_us_stat_alarm_cleared_data is 
+ * out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_1g_us_stat_alarm_cleared_data_bounds_check(const bcmolt_epon_onu_1g_us_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_onu_1g_us_stat_alarm_cleared_id *failed_prop);
+
+/** Initializes a bcmolt_epon_onu_1g_us_stat_alarm_raised_data struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_onu_1g_us_stat_alarm_raised_data_set_default(bcmolt_epon_onu_1g_us_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_onu_1g_us_stat_alarm_raised_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_1g_us_stat_alarm_raised_data_pack(const bcmolt_epon_onu_1g_us_stat_alarm_raised_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_onu_1g_us_stat_alarm_raised_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_onu_1g_us_stat_alarm_raised_data_get_packed_length(const bcmolt_epon_onu_1g_us_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_onu_1g_us_stat_alarm_raised_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_1g_us_stat_alarm_raised_data_unpack(bcmolt_epon_onu_1g_us_stat_alarm_raised_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_onu_1g_us_stat_alarm_raised_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_onu_1g_us_stat_alarm_raised_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_onu_1g_us_stat_alarm_raised_data is 
+ * out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_1g_us_stat_alarm_raised_data_bounds_check(const bcmolt_epon_onu_1g_us_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_onu_1g_us_stat_alarm_raised_id *failed_prop);
+
+/** Initializes a bcmolt_epon_onu_1g_us_auto_cfg_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_onu_1g_us_auto_cfg_data_set_default(bcmolt_epon_onu_1g_us_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_onu_1g_us_auto_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_1g_us_auto_cfg_data_pack(const bcmolt_epon_onu_1g_us_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_onu_1g_us_auto_cfg_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_onu_1g_us_auto_cfg_data_get_packed_length(const bcmolt_epon_onu_1g_us_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_onu_1g_us_auto_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_1g_us_auto_cfg_data_unpack(bcmolt_epon_onu_1g_us_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_onu_1g_us_auto_cfg_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_onu_1g_us_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_onu_1g_us_auto_cfg_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_onu_1g_us_auto_cfg_data_bounds_check(const bcmolt_epon_onu_1g_us_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_onu_1g_us_auto_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_epon_path_10g_ds_key struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_path_10g_ds_key_set_default(bcmolt_epon_path_10g_ds_key *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_path_10g_ds_key to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_10g_ds_key_pack(const bcmolt_epon_path_10g_ds_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_path_10g_ds_key would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_path_10g_ds_key_get_packed_length(const bcmolt_epon_path_10g_ds_key *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_path_10g_ds_key from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_10g_ds_key_unpack(bcmolt_epon_path_10g_ds_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_path_10g_ds_key struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_path_10g_ds_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_path_10g_ds_key is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_10g_ds_key_bounds_check(const bcmolt_epon_path_10g_ds_key *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_10g_ds_key_id *failed_prop);
+
+/** Initializes a bcmolt_epon_path_10g_ds_cfg_data struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_path_10g_ds_cfg_data_set_default(bcmolt_epon_path_10g_ds_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_path_10g_ds_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_10g_ds_cfg_data_pack(const bcmolt_epon_path_10g_ds_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_path_10g_ds_cfg_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_path_10g_ds_cfg_data_get_packed_length(const bcmolt_epon_path_10g_ds_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_path_10g_ds_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_10g_ds_cfg_data_unpack(bcmolt_epon_path_10g_ds_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_path_10g_ds_cfg_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_path_10g_ds_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_path_10g_ds_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_10g_ds_cfg_data_bounds_check(const bcmolt_epon_path_10g_ds_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_10g_ds_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_epon_path_10g_ds_stat_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_path_10g_ds_stat_data_set_default(bcmolt_epon_path_10g_ds_stat_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_path_10g_ds_stat_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_10g_ds_stat_data_pack(const bcmolt_epon_path_10g_ds_stat_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_path_10g_ds_stat_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_path_10g_ds_stat_data_get_packed_length(const bcmolt_epon_path_10g_ds_stat_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_path_10g_ds_stat_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_10g_ds_stat_data_unpack(bcmolt_epon_path_10g_ds_stat_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_path_10g_ds_stat_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_path_10g_ds_stat_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_path_10g_ds_stat_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_10g_ds_stat_data_bounds_check(const bcmolt_epon_path_10g_ds_stat_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_10g_ds_stat_id *failed_prop);
+
+/** Initializes a bcmolt_epon_path_10g_ds_stat_cfg_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_path_10g_ds_stat_cfg_data_set_default(bcmolt_epon_path_10g_ds_stat_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_path_10g_ds_stat_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_10g_ds_stat_cfg_data_pack(const bcmolt_epon_path_10g_ds_stat_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_path_10g_ds_stat_cfg_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_path_10g_ds_stat_cfg_data_get_packed_length(const bcmolt_epon_path_10g_ds_stat_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_path_10g_ds_stat_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_10g_ds_stat_cfg_data_unpack(bcmolt_epon_path_10g_ds_stat_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_path_10g_ds_stat_cfg_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_path_10g_ds_stat_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_path_10g_ds_stat_cfg_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_10g_ds_stat_cfg_data_bounds_check(const bcmolt_epon_path_10g_ds_stat_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_10g_ds_stat_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_epon_path_10g_ds_stat_alarm_cleared_data struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_path_10g_ds_stat_alarm_cleared_data_set_default(bcmolt_epon_path_10g_ds_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_path_10g_ds_stat_alarm_cleared_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_10g_ds_stat_alarm_cleared_data_pack(const bcmolt_epon_path_10g_ds_stat_alarm_cleared_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_epon_path_10g_ds_stat_alarm_cleared_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_path_10g_ds_stat_alarm_cleared_data_get_packed_length(const bcmolt_epon_path_10g_ds_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_path_10g_ds_stat_alarm_cleared_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_10g_ds_stat_alarm_cleared_data_unpack(bcmolt_epon_path_10g_ds_stat_alarm_cleared_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_path_10g_ds_stat_alarm_cleared_data struct 
+ * and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_path_10g_ds_stat_alarm_cleared_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_path_10g_ds_stat_alarm_cleared_data 
+ * is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_10g_ds_stat_alarm_cleared_data_bounds_check(const bcmolt_epon_path_10g_ds_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_10g_ds_stat_alarm_cleared_id *failed_prop);
+
+/** Initializes a bcmolt_epon_path_10g_ds_stat_alarm_raised_data struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_path_10g_ds_stat_alarm_raised_data_set_default(bcmolt_epon_path_10g_ds_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_path_10g_ds_stat_alarm_raised_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_10g_ds_stat_alarm_raised_data_pack(const bcmolt_epon_path_10g_ds_stat_alarm_raised_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_epon_path_10g_ds_stat_alarm_raised_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_path_10g_ds_stat_alarm_raised_data_get_packed_length(const bcmolt_epon_path_10g_ds_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_path_10g_ds_stat_alarm_raised_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_10g_ds_stat_alarm_raised_data_unpack(bcmolt_epon_path_10g_ds_stat_alarm_raised_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_path_10g_ds_stat_alarm_raised_data struct 
+ * and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_path_10g_ds_stat_alarm_raised_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_path_10g_ds_stat_alarm_raised_data is 
+ * out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_10g_ds_stat_alarm_raised_data_bounds_check(const bcmolt_epon_path_10g_ds_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_10g_ds_stat_alarm_raised_id *failed_prop);
+
+/** Initializes a bcmolt_epon_path_10g_ds_auto_cfg_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_path_10g_ds_auto_cfg_data_set_default(bcmolt_epon_path_10g_ds_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_path_10g_ds_auto_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_10g_ds_auto_cfg_data_pack(const bcmolt_epon_path_10g_ds_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_path_10g_ds_auto_cfg_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_path_10g_ds_auto_cfg_data_get_packed_length(const bcmolt_epon_path_10g_ds_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_path_10g_ds_auto_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_10g_ds_auto_cfg_data_unpack(bcmolt_epon_path_10g_ds_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_path_10g_ds_auto_cfg_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_path_10g_ds_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_path_10g_ds_auto_cfg_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_10g_ds_auto_cfg_data_bounds_check(const bcmolt_epon_path_10g_ds_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_10g_ds_auto_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_epon_path_10g_us_key struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_path_10g_us_key_set_default(bcmolt_epon_path_10g_us_key *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_path_10g_us_key to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_10g_us_key_pack(const bcmolt_epon_path_10g_us_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_path_10g_us_key would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_path_10g_us_key_get_packed_length(const bcmolt_epon_path_10g_us_key *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_path_10g_us_key from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_10g_us_key_unpack(bcmolt_epon_path_10g_us_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_path_10g_us_key struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_path_10g_us_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_path_10g_us_key is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_10g_us_key_bounds_check(const bcmolt_epon_path_10g_us_key *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_10g_us_key_id *failed_prop);
+
+/** Initializes a bcmolt_epon_path_10g_us_cfg_data struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_path_10g_us_cfg_data_set_default(bcmolt_epon_path_10g_us_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_path_10g_us_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_10g_us_cfg_data_pack(const bcmolt_epon_path_10g_us_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_path_10g_us_cfg_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_path_10g_us_cfg_data_get_packed_length(const bcmolt_epon_path_10g_us_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_path_10g_us_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_10g_us_cfg_data_unpack(bcmolt_epon_path_10g_us_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_path_10g_us_cfg_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_path_10g_us_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_path_10g_us_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_10g_us_cfg_data_bounds_check(const bcmolt_epon_path_10g_us_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_10g_us_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_epon_path_10g_us_stat_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_path_10g_us_stat_data_set_default(bcmolt_epon_path_10g_us_stat_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_path_10g_us_stat_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_10g_us_stat_data_pack(const bcmolt_epon_path_10g_us_stat_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_path_10g_us_stat_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_path_10g_us_stat_data_get_packed_length(const bcmolt_epon_path_10g_us_stat_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_path_10g_us_stat_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_10g_us_stat_data_unpack(bcmolt_epon_path_10g_us_stat_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_path_10g_us_stat_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_path_10g_us_stat_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_path_10g_us_stat_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_10g_us_stat_data_bounds_check(const bcmolt_epon_path_10g_us_stat_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_10g_us_stat_id *failed_prop);
+
+/** Initializes a bcmolt_epon_path_10g_us_stat_cfg_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_path_10g_us_stat_cfg_data_set_default(bcmolt_epon_path_10g_us_stat_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_path_10g_us_stat_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_10g_us_stat_cfg_data_pack(const bcmolt_epon_path_10g_us_stat_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_path_10g_us_stat_cfg_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_path_10g_us_stat_cfg_data_get_packed_length(const bcmolt_epon_path_10g_us_stat_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_path_10g_us_stat_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_10g_us_stat_cfg_data_unpack(bcmolt_epon_path_10g_us_stat_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_path_10g_us_stat_cfg_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_path_10g_us_stat_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_path_10g_us_stat_cfg_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_10g_us_stat_cfg_data_bounds_check(const bcmolt_epon_path_10g_us_stat_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_10g_us_stat_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_epon_path_10g_us_stat_alarm_cleared_data struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_path_10g_us_stat_alarm_cleared_data_set_default(bcmolt_epon_path_10g_us_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_path_10g_us_stat_alarm_cleared_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_10g_us_stat_alarm_cleared_data_pack(const bcmolt_epon_path_10g_us_stat_alarm_cleared_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_epon_path_10g_us_stat_alarm_cleared_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_path_10g_us_stat_alarm_cleared_data_get_packed_length(const bcmolt_epon_path_10g_us_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_path_10g_us_stat_alarm_cleared_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_10g_us_stat_alarm_cleared_data_unpack(bcmolt_epon_path_10g_us_stat_alarm_cleared_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_path_10g_us_stat_alarm_cleared_data struct 
+ * and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_path_10g_us_stat_alarm_cleared_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_path_10g_us_stat_alarm_cleared_data 
+ * is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_10g_us_stat_alarm_cleared_data_bounds_check(const bcmolt_epon_path_10g_us_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_10g_us_stat_alarm_cleared_id *failed_prop);
+
+/** Initializes a bcmolt_epon_path_10g_us_stat_alarm_raised_data struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_path_10g_us_stat_alarm_raised_data_set_default(bcmolt_epon_path_10g_us_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_path_10g_us_stat_alarm_raised_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_10g_us_stat_alarm_raised_data_pack(const bcmolt_epon_path_10g_us_stat_alarm_raised_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_epon_path_10g_us_stat_alarm_raised_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_path_10g_us_stat_alarm_raised_data_get_packed_length(const bcmolt_epon_path_10g_us_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_path_10g_us_stat_alarm_raised_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_10g_us_stat_alarm_raised_data_unpack(bcmolt_epon_path_10g_us_stat_alarm_raised_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_path_10g_us_stat_alarm_raised_data struct 
+ * and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_path_10g_us_stat_alarm_raised_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_path_10g_us_stat_alarm_raised_data is 
+ * out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_10g_us_stat_alarm_raised_data_bounds_check(const bcmolt_epon_path_10g_us_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_10g_us_stat_alarm_raised_id *failed_prop);
+
+/** Initializes a bcmolt_epon_path_10g_us_auto_cfg_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_path_10g_us_auto_cfg_data_set_default(bcmolt_epon_path_10g_us_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_path_10g_us_auto_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_10g_us_auto_cfg_data_pack(const bcmolt_epon_path_10g_us_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_path_10g_us_auto_cfg_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_path_10g_us_auto_cfg_data_get_packed_length(const bcmolt_epon_path_10g_us_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_path_10g_us_auto_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_10g_us_auto_cfg_data_unpack(bcmolt_epon_path_10g_us_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_path_10g_us_auto_cfg_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_path_10g_us_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_path_10g_us_auto_cfg_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_10g_us_auto_cfg_data_bounds_check(const bcmolt_epon_path_10g_us_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_10g_us_auto_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_epon_path_1g_ds_key struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_path_1g_ds_key_set_default(bcmolt_epon_path_1g_ds_key *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_path_1g_ds_key to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_1g_ds_key_pack(const bcmolt_epon_path_1g_ds_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_path_1g_ds_key would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_path_1g_ds_key_get_packed_length(const bcmolt_epon_path_1g_ds_key *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_path_1g_ds_key from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_1g_ds_key_unpack(bcmolt_epon_path_1g_ds_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_path_1g_ds_key struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_path_1g_ds_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_path_1g_ds_key is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_1g_ds_key_bounds_check(const bcmolt_epon_path_1g_ds_key *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_1g_ds_key_id *failed_prop);
+
+/** Initializes a bcmolt_epon_path_1g_ds_cfg_data struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_path_1g_ds_cfg_data_set_default(bcmolt_epon_path_1g_ds_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_path_1g_ds_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_1g_ds_cfg_data_pack(const bcmolt_epon_path_1g_ds_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_path_1g_ds_cfg_data would occupy 
+ * on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_path_1g_ds_cfg_data_get_packed_length(const bcmolt_epon_path_1g_ds_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_path_1g_ds_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_1g_ds_cfg_data_unpack(bcmolt_epon_path_1g_ds_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_path_1g_ds_cfg_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_path_1g_ds_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_path_1g_ds_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_1g_ds_cfg_data_bounds_check(const bcmolt_epon_path_1g_ds_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_1g_ds_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_epon_path_1g_ds_stat_data struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_path_1g_ds_stat_data_set_default(bcmolt_epon_path_1g_ds_stat_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_path_1g_ds_stat_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_1g_ds_stat_data_pack(const bcmolt_epon_path_1g_ds_stat_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_path_1g_ds_stat_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_path_1g_ds_stat_data_get_packed_length(const bcmolt_epon_path_1g_ds_stat_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_path_1g_ds_stat_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_1g_ds_stat_data_unpack(bcmolt_epon_path_1g_ds_stat_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_path_1g_ds_stat_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_path_1g_ds_stat_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_path_1g_ds_stat_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_1g_ds_stat_data_bounds_check(const bcmolt_epon_path_1g_ds_stat_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_1g_ds_stat_id *failed_prop);
+
+/** Initializes a bcmolt_epon_path_1g_ds_stat_cfg_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_path_1g_ds_stat_cfg_data_set_default(bcmolt_epon_path_1g_ds_stat_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_path_1g_ds_stat_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_1g_ds_stat_cfg_data_pack(const bcmolt_epon_path_1g_ds_stat_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_path_1g_ds_stat_cfg_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_path_1g_ds_stat_cfg_data_get_packed_length(const bcmolt_epon_path_1g_ds_stat_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_path_1g_ds_stat_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_1g_ds_stat_cfg_data_unpack(bcmolt_epon_path_1g_ds_stat_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_path_1g_ds_stat_cfg_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_path_1g_ds_stat_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_path_1g_ds_stat_cfg_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_1g_ds_stat_cfg_data_bounds_check(const bcmolt_epon_path_1g_ds_stat_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_1g_ds_stat_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_epon_path_1g_ds_stat_alarm_cleared_data struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_path_1g_ds_stat_alarm_cleared_data_set_default(bcmolt_epon_path_1g_ds_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_path_1g_ds_stat_alarm_cleared_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_1g_ds_stat_alarm_cleared_data_pack(const bcmolt_epon_path_1g_ds_stat_alarm_cleared_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_epon_path_1g_ds_stat_alarm_cleared_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_path_1g_ds_stat_alarm_cleared_data_get_packed_length(const bcmolt_epon_path_1g_ds_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_path_1g_ds_stat_alarm_cleared_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_1g_ds_stat_alarm_cleared_data_unpack(bcmolt_epon_path_1g_ds_stat_alarm_cleared_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_path_1g_ds_stat_alarm_cleared_data struct 
+ * and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_path_1g_ds_stat_alarm_cleared_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_path_1g_ds_stat_alarm_cleared_data is 
+ * out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_1g_ds_stat_alarm_cleared_data_bounds_check(const bcmolt_epon_path_1g_ds_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_1g_ds_stat_alarm_cleared_id *failed_prop);
+
+/** Initializes a bcmolt_epon_path_1g_ds_stat_alarm_raised_data struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_path_1g_ds_stat_alarm_raised_data_set_default(bcmolt_epon_path_1g_ds_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_path_1g_ds_stat_alarm_raised_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_1g_ds_stat_alarm_raised_data_pack(const bcmolt_epon_path_1g_ds_stat_alarm_raised_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_epon_path_1g_ds_stat_alarm_raised_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_path_1g_ds_stat_alarm_raised_data_get_packed_length(const bcmolt_epon_path_1g_ds_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_path_1g_ds_stat_alarm_raised_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_1g_ds_stat_alarm_raised_data_unpack(bcmolt_epon_path_1g_ds_stat_alarm_raised_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_path_1g_ds_stat_alarm_raised_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_path_1g_ds_stat_alarm_raised_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_path_1g_ds_stat_alarm_raised_data is 
+ * out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_1g_ds_stat_alarm_raised_data_bounds_check(const bcmolt_epon_path_1g_ds_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_1g_ds_stat_alarm_raised_id *failed_prop);
+
+/** Initializes a bcmolt_epon_path_1g_ds_auto_cfg_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_path_1g_ds_auto_cfg_data_set_default(bcmolt_epon_path_1g_ds_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_path_1g_ds_auto_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_1g_ds_auto_cfg_data_pack(const bcmolt_epon_path_1g_ds_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_path_1g_ds_auto_cfg_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_path_1g_ds_auto_cfg_data_get_packed_length(const bcmolt_epon_path_1g_ds_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_path_1g_ds_auto_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_1g_ds_auto_cfg_data_unpack(bcmolt_epon_path_1g_ds_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_path_1g_ds_auto_cfg_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_path_1g_ds_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_path_1g_ds_auto_cfg_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_1g_ds_auto_cfg_data_bounds_check(const bcmolt_epon_path_1g_ds_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_1g_ds_auto_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_epon_path_1g_us_key struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_path_1g_us_key_set_default(bcmolt_epon_path_1g_us_key *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_path_1g_us_key to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_1g_us_key_pack(const bcmolt_epon_path_1g_us_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_path_1g_us_key would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_path_1g_us_key_get_packed_length(const bcmolt_epon_path_1g_us_key *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_path_1g_us_key from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_1g_us_key_unpack(bcmolt_epon_path_1g_us_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_path_1g_us_key struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_path_1g_us_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_path_1g_us_key is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_1g_us_key_bounds_check(const bcmolt_epon_path_1g_us_key *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_1g_us_key_id *failed_prop);
+
+/** Initializes a bcmolt_epon_path_1g_us_cfg_data struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_path_1g_us_cfg_data_set_default(bcmolt_epon_path_1g_us_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_path_1g_us_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_1g_us_cfg_data_pack(const bcmolt_epon_path_1g_us_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_path_1g_us_cfg_data would occupy 
+ * on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_path_1g_us_cfg_data_get_packed_length(const bcmolt_epon_path_1g_us_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_path_1g_us_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_1g_us_cfg_data_unpack(bcmolt_epon_path_1g_us_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_path_1g_us_cfg_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_path_1g_us_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_path_1g_us_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_1g_us_cfg_data_bounds_check(const bcmolt_epon_path_1g_us_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_1g_us_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_epon_path_1g_us_stat_data struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_path_1g_us_stat_data_set_default(bcmolt_epon_path_1g_us_stat_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_path_1g_us_stat_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_1g_us_stat_data_pack(const bcmolt_epon_path_1g_us_stat_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_path_1g_us_stat_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_path_1g_us_stat_data_get_packed_length(const bcmolt_epon_path_1g_us_stat_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_path_1g_us_stat_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_1g_us_stat_data_unpack(bcmolt_epon_path_1g_us_stat_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_path_1g_us_stat_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_path_1g_us_stat_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_path_1g_us_stat_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_1g_us_stat_data_bounds_check(const bcmolt_epon_path_1g_us_stat_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_1g_us_stat_id *failed_prop);
+
+/** Initializes a bcmolt_epon_path_1g_us_stat_cfg_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_path_1g_us_stat_cfg_data_set_default(bcmolt_epon_path_1g_us_stat_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_path_1g_us_stat_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_1g_us_stat_cfg_data_pack(const bcmolt_epon_path_1g_us_stat_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_path_1g_us_stat_cfg_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_path_1g_us_stat_cfg_data_get_packed_length(const bcmolt_epon_path_1g_us_stat_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_path_1g_us_stat_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_1g_us_stat_cfg_data_unpack(bcmolt_epon_path_1g_us_stat_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_path_1g_us_stat_cfg_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_path_1g_us_stat_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_path_1g_us_stat_cfg_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_1g_us_stat_cfg_data_bounds_check(const bcmolt_epon_path_1g_us_stat_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_1g_us_stat_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_epon_path_1g_us_stat_alarm_cleared_data struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_path_1g_us_stat_alarm_cleared_data_set_default(bcmolt_epon_path_1g_us_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_path_1g_us_stat_alarm_cleared_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_1g_us_stat_alarm_cleared_data_pack(const bcmolt_epon_path_1g_us_stat_alarm_cleared_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_epon_path_1g_us_stat_alarm_cleared_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_path_1g_us_stat_alarm_cleared_data_get_packed_length(const bcmolt_epon_path_1g_us_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_path_1g_us_stat_alarm_cleared_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_1g_us_stat_alarm_cleared_data_unpack(bcmolt_epon_path_1g_us_stat_alarm_cleared_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_path_1g_us_stat_alarm_cleared_data struct 
+ * and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_path_1g_us_stat_alarm_cleared_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_path_1g_us_stat_alarm_cleared_data is 
+ * out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_1g_us_stat_alarm_cleared_data_bounds_check(const bcmolt_epon_path_1g_us_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_1g_us_stat_alarm_cleared_id *failed_prop);
+
+/** Initializes a bcmolt_epon_path_1g_us_stat_alarm_raised_data struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_path_1g_us_stat_alarm_raised_data_set_default(bcmolt_epon_path_1g_us_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_path_1g_us_stat_alarm_raised_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_1g_us_stat_alarm_raised_data_pack(const bcmolt_epon_path_1g_us_stat_alarm_raised_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_epon_path_1g_us_stat_alarm_raised_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_path_1g_us_stat_alarm_raised_data_get_packed_length(const bcmolt_epon_path_1g_us_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_path_1g_us_stat_alarm_raised_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_1g_us_stat_alarm_raised_data_unpack(bcmolt_epon_path_1g_us_stat_alarm_raised_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_path_1g_us_stat_alarm_raised_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_path_1g_us_stat_alarm_raised_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_path_1g_us_stat_alarm_raised_data is 
+ * out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_1g_us_stat_alarm_raised_data_bounds_check(const bcmolt_epon_path_1g_us_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_1g_us_stat_alarm_raised_id *failed_prop);
+
+/** Initializes a bcmolt_epon_path_1g_us_auto_cfg_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_path_1g_us_auto_cfg_data_set_default(bcmolt_epon_path_1g_us_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_path_1g_us_auto_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_1g_us_auto_cfg_data_pack(const bcmolt_epon_path_1g_us_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_path_1g_us_auto_cfg_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_path_1g_us_auto_cfg_data_get_packed_length(const bcmolt_epon_path_1g_us_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_path_1g_us_auto_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_1g_us_auto_cfg_data_unpack(bcmolt_epon_path_1g_us_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_path_1g_us_auto_cfg_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_path_1g_us_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_path_1g_us_auto_cfg_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_path_1g_us_auto_cfg_data_bounds_check(const bcmolt_epon_path_1g_us_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_path_1g_us_auto_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_epon_rp_key struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_rp_key_set_default(bcmolt_epon_rp_key *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_rp_key to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_rp_key_pack(const bcmolt_epon_rp_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_rp_key would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_rp_key_get_packed_length(const bcmolt_epon_rp_key *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_rp_key from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_rp_key_unpack(bcmolt_epon_rp_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_rp_key struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_rp_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_rp_key is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_rp_key_bounds_check(const bcmolt_epon_rp_key *this, bcmolt_presence_mask fields_present, bcmolt_epon_rp_key_id *failed_prop);
+
+/** Initializes a bcmolt_epon_rp_cfg_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_epon_rp_cfg_data_set_default(bcmolt_epon_rp_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_epon_rp_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_rp_cfg_data_pack(const bcmolt_epon_rp_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_epon_rp_cfg_data would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_epon_rp_cfg_data_get_packed_length(const bcmolt_epon_rp_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_epon_rp_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_rp_cfg_data_unpack(bcmolt_epon_rp_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_epon_rp_cfg_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_epon_rp_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_epon_rp_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_epon_rp_cfg_data_bounds_check(const bcmolt_epon_rp_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_epon_rp_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_gpio_key struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpio_key_set_default(bcmolt_gpio_key *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpio_key to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpio_key_pack(const bcmolt_gpio_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpio_key would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpio_key_get_packed_length(const bcmolt_gpio_key *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpio_key from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpio_key_unpack(bcmolt_gpio_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpio_key struct and collects memory requirements 
+ * above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpio_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpio_key is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpio_key_bounds_check(const bcmolt_gpio_key *this, bcmolt_presence_mask fields_present, bcmolt_gpio_key_id *failed_prop);
+
+/** Initializes a bcmolt_gpio_cfg_data struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpio_cfg_data_set_default(bcmolt_gpio_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpio_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpio_cfg_data_pack(const bcmolt_gpio_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpio_cfg_data would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpio_cfg_data_get_packed_length(const bcmolt_gpio_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpio_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpio_cfg_data_unpack(bcmolt_gpio_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpio_cfg_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpio_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpio_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpio_cfg_data_bounds_check(const bcmolt_gpio_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_gpio_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_alloc_key struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_alloc_key_set_default(bcmolt_gpon_alloc_key *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_alloc_key to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_alloc_key_pack(const bcmolt_gpon_alloc_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_alloc_key would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_alloc_key_get_packed_length(const bcmolt_gpon_alloc_key *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_alloc_key from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_alloc_key_unpack(bcmolt_gpon_alloc_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_alloc_key struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_alloc_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_alloc_key is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_alloc_key_bounds_check(const bcmolt_gpon_alloc_key *this, bcmolt_presence_mask fields_present, bcmolt_gpon_alloc_key_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_alloc_cfg_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_alloc_cfg_data_set_default(bcmolt_gpon_alloc_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_alloc_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_alloc_cfg_data_pack(const bcmolt_gpon_alloc_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_alloc_cfg_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_alloc_cfg_data_get_packed_length(const bcmolt_gpon_alloc_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_alloc_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_alloc_cfg_data_unpack(bcmolt_gpon_alloc_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_alloc_cfg_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_alloc_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_alloc_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_alloc_cfg_data_bounds_check(const bcmolt_gpon_alloc_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_alloc_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_alloc_stat_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_alloc_stat_data_set_default(bcmolt_gpon_alloc_stat_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_alloc_stat_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_alloc_stat_data_pack(const bcmolt_gpon_alloc_stat_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_alloc_stat_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_alloc_stat_data_get_packed_length(const bcmolt_gpon_alloc_stat_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_alloc_stat_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_alloc_stat_data_unpack(bcmolt_gpon_alloc_stat_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_alloc_stat_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_alloc_stat_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_alloc_stat_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_alloc_stat_data_bounds_check(const bcmolt_gpon_alloc_stat_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_alloc_stat_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_alloc_stat_cfg_data struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_alloc_stat_cfg_data_set_default(bcmolt_gpon_alloc_stat_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_alloc_stat_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_alloc_stat_cfg_data_pack(const bcmolt_gpon_alloc_stat_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_alloc_stat_cfg_data would occupy 
+ * on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_alloc_stat_cfg_data_get_packed_length(const bcmolt_gpon_alloc_stat_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_alloc_stat_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_alloc_stat_cfg_data_unpack(bcmolt_gpon_alloc_stat_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_alloc_stat_cfg_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_alloc_stat_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_alloc_stat_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_alloc_stat_cfg_data_bounds_check(const bcmolt_gpon_alloc_stat_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_alloc_stat_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_alloc_configuration_completed_data struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_alloc_configuration_completed_data_set_default(bcmolt_gpon_alloc_configuration_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_alloc_configuration_completed_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_alloc_configuration_completed_data_pack(const bcmolt_gpon_alloc_configuration_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_gpon_alloc_configuration_completed_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_alloc_configuration_completed_data_get_packed_length(const bcmolt_gpon_alloc_configuration_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_alloc_configuration_completed_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_alloc_configuration_completed_data_unpack(bcmolt_gpon_alloc_configuration_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_alloc_configuration_completed_data struct 
+ * and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_alloc_configuration_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_alloc_configuration_completed_data is 
+ * out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_alloc_configuration_completed_data_bounds_check(const bcmolt_gpon_alloc_configuration_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_alloc_configuration_completed_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_alloc_get_alloc_stats_completed_data struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_alloc_get_alloc_stats_completed_data_set_default(bcmolt_gpon_alloc_get_alloc_stats_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_alloc_get_alloc_stats_completed_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_alloc_get_alloc_stats_completed_data_pack(const bcmolt_gpon_alloc_get_alloc_stats_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_gpon_alloc_get_alloc_stats_completed_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_alloc_get_alloc_stats_completed_data_get_packed_length(const bcmolt_gpon_alloc_get_alloc_stats_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_alloc_get_alloc_stats_completed_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_alloc_get_alloc_stats_completed_data_unpack(bcmolt_gpon_alloc_get_alloc_stats_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_alloc_get_alloc_stats_completed_data struct 
+ * and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_alloc_get_alloc_stats_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_alloc_get_alloc_stats_completed_data 
+ * is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_alloc_get_alloc_stats_completed_data_bounds_check(const bcmolt_gpon_alloc_get_alloc_stats_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_alloc_get_alloc_stats_completed_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_alloc_stat_alarm_cleared_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_alloc_stat_alarm_cleared_data_set_default(bcmolt_gpon_alloc_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_alloc_stat_alarm_cleared_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_alloc_stat_alarm_cleared_data_pack(const bcmolt_gpon_alloc_stat_alarm_cleared_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_alloc_stat_alarm_cleared_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_alloc_stat_alarm_cleared_data_get_packed_length(const bcmolt_gpon_alloc_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_alloc_stat_alarm_cleared_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_alloc_stat_alarm_cleared_data_unpack(bcmolt_gpon_alloc_stat_alarm_cleared_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_alloc_stat_alarm_cleared_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_alloc_stat_alarm_cleared_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_alloc_stat_alarm_cleared_data is out 
+ * of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_alloc_stat_alarm_cleared_data_bounds_check(const bcmolt_gpon_alloc_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_alloc_stat_alarm_cleared_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_alloc_stat_alarm_raised_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_alloc_stat_alarm_raised_data_set_default(bcmolt_gpon_alloc_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_alloc_stat_alarm_raised_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_alloc_stat_alarm_raised_data_pack(const bcmolt_gpon_alloc_stat_alarm_raised_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_alloc_stat_alarm_raised_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_alloc_stat_alarm_raised_data_get_packed_length(const bcmolt_gpon_alloc_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_alloc_stat_alarm_raised_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_alloc_stat_alarm_raised_data_unpack(bcmolt_gpon_alloc_stat_alarm_raised_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_alloc_stat_alarm_raised_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_alloc_stat_alarm_raised_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_alloc_stat_alarm_raised_data is out 
+ * of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_alloc_stat_alarm_raised_data_bounds_check(const bcmolt_gpon_alloc_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_alloc_stat_alarm_raised_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_alloc_auto_cfg_data struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_alloc_auto_cfg_data_set_default(bcmolt_gpon_alloc_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_alloc_auto_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_alloc_auto_cfg_data_pack(const bcmolt_gpon_alloc_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_alloc_auto_cfg_data would occupy 
+ * on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_alloc_auto_cfg_data_get_packed_length(const bcmolt_gpon_alloc_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_alloc_auto_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_alloc_auto_cfg_data_unpack(bcmolt_gpon_alloc_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_alloc_auto_cfg_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_alloc_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_alloc_auto_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_alloc_auto_cfg_data_bounds_check(const bcmolt_gpon_alloc_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_alloc_auto_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_alloc_get_stats_data struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_alloc_get_stats_data_set_default(bcmolt_gpon_alloc_get_stats_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_alloc_get_stats_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_alloc_get_stats_data_pack(const bcmolt_gpon_alloc_get_stats_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_alloc_get_stats_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_alloc_get_stats_data_get_packed_length(const bcmolt_gpon_alloc_get_stats_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_alloc_get_stats_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_alloc_get_stats_data_unpack(bcmolt_gpon_alloc_get_stats_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_alloc_get_stats_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_alloc_get_stats_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_alloc_get_stats_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_alloc_get_stats_data_bounds_check(const bcmolt_gpon_alloc_get_stats_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_alloc_get_stats_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_alloc_set_state_data struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_alloc_set_state_data_set_default(bcmolt_gpon_alloc_set_state_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_alloc_set_state_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_alloc_set_state_data_pack(const bcmolt_gpon_alloc_set_state_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_alloc_set_state_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_alloc_set_state_data_get_packed_length(const bcmolt_gpon_alloc_set_state_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_alloc_set_state_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_alloc_set_state_data_unpack(bcmolt_gpon_alloc_set_state_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_alloc_set_state_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_alloc_set_state_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_alloc_set_state_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_alloc_set_state_data_bounds_check(const bcmolt_gpon_alloc_set_state_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_alloc_set_state_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_gem_port_key struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_gem_port_key_set_default(bcmolt_gpon_gem_port_key *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_gem_port_key to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_gem_port_key_pack(const bcmolt_gpon_gem_port_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_gem_port_key would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_gem_port_key_get_packed_length(const bcmolt_gpon_gem_port_key *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_gem_port_key from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_gem_port_key_unpack(bcmolt_gpon_gem_port_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_gem_port_key struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_gem_port_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_gem_port_key is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_gem_port_key_bounds_check(const bcmolt_gpon_gem_port_key *this, bcmolt_presence_mask fields_present, bcmolt_gpon_gem_port_key_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_gem_port_cfg_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_gem_port_cfg_data_set_default(bcmolt_gpon_gem_port_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_gem_port_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_gem_port_cfg_data_pack(const bcmolt_gpon_gem_port_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_gem_port_cfg_data would occupy 
+ * on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_gem_port_cfg_data_get_packed_length(const bcmolt_gpon_gem_port_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_gem_port_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_gem_port_cfg_data_unpack(bcmolt_gpon_gem_port_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_gem_port_cfg_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_gem_port_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_gem_port_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_gem_port_cfg_data_bounds_check(const bcmolt_gpon_gem_port_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_gem_port_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_gem_port_stat_data struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_gem_port_stat_data_set_default(bcmolt_gpon_gem_port_stat_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_gem_port_stat_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_gem_port_stat_data_pack(const bcmolt_gpon_gem_port_stat_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_gem_port_stat_data would occupy 
+ * on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_gem_port_stat_data_get_packed_length(const bcmolt_gpon_gem_port_stat_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_gem_port_stat_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_gem_port_stat_data_unpack(bcmolt_gpon_gem_port_stat_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_gem_port_stat_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_gem_port_stat_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_gem_port_stat_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_gem_port_stat_data_bounds_check(const bcmolt_gpon_gem_port_stat_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_gem_port_stat_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_gem_port_stat_cfg_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_gem_port_stat_cfg_data_set_default(bcmolt_gpon_gem_port_stat_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_gem_port_stat_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_gem_port_stat_cfg_data_pack(const bcmolt_gpon_gem_port_stat_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_gem_port_stat_cfg_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_gem_port_stat_cfg_data_get_packed_length(const bcmolt_gpon_gem_port_stat_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_gem_port_stat_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_gem_port_stat_cfg_data_unpack(bcmolt_gpon_gem_port_stat_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_gem_port_stat_cfg_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_gem_port_stat_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_gem_port_stat_cfg_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_gem_port_stat_cfg_data_bounds_check(const bcmolt_gpon_gem_port_stat_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_gem_port_stat_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_gem_port_configuration_completed_data struct.  
+ * This sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_gem_port_configuration_completed_data_set_default(bcmolt_gpon_gem_port_configuration_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_gem_port_configuration_completed_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_gem_port_configuration_completed_data_pack(const bcmolt_gpon_gem_port_configuration_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_gpon_gem_port_configuration_completed_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_gem_port_configuration_completed_data_get_packed_length(const bcmolt_gpon_gem_port_configuration_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_gem_port_configuration_completed_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_gem_port_configuration_completed_data_unpack(bcmolt_gpon_gem_port_configuration_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_gem_port_configuration_completed_data struct 
+ * and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_gem_port_configuration_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_gem_port_configuration_completed_data 
+ * is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_gem_port_configuration_completed_data_bounds_check(const bcmolt_gpon_gem_port_configuration_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_gem_port_configuration_completed_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_gem_port_stat_alarm_cleared_data struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_gem_port_stat_alarm_cleared_data_set_default(bcmolt_gpon_gem_port_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_gem_port_stat_alarm_cleared_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_gem_port_stat_alarm_cleared_data_pack(const bcmolt_gpon_gem_port_stat_alarm_cleared_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_gem_port_stat_alarm_cleared_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_gem_port_stat_alarm_cleared_data_get_packed_length(const bcmolt_gpon_gem_port_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_gem_port_stat_alarm_cleared_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_gem_port_stat_alarm_cleared_data_unpack(bcmolt_gpon_gem_port_stat_alarm_cleared_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_gem_port_stat_alarm_cleared_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_gem_port_stat_alarm_cleared_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_gem_port_stat_alarm_cleared_data is 
+ * out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_gem_port_stat_alarm_cleared_data_bounds_check(const bcmolt_gpon_gem_port_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_gem_port_stat_alarm_cleared_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_gem_port_stat_alarm_raised_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_gem_port_stat_alarm_raised_data_set_default(bcmolt_gpon_gem_port_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_gem_port_stat_alarm_raised_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_gem_port_stat_alarm_raised_data_pack(const bcmolt_gpon_gem_port_stat_alarm_raised_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_gem_port_stat_alarm_raised_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_gem_port_stat_alarm_raised_data_get_packed_length(const bcmolt_gpon_gem_port_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_gem_port_stat_alarm_raised_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_gem_port_stat_alarm_raised_data_unpack(bcmolt_gpon_gem_port_stat_alarm_raised_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_gem_port_stat_alarm_raised_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_gem_port_stat_alarm_raised_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_gem_port_stat_alarm_raised_data is 
+ * out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_gem_port_stat_alarm_raised_data_bounds_check(const bcmolt_gpon_gem_port_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_gem_port_stat_alarm_raised_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_gem_port_auto_cfg_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_gem_port_auto_cfg_data_set_default(bcmolt_gpon_gem_port_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_gem_port_auto_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_gem_port_auto_cfg_data_pack(const bcmolt_gpon_gem_port_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_gem_port_auto_cfg_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_gem_port_auto_cfg_data_get_packed_length(const bcmolt_gpon_gem_port_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_gem_port_auto_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_gem_port_auto_cfg_data_unpack(bcmolt_gpon_gem_port_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_gem_port_auto_cfg_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_gem_port_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_gem_port_auto_cfg_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_gem_port_auto_cfg_data_bounds_check(const bcmolt_gpon_gem_port_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_gem_port_auto_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_gem_port_set_state_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_gem_port_set_state_data_set_default(bcmolt_gpon_gem_port_set_state_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_gem_port_set_state_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_gem_port_set_state_data_pack(const bcmolt_gpon_gem_port_set_state_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_gem_port_set_state_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_gem_port_set_state_data_get_packed_length(const bcmolt_gpon_gem_port_set_state_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_gem_port_set_state_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_gem_port_set_state_data_unpack(bcmolt_gpon_gem_port_set_state_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_gem_port_set_state_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_gem_port_set_state_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_gem_port_set_state_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_gem_port_set_state_data_bounds_check(const bcmolt_gpon_gem_port_set_state_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_gem_port_set_state_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_iwf_key struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_iwf_key_set_default(bcmolt_gpon_iwf_key *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_iwf_key to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_key_pack(const bcmolt_gpon_iwf_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_iwf_key would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_iwf_key_get_packed_length(const bcmolt_gpon_iwf_key *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_iwf_key from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_key_unpack(bcmolt_gpon_iwf_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_iwf_key struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_iwf_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_iwf_key is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_key_bounds_check(const bcmolt_gpon_iwf_key *this, bcmolt_presence_mask fields_present, bcmolt_gpon_iwf_key_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_iwf_cfg_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_iwf_cfg_data_set_default(bcmolt_gpon_iwf_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_iwf_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_cfg_data_pack(const bcmolt_gpon_iwf_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_iwf_cfg_data would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_iwf_cfg_data_get_packed_length(const bcmolt_gpon_iwf_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_iwf_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_cfg_data_unpack(bcmolt_gpon_iwf_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_iwf_cfg_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_iwf_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_iwf_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_cfg_data_bounds_check(const bcmolt_gpon_iwf_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_iwf_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_iwf_stat_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_iwf_stat_data_set_default(bcmolt_gpon_iwf_stat_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_iwf_stat_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_stat_data_pack(const bcmolt_gpon_iwf_stat_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_iwf_stat_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_iwf_stat_data_get_packed_length(const bcmolt_gpon_iwf_stat_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_iwf_stat_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_stat_data_unpack(bcmolt_gpon_iwf_stat_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_iwf_stat_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_iwf_stat_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_iwf_stat_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_stat_data_bounds_check(const bcmolt_gpon_iwf_stat_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_iwf_stat_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_iwf_stat_cfg_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_iwf_stat_cfg_data_set_default(bcmolt_gpon_iwf_stat_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_iwf_stat_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_stat_cfg_data_pack(const bcmolt_gpon_iwf_stat_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_iwf_stat_cfg_data would occupy 
+ * on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_iwf_stat_cfg_data_get_packed_length(const bcmolt_gpon_iwf_stat_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_iwf_stat_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_stat_cfg_data_unpack(bcmolt_gpon_iwf_stat_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_iwf_stat_cfg_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_iwf_stat_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_iwf_stat_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_stat_cfg_data_bounds_check(const bcmolt_gpon_iwf_stat_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_iwf_stat_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_iwf_scan_mac_table_completed_data struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_iwf_scan_mac_table_completed_data_set_default(bcmolt_gpon_iwf_scan_mac_table_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_iwf_scan_mac_table_completed_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_scan_mac_table_completed_data_pack(const bcmolt_gpon_iwf_scan_mac_table_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_gpon_iwf_scan_mac_table_completed_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_iwf_scan_mac_table_completed_data_get_packed_length(const bcmolt_gpon_iwf_scan_mac_table_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_iwf_scan_mac_table_completed_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_scan_mac_table_completed_data_unpack(bcmolt_gpon_iwf_scan_mac_table_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_iwf_scan_mac_table_completed_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_iwf_scan_mac_table_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_iwf_scan_mac_table_completed_data is 
+ * out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_scan_mac_table_completed_data_bounds_check(const bcmolt_gpon_iwf_scan_mac_table_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_iwf_scan_mac_table_completed_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_iwf_stat_alarm_cleared_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_iwf_stat_alarm_cleared_data_set_default(bcmolt_gpon_iwf_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_iwf_stat_alarm_cleared_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_stat_alarm_cleared_data_pack(const bcmolt_gpon_iwf_stat_alarm_cleared_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_iwf_stat_alarm_cleared_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_iwf_stat_alarm_cleared_data_get_packed_length(const bcmolt_gpon_iwf_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_iwf_stat_alarm_cleared_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_stat_alarm_cleared_data_unpack(bcmolt_gpon_iwf_stat_alarm_cleared_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_iwf_stat_alarm_cleared_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_iwf_stat_alarm_cleared_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_iwf_stat_alarm_cleared_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_stat_alarm_cleared_data_bounds_check(const bcmolt_gpon_iwf_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_iwf_stat_alarm_cleared_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_iwf_stat_alarm_raised_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_iwf_stat_alarm_raised_data_set_default(bcmolt_gpon_iwf_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_iwf_stat_alarm_raised_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_stat_alarm_raised_data_pack(const bcmolt_gpon_iwf_stat_alarm_raised_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_iwf_stat_alarm_raised_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_iwf_stat_alarm_raised_data_get_packed_length(const bcmolt_gpon_iwf_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_iwf_stat_alarm_raised_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_stat_alarm_raised_data_unpack(bcmolt_gpon_iwf_stat_alarm_raised_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_iwf_stat_alarm_raised_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_iwf_stat_alarm_raised_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_iwf_stat_alarm_raised_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_stat_alarm_raised_data_bounds_check(const bcmolt_gpon_iwf_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_iwf_stat_alarm_raised_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_iwf_auto_cfg_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_iwf_auto_cfg_data_set_default(bcmolt_gpon_iwf_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_iwf_auto_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_auto_cfg_data_pack(const bcmolt_gpon_iwf_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_iwf_auto_cfg_data would occupy 
+ * on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_iwf_auto_cfg_data_get_packed_length(const bcmolt_gpon_iwf_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_iwf_auto_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_auto_cfg_data_unpack(bcmolt_gpon_iwf_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_iwf_auto_cfg_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_iwf_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_iwf_auto_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_auto_cfg_data_bounds_check(const bcmolt_gpon_iwf_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_iwf_auto_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_iwf_flush_mac_table_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_iwf_flush_mac_table_data_set_default(bcmolt_gpon_iwf_flush_mac_table_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_iwf_flush_mac_table_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_flush_mac_table_data_pack(const bcmolt_gpon_iwf_flush_mac_table_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_iwf_flush_mac_table_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_iwf_flush_mac_table_data_get_packed_length(const bcmolt_gpon_iwf_flush_mac_table_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_iwf_flush_mac_table_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_flush_mac_table_data_unpack(bcmolt_gpon_iwf_flush_mac_table_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_iwf_flush_mac_table_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_iwf_flush_mac_table_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_iwf_flush_mac_table_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_flush_mac_table_data_bounds_check(const bcmolt_gpon_iwf_flush_mac_table_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_iwf_flush_mac_table_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_iwf_scan_mac_table_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_iwf_scan_mac_table_data_set_default(bcmolt_gpon_iwf_scan_mac_table_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_iwf_scan_mac_table_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_scan_mac_table_data_pack(const bcmolt_gpon_iwf_scan_mac_table_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_iwf_scan_mac_table_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_iwf_scan_mac_table_data_get_packed_length(const bcmolt_gpon_iwf_scan_mac_table_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_iwf_scan_mac_table_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_scan_mac_table_data_unpack(bcmolt_gpon_iwf_scan_mac_table_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_iwf_scan_mac_table_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_iwf_scan_mac_table_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_iwf_scan_mac_table_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_scan_mac_table_data_bounds_check(const bcmolt_gpon_iwf_scan_mac_table_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_iwf_scan_mac_table_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_iwf_ds_egress_flow_key struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_iwf_ds_egress_flow_key_set_default(bcmolt_gpon_iwf_ds_egress_flow_key *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_iwf_ds_egress_flow_key to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_ds_egress_flow_key_pack(const bcmolt_gpon_iwf_ds_egress_flow_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_iwf_ds_egress_flow_key would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_iwf_ds_egress_flow_key_get_packed_length(const bcmolt_gpon_iwf_ds_egress_flow_key *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_iwf_ds_egress_flow_key from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_ds_egress_flow_key_unpack(bcmolt_gpon_iwf_ds_egress_flow_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_iwf_ds_egress_flow_key struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_iwf_ds_egress_flow_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_iwf_ds_egress_flow_key is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_ds_egress_flow_key_bounds_check(const bcmolt_gpon_iwf_ds_egress_flow_key *this, bcmolt_presence_mask fields_present, bcmolt_gpon_iwf_ds_egress_flow_key_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_iwf_ds_egress_flow_cfg_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_iwf_ds_egress_flow_cfg_data_set_default(bcmolt_gpon_iwf_ds_egress_flow_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_iwf_ds_egress_flow_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_ds_egress_flow_cfg_data_pack(const bcmolt_gpon_iwf_ds_egress_flow_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_iwf_ds_egress_flow_cfg_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_iwf_ds_egress_flow_cfg_data_get_packed_length(const bcmolt_gpon_iwf_ds_egress_flow_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_iwf_ds_egress_flow_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_ds_egress_flow_cfg_data_unpack(bcmolt_gpon_iwf_ds_egress_flow_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_iwf_ds_egress_flow_cfg_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_iwf_ds_egress_flow_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_iwf_ds_egress_flow_cfg_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_ds_egress_flow_cfg_data_bounds_check(const bcmolt_gpon_iwf_ds_egress_flow_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_iwf_ds_egress_flow_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_iwf_ds_ingress_flow_key struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_iwf_ds_ingress_flow_key_set_default(bcmolt_gpon_iwf_ds_ingress_flow_key *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_iwf_ds_ingress_flow_key to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_ds_ingress_flow_key_pack(const bcmolt_gpon_iwf_ds_ingress_flow_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_iwf_ds_ingress_flow_key would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_iwf_ds_ingress_flow_key_get_packed_length(const bcmolt_gpon_iwf_ds_ingress_flow_key *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_iwf_ds_ingress_flow_key from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_ds_ingress_flow_key_unpack(bcmolt_gpon_iwf_ds_ingress_flow_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_iwf_ds_ingress_flow_key struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_iwf_ds_ingress_flow_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_iwf_ds_ingress_flow_key is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_ds_ingress_flow_key_bounds_check(const bcmolt_gpon_iwf_ds_ingress_flow_key *this, bcmolt_presence_mask fields_present, bcmolt_gpon_iwf_ds_ingress_flow_key_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_iwf_ds_ingress_flow_cfg_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_iwf_ds_ingress_flow_cfg_data_set_default(bcmolt_gpon_iwf_ds_ingress_flow_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_iwf_ds_ingress_flow_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_ds_ingress_flow_cfg_data_pack(const bcmolt_gpon_iwf_ds_ingress_flow_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_iwf_ds_ingress_flow_cfg_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_iwf_ds_ingress_flow_cfg_data_get_packed_length(const bcmolt_gpon_iwf_ds_ingress_flow_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_iwf_ds_ingress_flow_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_ds_ingress_flow_cfg_data_unpack(bcmolt_gpon_iwf_ds_ingress_flow_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_iwf_ds_ingress_flow_cfg_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_iwf_ds_ingress_flow_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_iwf_ds_ingress_flow_cfg_data is out 
+ * of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_ds_ingress_flow_cfg_data_bounds_check(const bcmolt_gpon_iwf_ds_ingress_flow_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_iwf_ds_ingress_flow_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_iwf_mac_table_key struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_iwf_mac_table_key_set_default(bcmolt_gpon_iwf_mac_table_key *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_iwf_mac_table_key to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_mac_table_key_pack(const bcmolt_gpon_iwf_mac_table_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_iwf_mac_table_key would occupy 
+ * on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_iwf_mac_table_key_get_packed_length(const bcmolt_gpon_iwf_mac_table_key *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_iwf_mac_table_key from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_mac_table_key_unpack(bcmolt_gpon_iwf_mac_table_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_iwf_mac_table_key struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_iwf_mac_table_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_iwf_mac_table_key is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_mac_table_key_bounds_check(const bcmolt_gpon_iwf_mac_table_key *this, bcmolt_presence_mask fields_present, bcmolt_gpon_iwf_mac_table_key_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_iwf_mac_table_cfg_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_iwf_mac_table_cfg_data_set_default(bcmolt_gpon_iwf_mac_table_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_iwf_mac_table_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_mac_table_cfg_data_pack(const bcmolt_gpon_iwf_mac_table_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_iwf_mac_table_cfg_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_iwf_mac_table_cfg_data_get_packed_length(const bcmolt_gpon_iwf_mac_table_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_iwf_mac_table_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_mac_table_cfg_data_unpack(bcmolt_gpon_iwf_mac_table_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_iwf_mac_table_cfg_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_iwf_mac_table_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_iwf_mac_table_cfg_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_mac_table_cfg_data_bounds_check(const bcmolt_gpon_iwf_mac_table_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_iwf_mac_table_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_iwf_mac_table_mac_dropped_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_iwf_mac_table_mac_dropped_data_set_default(bcmolt_gpon_iwf_mac_table_mac_dropped_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_iwf_mac_table_mac_dropped_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_mac_table_mac_dropped_data_pack(const bcmolt_gpon_iwf_mac_table_mac_dropped_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_iwf_mac_table_mac_dropped_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_iwf_mac_table_mac_dropped_data_get_packed_length(const bcmolt_gpon_iwf_mac_table_mac_dropped_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_iwf_mac_table_mac_dropped_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_mac_table_mac_dropped_data_unpack(bcmolt_gpon_iwf_mac_table_mac_dropped_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_iwf_mac_table_mac_dropped_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_iwf_mac_table_mac_dropped_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_iwf_mac_table_mac_dropped_data is out 
+ * of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_mac_table_mac_dropped_data_bounds_check(const bcmolt_gpon_iwf_mac_table_mac_dropped_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_iwf_mac_table_mac_dropped_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_iwf_mac_table_mac_move_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_iwf_mac_table_mac_move_data_set_default(bcmolt_gpon_iwf_mac_table_mac_move_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_iwf_mac_table_mac_move_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_mac_table_mac_move_data_pack(const bcmolt_gpon_iwf_mac_table_mac_move_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_iwf_mac_table_mac_move_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_iwf_mac_table_mac_move_data_get_packed_length(const bcmolt_gpon_iwf_mac_table_mac_move_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_iwf_mac_table_mac_move_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_mac_table_mac_move_data_unpack(bcmolt_gpon_iwf_mac_table_mac_move_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_iwf_mac_table_mac_move_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_iwf_mac_table_mac_move_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_iwf_mac_table_mac_move_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_mac_table_mac_move_data_bounds_check(const bcmolt_gpon_iwf_mac_table_mac_move_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_iwf_mac_table_mac_move_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_iwf_mac_table_new_mac_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_iwf_mac_table_new_mac_data_set_default(bcmolt_gpon_iwf_mac_table_new_mac_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_iwf_mac_table_new_mac_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_mac_table_new_mac_data_pack(const bcmolt_gpon_iwf_mac_table_new_mac_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_iwf_mac_table_new_mac_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_iwf_mac_table_new_mac_data_get_packed_length(const bcmolt_gpon_iwf_mac_table_new_mac_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_iwf_mac_table_new_mac_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_mac_table_new_mac_data_unpack(bcmolt_gpon_iwf_mac_table_new_mac_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_iwf_mac_table_new_mac_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_iwf_mac_table_new_mac_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_iwf_mac_table_new_mac_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_mac_table_new_mac_data_bounds_check(const bcmolt_gpon_iwf_mac_table_new_mac_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_iwf_mac_table_new_mac_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_iwf_mac_table_auto_cfg_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_iwf_mac_table_auto_cfg_data_set_default(bcmolt_gpon_iwf_mac_table_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_iwf_mac_table_auto_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_mac_table_auto_cfg_data_pack(const bcmolt_gpon_iwf_mac_table_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_iwf_mac_table_auto_cfg_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_iwf_mac_table_auto_cfg_data_get_packed_length(const bcmolt_gpon_iwf_mac_table_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_iwf_mac_table_auto_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_mac_table_auto_cfg_data_unpack(bcmolt_gpon_iwf_mac_table_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_iwf_mac_table_auto_cfg_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_iwf_mac_table_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_iwf_mac_table_auto_cfg_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_mac_table_auto_cfg_data_bounds_check(const bcmolt_gpon_iwf_mac_table_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_iwf_mac_table_auto_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_iwf_us_flow_key struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_iwf_us_flow_key_set_default(bcmolt_gpon_iwf_us_flow_key *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_iwf_us_flow_key to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_us_flow_key_pack(const bcmolt_gpon_iwf_us_flow_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_iwf_us_flow_key would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_iwf_us_flow_key_get_packed_length(const bcmolt_gpon_iwf_us_flow_key *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_iwf_us_flow_key from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_us_flow_key_unpack(bcmolt_gpon_iwf_us_flow_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_iwf_us_flow_key struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_iwf_us_flow_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_iwf_us_flow_key is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_us_flow_key_bounds_check(const bcmolt_gpon_iwf_us_flow_key *this, bcmolt_presence_mask fields_present, bcmolt_gpon_iwf_us_flow_key_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_iwf_us_flow_cfg_data struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_iwf_us_flow_cfg_data_set_default(bcmolt_gpon_iwf_us_flow_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_iwf_us_flow_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_us_flow_cfg_data_pack(const bcmolt_gpon_iwf_us_flow_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_iwf_us_flow_cfg_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_iwf_us_flow_cfg_data_get_packed_length(const bcmolt_gpon_iwf_us_flow_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_iwf_us_flow_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_us_flow_cfg_data_unpack(bcmolt_gpon_iwf_us_flow_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_iwf_us_flow_cfg_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_iwf_us_flow_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_iwf_us_flow_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_iwf_us_flow_cfg_data_bounds_check(const bcmolt_gpon_iwf_us_flow_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_iwf_us_flow_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_ni_key struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_ni_key_set_default(bcmolt_gpon_ni_key *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_ni_key to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_key_pack(const bcmolt_gpon_ni_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_ni_key would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_ni_key_get_packed_length(const bcmolt_gpon_ni_key *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_ni_key from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_key_unpack(bcmolt_gpon_ni_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_ni_key struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_ni_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_ni_key is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_key_bounds_check(const bcmolt_gpon_ni_key *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_key_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_ni_cfg_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_ni_cfg_data_set_default(bcmolt_gpon_ni_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_ni_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_cfg_data_pack(const bcmolt_gpon_ni_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_ni_cfg_data would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_ni_cfg_data_get_packed_length(const bcmolt_gpon_ni_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_ni_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_cfg_data_unpack(bcmolt_gpon_ni_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_ni_cfg_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_ni_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_ni_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_cfg_data_bounds_check(const bcmolt_gpon_ni_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_ni_stat_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_ni_stat_data_set_default(bcmolt_gpon_ni_stat_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_ni_stat_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_stat_data_pack(const bcmolt_gpon_ni_stat_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_ni_stat_data would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_ni_stat_data_get_packed_length(const bcmolt_gpon_ni_stat_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_ni_stat_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_stat_data_unpack(bcmolt_gpon_ni_stat_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_ni_stat_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_ni_stat_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_ni_stat_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_stat_data_bounds_check(const bcmolt_gpon_ni_stat_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_stat_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_ni_stat_cfg_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_ni_stat_cfg_data_set_default(bcmolt_gpon_ni_stat_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_ni_stat_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_stat_cfg_data_pack(const bcmolt_gpon_ni_stat_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_ni_stat_cfg_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_ni_stat_cfg_data_get_packed_length(const bcmolt_gpon_ni_stat_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_ni_stat_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_stat_cfg_data_unpack(bcmolt_gpon_ni_stat_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_ni_stat_cfg_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_ni_stat_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_ni_stat_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_stat_cfg_data_bounds_check(const bcmolt_gpon_ni_stat_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_stat_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_ni_cpu_packets_failure_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_ni_cpu_packets_failure_data_set_default(bcmolt_gpon_ni_cpu_packets_failure_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_ni_cpu_packets_failure_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_cpu_packets_failure_data_pack(const bcmolt_gpon_ni_cpu_packets_failure_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_ni_cpu_packets_failure_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_ni_cpu_packets_failure_data_get_packed_length(const bcmolt_gpon_ni_cpu_packets_failure_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_ni_cpu_packets_failure_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_cpu_packets_failure_data_unpack(bcmolt_gpon_ni_cpu_packets_failure_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_ni_cpu_packets_failure_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_ni_cpu_packets_failure_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_ni_cpu_packets_failure_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_cpu_packets_failure_data_bounds_check(const bcmolt_gpon_ni_cpu_packets_failure_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_cpu_packets_failure_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_ni_los_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_ni_los_data_set_default(bcmolt_gpon_ni_los_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_ni_los_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_los_data_pack(const bcmolt_gpon_ni_los_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_ni_los_data would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_ni_los_data_get_packed_length(const bcmolt_gpon_ni_los_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_ni_los_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_los_data_unpack(bcmolt_gpon_ni_los_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_ni_los_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_ni_los_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_ni_los_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_los_data_bounds_check(const bcmolt_gpon_ni_los_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_los_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_ni_onu_discovered_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_ni_onu_discovered_data_set_default(bcmolt_gpon_ni_onu_discovered_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_ni_onu_discovered_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_onu_discovered_data_pack(const bcmolt_gpon_ni_onu_discovered_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_ni_onu_discovered_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_ni_onu_discovered_data_get_packed_length(const bcmolt_gpon_ni_onu_discovered_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_ni_onu_discovered_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_onu_discovered_data_unpack(bcmolt_gpon_ni_onu_discovered_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_ni_onu_discovered_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_ni_onu_discovered_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_ni_onu_discovered_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_onu_discovered_data_bounds_check(const bcmolt_gpon_ni_onu_discovered_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_onu_discovered_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_ni_onu_upgrade_complete_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_ni_onu_upgrade_complete_data_set_default(bcmolt_gpon_ni_onu_upgrade_complete_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_ni_onu_upgrade_complete_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_onu_upgrade_complete_data_pack(const bcmolt_gpon_ni_onu_upgrade_complete_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_ni_onu_upgrade_complete_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_ni_onu_upgrade_complete_data_get_packed_length(const bcmolt_gpon_ni_onu_upgrade_complete_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_ni_onu_upgrade_complete_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_onu_upgrade_complete_data_unpack(bcmolt_gpon_ni_onu_upgrade_complete_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_ni_onu_upgrade_complete_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_ni_onu_upgrade_complete_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_ni_onu_upgrade_complete_data is out 
+ * of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_onu_upgrade_complete_data_bounds_check(const bcmolt_gpon_ni_onu_upgrade_complete_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_onu_upgrade_complete_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_ni_protection_switching_onus_ranged_data struct.  
+ * This sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_ni_protection_switching_onus_ranged_data_set_default(bcmolt_gpon_ni_protection_switching_onus_ranged_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_ni_protection_switching_onus_ranged_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_protection_switching_onus_ranged_data_pack(const bcmolt_gpon_ni_protection_switching_onus_ranged_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_gpon_ni_protection_switching_onus_ranged_data would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_ni_protection_switching_onus_ranged_data_get_packed_length(const bcmolt_gpon_ni_protection_switching_onus_ranged_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_ni_protection_switching_onus_ranged_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_protection_switching_onus_ranged_data_unpack(bcmolt_gpon_ni_protection_switching_onus_ranged_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_ni_protection_switching_onus_ranged_data 
+ * struct and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_ni_protection_switching_onus_ranged_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the 
+ * bcmolt_gpon_ni_protection_switching_onus_ranged_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_protection_switching_onus_ranged_data_bounds_check(const bcmolt_gpon_ni_protection_switching_onus_ranged_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_protection_switching_onus_ranged_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_ni_protection_switching_switchover_completed_data 
+ * struct.  This sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_ni_protection_switching_switchover_completed_data_set_default(bcmolt_gpon_ni_protection_switching_switchover_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_ni_protection_switching_switchover_completed_data to 
+ * bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_protection_switching_switchover_completed_data_pack(const bcmolt_gpon_ni_protection_switching_switchover_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_gpon_ni_protection_switching_switchover_completed_data would occupy 
+ * on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_ni_protection_switching_switchover_completed_data_get_packed_length(const bcmolt_gpon_ni_protection_switching_switchover_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_ni_protection_switching_switchover_completed_data from 
+ * bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_protection_switching_switchover_completed_data_unpack(bcmolt_gpon_ni_protection_switching_switchover_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed 
+ * bcmolt_gpon_ni_protection_switching_switchover_completed_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_ni_protection_switching_switchover_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the 
+ * bcmolt_gpon_ni_protection_switching_switchover_completed_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_protection_switching_switchover_completed_data_bounds_check(const bcmolt_gpon_ni_protection_switching_switchover_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_protection_switching_switchover_completed_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_ni_protection_switching_traffic_resume_data 
+ * struct.  This sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_ni_protection_switching_traffic_resume_data_set_default(bcmolt_gpon_ni_protection_switching_traffic_resume_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_ni_protection_switching_traffic_resume_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_protection_switching_traffic_resume_data_pack(const bcmolt_gpon_ni_protection_switching_traffic_resume_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_gpon_ni_protection_switching_traffic_resume_data would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_ni_protection_switching_traffic_resume_data_get_packed_length(const bcmolt_gpon_ni_protection_switching_traffic_resume_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_ni_protection_switching_traffic_resume_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_protection_switching_traffic_resume_data_unpack(bcmolt_gpon_ni_protection_switching_traffic_resume_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_ni_protection_switching_traffic_resume_data 
+ * struct and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_ni_protection_switching_traffic_resume_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the 
+ * bcmolt_gpon_ni_protection_switching_traffic_resume_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_protection_switching_traffic_resume_data_bounds_check(const bcmolt_gpon_ni_protection_switching_traffic_resume_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_protection_switching_traffic_resume_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_ni_rogue_detection_completed_data struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_ni_rogue_detection_completed_data_set_default(bcmolt_gpon_ni_rogue_detection_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_ni_rogue_detection_completed_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_rogue_detection_completed_data_pack(const bcmolt_gpon_ni_rogue_detection_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_gpon_ni_rogue_detection_completed_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_ni_rogue_detection_completed_data_get_packed_length(const bcmolt_gpon_ni_rogue_detection_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_ni_rogue_detection_completed_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_rogue_detection_completed_data_unpack(bcmolt_gpon_ni_rogue_detection_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_ni_rogue_detection_completed_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_ni_rogue_detection_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_ni_rogue_detection_completed_data is 
+ * out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_rogue_detection_completed_data_bounds_check(const bcmolt_gpon_ni_rogue_detection_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_rogue_detection_completed_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_data 
+ * struct.  This sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_data_set_default(bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_data_pack(const bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_data_get_packed_length(const bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_data from 
+ * bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_data_unpack(bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed 
+ * bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the 
+ * bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_data_bounds_check(const bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_ni_stat_alarm_cleared_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_ni_stat_alarm_cleared_data_set_default(bcmolt_gpon_ni_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_ni_stat_alarm_cleared_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_stat_alarm_cleared_data_pack(const bcmolt_gpon_ni_stat_alarm_cleared_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_ni_stat_alarm_cleared_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_ni_stat_alarm_cleared_data_get_packed_length(const bcmolt_gpon_ni_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_ni_stat_alarm_cleared_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_stat_alarm_cleared_data_unpack(bcmolt_gpon_ni_stat_alarm_cleared_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_ni_stat_alarm_cleared_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_ni_stat_alarm_cleared_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_ni_stat_alarm_cleared_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_stat_alarm_cleared_data_bounds_check(const bcmolt_gpon_ni_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_stat_alarm_cleared_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_ni_stat_alarm_raised_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_ni_stat_alarm_raised_data_set_default(bcmolt_gpon_ni_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_ni_stat_alarm_raised_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_stat_alarm_raised_data_pack(const bcmolt_gpon_ni_stat_alarm_raised_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_ni_stat_alarm_raised_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_ni_stat_alarm_raised_data_get_packed_length(const bcmolt_gpon_ni_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_ni_stat_alarm_raised_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_stat_alarm_raised_data_unpack(bcmolt_gpon_ni_stat_alarm_raised_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_ni_stat_alarm_raised_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_ni_stat_alarm_raised_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_ni_stat_alarm_raised_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_stat_alarm_raised_data_bounds_check(const bcmolt_gpon_ni_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_stat_alarm_raised_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_ni_state_change_completed_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_ni_state_change_completed_data_set_default(bcmolt_gpon_ni_state_change_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_ni_state_change_completed_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_state_change_completed_data_pack(const bcmolt_gpon_ni_state_change_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_ni_state_change_completed_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_ni_state_change_completed_data_get_packed_length(const bcmolt_gpon_ni_state_change_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_ni_state_change_completed_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_state_change_completed_data_unpack(bcmolt_gpon_ni_state_change_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_ni_state_change_completed_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_ni_state_change_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_ni_state_change_completed_data is out 
+ * of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_state_change_completed_data_bounds_check(const bcmolt_gpon_ni_state_change_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_state_change_completed_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_ni_tod_request_completed_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_ni_tod_request_completed_data_set_default(bcmolt_gpon_ni_tod_request_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_ni_tod_request_completed_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_tod_request_completed_data_pack(const bcmolt_gpon_ni_tod_request_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_ni_tod_request_completed_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_ni_tod_request_completed_data_get_packed_length(const bcmolt_gpon_ni_tod_request_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_ni_tod_request_completed_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_tod_request_completed_data_unpack(bcmolt_gpon_ni_tod_request_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_ni_tod_request_completed_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_ni_tod_request_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_ni_tod_request_completed_data is out 
+ * of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_tod_request_completed_data_bounds_check(const bcmolt_gpon_ni_tod_request_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_tod_request_completed_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_ni_auto_cfg_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_ni_auto_cfg_data_set_default(bcmolt_gpon_ni_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_ni_auto_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_auto_cfg_data_pack(const bcmolt_gpon_ni_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_ni_auto_cfg_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_ni_auto_cfg_data_get_packed_length(const bcmolt_gpon_ni_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_ni_auto_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_auto_cfg_data_unpack(bcmolt_gpon_ni_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_ni_auto_cfg_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_ni_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_ni_auto_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_auto_cfg_data_bounds_check(const bcmolt_gpon_ni_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_auto_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_ni_disable_serial_number_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_ni_disable_serial_number_data_set_default(bcmolt_gpon_ni_disable_serial_number_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_ni_disable_serial_number_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_disable_serial_number_data_pack(const bcmolt_gpon_ni_disable_serial_number_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_ni_disable_serial_number_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_ni_disable_serial_number_data_get_packed_length(const bcmolt_gpon_ni_disable_serial_number_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_ni_disable_serial_number_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_disable_serial_number_data_unpack(bcmolt_gpon_ni_disable_serial_number_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_ni_disable_serial_number_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_ni_disable_serial_number_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_ni_disable_serial_number_data is out 
+ * of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_disable_serial_number_data_bounds_check(const bcmolt_gpon_ni_disable_serial_number_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_disable_serial_number_id *failed_prop);
+
+/** Initializes a 
+ * bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_data 
+ * struct.  This sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_data_set_default(bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a 
+ * bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_data to 
+ * bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_data_pack(const bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_data_get_packed_length(const bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a 
+ * bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_data from 
+ * bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_data_unpack(bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed 
+ * bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_data 
+ * struct and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the 
+ * bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_data is 
+ * out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_data_bounds_check(const bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_ni_rogue_detection_window_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_ni_rogue_detection_window_data_set_default(bcmolt_gpon_ni_rogue_detection_window_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_ni_rogue_detection_window_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_rogue_detection_window_data_pack(const bcmolt_gpon_ni_rogue_detection_window_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_ni_rogue_detection_window_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_ni_rogue_detection_window_data_get_packed_length(const bcmolt_gpon_ni_rogue_detection_window_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_ni_rogue_detection_window_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_rogue_detection_window_data_unpack(bcmolt_gpon_ni_rogue_detection_window_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_ni_rogue_detection_window_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_ni_rogue_detection_window_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_ni_rogue_detection_window_data is out 
+ * of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_rogue_detection_window_data_bounds_check(const bcmolt_gpon_ni_rogue_detection_window_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_rogue_detection_window_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_ni_set_onu_state_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_ni_set_onu_state_data_set_default(bcmolt_gpon_ni_set_onu_state_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_ni_set_onu_state_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_set_onu_state_data_pack(const bcmolt_gpon_ni_set_onu_state_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_ni_set_onu_state_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_ni_set_onu_state_data_get_packed_length(const bcmolt_gpon_ni_set_onu_state_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_ni_set_onu_state_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_set_onu_state_data_unpack(bcmolt_gpon_ni_set_onu_state_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_ni_set_onu_state_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_ni_set_onu_state_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_ni_set_onu_state_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_set_onu_state_data_bounds_check(const bcmolt_gpon_ni_set_onu_state_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_set_onu_state_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_ni_set_pon_state_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_ni_set_pon_state_data_set_default(bcmolt_gpon_ni_set_pon_state_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_ni_set_pon_state_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_set_pon_state_data_pack(const bcmolt_gpon_ni_set_pon_state_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_ni_set_pon_state_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_ni_set_pon_state_data_get_packed_length(const bcmolt_gpon_ni_set_pon_state_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_ni_set_pon_state_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_set_pon_state_data_unpack(bcmolt_gpon_ni_set_pon_state_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_ni_set_pon_state_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_ni_set_pon_state_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_ni_set_pon_state_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_set_pon_state_data_bounds_check(const bcmolt_gpon_ni_set_pon_state_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_set_pon_state_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_ni_start_onu_upgrade_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_ni_start_onu_upgrade_data_set_default(bcmolt_gpon_ni_start_onu_upgrade_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_ni_start_onu_upgrade_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_start_onu_upgrade_data_pack(const bcmolt_gpon_ni_start_onu_upgrade_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_ni_start_onu_upgrade_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_ni_start_onu_upgrade_data_get_packed_length(const bcmolt_gpon_ni_start_onu_upgrade_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_ni_start_onu_upgrade_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_start_onu_upgrade_data_unpack(bcmolt_gpon_ni_start_onu_upgrade_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_ni_start_onu_upgrade_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_ni_start_onu_upgrade_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_ni_start_onu_upgrade_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_start_onu_upgrade_data_bounds_check(const bcmolt_gpon_ni_start_onu_upgrade_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_start_onu_upgrade_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_ni_broadcast_ploam_packet_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_ni_broadcast_ploam_packet_data_set_default(bcmolt_gpon_ni_broadcast_ploam_packet_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_ni_broadcast_ploam_packet_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_broadcast_ploam_packet_data_pack(const bcmolt_gpon_ni_broadcast_ploam_packet_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_ni_broadcast_ploam_packet_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_ni_broadcast_ploam_packet_data_get_packed_length(const bcmolt_gpon_ni_broadcast_ploam_packet_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_ni_broadcast_ploam_packet_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_broadcast_ploam_packet_data_unpack(bcmolt_gpon_ni_broadcast_ploam_packet_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_ni_broadcast_ploam_packet_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_ni_broadcast_ploam_packet_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_ni_broadcast_ploam_packet_data is out 
+ * of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_broadcast_ploam_packet_data_bounds_check(const bcmolt_gpon_ni_broadcast_ploam_packet_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_broadcast_ploam_packet_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_ni_cpu_packets_data struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_ni_cpu_packets_data_set_default(bcmolt_gpon_ni_cpu_packets_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_ni_cpu_packets_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_cpu_packets_data_pack(const bcmolt_gpon_ni_cpu_packets_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_ni_cpu_packets_data would occupy 
+ * on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_ni_cpu_packets_data_get_packed_length(const bcmolt_gpon_ni_cpu_packets_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_ni_cpu_packets_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_cpu_packets_data_unpack(bcmolt_gpon_ni_cpu_packets_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_ni_cpu_packets_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_ni_cpu_packets_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_ni_cpu_packets_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_ni_cpu_packets_data_bounds_check(const bcmolt_gpon_ni_cpu_packets_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_ni_cpu_packets_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_onu_key struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_onu_key_set_default(bcmolt_gpon_onu_key *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_onu_key to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_key_pack(const bcmolt_gpon_onu_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_onu_key would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_key_get_packed_length(const bcmolt_gpon_onu_key *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_onu_key from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_key_unpack(bcmolt_gpon_onu_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_onu_key struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_onu_key is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_key_bounds_check(const bcmolt_gpon_onu_key *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_key_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_onu_cfg_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_onu_cfg_data_set_default(bcmolt_gpon_onu_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_onu_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_cfg_data_pack(const bcmolt_gpon_onu_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_onu_cfg_data would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_cfg_data_get_packed_length(const bcmolt_gpon_onu_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_onu_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_cfg_data_unpack(bcmolt_gpon_onu_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_onu_cfg_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_onu_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_cfg_data_bounds_check(const bcmolt_gpon_onu_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_onu_stat_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_onu_stat_data_set_default(bcmolt_gpon_onu_stat_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_onu_stat_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_stat_data_pack(const bcmolt_gpon_onu_stat_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_onu_stat_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_stat_data_get_packed_length(const bcmolt_gpon_onu_stat_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_onu_stat_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_stat_data_unpack(bcmolt_gpon_onu_stat_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_onu_stat_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_stat_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_onu_stat_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_stat_data_bounds_check(const bcmolt_gpon_onu_stat_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_stat_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_onu_stat_cfg_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_onu_stat_cfg_data_set_default(bcmolt_gpon_onu_stat_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_onu_stat_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_stat_cfg_data_pack(const bcmolt_gpon_onu_stat_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_onu_stat_cfg_data would occupy 
+ * on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_stat_cfg_data_get_packed_length(const bcmolt_gpon_onu_stat_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_onu_stat_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_stat_cfg_data_unpack(bcmolt_gpon_onu_stat_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_onu_stat_cfg_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_stat_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_onu_stat_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_stat_cfg_data_bounds_check(const bcmolt_gpon_onu_stat_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_stat_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_onu_ber_interval_configuration_completed_data 
+ * struct.  This sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_onu_ber_interval_configuration_completed_data_set_default(bcmolt_gpon_onu_ber_interval_configuration_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_onu_ber_interval_configuration_completed_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_ber_interval_configuration_completed_data_pack(const bcmolt_gpon_onu_ber_interval_configuration_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_gpon_onu_ber_interval_configuration_completed_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_ber_interval_configuration_completed_data_get_packed_length(const bcmolt_gpon_onu_ber_interval_configuration_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_onu_ber_interval_configuration_completed_data from 
+ * bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_ber_interval_configuration_completed_data_unpack(bcmolt_gpon_onu_ber_interval_configuration_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed 
+ * bcmolt_gpon_onu_ber_interval_configuration_completed_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_ber_interval_configuration_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the 
+ * bcmolt_gpon_onu_ber_interval_configuration_completed_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_ber_interval_configuration_completed_data_bounds_check(const bcmolt_gpon_onu_ber_interval_configuration_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_ber_interval_configuration_completed_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_onu_dfi_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_onu_dfi_data_set_default(bcmolt_gpon_onu_dfi_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_onu_dfi_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_dfi_data_pack(const bcmolt_gpon_onu_dfi_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_onu_dfi_data would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_dfi_data_get_packed_length(const bcmolt_gpon_onu_dfi_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_onu_dfi_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_dfi_data_unpack(bcmolt_gpon_onu_dfi_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_onu_dfi_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_dfi_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_onu_dfi_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_dfi_data_bounds_check(const bcmolt_gpon_onu_dfi_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_dfi_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_onu_dgi_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_onu_dgi_data_set_default(bcmolt_gpon_onu_dgi_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_onu_dgi_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_dgi_data_pack(const bcmolt_gpon_onu_dgi_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_onu_dgi_data would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_dgi_data_get_packed_length(const bcmolt_gpon_onu_dgi_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_onu_dgi_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_dgi_data_unpack(bcmolt_gpon_onu_dgi_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_onu_dgi_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_dgi_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_onu_dgi_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_dgi_data_bounds_check(const bcmolt_gpon_onu_dgi_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_dgi_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_onu_dowi_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_onu_dowi_data_set_default(bcmolt_gpon_onu_dowi_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_onu_dowi_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_dowi_data_pack(const bcmolt_gpon_onu_dowi_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_onu_dowi_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_dowi_data_get_packed_length(const bcmolt_gpon_onu_dowi_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_onu_dowi_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_dowi_data_unpack(bcmolt_gpon_onu_dowi_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_onu_dowi_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_dowi_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_onu_dowi_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_dowi_data_bounds_check(const bcmolt_gpon_onu_dowi_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_dowi_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_onu_err_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_onu_err_data_set_default(bcmolt_gpon_onu_err_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_onu_err_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_err_data_pack(const bcmolt_gpon_onu_err_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_onu_err_data would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_err_data_get_packed_length(const bcmolt_gpon_onu_err_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_onu_err_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_err_data_unpack(bcmolt_gpon_onu_err_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_onu_err_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_err_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_onu_err_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_err_data_bounds_check(const bcmolt_gpon_onu_err_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_err_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_onu_invalid_dbru_report_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_onu_invalid_dbru_report_data_set_default(bcmolt_gpon_onu_invalid_dbru_report_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_onu_invalid_dbru_report_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_invalid_dbru_report_data_pack(const bcmolt_gpon_onu_invalid_dbru_report_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_onu_invalid_dbru_report_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_invalid_dbru_report_data_get_packed_length(const bcmolt_gpon_onu_invalid_dbru_report_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_onu_invalid_dbru_report_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_invalid_dbru_report_data_unpack(bcmolt_gpon_onu_invalid_dbru_report_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_onu_invalid_dbru_report_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_invalid_dbru_report_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_onu_invalid_dbru_report_data is out 
+ * of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_invalid_dbru_report_data_bounds_check(const bcmolt_gpon_onu_invalid_dbru_report_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_invalid_dbru_report_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_onu_key_exchange_completed_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_onu_key_exchange_completed_data_set_default(bcmolt_gpon_onu_key_exchange_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_onu_key_exchange_completed_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_key_exchange_completed_data_pack(const bcmolt_gpon_onu_key_exchange_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_onu_key_exchange_completed_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_key_exchange_completed_data_get_packed_length(const bcmolt_gpon_onu_key_exchange_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_onu_key_exchange_completed_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_key_exchange_completed_data_unpack(bcmolt_gpon_onu_key_exchange_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_onu_key_exchange_completed_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_key_exchange_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_onu_key_exchange_completed_data is 
+ * out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_key_exchange_completed_data_bounds_check(const bcmolt_gpon_onu_key_exchange_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_key_exchange_completed_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_onu_key_exchange_decrypt_required_data struct.  
+ * This sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_onu_key_exchange_decrypt_required_data_set_default(bcmolt_gpon_onu_key_exchange_decrypt_required_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_onu_key_exchange_decrypt_required_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_key_exchange_decrypt_required_data_pack(const bcmolt_gpon_onu_key_exchange_decrypt_required_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_gpon_onu_key_exchange_decrypt_required_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_key_exchange_decrypt_required_data_get_packed_length(const bcmolt_gpon_onu_key_exchange_decrypt_required_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_onu_key_exchange_decrypt_required_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_key_exchange_decrypt_required_data_unpack(bcmolt_gpon_onu_key_exchange_decrypt_required_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_onu_key_exchange_decrypt_required_data 
+ * struct and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_key_exchange_decrypt_required_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the 
+ * bcmolt_gpon_onu_key_exchange_decrypt_required_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_key_exchange_decrypt_required_data_bounds_check(const bcmolt_gpon_onu_key_exchange_decrypt_required_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_key_exchange_decrypt_required_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_onu_key_exchange_key_mismatch_data struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_onu_key_exchange_key_mismatch_data_set_default(bcmolt_gpon_onu_key_exchange_key_mismatch_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_onu_key_exchange_key_mismatch_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_key_exchange_key_mismatch_data_pack(const bcmolt_gpon_onu_key_exchange_key_mismatch_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_gpon_onu_key_exchange_key_mismatch_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_key_exchange_key_mismatch_data_get_packed_length(const bcmolt_gpon_onu_key_exchange_key_mismatch_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_onu_key_exchange_key_mismatch_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_key_exchange_key_mismatch_data_unpack(bcmolt_gpon_onu_key_exchange_key_mismatch_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_onu_key_exchange_key_mismatch_data struct 
+ * and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_key_exchange_key_mismatch_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_onu_key_exchange_key_mismatch_data is 
+ * out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_key_exchange_key_mismatch_data_bounds_check(const bcmolt_gpon_onu_key_exchange_key_mismatch_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_key_exchange_key_mismatch_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_onu_key_exchange_unconsecutive_index_data struct.  
+ * This sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_onu_key_exchange_unconsecutive_index_data_set_default(bcmolt_gpon_onu_key_exchange_unconsecutive_index_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_onu_key_exchange_unconsecutive_index_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_key_exchange_unconsecutive_index_data_pack(const bcmolt_gpon_onu_key_exchange_unconsecutive_index_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_gpon_onu_key_exchange_unconsecutive_index_data would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_key_exchange_unconsecutive_index_data_get_packed_length(const bcmolt_gpon_onu_key_exchange_unconsecutive_index_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_onu_key_exchange_unconsecutive_index_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_key_exchange_unconsecutive_index_data_unpack(bcmolt_gpon_onu_key_exchange_unconsecutive_index_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_onu_key_exchange_unconsecutive_index_data 
+ * struct and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_key_exchange_unconsecutive_index_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the 
+ * bcmolt_gpon_onu_key_exchange_unconsecutive_index_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_key_exchange_unconsecutive_index_data_bounds_check(const bcmolt_gpon_onu_key_exchange_unconsecutive_index_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_key_exchange_unconsecutive_index_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_onu_loai_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_onu_loai_data_set_default(bcmolt_gpon_onu_loai_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_onu_loai_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_loai_data_pack(const bcmolt_gpon_onu_loai_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_onu_loai_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_loai_data_get_packed_length(const bcmolt_gpon_onu_loai_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_onu_loai_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_loai_data_unpack(bcmolt_gpon_onu_loai_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_onu_loai_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_loai_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_onu_loai_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_loai_data_bounds_check(const bcmolt_gpon_onu_loai_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_loai_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_onu_loki_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_onu_loki_data_set_default(bcmolt_gpon_onu_loki_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_onu_loki_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_loki_data_pack(const bcmolt_gpon_onu_loki_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_onu_loki_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_loki_data_get_packed_length(const bcmolt_gpon_onu_loki_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_onu_loki_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_loki_data_unpack(bcmolt_gpon_onu_loki_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_onu_loki_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_loki_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_onu_loki_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_loki_data_bounds_check(const bcmolt_gpon_onu_loki_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_loki_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_onu_memi_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_onu_memi_data_set_default(bcmolt_gpon_onu_memi_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_onu_memi_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_memi_data_pack(const bcmolt_gpon_onu_memi_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_onu_memi_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_memi_data_get_packed_length(const bcmolt_gpon_onu_memi_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_onu_memi_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_memi_data_unpack(bcmolt_gpon_onu_memi_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_onu_memi_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_memi_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_onu_memi_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_memi_data_bounds_check(const bcmolt_gpon_onu_memi_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_memi_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_onu_omci_port_id_configuration_completed_data 
+ * struct.  This sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_onu_omci_port_id_configuration_completed_data_set_default(bcmolt_gpon_onu_omci_port_id_configuration_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_onu_omci_port_id_configuration_completed_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_omci_port_id_configuration_completed_data_pack(const bcmolt_gpon_onu_omci_port_id_configuration_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_gpon_onu_omci_port_id_configuration_completed_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_omci_port_id_configuration_completed_data_get_packed_length(const bcmolt_gpon_onu_omci_port_id_configuration_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_onu_omci_port_id_configuration_completed_data from 
+ * bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_omci_port_id_configuration_completed_data_unpack(bcmolt_gpon_onu_omci_port_id_configuration_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed 
+ * bcmolt_gpon_onu_omci_port_id_configuration_completed_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_omci_port_id_configuration_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the 
+ * bcmolt_gpon_onu_omci_port_id_configuration_completed_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_omci_port_id_configuration_completed_data_bounds_check(const bcmolt_gpon_onu_omci_port_id_configuration_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_omci_port_id_configuration_completed_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_onu_onu_activation_completed_data struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_onu_onu_activation_completed_data_set_default(bcmolt_gpon_onu_onu_activation_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_onu_onu_activation_completed_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_onu_activation_completed_data_pack(const bcmolt_gpon_onu_onu_activation_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_gpon_onu_onu_activation_completed_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_onu_activation_completed_data_get_packed_length(const bcmolt_gpon_onu_onu_activation_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_onu_onu_activation_completed_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_onu_activation_completed_data_unpack(bcmolt_gpon_onu_onu_activation_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_onu_onu_activation_completed_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_onu_activation_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_onu_onu_activation_completed_data is 
+ * out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_onu_activation_completed_data_bounds_check(const bcmolt_gpon_onu_onu_activation_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_onu_activation_completed_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_onu_onu_activation_standby_completed_data struct.  
+ * This sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_onu_onu_activation_standby_completed_data_set_default(bcmolt_gpon_onu_onu_activation_standby_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_onu_onu_activation_standby_completed_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_onu_activation_standby_completed_data_pack(const bcmolt_gpon_onu_onu_activation_standby_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_gpon_onu_onu_activation_standby_completed_data would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_onu_activation_standby_completed_data_get_packed_length(const bcmolt_gpon_onu_onu_activation_standby_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_onu_onu_activation_standby_completed_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_onu_activation_standby_completed_data_unpack(bcmolt_gpon_onu_onu_activation_standby_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_onu_onu_activation_standby_completed_data 
+ * struct and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_onu_activation_standby_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the 
+ * bcmolt_gpon_onu_onu_activation_standby_completed_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_onu_activation_standby_completed_data_bounds_check(const bcmolt_gpon_onu_onu_activation_standby_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_onu_activation_standby_completed_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_onu_onu_alarm_data struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_onu_onu_alarm_data_set_default(bcmolt_gpon_onu_onu_alarm_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_onu_onu_alarm_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_onu_alarm_data_pack(const bcmolt_gpon_onu_onu_alarm_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_onu_onu_alarm_data would occupy 
+ * on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_onu_alarm_data_get_packed_length(const bcmolt_gpon_onu_onu_alarm_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_onu_onu_alarm_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_onu_alarm_data_unpack(bcmolt_gpon_onu_onu_alarm_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_onu_onu_alarm_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_onu_alarm_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_onu_onu_alarm_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_onu_alarm_data_bounds_check(const bcmolt_gpon_onu_onu_alarm_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_onu_alarm_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_onu_onu_deactivation_completed_data struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_onu_onu_deactivation_completed_data_set_default(bcmolt_gpon_onu_onu_deactivation_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_onu_onu_deactivation_completed_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_onu_deactivation_completed_data_pack(const bcmolt_gpon_onu_onu_deactivation_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_gpon_onu_onu_deactivation_completed_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_onu_deactivation_completed_data_get_packed_length(const bcmolt_gpon_onu_onu_deactivation_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_onu_onu_deactivation_completed_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_onu_deactivation_completed_data_unpack(bcmolt_gpon_onu_onu_deactivation_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_onu_onu_deactivation_completed_data struct 
+ * and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_onu_deactivation_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_onu_onu_deactivation_completed_data 
+ * is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_onu_deactivation_completed_data_bounds_check(const bcmolt_gpon_onu_onu_deactivation_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_onu_deactivation_completed_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_onu_onu_disable_completed_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_onu_onu_disable_completed_data_set_default(bcmolt_gpon_onu_onu_disable_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_onu_onu_disable_completed_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_onu_disable_completed_data_pack(const bcmolt_gpon_onu_onu_disable_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_onu_onu_disable_completed_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_onu_disable_completed_data_get_packed_length(const bcmolt_gpon_onu_onu_disable_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_onu_onu_disable_completed_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_onu_disable_completed_data_unpack(bcmolt_gpon_onu_onu_disable_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_onu_onu_disable_completed_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_onu_disable_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_onu_onu_disable_completed_data is out 
+ * of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_onu_disable_completed_data_bounds_check(const bcmolt_gpon_onu_onu_disable_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_onu_disable_completed_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_onu_onu_enable_completed_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_onu_onu_enable_completed_data_set_default(bcmolt_gpon_onu_onu_enable_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_onu_onu_enable_completed_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_onu_enable_completed_data_pack(const bcmolt_gpon_onu_onu_enable_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_onu_onu_enable_completed_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_onu_enable_completed_data_get_packed_length(const bcmolt_gpon_onu_onu_enable_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_onu_onu_enable_completed_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_onu_enable_completed_data_unpack(bcmolt_gpon_onu_onu_enable_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_onu_onu_enable_completed_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_onu_enable_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_onu_onu_enable_completed_data is out 
+ * of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_onu_enable_completed_data_bounds_check(const bcmolt_gpon_onu_onu_enable_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_onu_enable_completed_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_onu_password_authentication_completed_data struct. 
+ *  This sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_onu_password_authentication_completed_data_set_default(bcmolt_gpon_onu_password_authentication_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_onu_password_authentication_completed_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_password_authentication_completed_data_pack(const bcmolt_gpon_onu_password_authentication_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_gpon_onu_password_authentication_completed_data would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_password_authentication_completed_data_get_packed_length(const bcmolt_gpon_onu_password_authentication_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_onu_password_authentication_completed_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_password_authentication_completed_data_unpack(bcmolt_gpon_onu_password_authentication_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_onu_password_authentication_completed_data 
+ * struct and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_password_authentication_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the 
+ * bcmolt_gpon_onu_password_authentication_completed_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_password_authentication_completed_data_bounds_check(const bcmolt_gpon_onu_password_authentication_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_password_authentication_completed_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_onu_pee_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_onu_pee_data_set_default(bcmolt_gpon_onu_pee_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_onu_pee_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_pee_data_pack(const bcmolt_gpon_onu_pee_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_onu_pee_data would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_pee_data_get_packed_length(const bcmolt_gpon_onu_pee_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_onu_pee_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_pee_data_unpack(bcmolt_gpon_onu_pee_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_onu_pee_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_pee_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_onu_pee_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_pee_data_bounds_check(const bcmolt_gpon_onu_pee_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_pee_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_onu_possible_drift_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_onu_possible_drift_data_set_default(bcmolt_gpon_onu_possible_drift_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_onu_possible_drift_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_possible_drift_data_pack(const bcmolt_gpon_onu_possible_drift_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_onu_possible_drift_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_possible_drift_data_get_packed_length(const bcmolt_gpon_onu_possible_drift_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_onu_possible_drift_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_possible_drift_data_unpack(bcmolt_gpon_onu_possible_drift_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_onu_possible_drift_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_possible_drift_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_onu_possible_drift_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_possible_drift_data_bounds_check(const bcmolt_gpon_onu_possible_drift_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_possible_drift_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_onu_power_management_state_change_data struct.  
+ * This sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_onu_power_management_state_change_data_set_default(bcmolt_gpon_onu_power_management_state_change_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_onu_power_management_state_change_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_power_management_state_change_data_pack(const bcmolt_gpon_onu_power_management_state_change_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_gpon_onu_power_management_state_change_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_power_management_state_change_data_get_packed_length(const bcmolt_gpon_onu_power_management_state_change_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_onu_power_management_state_change_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_power_management_state_change_data_unpack(bcmolt_gpon_onu_power_management_state_change_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_onu_power_management_state_change_data 
+ * struct and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_power_management_state_change_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the 
+ * bcmolt_gpon_onu_power_management_state_change_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_power_management_state_change_data_bounds_check(const bcmolt_gpon_onu_power_management_state_change_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_power_management_state_change_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_onu_pst_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_onu_pst_data_set_default(bcmolt_gpon_onu_pst_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_onu_pst_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_pst_data_pack(const bcmolt_gpon_onu_pst_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_onu_pst_data would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_pst_data_get_packed_length(const bcmolt_gpon_onu_pst_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_onu_pst_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_pst_data_unpack(bcmolt_gpon_onu_pst_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_onu_pst_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_pst_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_onu_pst_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_pst_data_bounds_check(const bcmolt_gpon_onu_pst_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_pst_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_onu_ranging_completed_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_onu_ranging_completed_data_set_default(bcmolt_gpon_onu_ranging_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_onu_ranging_completed_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_ranging_completed_data_pack(const bcmolt_gpon_onu_ranging_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_onu_ranging_completed_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_ranging_completed_data_get_packed_length(const bcmolt_gpon_onu_ranging_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_onu_ranging_completed_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_ranging_completed_data_unpack(bcmolt_gpon_onu_ranging_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_onu_ranging_completed_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_ranging_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_onu_ranging_completed_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_ranging_completed_data_bounds_check(const bcmolt_gpon_onu_ranging_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_ranging_completed_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_onu_rei_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_onu_rei_data_set_default(bcmolt_gpon_onu_rei_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_onu_rei_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_rei_data_pack(const bcmolt_gpon_onu_rei_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_onu_rei_data would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_rei_data_get_packed_length(const bcmolt_gpon_onu_rei_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_onu_rei_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_rei_data_unpack(bcmolt_gpon_onu_rei_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_onu_rei_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_rei_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_onu_rei_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_rei_data_bounds_check(const bcmolt_gpon_onu_rei_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_rei_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_onu_rssi_measurement_completed_data struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_onu_rssi_measurement_completed_data_set_default(bcmolt_gpon_onu_rssi_measurement_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_onu_rssi_measurement_completed_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_rssi_measurement_completed_data_pack(const bcmolt_gpon_onu_rssi_measurement_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_gpon_onu_rssi_measurement_completed_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_rssi_measurement_completed_data_get_packed_length(const bcmolt_gpon_onu_rssi_measurement_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_onu_rssi_measurement_completed_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_rssi_measurement_completed_data_unpack(bcmolt_gpon_onu_rssi_measurement_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_onu_rssi_measurement_completed_data struct 
+ * and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_rssi_measurement_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_onu_rssi_measurement_completed_data 
+ * is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_rssi_measurement_completed_data_bounds_check(const bcmolt_gpon_onu_rssi_measurement_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_rssi_measurement_completed_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_onu_sdi_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_onu_sdi_data_set_default(bcmolt_gpon_onu_sdi_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_onu_sdi_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_sdi_data_pack(const bcmolt_gpon_onu_sdi_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_onu_sdi_data would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_sdi_data_get_packed_length(const bcmolt_gpon_onu_sdi_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_onu_sdi_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_sdi_data_unpack(bcmolt_gpon_onu_sdi_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_onu_sdi_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_sdi_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_onu_sdi_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_sdi_data_bounds_check(const bcmolt_gpon_onu_sdi_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_sdi_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_onu_sfi_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_onu_sfi_data_set_default(bcmolt_gpon_onu_sfi_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_onu_sfi_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_sfi_data_pack(const bcmolt_gpon_onu_sfi_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_onu_sfi_data would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_sfi_data_get_packed_length(const bcmolt_gpon_onu_sfi_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_onu_sfi_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_sfi_data_unpack(bcmolt_gpon_onu_sfi_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_onu_sfi_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_sfi_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_onu_sfi_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_sfi_data_bounds_check(const bcmolt_gpon_onu_sfi_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_sfi_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_onu_stat_alarm_cleared_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_onu_stat_alarm_cleared_data_set_default(bcmolt_gpon_onu_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_onu_stat_alarm_cleared_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_stat_alarm_cleared_data_pack(const bcmolt_gpon_onu_stat_alarm_cleared_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_onu_stat_alarm_cleared_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_stat_alarm_cleared_data_get_packed_length(const bcmolt_gpon_onu_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_onu_stat_alarm_cleared_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_stat_alarm_cleared_data_unpack(bcmolt_gpon_onu_stat_alarm_cleared_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_onu_stat_alarm_cleared_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_stat_alarm_cleared_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_onu_stat_alarm_cleared_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_stat_alarm_cleared_data_bounds_check(const bcmolt_gpon_onu_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_stat_alarm_cleared_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_onu_stat_alarm_raised_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_onu_stat_alarm_raised_data_set_default(bcmolt_gpon_onu_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_onu_stat_alarm_raised_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_stat_alarm_raised_data_pack(const bcmolt_gpon_onu_stat_alarm_raised_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_onu_stat_alarm_raised_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_stat_alarm_raised_data_get_packed_length(const bcmolt_gpon_onu_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_onu_stat_alarm_raised_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_stat_alarm_raised_data_unpack(bcmolt_gpon_onu_stat_alarm_raised_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_onu_stat_alarm_raised_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_stat_alarm_raised_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_onu_stat_alarm_raised_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_stat_alarm_raised_data_bounds_check(const bcmolt_gpon_onu_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_stat_alarm_raised_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_onu_sufi_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_onu_sufi_data_set_default(bcmolt_gpon_onu_sufi_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_onu_sufi_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_sufi_data_pack(const bcmolt_gpon_onu_sufi_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_onu_sufi_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_sufi_data_get_packed_length(const bcmolt_gpon_onu_sufi_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_onu_sufi_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_sufi_data_unpack(bcmolt_gpon_onu_sufi_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_onu_sufi_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_sufi_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_onu_sufi_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_sufi_data_bounds_check(const bcmolt_gpon_onu_sufi_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_sufi_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_onu_tiwi_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_onu_tiwi_data_set_default(bcmolt_gpon_onu_tiwi_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_onu_tiwi_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_tiwi_data_pack(const bcmolt_gpon_onu_tiwi_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_onu_tiwi_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_tiwi_data_get_packed_length(const bcmolt_gpon_onu_tiwi_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_onu_tiwi_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_tiwi_data_unpack(bcmolt_gpon_onu_tiwi_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_onu_tiwi_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_tiwi_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_onu_tiwi_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_tiwi_data_bounds_check(const bcmolt_gpon_onu_tiwi_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_tiwi_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_onu_auto_cfg_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_onu_auto_cfg_data_set_default(bcmolt_gpon_onu_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_onu_auto_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_auto_cfg_data_pack(const bcmolt_gpon_onu_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_onu_auto_cfg_data would occupy 
+ * on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_auto_cfg_data_get_packed_length(const bcmolt_gpon_onu_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_onu_auto_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_auto_cfg_data_unpack(bcmolt_gpon_onu_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_onu_auto_cfg_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_onu_auto_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_auto_cfg_data_bounds_check(const bcmolt_gpon_onu_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_auto_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_onu_change_power_level_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_onu_change_power_level_data_set_default(bcmolt_gpon_onu_change_power_level_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_onu_change_power_level_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_change_power_level_data_pack(const bcmolt_gpon_onu_change_power_level_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_onu_change_power_level_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_change_power_level_data_get_packed_length(const bcmolt_gpon_onu_change_power_level_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_onu_change_power_level_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_change_power_level_data_unpack(bcmolt_gpon_onu_change_power_level_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_onu_change_power_level_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_change_power_level_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_onu_change_power_level_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_change_power_level_data_bounds_check(const bcmolt_gpon_onu_change_power_level_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_change_power_level_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_onu_set_onu_state_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_onu_set_onu_state_data_set_default(bcmolt_gpon_onu_set_onu_state_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_onu_set_onu_state_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_set_onu_state_data_pack(const bcmolt_gpon_onu_set_onu_state_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_onu_set_onu_state_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_set_onu_state_data_get_packed_length(const bcmolt_gpon_onu_set_onu_state_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_onu_set_onu_state_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_set_onu_state_data_unpack(bcmolt_gpon_onu_set_onu_state_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_onu_set_onu_state_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_set_onu_state_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_onu_set_onu_state_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_set_onu_state_data_bounds_check(const bcmolt_gpon_onu_set_onu_state_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_set_onu_state_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_onu_cpu_packets_data struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_onu_cpu_packets_data_set_default(bcmolt_gpon_onu_cpu_packets_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_onu_cpu_packets_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_cpu_packets_data_pack(const bcmolt_gpon_onu_cpu_packets_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_onu_cpu_packets_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_cpu_packets_data_get_packed_length(const bcmolt_gpon_onu_cpu_packets_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_onu_cpu_packets_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_cpu_packets_data_unpack(bcmolt_gpon_onu_cpu_packets_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_onu_cpu_packets_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_cpu_packets_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_onu_cpu_packets_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_cpu_packets_data_bounds_check(const bcmolt_gpon_onu_cpu_packets_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_cpu_packets_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_onu_ploam_packet_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_onu_ploam_packet_data_set_default(bcmolt_gpon_onu_ploam_packet_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_onu_ploam_packet_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_ploam_packet_data_pack(const bcmolt_gpon_onu_ploam_packet_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_onu_ploam_packet_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_ploam_packet_data_get_packed_length(const bcmolt_gpon_onu_ploam_packet_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_onu_ploam_packet_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_ploam_packet_data_unpack(bcmolt_gpon_onu_ploam_packet_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_onu_ploam_packet_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_ploam_packet_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_onu_ploam_packet_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_ploam_packet_data_bounds_check(const bcmolt_gpon_onu_ploam_packet_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_ploam_packet_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_onu_cpu_packet_data struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_onu_cpu_packet_data_set_default(bcmolt_gpon_onu_cpu_packet_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_onu_cpu_packet_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_cpu_packet_data_pack(const bcmolt_gpon_onu_cpu_packet_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_onu_cpu_packet_data would occupy 
+ * on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_cpu_packet_data_get_packed_length(const bcmolt_gpon_onu_cpu_packet_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_onu_cpu_packet_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_cpu_packet_data_unpack(bcmolt_gpon_onu_cpu_packet_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_onu_cpu_packet_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_cpu_packet_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_onu_cpu_packet_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_cpu_packet_data_bounds_check(const bcmolt_gpon_onu_cpu_packet_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_cpu_packet_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_onu_omci_packet_data struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_onu_omci_packet_data_set_default(bcmolt_gpon_onu_omci_packet_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_onu_omci_packet_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_omci_packet_data_pack(const bcmolt_gpon_onu_omci_packet_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_onu_omci_packet_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_onu_omci_packet_data_get_packed_length(const bcmolt_gpon_onu_omci_packet_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_onu_omci_packet_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_omci_packet_data_unpack(bcmolt_gpon_onu_omci_packet_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_onu_omci_packet_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_onu_omci_packet_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_onu_omci_packet_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_onu_omci_packet_data_bounds_check(const bcmolt_gpon_onu_omci_packet_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_onu_omci_packet_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_trx_key struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_trx_key_set_default(bcmolt_gpon_trx_key *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_trx_key to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_trx_key_pack(const bcmolt_gpon_trx_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_trx_key would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_trx_key_get_packed_length(const bcmolt_gpon_trx_key *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_trx_key from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_trx_key_unpack(bcmolt_gpon_trx_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_trx_key struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_trx_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_trx_key is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_trx_key_bounds_check(const bcmolt_gpon_trx_key *this, bcmolt_presence_mask fields_present, bcmolt_gpon_trx_key_id *failed_prop);
+
+/** Initializes a bcmolt_gpon_trx_cfg_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_gpon_trx_cfg_data_set_default(bcmolt_gpon_trx_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_gpon_trx_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_trx_cfg_data_pack(const bcmolt_gpon_trx_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_gpon_trx_cfg_data would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_gpon_trx_cfg_data_get_packed_length(const bcmolt_gpon_trx_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_gpon_trx_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_trx_cfg_data_unpack(bcmolt_gpon_trx_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_gpon_trx_cfg_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_gpon_trx_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_gpon_trx_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_gpon_trx_cfg_data_bounds_check(const bcmolt_gpon_trx_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_gpon_trx_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_log_entry_key struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_log_entry_key_set_default(bcmolt_log_entry_key *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_log_entry_key to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_log_entry_key_pack(const bcmolt_log_entry_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_log_entry_key would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_log_entry_key_get_packed_length(const bcmolt_log_entry_key *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_log_entry_key from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_log_entry_key_unpack(bcmolt_log_entry_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_log_entry_key struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_log_entry_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_log_entry_key is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_log_entry_key_bounds_check(const bcmolt_log_entry_key *this, bcmolt_presence_mask fields_present, bcmolt_log_entry_key_id *failed_prop);
+
+/** Initializes a bcmolt_log_entry_cfg_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_log_entry_cfg_data_set_default(bcmolt_log_entry_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_log_entry_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_log_entry_cfg_data_pack(const bcmolt_log_entry_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_log_entry_cfg_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_log_entry_cfg_data_get_packed_length(const bcmolt_log_entry_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_log_entry_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_log_entry_cfg_data_unpack(bcmolt_log_entry_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_log_entry_cfg_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_log_entry_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_log_entry_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_log_entry_cfg_data_bounds_check(const bcmolt_log_entry_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_log_entry_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_log_entry_stat_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_log_entry_stat_data_set_default(bcmolt_log_entry_stat_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_log_entry_stat_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_log_entry_stat_data_pack(const bcmolt_log_entry_stat_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_log_entry_stat_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_log_entry_stat_data_get_packed_length(const bcmolt_log_entry_stat_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_log_entry_stat_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_log_entry_stat_data_unpack(bcmolt_log_entry_stat_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_log_entry_stat_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_log_entry_stat_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_log_entry_stat_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_log_entry_stat_data_bounds_check(const bcmolt_log_entry_stat_data *this, bcmolt_presence_mask fields_present, bcmolt_log_entry_stat_id *failed_prop);
+
+/** Initializes a bcmolt_log_entry_stat_cfg_data struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_log_entry_stat_cfg_data_set_default(bcmolt_log_entry_stat_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_log_entry_stat_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_log_entry_stat_cfg_data_pack(const bcmolt_log_entry_stat_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_log_entry_stat_cfg_data would occupy 
+ * on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_log_entry_stat_cfg_data_get_packed_length(const bcmolt_log_entry_stat_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_log_entry_stat_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_log_entry_stat_cfg_data_unpack(bcmolt_log_entry_stat_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_log_entry_stat_cfg_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_log_entry_stat_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_log_entry_stat_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_log_entry_stat_cfg_data_bounds_check(const bcmolt_log_entry_stat_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_log_entry_stat_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_log_entry_stat_alarm_cleared_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_log_entry_stat_alarm_cleared_data_set_default(bcmolt_log_entry_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_log_entry_stat_alarm_cleared_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_log_entry_stat_alarm_cleared_data_pack(const bcmolt_log_entry_stat_alarm_cleared_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_log_entry_stat_alarm_cleared_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_log_entry_stat_alarm_cleared_data_get_packed_length(const bcmolt_log_entry_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_log_entry_stat_alarm_cleared_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_log_entry_stat_alarm_cleared_data_unpack(bcmolt_log_entry_stat_alarm_cleared_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_log_entry_stat_alarm_cleared_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_log_entry_stat_alarm_cleared_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_log_entry_stat_alarm_cleared_data is out 
+ * of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_log_entry_stat_alarm_cleared_data_bounds_check(const bcmolt_log_entry_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present, bcmolt_log_entry_stat_alarm_cleared_id *failed_prop);
+
+/** Initializes a bcmolt_log_entry_stat_alarm_raised_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_log_entry_stat_alarm_raised_data_set_default(bcmolt_log_entry_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_log_entry_stat_alarm_raised_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_log_entry_stat_alarm_raised_data_pack(const bcmolt_log_entry_stat_alarm_raised_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_log_entry_stat_alarm_raised_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_log_entry_stat_alarm_raised_data_get_packed_length(const bcmolt_log_entry_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_log_entry_stat_alarm_raised_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_log_entry_stat_alarm_raised_data_unpack(bcmolt_log_entry_stat_alarm_raised_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_log_entry_stat_alarm_raised_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_log_entry_stat_alarm_raised_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_log_entry_stat_alarm_raised_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_log_entry_stat_alarm_raised_data_bounds_check(const bcmolt_log_entry_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present, bcmolt_log_entry_stat_alarm_raised_id *failed_prop);
+
+/** Initializes a bcmolt_log_entry_auto_cfg_data struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_log_entry_auto_cfg_data_set_default(bcmolt_log_entry_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_log_entry_auto_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_log_entry_auto_cfg_data_pack(const bcmolt_log_entry_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_log_entry_auto_cfg_data would occupy 
+ * on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_log_entry_auto_cfg_data_get_packed_length(const bcmolt_log_entry_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_log_entry_auto_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_log_entry_auto_cfg_data_unpack(bcmolt_log_entry_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_log_entry_auto_cfg_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_log_entry_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_log_entry_auto_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_log_entry_auto_cfg_data_bounds_check(const bcmolt_log_entry_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_log_entry_auto_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_logger_key struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_logger_key_set_default(bcmolt_logger_key *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_logger_key to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_logger_key_pack(const bcmolt_logger_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_logger_key would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_logger_key_get_packed_length(const bcmolt_logger_key *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_logger_key from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_logger_key_unpack(bcmolt_logger_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_logger_key struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_logger_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_logger_key is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_logger_key_bounds_check(const bcmolt_logger_key *this, bcmolt_presence_mask fields_present, bcmolt_logger_key_id *failed_prop);
+
+/** Initializes a bcmolt_logger_cfg_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_logger_cfg_data_set_default(bcmolt_logger_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_logger_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_logger_cfg_data_pack(const bcmolt_logger_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_logger_cfg_data would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_logger_cfg_data_get_packed_length(const bcmolt_logger_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_logger_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_logger_cfg_data_unpack(bcmolt_logger_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_logger_cfg_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_logger_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_logger_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_logger_cfg_data_bounds_check(const bcmolt_logger_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_logger_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_logger_stat_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_logger_stat_data_set_default(bcmolt_logger_stat_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_logger_stat_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_logger_stat_data_pack(const bcmolt_logger_stat_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_logger_stat_data would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_logger_stat_data_get_packed_length(const bcmolt_logger_stat_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_logger_stat_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_logger_stat_data_unpack(bcmolt_logger_stat_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_logger_stat_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_logger_stat_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_logger_stat_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_logger_stat_data_bounds_check(const bcmolt_logger_stat_data *this, bcmolt_presence_mask fields_present, bcmolt_logger_stat_id *failed_prop);
+
+/** Initializes a bcmolt_logger_stat_cfg_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_logger_stat_cfg_data_set_default(bcmolt_logger_stat_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_logger_stat_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_logger_stat_cfg_data_pack(const bcmolt_logger_stat_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_logger_stat_cfg_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_logger_stat_cfg_data_get_packed_length(const bcmolt_logger_stat_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_logger_stat_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_logger_stat_cfg_data_unpack(bcmolt_logger_stat_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_logger_stat_cfg_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_logger_stat_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_logger_stat_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_logger_stat_cfg_data_bounds_check(const bcmolt_logger_stat_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_logger_stat_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_logger_stat_alarm_cleared_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_logger_stat_alarm_cleared_data_set_default(bcmolt_logger_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_logger_stat_alarm_cleared_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_logger_stat_alarm_cleared_data_pack(const bcmolt_logger_stat_alarm_cleared_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_logger_stat_alarm_cleared_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_logger_stat_alarm_cleared_data_get_packed_length(const bcmolt_logger_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_logger_stat_alarm_cleared_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_logger_stat_alarm_cleared_data_unpack(bcmolt_logger_stat_alarm_cleared_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_logger_stat_alarm_cleared_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_logger_stat_alarm_cleared_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_logger_stat_alarm_cleared_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_logger_stat_alarm_cleared_data_bounds_check(const bcmolt_logger_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present, bcmolt_logger_stat_alarm_cleared_id *failed_prop);
+
+/** Initializes a bcmolt_logger_stat_alarm_raised_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_logger_stat_alarm_raised_data_set_default(bcmolt_logger_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_logger_stat_alarm_raised_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_logger_stat_alarm_raised_data_pack(const bcmolt_logger_stat_alarm_raised_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_logger_stat_alarm_raised_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_logger_stat_alarm_raised_data_get_packed_length(const bcmolt_logger_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_logger_stat_alarm_raised_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_logger_stat_alarm_raised_data_unpack(bcmolt_logger_stat_alarm_raised_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_logger_stat_alarm_raised_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_logger_stat_alarm_raised_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_logger_stat_alarm_raised_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_logger_stat_alarm_raised_data_bounds_check(const bcmolt_logger_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present, bcmolt_logger_stat_alarm_raised_id *failed_prop);
+
+/** Initializes a bcmolt_logger_auto_cfg_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_logger_auto_cfg_data_set_default(bcmolt_logger_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_logger_auto_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_logger_auto_cfg_data_pack(const bcmolt_logger_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_logger_auto_cfg_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_logger_auto_cfg_data_get_packed_length(const bcmolt_logger_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_logger_auto_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_logger_auto_cfg_data_unpack(bcmolt_logger_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_logger_auto_cfg_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_logger_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_logger_auto_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_logger_auto_cfg_data_bounds_check(const bcmolt_logger_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_logger_auto_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_nni_key struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_nni_key_set_default(bcmolt_nni_key *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_nni_key to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_nni_key_pack(const bcmolt_nni_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_nni_key would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_nni_key_get_packed_length(const bcmolt_nni_key *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_nni_key from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_nni_key_unpack(bcmolt_nni_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_nni_key struct and collects memory requirements 
+ * above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_nni_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_nni_key is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_nni_key_bounds_check(const bcmolt_nni_key *this, bcmolt_presence_mask fields_present, bcmolt_nni_key_id *failed_prop);
+
+/** Initializes a bcmolt_nni_cfg_data struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_nni_cfg_data_set_default(bcmolt_nni_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_nni_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_nni_cfg_data_pack(const bcmolt_nni_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_nni_cfg_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_nni_cfg_data_get_packed_length(const bcmolt_nni_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_nni_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_nni_cfg_data_unpack(bcmolt_nni_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_nni_cfg_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_nni_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_nni_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_nni_cfg_data_bounds_check(const bcmolt_nni_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_nni_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_nni_stat_data struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_nni_stat_data_set_default(bcmolt_nni_stat_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_nni_stat_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_nni_stat_data_pack(const bcmolt_nni_stat_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_nni_stat_data would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_nni_stat_data_get_packed_length(const bcmolt_nni_stat_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_nni_stat_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_nni_stat_data_unpack(bcmolt_nni_stat_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_nni_stat_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_nni_stat_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_nni_stat_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_nni_stat_data_bounds_check(const bcmolt_nni_stat_data *this, bcmolt_presence_mask fields_present, bcmolt_nni_stat_id *failed_prop);
+
+/** Initializes a bcmolt_nni_stat_cfg_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_nni_stat_cfg_data_set_default(bcmolt_nni_stat_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_nni_stat_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_nni_stat_cfg_data_pack(const bcmolt_nni_stat_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_nni_stat_cfg_data would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_nni_stat_cfg_data_get_packed_length(const bcmolt_nni_stat_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_nni_stat_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_nni_stat_cfg_data_unpack(bcmolt_nni_stat_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_nni_stat_cfg_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_nni_stat_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_nni_stat_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_nni_stat_cfg_data_bounds_check(const bcmolt_nni_stat_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_nni_stat_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_nni_stat_alarm_cleared_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_nni_stat_alarm_cleared_data_set_default(bcmolt_nni_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_nni_stat_alarm_cleared_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_nni_stat_alarm_cleared_data_pack(const bcmolt_nni_stat_alarm_cleared_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_nni_stat_alarm_cleared_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_nni_stat_alarm_cleared_data_get_packed_length(const bcmolt_nni_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_nni_stat_alarm_cleared_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_nni_stat_alarm_cleared_data_unpack(bcmolt_nni_stat_alarm_cleared_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_nni_stat_alarm_cleared_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_nni_stat_alarm_cleared_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_nni_stat_alarm_cleared_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_nni_stat_alarm_cleared_data_bounds_check(const bcmolt_nni_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present, bcmolt_nni_stat_alarm_cleared_id *failed_prop);
+
+/** Initializes a bcmolt_nni_stat_alarm_raised_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_nni_stat_alarm_raised_data_set_default(bcmolt_nni_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_nni_stat_alarm_raised_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_nni_stat_alarm_raised_data_pack(const bcmolt_nni_stat_alarm_raised_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_nni_stat_alarm_raised_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_nni_stat_alarm_raised_data_get_packed_length(const bcmolt_nni_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_nni_stat_alarm_raised_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_nni_stat_alarm_raised_data_unpack(bcmolt_nni_stat_alarm_raised_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_nni_stat_alarm_raised_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_nni_stat_alarm_raised_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_nni_stat_alarm_raised_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_nni_stat_alarm_raised_data_bounds_check(const bcmolt_nni_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present, bcmolt_nni_stat_alarm_raised_id *failed_prop);
+
+/** Initializes a bcmolt_nni_status_changed_data struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_nni_status_changed_data_set_default(bcmolt_nni_status_changed_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_nni_status_changed_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_nni_status_changed_data_pack(const bcmolt_nni_status_changed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_nni_status_changed_data would occupy 
+ * on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_nni_status_changed_data_get_packed_length(const bcmolt_nni_status_changed_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_nni_status_changed_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_nni_status_changed_data_unpack(bcmolt_nni_status_changed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_nni_status_changed_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_nni_status_changed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_nni_status_changed_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_nni_status_changed_data_bounds_check(const bcmolt_nni_status_changed_data *this, bcmolt_presence_mask fields_present, bcmolt_nni_status_changed_id *failed_prop);
+
+/** Initializes a bcmolt_nni_auto_cfg_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_nni_auto_cfg_data_set_default(bcmolt_nni_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_nni_auto_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_nni_auto_cfg_data_pack(const bcmolt_nni_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_nni_auto_cfg_data would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_nni_auto_cfg_data_get_packed_length(const bcmolt_nni_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_nni_auto_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_nni_auto_cfg_data_unpack(bcmolt_nni_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_nni_auto_cfg_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_nni_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_nni_auto_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_nni_auto_cfg_data_bounds_check(const bcmolt_nni_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_nni_auto_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_nni_serdes_key struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_nni_serdes_key_set_default(bcmolt_nni_serdes_key *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_nni_serdes_key to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_nni_serdes_key_pack(const bcmolt_nni_serdes_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_nni_serdes_key would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_nni_serdes_key_get_packed_length(const bcmolt_nni_serdes_key *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_nni_serdes_key from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_nni_serdes_key_unpack(bcmolt_nni_serdes_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_nni_serdes_key struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_nni_serdes_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_nni_serdes_key is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_nni_serdes_key_bounds_check(const bcmolt_nni_serdes_key *this, bcmolt_presence_mask fields_present, bcmolt_nni_serdes_key_id *failed_prop);
+
+/** Initializes a bcmolt_nni_serdes_cfg_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_nni_serdes_cfg_data_set_default(bcmolt_nni_serdes_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_nni_serdes_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_nni_serdes_cfg_data_pack(const bcmolt_nni_serdes_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_nni_serdes_cfg_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_nni_serdes_cfg_data_get_packed_length(const bcmolt_nni_serdes_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_nni_serdes_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_nni_serdes_cfg_data_unpack(bcmolt_nni_serdes_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_nni_serdes_cfg_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_nni_serdes_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_nni_serdes_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_nni_serdes_cfg_data_bounds_check(const bcmolt_nni_serdes_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_nni_serdes_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_software_error_key struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_software_error_key_set_default(bcmolt_software_error_key *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_software_error_key to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_software_error_key_pack(const bcmolt_software_error_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_software_error_key would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_software_error_key_get_packed_length(const bcmolt_software_error_key *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_software_error_key from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_software_error_key_unpack(bcmolt_software_error_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_software_error_key struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_software_error_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_software_error_key is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_software_error_key_bounds_check(const bcmolt_software_error_key *this, bcmolt_presence_mask fields_present, bcmolt_software_error_key_id *failed_prop);
+
+/** Initializes a bcmolt_software_error_cfg_data struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_software_error_cfg_data_set_default(bcmolt_software_error_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_software_error_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_software_error_cfg_data_pack(const bcmolt_software_error_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_software_error_cfg_data would occupy 
+ * on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_software_error_cfg_data_get_packed_length(const bcmolt_software_error_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_software_error_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_software_error_cfg_data_unpack(bcmolt_software_error_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_software_error_cfg_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_software_error_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_software_error_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_software_error_cfg_data_bounds_check(const bcmolt_software_error_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_software_error_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_trx_calibration_key struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_trx_calibration_key_set_default(bcmolt_trx_calibration_key *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_trx_calibration_key to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_trx_calibration_key_pack(const bcmolt_trx_calibration_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_trx_calibration_key would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_trx_calibration_key_get_packed_length(const bcmolt_trx_calibration_key *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_trx_calibration_key from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_trx_calibration_key_unpack(bcmolt_trx_calibration_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_trx_calibration_key struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_trx_calibration_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_trx_calibration_key is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_trx_calibration_key_bounds_check(const bcmolt_trx_calibration_key *this, bcmolt_presence_mask fields_present, bcmolt_trx_calibration_key_id *failed_prop);
+
+/** Initializes a 
+ * bcmolt_trx_calibration_capture_window_and_statistic_completed_data struct.  
+ * This sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_trx_calibration_capture_window_and_statistic_completed_data_set_default(bcmolt_trx_calibration_capture_window_and_statistic_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_trx_calibration_capture_window_and_statistic_completed_data 
+ * to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_trx_calibration_capture_window_and_statistic_completed_data_pack(const bcmolt_trx_calibration_capture_window_and_statistic_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_trx_calibration_capture_window_and_statistic_completed_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_trx_calibration_capture_window_and_statistic_completed_data_get_packed_length(const bcmolt_trx_calibration_capture_window_and_statistic_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_trx_calibration_capture_window_and_statistic_completed_data 
+ * from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_trx_calibration_capture_window_and_statistic_completed_data_unpack(bcmolt_trx_calibration_capture_window_and_statistic_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed 
+ * bcmolt_trx_calibration_capture_window_and_statistic_completed_data struct 
+ * and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_trx_calibration_capture_window_and_statistic_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the 
+ * bcmolt_trx_calibration_capture_window_and_statistic_completed_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_trx_calibration_capture_window_and_statistic_completed_data_bounds_check(const bcmolt_trx_calibration_capture_window_and_statistic_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_trx_calibration_capture_window_and_statistic_completed_id *failed_prop);
+
+/** Initializes a bcmolt_trx_calibration_auto_cfg_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_trx_calibration_auto_cfg_data_set_default(bcmolt_trx_calibration_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_trx_calibration_auto_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_trx_calibration_auto_cfg_data_pack(const bcmolt_trx_calibration_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_trx_calibration_auto_cfg_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_trx_calibration_auto_cfg_data_get_packed_length(const bcmolt_trx_calibration_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_trx_calibration_auto_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_trx_calibration_auto_cfg_data_unpack(bcmolt_trx_calibration_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_trx_calibration_auto_cfg_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_trx_calibration_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_trx_calibration_auto_cfg_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_trx_calibration_auto_cfg_data_bounds_check(const bcmolt_trx_calibration_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_trx_calibration_auto_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_trx_calibration_start_capture_window_data struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_trx_calibration_start_capture_window_data_set_default(bcmolt_trx_calibration_start_capture_window_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_trx_calibration_start_capture_window_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_trx_calibration_start_capture_window_data_pack(const bcmolt_trx_calibration_start_capture_window_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_trx_calibration_start_capture_window_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_trx_calibration_start_capture_window_data_get_packed_length(const bcmolt_trx_calibration_start_capture_window_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_trx_calibration_start_capture_window_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_trx_calibration_start_capture_window_data_unpack(bcmolt_trx_calibration_start_capture_window_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_trx_calibration_start_capture_window_data struct 
+ * and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_trx_calibration_start_capture_window_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_trx_calibration_start_capture_window_data 
+ * is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_trx_calibration_start_capture_window_data_bounds_check(const bcmolt_trx_calibration_start_capture_window_data *this, bcmolt_presence_mask fields_present, bcmolt_trx_calibration_start_capture_window_id *failed_prop);
+
+/** Initializes a bcmolt_trx_calibration_stop_capture_window_data struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_trx_calibration_stop_capture_window_data_set_default(bcmolt_trx_calibration_stop_capture_window_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_trx_calibration_stop_capture_window_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_trx_calibration_stop_capture_window_data_pack(const bcmolt_trx_calibration_stop_capture_window_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_trx_calibration_stop_capture_window_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_trx_calibration_stop_capture_window_data_get_packed_length(const bcmolt_trx_calibration_stop_capture_window_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_trx_calibration_stop_capture_window_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_trx_calibration_stop_capture_window_data_unpack(bcmolt_trx_calibration_stop_capture_window_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_trx_calibration_stop_capture_window_data struct 
+ * and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_trx_calibration_stop_capture_window_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_trx_calibration_stop_capture_window_data 
+ * is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_trx_calibration_stop_capture_window_data_bounds_check(const bcmolt_trx_calibration_stop_capture_window_data *this, bcmolt_presence_mask fields_present, bcmolt_trx_calibration_stop_capture_window_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_alloc_key struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_alloc_key_set_default(bcmolt_xgpon_alloc_key *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_alloc_key to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_alloc_key_pack(const bcmolt_xgpon_alloc_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_alloc_key would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_alloc_key_get_packed_length(const bcmolt_xgpon_alloc_key *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_alloc_key from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_alloc_key_unpack(bcmolt_xgpon_alloc_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_alloc_key struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_alloc_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_alloc_key is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_alloc_key_bounds_check(const bcmolt_xgpon_alloc_key *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_alloc_key_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_alloc_cfg_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_alloc_cfg_data_set_default(bcmolt_xgpon_alloc_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_alloc_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_alloc_cfg_data_pack(const bcmolt_xgpon_alloc_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_alloc_cfg_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_alloc_cfg_data_get_packed_length(const bcmolt_xgpon_alloc_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_alloc_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_alloc_cfg_data_unpack(bcmolt_xgpon_alloc_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_alloc_cfg_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_alloc_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_alloc_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_alloc_cfg_data_bounds_check(const bcmolt_xgpon_alloc_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_alloc_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_alloc_stat_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_alloc_stat_data_set_default(bcmolt_xgpon_alloc_stat_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_alloc_stat_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_alloc_stat_data_pack(const bcmolt_xgpon_alloc_stat_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_alloc_stat_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_alloc_stat_data_get_packed_length(const bcmolt_xgpon_alloc_stat_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_alloc_stat_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_alloc_stat_data_unpack(bcmolt_xgpon_alloc_stat_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_alloc_stat_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_alloc_stat_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_alloc_stat_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_alloc_stat_data_bounds_check(const bcmolt_xgpon_alloc_stat_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_alloc_stat_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_alloc_stat_cfg_data struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_alloc_stat_cfg_data_set_default(bcmolt_xgpon_alloc_stat_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_alloc_stat_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_alloc_stat_cfg_data_pack(const bcmolt_xgpon_alloc_stat_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_alloc_stat_cfg_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_alloc_stat_cfg_data_get_packed_length(const bcmolt_xgpon_alloc_stat_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_alloc_stat_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_alloc_stat_cfg_data_unpack(bcmolt_xgpon_alloc_stat_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_alloc_stat_cfg_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_alloc_stat_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_alloc_stat_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_alloc_stat_cfg_data_bounds_check(const bcmolt_xgpon_alloc_stat_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_alloc_stat_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_alloc_configuration_completed_data struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_alloc_configuration_completed_data_set_default(bcmolt_xgpon_alloc_configuration_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_alloc_configuration_completed_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_alloc_configuration_completed_data_pack(const bcmolt_xgpon_alloc_configuration_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_xgpon_alloc_configuration_completed_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_alloc_configuration_completed_data_get_packed_length(const bcmolt_xgpon_alloc_configuration_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_alloc_configuration_completed_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_alloc_configuration_completed_data_unpack(bcmolt_xgpon_alloc_configuration_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_alloc_configuration_completed_data struct 
+ * and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_alloc_configuration_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_alloc_configuration_completed_data 
+ * is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_alloc_configuration_completed_data_bounds_check(const bcmolt_xgpon_alloc_configuration_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_alloc_configuration_completed_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_alloc_get_alloc_stats_completed_data struct.  
+ * This sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_alloc_get_alloc_stats_completed_data_set_default(bcmolt_xgpon_alloc_get_alloc_stats_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_alloc_get_alloc_stats_completed_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_alloc_get_alloc_stats_completed_data_pack(const bcmolt_xgpon_alloc_get_alloc_stats_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_xgpon_alloc_get_alloc_stats_completed_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_alloc_get_alloc_stats_completed_data_get_packed_length(const bcmolt_xgpon_alloc_get_alloc_stats_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_alloc_get_alloc_stats_completed_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_alloc_get_alloc_stats_completed_data_unpack(bcmolt_xgpon_alloc_get_alloc_stats_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_alloc_get_alloc_stats_completed_data struct 
+ * and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_alloc_get_alloc_stats_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_alloc_get_alloc_stats_completed_data 
+ * is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_alloc_get_alloc_stats_completed_data_bounds_check(const bcmolt_xgpon_alloc_get_alloc_stats_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_alloc_get_alloc_stats_completed_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_alloc_stat_alarm_cleared_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_alloc_stat_alarm_cleared_data_set_default(bcmolt_xgpon_alloc_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_alloc_stat_alarm_cleared_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_alloc_stat_alarm_cleared_data_pack(const bcmolt_xgpon_alloc_stat_alarm_cleared_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_alloc_stat_alarm_cleared_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_alloc_stat_alarm_cleared_data_get_packed_length(const bcmolt_xgpon_alloc_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_alloc_stat_alarm_cleared_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_alloc_stat_alarm_cleared_data_unpack(bcmolt_xgpon_alloc_stat_alarm_cleared_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_alloc_stat_alarm_cleared_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_alloc_stat_alarm_cleared_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_alloc_stat_alarm_cleared_data is out 
+ * of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_alloc_stat_alarm_cleared_data_bounds_check(const bcmolt_xgpon_alloc_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_alloc_stat_alarm_cleared_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_alloc_stat_alarm_raised_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_alloc_stat_alarm_raised_data_set_default(bcmolt_xgpon_alloc_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_alloc_stat_alarm_raised_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_alloc_stat_alarm_raised_data_pack(const bcmolt_xgpon_alloc_stat_alarm_raised_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_alloc_stat_alarm_raised_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_alloc_stat_alarm_raised_data_get_packed_length(const bcmolt_xgpon_alloc_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_alloc_stat_alarm_raised_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_alloc_stat_alarm_raised_data_unpack(bcmolt_xgpon_alloc_stat_alarm_raised_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_alloc_stat_alarm_raised_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_alloc_stat_alarm_raised_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_alloc_stat_alarm_raised_data is out 
+ * of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_alloc_stat_alarm_raised_data_bounds_check(const bcmolt_xgpon_alloc_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_alloc_stat_alarm_raised_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_alloc_auto_cfg_data struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_alloc_auto_cfg_data_set_default(bcmolt_xgpon_alloc_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_alloc_auto_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_alloc_auto_cfg_data_pack(const bcmolt_xgpon_alloc_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_alloc_auto_cfg_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_alloc_auto_cfg_data_get_packed_length(const bcmolt_xgpon_alloc_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_alloc_auto_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_alloc_auto_cfg_data_unpack(bcmolt_xgpon_alloc_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_alloc_auto_cfg_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_alloc_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_alloc_auto_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_alloc_auto_cfg_data_bounds_check(const bcmolt_xgpon_alloc_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_alloc_auto_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_alloc_get_stats_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_alloc_get_stats_data_set_default(bcmolt_xgpon_alloc_get_stats_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_alloc_get_stats_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_alloc_get_stats_data_pack(const bcmolt_xgpon_alloc_get_stats_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_alloc_get_stats_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_alloc_get_stats_data_get_packed_length(const bcmolt_xgpon_alloc_get_stats_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_alloc_get_stats_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_alloc_get_stats_data_unpack(bcmolt_xgpon_alloc_get_stats_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_alloc_get_stats_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_alloc_get_stats_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_alloc_get_stats_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_alloc_get_stats_data_bounds_check(const bcmolt_xgpon_alloc_get_stats_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_alloc_get_stats_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_alloc_set_state_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_alloc_set_state_data_set_default(bcmolt_xgpon_alloc_set_state_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_alloc_set_state_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_alloc_set_state_data_pack(const bcmolt_xgpon_alloc_set_state_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_alloc_set_state_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_alloc_set_state_data_get_packed_length(const bcmolt_xgpon_alloc_set_state_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_alloc_set_state_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_alloc_set_state_data_unpack(bcmolt_xgpon_alloc_set_state_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_alloc_set_state_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_alloc_set_state_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_alloc_set_state_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_alloc_set_state_data_bounds_check(const bcmolt_xgpon_alloc_set_state_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_alloc_set_state_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_gem_port_key struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_gem_port_key_set_default(bcmolt_xgpon_gem_port_key *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_gem_port_key to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_key_pack(const bcmolt_xgpon_gem_port_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_gem_port_key would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_gem_port_key_get_packed_length(const bcmolt_xgpon_gem_port_key *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_gem_port_key from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_key_unpack(bcmolt_xgpon_gem_port_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_gem_port_key struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_gem_port_key is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_key_bounds_check(const bcmolt_xgpon_gem_port_key *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_gem_port_key_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_gem_port_cfg_data struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_gem_port_cfg_data_set_default(bcmolt_xgpon_gem_port_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_gem_port_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_cfg_data_pack(const bcmolt_xgpon_gem_port_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_gem_port_cfg_data would occupy 
+ * on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_gem_port_cfg_data_get_packed_length(const bcmolt_xgpon_gem_port_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_gem_port_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_cfg_data_unpack(bcmolt_xgpon_gem_port_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_gem_port_cfg_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_gem_port_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_cfg_data_bounds_check(const bcmolt_xgpon_gem_port_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_gem_port_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_gem_port_stat_data struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_gem_port_stat_data_set_default(bcmolt_xgpon_gem_port_stat_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_gem_port_stat_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_stat_data_pack(const bcmolt_xgpon_gem_port_stat_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_gem_port_stat_data would occupy 
+ * on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_gem_port_stat_data_get_packed_length(const bcmolt_xgpon_gem_port_stat_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_gem_port_stat_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_stat_data_unpack(bcmolt_xgpon_gem_port_stat_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_gem_port_stat_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_stat_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_gem_port_stat_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_stat_data_bounds_check(const bcmolt_xgpon_gem_port_stat_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_gem_port_stat_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_gem_port_stat_cfg_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_gem_port_stat_cfg_data_set_default(bcmolt_xgpon_gem_port_stat_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_gem_port_stat_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_stat_cfg_data_pack(const bcmolt_xgpon_gem_port_stat_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_gem_port_stat_cfg_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_gem_port_stat_cfg_data_get_packed_length(const bcmolt_xgpon_gem_port_stat_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_gem_port_stat_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_stat_cfg_data_unpack(bcmolt_xgpon_gem_port_stat_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_gem_port_stat_cfg_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_stat_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_gem_port_stat_cfg_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_stat_cfg_data_bounds_check(const bcmolt_xgpon_gem_port_stat_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_gem_port_stat_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_gem_port_stat_alarm_cleared_data struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_gem_port_stat_alarm_cleared_data_set_default(bcmolt_xgpon_gem_port_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_gem_port_stat_alarm_cleared_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_stat_alarm_cleared_data_pack(const bcmolt_xgpon_gem_port_stat_alarm_cleared_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_xgpon_gem_port_stat_alarm_cleared_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_gem_port_stat_alarm_cleared_data_get_packed_length(const bcmolt_xgpon_gem_port_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_gem_port_stat_alarm_cleared_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_stat_alarm_cleared_data_unpack(bcmolt_xgpon_gem_port_stat_alarm_cleared_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_gem_port_stat_alarm_cleared_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_stat_alarm_cleared_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_gem_port_stat_alarm_cleared_data is 
+ * out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_stat_alarm_cleared_data_bounds_check(const bcmolt_xgpon_gem_port_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_gem_port_stat_alarm_cleared_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_gem_port_stat_alarm_raised_data struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_gem_port_stat_alarm_raised_data_set_default(bcmolt_xgpon_gem_port_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_gem_port_stat_alarm_raised_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_stat_alarm_raised_data_pack(const bcmolt_xgpon_gem_port_stat_alarm_raised_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_gem_port_stat_alarm_raised_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_gem_port_stat_alarm_raised_data_get_packed_length(const bcmolt_xgpon_gem_port_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_gem_port_stat_alarm_raised_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_stat_alarm_raised_data_unpack(bcmolt_xgpon_gem_port_stat_alarm_raised_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_gem_port_stat_alarm_raised_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_stat_alarm_raised_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_gem_port_stat_alarm_raised_data is 
+ * out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_stat_alarm_raised_data_bounds_check(const bcmolt_xgpon_gem_port_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_gem_port_stat_alarm_raised_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_gem_port_auto_cfg_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_gem_port_auto_cfg_data_set_default(bcmolt_xgpon_gem_port_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_gem_port_auto_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_auto_cfg_data_pack(const bcmolt_xgpon_gem_port_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_gem_port_auto_cfg_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_gem_port_auto_cfg_data_get_packed_length(const bcmolt_xgpon_gem_port_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_gem_port_auto_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_auto_cfg_data_unpack(bcmolt_xgpon_gem_port_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_gem_port_auto_cfg_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_gem_port_auto_cfg_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_gem_port_auto_cfg_data_bounds_check(const bcmolt_xgpon_gem_port_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_gem_port_auto_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_iwf_key struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_iwf_key_set_default(bcmolt_xgpon_iwf_key *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_iwf_key to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_iwf_key_pack(const bcmolt_xgpon_iwf_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_iwf_key would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_iwf_key_get_packed_length(const bcmolt_xgpon_iwf_key *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_iwf_key from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_iwf_key_unpack(bcmolt_xgpon_iwf_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_iwf_key struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_iwf_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_iwf_key is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_iwf_key_bounds_check(const bcmolt_xgpon_iwf_key *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_iwf_key_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_iwf_cfg_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_iwf_cfg_data_set_default(bcmolt_xgpon_iwf_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_iwf_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_iwf_cfg_data_pack(const bcmolt_xgpon_iwf_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_iwf_cfg_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_iwf_cfg_data_get_packed_length(const bcmolt_xgpon_iwf_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_iwf_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_iwf_cfg_data_unpack(bcmolt_xgpon_iwf_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_iwf_cfg_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_iwf_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_iwf_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_iwf_cfg_data_bounds_check(const bcmolt_xgpon_iwf_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_iwf_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_ni_key struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_ni_key_set_default(bcmolt_xgpon_ni_key *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_ni_key to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_key_pack(const bcmolt_xgpon_ni_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_ni_key would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_ni_key_get_packed_length(const bcmolt_xgpon_ni_key *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_ni_key from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_key_unpack(bcmolt_xgpon_ni_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_ni_key struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_ni_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_ni_key is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_key_bounds_check(const bcmolt_xgpon_ni_key *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_key_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_ni_cfg_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_ni_cfg_data_set_default(bcmolt_xgpon_ni_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_ni_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_cfg_data_pack(const bcmolt_xgpon_ni_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_ni_cfg_data would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_ni_cfg_data_get_packed_length(const bcmolt_xgpon_ni_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_ni_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_cfg_data_unpack(bcmolt_xgpon_ni_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_ni_cfg_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_ni_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_ni_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_cfg_data_bounds_check(const bcmolt_xgpon_ni_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_ni_stat_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_ni_stat_data_set_default(bcmolt_xgpon_ni_stat_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_ni_stat_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_stat_data_pack(const bcmolt_xgpon_ni_stat_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_ni_stat_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_ni_stat_data_get_packed_length(const bcmolt_xgpon_ni_stat_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_ni_stat_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_stat_data_unpack(bcmolt_xgpon_ni_stat_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_ni_stat_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_ni_stat_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_ni_stat_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_stat_data_bounds_check(const bcmolt_xgpon_ni_stat_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_stat_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_ni_stat_cfg_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_ni_stat_cfg_data_set_default(bcmolt_xgpon_ni_stat_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_ni_stat_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_stat_cfg_data_pack(const bcmolt_xgpon_ni_stat_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_ni_stat_cfg_data would occupy 
+ * on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_ni_stat_cfg_data_get_packed_length(const bcmolt_xgpon_ni_stat_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_ni_stat_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_stat_cfg_data_unpack(bcmolt_xgpon_ni_stat_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_ni_stat_cfg_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_ni_stat_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_ni_stat_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_stat_cfg_data_bounds_check(const bcmolt_xgpon_ni_stat_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_stat_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_ni_cpu_packets_failure_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_ni_cpu_packets_failure_data_set_default(bcmolt_xgpon_ni_cpu_packets_failure_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_ni_cpu_packets_failure_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_cpu_packets_failure_data_pack(const bcmolt_xgpon_ni_cpu_packets_failure_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_ni_cpu_packets_failure_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_ni_cpu_packets_failure_data_get_packed_length(const bcmolt_xgpon_ni_cpu_packets_failure_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_ni_cpu_packets_failure_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_cpu_packets_failure_data_unpack(bcmolt_xgpon_ni_cpu_packets_failure_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_ni_cpu_packets_failure_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_ni_cpu_packets_failure_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_ni_cpu_packets_failure_data is out 
+ * of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_cpu_packets_failure_data_bounds_check(const bcmolt_xgpon_ni_cpu_packets_failure_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_cpu_packets_failure_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_ni_los_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_ni_los_data_set_default(bcmolt_xgpon_ni_los_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_ni_los_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_los_data_pack(const bcmolt_xgpon_ni_los_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_ni_los_data would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_ni_los_data_get_packed_length(const bcmolt_xgpon_ni_los_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_ni_los_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_los_data_unpack(bcmolt_xgpon_ni_los_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_ni_los_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_ni_los_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_ni_los_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_los_data_bounds_check(const bcmolt_xgpon_ni_los_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_los_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_ni_onu_discovered_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_ni_onu_discovered_data_set_default(bcmolt_xgpon_ni_onu_discovered_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_ni_onu_discovered_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_onu_discovered_data_pack(const bcmolt_xgpon_ni_onu_discovered_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_ni_onu_discovered_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_ni_onu_discovered_data_get_packed_length(const bcmolt_xgpon_ni_onu_discovered_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_ni_onu_discovered_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_onu_discovered_data_unpack(bcmolt_xgpon_ni_onu_discovered_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_ni_onu_discovered_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_ni_onu_discovered_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_ni_onu_discovered_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_onu_discovered_data_bounds_check(const bcmolt_xgpon_ni_onu_discovered_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_onu_discovered_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_ni_onu_upgrade_complete_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_ni_onu_upgrade_complete_data_set_default(bcmolt_xgpon_ni_onu_upgrade_complete_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_ni_onu_upgrade_complete_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_onu_upgrade_complete_data_pack(const bcmolt_xgpon_ni_onu_upgrade_complete_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_ni_onu_upgrade_complete_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_ni_onu_upgrade_complete_data_get_packed_length(const bcmolt_xgpon_ni_onu_upgrade_complete_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_ni_onu_upgrade_complete_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_onu_upgrade_complete_data_unpack(bcmolt_xgpon_ni_onu_upgrade_complete_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_ni_onu_upgrade_complete_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_ni_onu_upgrade_complete_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_ni_onu_upgrade_complete_data is out 
+ * of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_onu_upgrade_complete_data_bounds_check(const bcmolt_xgpon_ni_onu_upgrade_complete_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_onu_upgrade_complete_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_ni_protection_switching_onus_ranged_data struct.  
+ * This sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_ni_protection_switching_onus_ranged_data_set_default(bcmolt_xgpon_ni_protection_switching_onus_ranged_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_ni_protection_switching_onus_ranged_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_protection_switching_onus_ranged_data_pack(const bcmolt_xgpon_ni_protection_switching_onus_ranged_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_xgpon_ni_protection_switching_onus_ranged_data would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_ni_protection_switching_onus_ranged_data_get_packed_length(const bcmolt_xgpon_ni_protection_switching_onus_ranged_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_ni_protection_switching_onus_ranged_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_protection_switching_onus_ranged_data_unpack(bcmolt_xgpon_ni_protection_switching_onus_ranged_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_ni_protection_switching_onus_ranged_data 
+ * struct and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_ni_protection_switching_onus_ranged_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the 
+ * bcmolt_xgpon_ni_protection_switching_onus_ranged_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_protection_switching_onus_ranged_data_bounds_check(const bcmolt_xgpon_ni_protection_switching_onus_ranged_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_protection_switching_onus_ranged_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_ni_protection_switching_switchover_completed_data 
+ * struct.  This sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_ni_protection_switching_switchover_completed_data_set_default(bcmolt_xgpon_ni_protection_switching_switchover_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_ni_protection_switching_switchover_completed_data to 
+ * bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_protection_switching_switchover_completed_data_pack(const bcmolt_xgpon_ni_protection_switching_switchover_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_xgpon_ni_protection_switching_switchover_completed_data would occupy 
+ * on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_ni_protection_switching_switchover_completed_data_get_packed_length(const bcmolt_xgpon_ni_protection_switching_switchover_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_ni_protection_switching_switchover_completed_data 
+ * from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_protection_switching_switchover_completed_data_unpack(bcmolt_xgpon_ni_protection_switching_switchover_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed 
+ * bcmolt_xgpon_ni_protection_switching_switchover_completed_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_ni_protection_switching_switchover_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the 
+ * bcmolt_xgpon_ni_protection_switching_switchover_completed_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_protection_switching_switchover_completed_data_bounds_check(const bcmolt_xgpon_ni_protection_switching_switchover_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_protection_switching_switchover_completed_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_ni_protection_switching_traffic_resume_data 
+ * struct.  This sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_ni_protection_switching_traffic_resume_data_set_default(bcmolt_xgpon_ni_protection_switching_traffic_resume_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_ni_protection_switching_traffic_resume_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_protection_switching_traffic_resume_data_pack(const bcmolt_xgpon_ni_protection_switching_traffic_resume_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_xgpon_ni_protection_switching_traffic_resume_data would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_ni_protection_switching_traffic_resume_data_get_packed_length(const bcmolt_xgpon_ni_protection_switching_traffic_resume_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_ni_protection_switching_traffic_resume_data from 
+ * bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_protection_switching_traffic_resume_data_unpack(bcmolt_xgpon_ni_protection_switching_traffic_resume_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_ni_protection_switching_traffic_resume_data 
+ * struct and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_ni_protection_switching_traffic_resume_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the 
+ * bcmolt_xgpon_ni_protection_switching_traffic_resume_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_protection_switching_traffic_resume_data_bounds_check(const bcmolt_xgpon_ni_protection_switching_traffic_resume_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_protection_switching_traffic_resume_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_ni_rogue_detection_completed_data struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_ni_rogue_detection_completed_data_set_default(bcmolt_xgpon_ni_rogue_detection_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_ni_rogue_detection_completed_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_rogue_detection_completed_data_pack(const bcmolt_xgpon_ni_rogue_detection_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_xgpon_ni_rogue_detection_completed_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_ni_rogue_detection_completed_data_get_packed_length(const bcmolt_xgpon_ni_rogue_detection_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_ni_rogue_detection_completed_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_rogue_detection_completed_data_unpack(bcmolt_xgpon_ni_rogue_detection_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_ni_rogue_detection_completed_data struct 
+ * and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_ni_rogue_detection_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_ni_rogue_detection_completed_data is 
+ * out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_rogue_detection_completed_data_bounds_check(const bcmolt_xgpon_ni_rogue_detection_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_rogue_detection_completed_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_data 
+ * struct.  This sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_data_set_default(bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_data_pack(const bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_data_get_packed_length(const bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_data from 
+ * bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_data_unpack(bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed 
+ * bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the 
+ * bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_data_bounds_check(const bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_ni_stat_alarm_cleared_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_ni_stat_alarm_cleared_data_set_default(bcmolt_xgpon_ni_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_ni_stat_alarm_cleared_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_stat_alarm_cleared_data_pack(const bcmolt_xgpon_ni_stat_alarm_cleared_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_ni_stat_alarm_cleared_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_ni_stat_alarm_cleared_data_get_packed_length(const bcmolt_xgpon_ni_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_ni_stat_alarm_cleared_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_stat_alarm_cleared_data_unpack(bcmolt_xgpon_ni_stat_alarm_cleared_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_ni_stat_alarm_cleared_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_ni_stat_alarm_cleared_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_ni_stat_alarm_cleared_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_stat_alarm_cleared_data_bounds_check(const bcmolt_xgpon_ni_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_stat_alarm_cleared_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_ni_stat_alarm_raised_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_ni_stat_alarm_raised_data_set_default(bcmolt_xgpon_ni_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_ni_stat_alarm_raised_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_stat_alarm_raised_data_pack(const bcmolt_xgpon_ni_stat_alarm_raised_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_ni_stat_alarm_raised_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_ni_stat_alarm_raised_data_get_packed_length(const bcmolt_xgpon_ni_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_ni_stat_alarm_raised_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_stat_alarm_raised_data_unpack(bcmolt_xgpon_ni_stat_alarm_raised_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_ni_stat_alarm_raised_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_ni_stat_alarm_raised_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_ni_stat_alarm_raised_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_stat_alarm_raised_data_bounds_check(const bcmolt_xgpon_ni_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_stat_alarm_raised_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_ni_state_change_completed_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_ni_state_change_completed_data_set_default(bcmolt_xgpon_ni_state_change_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_ni_state_change_completed_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_state_change_completed_data_pack(const bcmolt_xgpon_ni_state_change_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_ni_state_change_completed_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_ni_state_change_completed_data_get_packed_length(const bcmolt_xgpon_ni_state_change_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_ni_state_change_completed_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_state_change_completed_data_unpack(bcmolt_xgpon_ni_state_change_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_ni_state_change_completed_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_ni_state_change_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_ni_state_change_completed_data is 
+ * out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_state_change_completed_data_bounds_check(const bcmolt_xgpon_ni_state_change_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_state_change_completed_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_ni_tod_request_completed_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_ni_tod_request_completed_data_set_default(bcmolt_xgpon_ni_tod_request_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_ni_tod_request_completed_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_tod_request_completed_data_pack(const bcmolt_xgpon_ni_tod_request_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_ni_tod_request_completed_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_ni_tod_request_completed_data_get_packed_length(const bcmolt_xgpon_ni_tod_request_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_ni_tod_request_completed_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_tod_request_completed_data_unpack(bcmolt_xgpon_ni_tod_request_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_ni_tod_request_completed_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_ni_tod_request_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_ni_tod_request_completed_data is out 
+ * of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_tod_request_completed_data_bounds_check(const bcmolt_xgpon_ni_tod_request_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_tod_request_completed_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_ni_auto_cfg_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_ni_auto_cfg_data_set_default(bcmolt_xgpon_ni_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_ni_auto_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_auto_cfg_data_pack(const bcmolt_xgpon_ni_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_ni_auto_cfg_data would occupy 
+ * on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_ni_auto_cfg_data_get_packed_length(const bcmolt_xgpon_ni_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_ni_auto_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_auto_cfg_data_unpack(bcmolt_xgpon_ni_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_ni_auto_cfg_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_ni_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_ni_auto_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_auto_cfg_data_bounds_check(const bcmolt_xgpon_ni_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_auto_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_ni_adjust_tx_wavelength_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_ni_adjust_tx_wavelength_data_set_default(bcmolt_xgpon_ni_adjust_tx_wavelength_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_ni_adjust_tx_wavelength_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_adjust_tx_wavelength_data_pack(const bcmolt_xgpon_ni_adjust_tx_wavelength_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_ni_adjust_tx_wavelength_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_ni_adjust_tx_wavelength_data_get_packed_length(const bcmolt_xgpon_ni_adjust_tx_wavelength_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_ni_adjust_tx_wavelength_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_adjust_tx_wavelength_data_unpack(bcmolt_xgpon_ni_adjust_tx_wavelength_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_ni_adjust_tx_wavelength_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_ni_adjust_tx_wavelength_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_ni_adjust_tx_wavelength_data is out 
+ * of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_adjust_tx_wavelength_data_bounds_check(const bcmolt_xgpon_ni_adjust_tx_wavelength_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_adjust_tx_wavelength_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_ni_disable_serial_number_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_ni_disable_serial_number_data_set_default(bcmolt_xgpon_ni_disable_serial_number_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_ni_disable_serial_number_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_disable_serial_number_data_pack(const bcmolt_xgpon_ni_disable_serial_number_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_ni_disable_serial_number_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_ni_disable_serial_number_data_get_packed_length(const bcmolt_xgpon_ni_disable_serial_number_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_ni_disable_serial_number_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_disable_serial_number_data_unpack(bcmolt_xgpon_ni_disable_serial_number_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_ni_disable_serial_number_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_ni_disable_serial_number_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_ni_disable_serial_number_data is out 
+ * of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_disable_serial_number_data_bounds_check(const bcmolt_xgpon_ni_disable_serial_number_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_disable_serial_number_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_ni_rogue_detection_window_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_ni_rogue_detection_window_data_set_default(bcmolt_xgpon_ni_rogue_detection_window_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_ni_rogue_detection_window_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_rogue_detection_window_data_pack(const bcmolt_xgpon_ni_rogue_detection_window_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_ni_rogue_detection_window_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_ni_rogue_detection_window_data_get_packed_length(const bcmolt_xgpon_ni_rogue_detection_window_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_ni_rogue_detection_window_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_rogue_detection_window_data_unpack(bcmolt_xgpon_ni_rogue_detection_window_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_ni_rogue_detection_window_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_ni_rogue_detection_window_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_ni_rogue_detection_window_data is 
+ * out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_rogue_detection_window_data_bounds_check(const bcmolt_xgpon_ni_rogue_detection_window_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_rogue_detection_window_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_ni_run_special_bw_map_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_ni_run_special_bw_map_data_set_default(bcmolt_xgpon_ni_run_special_bw_map_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_ni_run_special_bw_map_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_run_special_bw_map_data_pack(const bcmolt_xgpon_ni_run_special_bw_map_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_ni_run_special_bw_map_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_ni_run_special_bw_map_data_get_packed_length(const bcmolt_xgpon_ni_run_special_bw_map_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_ni_run_special_bw_map_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_run_special_bw_map_data_unpack(bcmolt_xgpon_ni_run_special_bw_map_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_ni_run_special_bw_map_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_ni_run_special_bw_map_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_ni_run_special_bw_map_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_run_special_bw_map_data_bounds_check(const bcmolt_xgpon_ni_run_special_bw_map_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_run_special_bw_map_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_ni_set_onu_state_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_ni_set_onu_state_data_set_default(bcmolt_xgpon_ni_set_onu_state_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_ni_set_onu_state_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_set_onu_state_data_pack(const bcmolt_xgpon_ni_set_onu_state_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_ni_set_onu_state_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_ni_set_onu_state_data_get_packed_length(const bcmolt_xgpon_ni_set_onu_state_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_ni_set_onu_state_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_set_onu_state_data_unpack(bcmolt_xgpon_ni_set_onu_state_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_ni_set_onu_state_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_ni_set_onu_state_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_ni_set_onu_state_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_set_onu_state_data_bounds_check(const bcmolt_xgpon_ni_set_onu_state_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_set_onu_state_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_ni_set_pon_state_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_ni_set_pon_state_data_set_default(bcmolt_xgpon_ni_set_pon_state_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_ni_set_pon_state_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_set_pon_state_data_pack(const bcmolt_xgpon_ni_set_pon_state_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_ni_set_pon_state_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_ni_set_pon_state_data_get_packed_length(const bcmolt_xgpon_ni_set_pon_state_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_ni_set_pon_state_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_set_pon_state_data_unpack(bcmolt_xgpon_ni_set_pon_state_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_ni_set_pon_state_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_ni_set_pon_state_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_ni_set_pon_state_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_set_pon_state_data_bounds_check(const bcmolt_xgpon_ni_set_pon_state_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_set_pon_state_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_ni_start_onu_upgrade_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_ni_start_onu_upgrade_data_set_default(bcmolt_xgpon_ni_start_onu_upgrade_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_ni_start_onu_upgrade_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_start_onu_upgrade_data_pack(const bcmolt_xgpon_ni_start_onu_upgrade_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_ni_start_onu_upgrade_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_ni_start_onu_upgrade_data_get_packed_length(const bcmolt_xgpon_ni_start_onu_upgrade_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_ni_start_onu_upgrade_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_start_onu_upgrade_data_unpack(bcmolt_xgpon_ni_start_onu_upgrade_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_ni_start_onu_upgrade_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_ni_start_onu_upgrade_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_ni_start_onu_upgrade_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_start_onu_upgrade_data_bounds_check(const bcmolt_xgpon_ni_start_onu_upgrade_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_start_onu_upgrade_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_ni_broadcast_ploam_packet_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_ni_broadcast_ploam_packet_data_set_default(bcmolt_xgpon_ni_broadcast_ploam_packet_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_ni_broadcast_ploam_packet_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_broadcast_ploam_packet_data_pack(const bcmolt_xgpon_ni_broadcast_ploam_packet_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_ni_broadcast_ploam_packet_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_ni_broadcast_ploam_packet_data_get_packed_length(const bcmolt_xgpon_ni_broadcast_ploam_packet_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_ni_broadcast_ploam_packet_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_broadcast_ploam_packet_data_unpack(bcmolt_xgpon_ni_broadcast_ploam_packet_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_ni_broadcast_ploam_packet_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_ni_broadcast_ploam_packet_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_ni_broadcast_ploam_packet_data is 
+ * out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_broadcast_ploam_packet_data_bounds_check(const bcmolt_xgpon_ni_broadcast_ploam_packet_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_broadcast_ploam_packet_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_ni_cpu_packets_data struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_ni_cpu_packets_data_set_default(bcmolt_xgpon_ni_cpu_packets_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_ni_cpu_packets_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_cpu_packets_data_pack(const bcmolt_xgpon_ni_cpu_packets_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_ni_cpu_packets_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_ni_cpu_packets_data_get_packed_length(const bcmolt_xgpon_ni_cpu_packets_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_ni_cpu_packets_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_cpu_packets_data_unpack(bcmolt_xgpon_ni_cpu_packets_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_ni_cpu_packets_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_ni_cpu_packets_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_ni_cpu_packets_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_ni_cpu_packets_data_bounds_check(const bcmolt_xgpon_ni_cpu_packets_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_ni_cpu_packets_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_onu_key struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_onu_key_set_default(bcmolt_xgpon_onu_key *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_onu_key to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_key_pack(const bcmolt_xgpon_onu_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_onu_key would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_key_get_packed_length(const bcmolt_xgpon_onu_key *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_onu_key from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_key_unpack(bcmolt_xgpon_onu_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_onu_key struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_onu_key is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_key_bounds_check(const bcmolt_xgpon_onu_key *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_key_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_onu_cfg_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_onu_cfg_data_set_default(bcmolt_xgpon_onu_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_onu_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_cfg_data_pack(const bcmolt_xgpon_onu_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_onu_cfg_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_cfg_data_get_packed_length(const bcmolt_xgpon_onu_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_onu_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_cfg_data_unpack(bcmolt_xgpon_onu_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_onu_cfg_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_onu_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_cfg_data_bounds_check(const bcmolt_xgpon_onu_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_onu_stat_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_onu_stat_data_set_default(bcmolt_xgpon_onu_stat_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_onu_stat_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_stat_data_pack(const bcmolt_xgpon_onu_stat_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_onu_stat_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_stat_data_get_packed_length(const bcmolt_xgpon_onu_stat_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_onu_stat_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_stat_data_unpack(bcmolt_xgpon_onu_stat_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_onu_stat_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_stat_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_onu_stat_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_stat_data_bounds_check(const bcmolt_xgpon_onu_stat_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_stat_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_onu_stat_cfg_data struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_onu_stat_cfg_data_set_default(bcmolt_xgpon_onu_stat_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_onu_stat_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_stat_cfg_data_pack(const bcmolt_xgpon_onu_stat_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_onu_stat_cfg_data would occupy 
+ * on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_stat_cfg_data_get_packed_length(const bcmolt_xgpon_onu_stat_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_onu_stat_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_stat_cfg_data_unpack(bcmolt_xgpon_onu_stat_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_onu_stat_cfg_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_stat_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_onu_stat_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_stat_cfg_data_bounds_check(const bcmolt_xgpon_onu_stat_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_stat_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_onu_dfi_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_onu_dfi_data_set_default(bcmolt_xgpon_onu_dfi_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_onu_dfi_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_dfi_data_pack(const bcmolt_xgpon_onu_dfi_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_onu_dfi_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_dfi_data_get_packed_length(const bcmolt_xgpon_onu_dfi_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_onu_dfi_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_dfi_data_unpack(bcmolt_xgpon_onu_dfi_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_onu_dfi_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_dfi_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_onu_dfi_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_dfi_data_bounds_check(const bcmolt_xgpon_onu_dfi_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_dfi_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_onu_dgi_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_onu_dgi_data_set_default(bcmolt_xgpon_onu_dgi_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_onu_dgi_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_dgi_data_pack(const bcmolt_xgpon_onu_dgi_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_onu_dgi_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_dgi_data_get_packed_length(const bcmolt_xgpon_onu_dgi_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_onu_dgi_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_dgi_data_unpack(bcmolt_xgpon_onu_dgi_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_onu_dgi_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_dgi_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_onu_dgi_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_dgi_data_bounds_check(const bcmolt_xgpon_onu_dgi_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_dgi_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_onu_dowi_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_onu_dowi_data_set_default(bcmolt_xgpon_onu_dowi_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_onu_dowi_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_dowi_data_pack(const bcmolt_xgpon_onu_dowi_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_onu_dowi_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_dowi_data_get_packed_length(const bcmolt_xgpon_onu_dowi_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_onu_dowi_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_dowi_data_unpack(bcmolt_xgpon_onu_dowi_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_onu_dowi_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_dowi_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_onu_dowi_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_dowi_data_bounds_check(const bcmolt_xgpon_onu_dowi_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_dowi_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_onu_invalid_dbru_report_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_onu_invalid_dbru_report_data_set_default(bcmolt_xgpon_onu_invalid_dbru_report_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_onu_invalid_dbru_report_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_invalid_dbru_report_data_pack(const bcmolt_xgpon_onu_invalid_dbru_report_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_onu_invalid_dbru_report_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_invalid_dbru_report_data_get_packed_length(const bcmolt_xgpon_onu_invalid_dbru_report_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_onu_invalid_dbru_report_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_invalid_dbru_report_data_unpack(bcmolt_xgpon_onu_invalid_dbru_report_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_onu_invalid_dbru_report_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_invalid_dbru_report_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_onu_invalid_dbru_report_data is out 
+ * of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_invalid_dbru_report_data_bounds_check(const bcmolt_xgpon_onu_invalid_dbru_report_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_invalid_dbru_report_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_onu_key_exchange_completed_data struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_onu_key_exchange_completed_data_set_default(bcmolt_xgpon_onu_key_exchange_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_onu_key_exchange_completed_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_key_exchange_completed_data_pack(const bcmolt_xgpon_onu_key_exchange_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_onu_key_exchange_completed_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_key_exchange_completed_data_get_packed_length(const bcmolt_xgpon_onu_key_exchange_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_onu_key_exchange_completed_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_key_exchange_completed_data_unpack(bcmolt_xgpon_onu_key_exchange_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_onu_key_exchange_completed_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_key_exchange_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_onu_key_exchange_completed_data is 
+ * out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_key_exchange_completed_data_bounds_check(const bcmolt_xgpon_onu_key_exchange_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_key_exchange_completed_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_onu_key_exchange_key_mismatch_data struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_onu_key_exchange_key_mismatch_data_set_default(bcmolt_xgpon_onu_key_exchange_key_mismatch_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_onu_key_exchange_key_mismatch_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_key_exchange_key_mismatch_data_pack(const bcmolt_xgpon_onu_key_exchange_key_mismatch_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_xgpon_onu_key_exchange_key_mismatch_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_key_exchange_key_mismatch_data_get_packed_length(const bcmolt_xgpon_onu_key_exchange_key_mismatch_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_onu_key_exchange_key_mismatch_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_key_exchange_key_mismatch_data_unpack(bcmolt_xgpon_onu_key_exchange_key_mismatch_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_onu_key_exchange_key_mismatch_data struct 
+ * and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_key_exchange_key_mismatch_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_onu_key_exchange_key_mismatch_data 
+ * is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_key_exchange_key_mismatch_data_bounds_check(const bcmolt_xgpon_onu_key_exchange_key_mismatch_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_key_exchange_key_mismatch_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_onu_looci_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_onu_looci_data_set_default(bcmolt_xgpon_onu_looci_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_onu_looci_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_looci_data_pack(const bcmolt_xgpon_onu_looci_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_onu_looci_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_looci_data_get_packed_length(const bcmolt_xgpon_onu_looci_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_onu_looci_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_looci_data_unpack(bcmolt_xgpon_onu_looci_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_onu_looci_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_looci_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_onu_looci_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_looci_data_bounds_check(const bcmolt_xgpon_onu_looci_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_looci_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_onu_onu_activation_completed_data struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_onu_onu_activation_completed_data_set_default(bcmolt_xgpon_onu_onu_activation_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_onu_onu_activation_completed_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_activation_completed_data_pack(const bcmolt_xgpon_onu_onu_activation_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_xgpon_onu_onu_activation_completed_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_onu_activation_completed_data_get_packed_length(const bcmolt_xgpon_onu_onu_activation_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_onu_onu_activation_completed_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_activation_completed_data_unpack(bcmolt_xgpon_onu_onu_activation_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_onu_onu_activation_completed_data struct 
+ * and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_activation_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_onu_onu_activation_completed_data is 
+ * out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_activation_completed_data_bounds_check(const bcmolt_xgpon_onu_onu_activation_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_onu_activation_completed_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_onu_onu_alarm_data struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_onu_onu_alarm_data_set_default(bcmolt_xgpon_onu_onu_alarm_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_onu_onu_alarm_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_alarm_data_pack(const bcmolt_xgpon_onu_onu_alarm_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_onu_onu_alarm_data would occupy 
+ * on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_onu_alarm_data_get_packed_length(const bcmolt_xgpon_onu_onu_alarm_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_onu_onu_alarm_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_alarm_data_unpack(bcmolt_xgpon_onu_onu_alarm_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_onu_onu_alarm_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_alarm_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_onu_onu_alarm_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_alarm_data_bounds_check(const bcmolt_xgpon_onu_onu_alarm_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_onu_alarm_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_onu_onu_deactivation_completed_data struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_onu_onu_deactivation_completed_data_set_default(bcmolt_xgpon_onu_onu_deactivation_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_onu_onu_deactivation_completed_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_deactivation_completed_data_pack(const bcmolt_xgpon_onu_onu_deactivation_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_xgpon_onu_onu_deactivation_completed_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_onu_deactivation_completed_data_get_packed_length(const bcmolt_xgpon_onu_onu_deactivation_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_onu_onu_deactivation_completed_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_deactivation_completed_data_unpack(bcmolt_xgpon_onu_onu_deactivation_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_onu_onu_deactivation_completed_data struct 
+ * and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_deactivation_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_onu_onu_deactivation_completed_data 
+ * is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_deactivation_completed_data_bounds_check(const bcmolt_xgpon_onu_onu_deactivation_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_onu_deactivation_completed_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_onu_onu_disable_completed_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_onu_onu_disable_completed_data_set_default(bcmolt_xgpon_onu_onu_disable_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_onu_onu_disable_completed_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_disable_completed_data_pack(const bcmolt_xgpon_onu_onu_disable_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_onu_onu_disable_completed_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_onu_disable_completed_data_get_packed_length(const bcmolt_xgpon_onu_onu_disable_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_onu_onu_disable_completed_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_disable_completed_data_unpack(bcmolt_xgpon_onu_onu_disable_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_onu_onu_disable_completed_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_disable_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_onu_onu_disable_completed_data is 
+ * out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_disable_completed_data_bounds_check(const bcmolt_xgpon_onu_onu_disable_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_onu_disable_completed_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_onu_onu_enable_completed_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_onu_onu_enable_completed_data_set_default(bcmolt_xgpon_onu_onu_enable_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_onu_onu_enable_completed_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_enable_completed_data_pack(const bcmolt_xgpon_onu_onu_enable_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_onu_onu_enable_completed_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_onu_enable_completed_data_get_packed_length(const bcmolt_xgpon_onu_onu_enable_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_onu_onu_enable_completed_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_enable_completed_data_unpack(bcmolt_xgpon_onu_onu_enable_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_onu_onu_enable_completed_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_enable_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_onu_onu_enable_completed_data is out 
+ * of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_enable_completed_data_bounds_check(const bcmolt_xgpon_onu_onu_enable_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_onu_enable_completed_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_onu_onu_tuning_in_completed_data struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_onu_onu_tuning_in_completed_data_set_default(bcmolt_xgpon_onu_onu_tuning_in_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_onu_onu_tuning_in_completed_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_tuning_in_completed_data_pack(const bcmolt_xgpon_onu_onu_tuning_in_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_xgpon_onu_onu_tuning_in_completed_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_onu_tuning_in_completed_data_get_packed_length(const bcmolt_xgpon_onu_onu_tuning_in_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_onu_onu_tuning_in_completed_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_tuning_in_completed_data_unpack(bcmolt_xgpon_onu_onu_tuning_in_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_onu_onu_tuning_in_completed_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_tuning_in_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_onu_onu_tuning_in_completed_data is 
+ * out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_tuning_in_completed_data_bounds_check(const bcmolt_xgpon_onu_onu_tuning_in_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_onu_tuning_in_completed_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_onu_onu_tuning_out_completed_data struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_onu_onu_tuning_out_completed_data_set_default(bcmolt_xgpon_onu_onu_tuning_out_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_onu_onu_tuning_out_completed_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_tuning_out_completed_data_pack(const bcmolt_xgpon_onu_onu_tuning_out_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_xgpon_onu_onu_tuning_out_completed_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_onu_tuning_out_completed_data_get_packed_length(const bcmolt_xgpon_onu_onu_tuning_out_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_onu_onu_tuning_out_completed_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_tuning_out_completed_data_unpack(bcmolt_xgpon_onu_onu_tuning_out_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_onu_onu_tuning_out_completed_data struct 
+ * and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_tuning_out_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_onu_onu_tuning_out_completed_data is 
+ * out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_tuning_out_completed_data_bounds_check(const bcmolt_xgpon_onu_onu_tuning_out_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_onu_tuning_out_completed_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_onu_possible_drift_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_onu_possible_drift_data_set_default(bcmolt_xgpon_onu_possible_drift_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_onu_possible_drift_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_possible_drift_data_pack(const bcmolt_xgpon_onu_possible_drift_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_onu_possible_drift_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_possible_drift_data_get_packed_length(const bcmolt_xgpon_onu_possible_drift_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_onu_possible_drift_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_possible_drift_data_unpack(bcmolt_xgpon_onu_possible_drift_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_onu_possible_drift_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_possible_drift_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_onu_possible_drift_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_possible_drift_data_bounds_check(const bcmolt_xgpon_onu_possible_drift_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_possible_drift_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_onu_power_consumption_report_data struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_onu_power_consumption_report_data_set_default(bcmolt_xgpon_onu_power_consumption_report_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_onu_power_consumption_report_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_power_consumption_report_data_pack(const bcmolt_xgpon_onu_power_consumption_report_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_xgpon_onu_power_consumption_report_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_power_consumption_report_data_get_packed_length(const bcmolt_xgpon_onu_power_consumption_report_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_onu_power_consumption_report_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_power_consumption_report_data_unpack(bcmolt_xgpon_onu_power_consumption_report_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_onu_power_consumption_report_data struct 
+ * and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_power_consumption_report_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_onu_power_consumption_report_data is 
+ * out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_power_consumption_report_data_bounds_check(const bcmolt_xgpon_onu_power_consumption_report_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_power_consumption_report_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_onu_power_level_report_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_onu_power_level_report_data_set_default(bcmolt_xgpon_onu_power_level_report_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_onu_power_level_report_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_power_level_report_data_pack(const bcmolt_xgpon_onu_power_level_report_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_onu_power_level_report_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_power_level_report_data_get_packed_length(const bcmolt_xgpon_onu_power_level_report_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_onu_power_level_report_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_power_level_report_data_unpack(bcmolt_xgpon_onu_power_level_report_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_onu_power_level_report_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_power_level_report_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_onu_power_level_report_data is out 
+ * of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_power_level_report_data_bounds_check(const bcmolt_xgpon_onu_power_level_report_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_power_level_report_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_onu_power_management_state_change_data struct.  
+ * This sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_onu_power_management_state_change_data_set_default(bcmolt_xgpon_onu_power_management_state_change_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_onu_power_management_state_change_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_power_management_state_change_data_pack(const bcmolt_xgpon_onu_power_management_state_change_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_xgpon_onu_power_management_state_change_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_power_management_state_change_data_get_packed_length(const bcmolt_xgpon_onu_power_management_state_change_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_onu_power_management_state_change_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_power_management_state_change_data_unpack(bcmolt_xgpon_onu_power_management_state_change_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_onu_power_management_state_change_data 
+ * struct and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_power_management_state_change_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the 
+ * bcmolt_xgpon_onu_power_management_state_change_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_power_management_state_change_data_bounds_check(const bcmolt_xgpon_onu_power_management_state_change_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_power_management_state_change_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_onu_pqsi_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_onu_pqsi_data_set_default(bcmolt_xgpon_onu_pqsi_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_onu_pqsi_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_pqsi_data_pack(const bcmolt_xgpon_onu_pqsi_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_onu_pqsi_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_pqsi_data_get_packed_length(const bcmolt_xgpon_onu_pqsi_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_onu_pqsi_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_pqsi_data_unpack(bcmolt_xgpon_onu_pqsi_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_onu_pqsi_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_pqsi_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_onu_pqsi_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_pqsi_data_bounds_check(const bcmolt_xgpon_onu_pqsi_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_pqsi_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_onu_ranging_completed_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_onu_ranging_completed_data_set_default(bcmolt_xgpon_onu_ranging_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_onu_ranging_completed_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_ranging_completed_data_pack(const bcmolt_xgpon_onu_ranging_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_onu_ranging_completed_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_ranging_completed_data_get_packed_length(const bcmolt_xgpon_onu_ranging_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_onu_ranging_completed_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_ranging_completed_data_unpack(bcmolt_xgpon_onu_ranging_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_onu_ranging_completed_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_ranging_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_onu_ranging_completed_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_ranging_completed_data_bounds_check(const bcmolt_xgpon_onu_ranging_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_ranging_completed_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_onu_registration_id_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_onu_registration_id_data_set_default(bcmolt_xgpon_onu_registration_id_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_onu_registration_id_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_registration_id_data_pack(const bcmolt_xgpon_onu_registration_id_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_onu_registration_id_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_registration_id_data_get_packed_length(const bcmolt_xgpon_onu_registration_id_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_onu_registration_id_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_registration_id_data_unpack(bcmolt_xgpon_onu_registration_id_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_onu_registration_id_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_registration_id_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_onu_registration_id_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_registration_id_data_bounds_check(const bcmolt_xgpon_onu_registration_id_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_registration_id_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_onu_rssi_measurement_completed_data struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_onu_rssi_measurement_completed_data_set_default(bcmolt_xgpon_onu_rssi_measurement_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_onu_rssi_measurement_completed_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_rssi_measurement_completed_data_pack(const bcmolt_xgpon_onu_rssi_measurement_completed_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_xgpon_onu_rssi_measurement_completed_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_rssi_measurement_completed_data_get_packed_length(const bcmolt_xgpon_onu_rssi_measurement_completed_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_onu_rssi_measurement_completed_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_rssi_measurement_completed_data_unpack(bcmolt_xgpon_onu_rssi_measurement_completed_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_onu_rssi_measurement_completed_data struct 
+ * and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_rssi_measurement_completed_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_onu_rssi_measurement_completed_data 
+ * is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_rssi_measurement_completed_data_bounds_check(const bcmolt_xgpon_onu_rssi_measurement_completed_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_rssi_measurement_completed_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_onu_sdi_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_onu_sdi_data_set_default(bcmolt_xgpon_onu_sdi_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_onu_sdi_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_sdi_data_pack(const bcmolt_xgpon_onu_sdi_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_onu_sdi_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_sdi_data_get_packed_length(const bcmolt_xgpon_onu_sdi_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_onu_sdi_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_sdi_data_unpack(bcmolt_xgpon_onu_sdi_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_onu_sdi_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_sdi_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_onu_sdi_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_sdi_data_bounds_check(const bcmolt_xgpon_onu_sdi_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_sdi_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_onu_secure_mutual_authentication_failure_data 
+ * struct.  This sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_onu_secure_mutual_authentication_failure_data_set_default(bcmolt_xgpon_onu_secure_mutual_authentication_failure_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_onu_secure_mutual_authentication_failure_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_secure_mutual_authentication_failure_data_pack(const bcmolt_xgpon_onu_secure_mutual_authentication_failure_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_xgpon_onu_secure_mutual_authentication_failure_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_secure_mutual_authentication_failure_data_get_packed_length(const bcmolt_xgpon_onu_secure_mutual_authentication_failure_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_onu_secure_mutual_authentication_failure_data from 
+ * bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_secure_mutual_authentication_failure_data_unpack(bcmolt_xgpon_onu_secure_mutual_authentication_failure_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed 
+ * bcmolt_xgpon_onu_secure_mutual_authentication_failure_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_secure_mutual_authentication_failure_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the 
+ * bcmolt_xgpon_onu_secure_mutual_authentication_failure_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_secure_mutual_authentication_failure_data_bounds_check(const bcmolt_xgpon_onu_secure_mutual_authentication_failure_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_secure_mutual_authentication_failure_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_onu_sfi_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_onu_sfi_data_set_default(bcmolt_xgpon_onu_sfi_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_onu_sfi_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_sfi_data_pack(const bcmolt_xgpon_onu_sfi_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_onu_sfi_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_sfi_data_get_packed_length(const bcmolt_xgpon_onu_sfi_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_onu_sfi_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_sfi_data_unpack(bcmolt_xgpon_onu_sfi_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_onu_sfi_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_sfi_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_onu_sfi_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_sfi_data_bounds_check(const bcmolt_xgpon_onu_sfi_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_sfi_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_onu_stat_alarm_cleared_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_onu_stat_alarm_cleared_data_set_default(bcmolt_xgpon_onu_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_onu_stat_alarm_cleared_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_stat_alarm_cleared_data_pack(const bcmolt_xgpon_onu_stat_alarm_cleared_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_onu_stat_alarm_cleared_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_stat_alarm_cleared_data_get_packed_length(const bcmolt_xgpon_onu_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_onu_stat_alarm_cleared_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_stat_alarm_cleared_data_unpack(bcmolt_xgpon_onu_stat_alarm_cleared_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_onu_stat_alarm_cleared_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_stat_alarm_cleared_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_onu_stat_alarm_cleared_data is out 
+ * of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_stat_alarm_cleared_data_bounds_check(const bcmolt_xgpon_onu_stat_alarm_cleared_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_stat_alarm_cleared_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_onu_stat_alarm_raised_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_onu_stat_alarm_raised_data_set_default(bcmolt_xgpon_onu_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_onu_stat_alarm_raised_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_stat_alarm_raised_data_pack(const bcmolt_xgpon_onu_stat_alarm_raised_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_onu_stat_alarm_raised_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_stat_alarm_raised_data_get_packed_length(const bcmolt_xgpon_onu_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_onu_stat_alarm_raised_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_stat_alarm_raised_data_unpack(bcmolt_xgpon_onu_stat_alarm_raised_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_onu_stat_alarm_raised_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_stat_alarm_raised_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_onu_stat_alarm_raised_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_stat_alarm_raised_data_bounds_check(const bcmolt_xgpon_onu_stat_alarm_raised_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_stat_alarm_raised_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_onu_sufi_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_onu_sufi_data_set_default(bcmolt_xgpon_onu_sufi_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_onu_sufi_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_sufi_data_pack(const bcmolt_xgpon_onu_sufi_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_onu_sufi_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_sufi_data_get_packed_length(const bcmolt_xgpon_onu_sufi_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_onu_sufi_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_sufi_data_unpack(bcmolt_xgpon_onu_sufi_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_onu_sufi_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_sufi_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_onu_sufi_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_sufi_data_bounds_check(const bcmolt_xgpon_onu_sufi_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_sufi_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_onu_tiwi_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_onu_tiwi_data_set_default(bcmolt_xgpon_onu_tiwi_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_onu_tiwi_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_tiwi_data_pack(const bcmolt_xgpon_onu_tiwi_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_onu_tiwi_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_tiwi_data_get_packed_length(const bcmolt_xgpon_onu_tiwi_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_onu_tiwi_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_tiwi_data_unpack(bcmolt_xgpon_onu_tiwi_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_onu_tiwi_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_tiwi_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_onu_tiwi_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_tiwi_data_bounds_check(const bcmolt_xgpon_onu_tiwi_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_tiwi_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_onu_tuning_response_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_onu_tuning_response_data_set_default(bcmolt_xgpon_onu_tuning_response_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_onu_tuning_response_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_tuning_response_data_pack(const bcmolt_xgpon_onu_tuning_response_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_onu_tuning_response_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_tuning_response_data_get_packed_length(const bcmolt_xgpon_onu_tuning_response_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_onu_tuning_response_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_tuning_response_data_unpack(bcmolt_xgpon_onu_tuning_response_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_onu_tuning_response_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_tuning_response_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_onu_tuning_response_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_tuning_response_data_bounds_check(const bcmolt_xgpon_onu_tuning_response_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_tuning_response_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_onu_auto_cfg_data struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_onu_auto_cfg_data_set_default(bcmolt_xgpon_onu_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_onu_auto_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_auto_cfg_data_pack(const bcmolt_xgpon_onu_auto_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_onu_auto_cfg_data would occupy 
+ * on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_auto_cfg_data_get_packed_length(const bcmolt_xgpon_onu_auto_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_onu_auto_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_auto_cfg_data_unpack(bcmolt_xgpon_onu_auto_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_onu_auto_cfg_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_auto_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_onu_auto_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_auto_cfg_data_bounds_check(const bcmolt_xgpon_onu_auto_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_auto_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_onu_adjust_tx_wavelength_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_onu_adjust_tx_wavelength_data_set_default(bcmolt_xgpon_onu_adjust_tx_wavelength_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_onu_adjust_tx_wavelength_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_adjust_tx_wavelength_data_pack(const bcmolt_xgpon_onu_adjust_tx_wavelength_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_onu_adjust_tx_wavelength_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_adjust_tx_wavelength_data_get_packed_length(const bcmolt_xgpon_onu_adjust_tx_wavelength_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_onu_adjust_tx_wavelength_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_adjust_tx_wavelength_data_unpack(bcmolt_xgpon_onu_adjust_tx_wavelength_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_onu_adjust_tx_wavelength_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_adjust_tx_wavelength_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_onu_adjust_tx_wavelength_data is out 
+ * of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_adjust_tx_wavelength_data_bounds_check(const bcmolt_xgpon_onu_adjust_tx_wavelength_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_adjust_tx_wavelength_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_onu_change_power_levelling_data struct.  This 
+ * sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_onu_change_power_levelling_data_set_default(bcmolt_xgpon_onu_change_power_levelling_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_onu_change_power_levelling_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_change_power_levelling_data_pack(const bcmolt_xgpon_onu_change_power_levelling_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_onu_change_power_levelling_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_change_power_levelling_data_get_packed_length(const bcmolt_xgpon_onu_change_power_levelling_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_onu_change_power_levelling_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_change_power_levelling_data_unpack(bcmolt_xgpon_onu_change_power_levelling_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_onu_change_power_levelling_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_change_power_levelling_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_onu_change_power_levelling_data is 
+ * out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_change_power_levelling_data_bounds_check(const bcmolt_xgpon_onu_change_power_levelling_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_change_power_levelling_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_onu_onu_tuning_out_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_onu_onu_tuning_out_data_set_default(bcmolt_xgpon_onu_onu_tuning_out_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_onu_onu_tuning_out_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_tuning_out_data_pack(const bcmolt_xgpon_onu_onu_tuning_out_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_onu_onu_tuning_out_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_onu_tuning_out_data_get_packed_length(const bcmolt_xgpon_onu_onu_tuning_out_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_onu_onu_tuning_out_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_tuning_out_data_unpack(bcmolt_xgpon_onu_onu_tuning_out_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_onu_onu_tuning_out_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_tuning_out_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_onu_onu_tuning_out_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_onu_tuning_out_data_bounds_check(const bcmolt_xgpon_onu_onu_tuning_out_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_onu_tuning_out_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_onu_request_registration_data struct.  This sets 
+ * all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_onu_request_registration_data_set_default(bcmolt_xgpon_onu_request_registration_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_onu_request_registration_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_request_registration_data_pack(const bcmolt_xgpon_onu_request_registration_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_onu_request_registration_data 
+ * would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_request_registration_data_get_packed_length(const bcmolt_xgpon_onu_request_registration_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_onu_request_registration_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_request_registration_data_unpack(bcmolt_xgpon_onu_request_registration_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_onu_request_registration_data struct and 
+ * collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_request_registration_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_onu_request_registration_data is out 
+ * of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_request_registration_data_bounds_check(const bcmolt_xgpon_onu_request_registration_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_request_registration_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_onu_secure_mutual_authentication_data struct.  
+ * This sets all fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_onu_secure_mutual_authentication_data_set_default(bcmolt_xgpon_onu_secure_mutual_authentication_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_onu_secure_mutual_authentication_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_secure_mutual_authentication_data_pack(const bcmolt_xgpon_onu_secure_mutual_authentication_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a 
+ * bcmolt_xgpon_onu_secure_mutual_authentication_data would occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_secure_mutual_authentication_data_get_packed_length(const bcmolt_xgpon_onu_secure_mutual_authentication_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_onu_secure_mutual_authentication_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_secure_mutual_authentication_data_unpack(bcmolt_xgpon_onu_secure_mutual_authentication_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_onu_secure_mutual_authentication_data 
+ * struct and collects memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_secure_mutual_authentication_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the 
+ * bcmolt_xgpon_onu_secure_mutual_authentication_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_secure_mutual_authentication_data_bounds_check(const bcmolt_xgpon_onu_secure_mutual_authentication_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_secure_mutual_authentication_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_onu_set_onu_state_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_onu_set_onu_state_data_set_default(bcmolt_xgpon_onu_set_onu_state_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_onu_set_onu_state_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_set_onu_state_data_pack(const bcmolt_xgpon_onu_set_onu_state_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_onu_set_onu_state_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_set_onu_state_data_get_packed_length(const bcmolt_xgpon_onu_set_onu_state_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_onu_set_onu_state_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_set_onu_state_data_unpack(bcmolt_xgpon_onu_set_onu_state_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_onu_set_onu_state_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_set_onu_state_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_onu_set_onu_state_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_set_onu_state_data_bounds_check(const bcmolt_xgpon_onu_set_onu_state_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_set_onu_state_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_onu_cpu_packets_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_onu_cpu_packets_data_set_default(bcmolt_xgpon_onu_cpu_packets_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_onu_cpu_packets_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_cpu_packets_data_pack(const bcmolt_xgpon_onu_cpu_packets_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_onu_cpu_packets_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_cpu_packets_data_get_packed_length(const bcmolt_xgpon_onu_cpu_packets_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_onu_cpu_packets_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_cpu_packets_data_unpack(bcmolt_xgpon_onu_cpu_packets_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_onu_cpu_packets_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_cpu_packets_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_onu_cpu_packets_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_cpu_packets_data_bounds_check(const bcmolt_xgpon_onu_cpu_packets_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_cpu_packets_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_onu_ploam_packet_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_onu_ploam_packet_data_set_default(bcmolt_xgpon_onu_ploam_packet_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_onu_ploam_packet_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_ploam_packet_data_pack(const bcmolt_xgpon_onu_ploam_packet_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_onu_ploam_packet_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_ploam_packet_data_get_packed_length(const bcmolt_xgpon_onu_ploam_packet_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_onu_ploam_packet_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_ploam_packet_data_unpack(bcmolt_xgpon_onu_ploam_packet_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_onu_ploam_packet_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_ploam_packet_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_onu_ploam_packet_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_ploam_packet_data_bounds_check(const bcmolt_xgpon_onu_ploam_packet_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_ploam_packet_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_onu_cpu_packet_data struct.  This sets all fields 
+ * to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_onu_cpu_packet_data_set_default(bcmolt_xgpon_onu_cpu_packet_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_onu_cpu_packet_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_cpu_packet_data_pack(const bcmolt_xgpon_onu_cpu_packet_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_onu_cpu_packet_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_cpu_packet_data_get_packed_length(const bcmolt_xgpon_onu_cpu_packet_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_onu_cpu_packet_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_cpu_packet_data_unpack(bcmolt_xgpon_onu_cpu_packet_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_onu_cpu_packet_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_cpu_packet_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_onu_cpu_packet_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_cpu_packet_data_bounds_check(const bcmolt_xgpon_onu_cpu_packet_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_cpu_packet_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_onu_omci_packet_data struct.  This sets all 
+ * fields to default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_onu_omci_packet_data_set_default(bcmolt_xgpon_onu_omci_packet_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_onu_omci_packet_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_omci_packet_data_pack(const bcmolt_xgpon_onu_omci_packet_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_onu_omci_packet_data would 
+ * occupy on the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_onu_omci_packet_data_get_packed_length(const bcmolt_xgpon_onu_omci_packet_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_onu_omci_packet_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_omci_packet_data_unpack(bcmolt_xgpon_onu_omci_packet_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_onu_omci_packet_data struct and collects 
+ * memory requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_onu_omci_packet_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_onu_omci_packet_data is out of 
+ * bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_onu_omci_packet_data_bounds_check(const bcmolt_xgpon_onu_omci_packet_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_onu_omci_packet_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_trx_key struct.  This sets all fields to default 
+ * values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_trx_key_set_default(bcmolt_xgpon_trx_key *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_trx_key to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_trx_key_pack(const bcmolt_xgpon_trx_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_trx_key would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_trx_key_get_packed_length(const bcmolt_xgpon_trx_key *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_trx_key from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_trx_key_unpack(bcmolt_xgpon_trx_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_trx_key struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_trx_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_trx_key is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_trx_key_bounds_check(const bcmolt_xgpon_trx_key *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_trx_key_id *failed_prop);
+
+/** Initializes a bcmolt_xgpon_trx_cfg_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xgpon_trx_cfg_data_set_default(bcmolt_xgpon_trx_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xgpon_trx_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_trx_cfg_data_pack(const bcmolt_xgpon_trx_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xgpon_trx_cfg_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xgpon_trx_cfg_data_get_packed_length(const bcmolt_xgpon_trx_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xgpon_trx_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_trx_cfg_data_unpack(bcmolt_xgpon_trx_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xgpon_trx_cfg_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xgpon_trx_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xgpon_trx_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xgpon_trx_cfg_data_bounds_check(const bcmolt_xgpon_trx_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_xgpon_trx_cfg_id *failed_prop);
+
+/** Initializes a bcmolt_xpon_serdes_key struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xpon_serdes_key_set_default(bcmolt_xpon_serdes_key *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xpon_serdes_key to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xpon_serdes_key_pack(const bcmolt_xpon_serdes_key *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xpon_serdes_key would occupy on the 
+ * wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xpon_serdes_key_get_packed_length(const bcmolt_xpon_serdes_key *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xpon_serdes_key from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xpon_serdes_key_unpack(bcmolt_xpon_serdes_key *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xpon_serdes_key struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xpon_serdes_key_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xpon_serdes_key is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xpon_serdes_key_bounds_check(const bcmolt_xpon_serdes_key *this, bcmolt_presence_mask fields_present, bcmolt_xpon_serdes_key_id *failed_prop);
+
+/** Initializes a bcmolt_xpon_serdes_cfg_data struct.  This sets all fields to 
+ * default values. 
+ *
+ * \param this Pointer to the structure 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ */
+void bcmolt_xpon_serdes_cfg_data_set_default(bcmolt_xpon_serdes_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Packs a bcmolt_xpon_serdes_cfg_data to bytes 
+ *
+ * \param this Pointer to the object to pack 
+ * \param buf Pointer to the buffer to write to 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the pack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xpon_serdes_cfg_data_pack(const bcmolt_xpon_serdes_cfg_data *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+
+/** Gets the number of bytes that a bcmolt_xpon_serdes_cfg_data would occupy on 
+ * the wire 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return The structure size in bytes 
+ */
+uint32_t bcmolt_xpon_serdes_cfg_data_get_packed_length(const bcmolt_xpon_serdes_cfg_data *this, bcmolt_presence_mask fields_present);
+
+/** Unpacks a bcmolt_xpon_serdes_cfg_data from bytes 
+ *
+ * \param this Pointer to the object to unpack 
+ * \param buf Pointer to the buffer to read from 
+ * \param extra_mem Pointer to the first location in memory to use to store 
+ * pointer fields that are NULL.  Setting this to NULL will cause an error when 
+ * a NULL pointer is encountered. 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE if the unpack was successful, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xpon_serdes_cfg_data_unpack(bcmolt_xpon_serdes_cfg_data *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+
+/** Scans past a packed bcmolt_xpon_serdes_cfg_data struct and collects memory 
+ * requirements above and beyond sizeof() 
+ *
+ * \param packed A stream pointing to the packed byte stream 
+ * \param extra_mem Number of additional storage bytes required 
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \return TRUE on success, FALSE on failure 
+ */
+bcmos_bool bcmolt_xpon_serdes_cfg_data_scan(bcmolt_buf *packed, uint32_t *extra_mem, bcmolt_presence_mask fields_present);
+
+/** Checks if any field in the bcmolt_xpon_serdes_cfg_data is out of bounds 
+ *
+ * \param fields_present Bitmask of which fields are present in the structure. 
+ * \param failed_prop Reference to the property that was out of range (only set 
+ * on failure) 
+ * \return TRUE if all fields are in the correct range, FALSE otherwise 
+ */
+bcmos_bool bcmolt_xpon_serdes_cfg_data_bounds_check(const bcmolt_xpon_serdes_cfg_data *this, bcmolt_presence_mask fields_present, bcmolt_xpon_serdes_cfg_id *failed_prop);
+
+/* Maple device selected as a target for CLI commands */
+extern bcmolt_devid current_device;
+
+/** Set system mode
+ * \param[in]  dev            Device id
+ * \param[in]  system_mode    System mode
+ * \returns BCM_ERR_OK, BCM_ERR_NOT_SUPPORTED
+ */
+bcmos_errno bcmolt_system_mode_set(bcmolt_devid dev, bcmolt_system_mode system_mode);
+
+/** Get system mode
+ * \param[in]  dev            Device id
+ * \param[in]  system_mode    System mode
+ * \returns BCM_ERR_OK
+ */
+bcmos_errno bcmolt_system_mode_get(bcmolt_devid dev, bcmolt_system_mode *system_mode);
+
+/** Checks if objects with the given tag are valid in the given system mode. */
+bcmos_bool bcmolt_obj_tag_valid_for_system_mode(bcmolt_system_mode system_mode, bcmolt_obj_tag tag);
+
+/** Checks if the given object is supported in the given system mode.
+ * \param[in] system_mode System mode
+ * \param[in] obj         Object ID
+ * \return true if the object is supported in the given system mode, false otherwise.
+ */
+bcmos_bool bcmolt_object_is_supported(bcmolt_system_mode system_mode, bcmolt_obj_id obj);
+
+/** Gets the name of the given system mode as a string. */
+const char *bcmolt_system_mode_name(bcmolt_system_mode mode);
+
+/** Set xgpon num of onus
+ * \param[in]  dev            Device id
+ * \param[in]  xgpon_num_of_onus    XGPON num of onus
+ * \returns BCM_ERR_OK, BCM_ERR_NOT_SUPPORTED
+ */
+bcmos_errno bcmolt_xgpon_num_of_onus_set(bcmolt_devid dev, bcmolt_xgpon_num_of_onus xgpon_num_of_onus);
+
+/** Get xgpon num of onus
+ * \param[in]  dev            Device id
+ * \param[in]  xgpon_num_of_onus    XGPON num of onus
+ * \returns BCM_ERR_OK
+ */
+bcmos_errno bcmolt_xgpon_num_of_onus_get(bcmolt_devid dev, bcmolt_xgpon_num_of_onus *xgpon_num_of_onus);
+#endif /* BCMOLT_MODEL_TYPES_H_ */
diff --git a/bcm68620_release/release/host_driver/model/bcmolt_msg_pack.c b/bcm68620_release/release/host_driver/model/bcmolt_msg_pack.c
new file mode 100644
index 0000000..b417f95
--- /dev/null
+++ b/bcm68620_release/release/host_driver/model/bcmolt_msg_pack.c
@@ -0,0 +1,2145 @@
+/*
+<:copyright-BRCM:2016:proprietary:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+This program is the proprietary software of Broadcom Corporation and/or its
+licensors, and may only be used, duplicated, modified or distributed pursuant
+to the terms and conditions of a separate, written license agreement executed
+between you and Broadcom (an "Authorized License").  Except as set forth in
+an Authorized License, Broadcom grants no license (express or implied), right
+to use, or waiver of any kind with respect to the Software, and Broadcom
+expressly reserves all rights in and to the Software and all intellectual
+property rights therein.  IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE
+NO RIGHT TO USE THIS SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY
+BROADCOM AND DISCONTINUE ALL USE OF THE SOFTWARE.
+
+Except as expressly set forth in the Authorized License,
+
+1. This program, including its structure, sequence and organization,
+    constitutes the valuable trade secrets of Broadcom, and you shall use
+    all reasonable efforts to protect the confidentiality thereof, and to
+    use this information only in connection with your use of Broadcom
+    integrated circuit products.
+
+2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
+    AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, REPRESENTATIONS OR
+    WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH
+    RESPECT TO THE SOFTWARE.  BROADCOM SPECIFICALLY DISCLAIMS ANY AND
+    ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, NONINFRINGEMENT,
+    FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, ACCURACY OR
+    COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR CORRESPONDENCE
+    TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT OF USE OR
+    PERFORMANCE OF THE SOFTWARE.
+
+3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR
+    ITS LICENSORS BE LIABLE FOR (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL,
+    INDIRECT, OR EXEMPLARY DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY
+    WAY RELATING TO YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN
+    IF BROADCOM HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES;
+    OR (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE
+    SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE LIMITATIONS
+    SHALL APPLY NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF ANY
+    LIMITED REMEDY.
+:>
+*/
+#include <bcmolt_buf.h>
+#include <bcmolt_msg.h>
+#include "bcmolt_msg_pack.h"
+
+typedef uint32_t (*bcmolt_func_packed_len) (void *this, bcmolt_presence_mask fields_present);
+typedef bcmos_bool (*bcmolt_func_pack) (void *this, bcmolt_buf *buf, bcmolt_presence_mask fields_present);
+typedef bcmos_bool (*bcmolt_func_unpack) (void *this, bcmolt_buf *buf, void **extra_mem, bcmolt_presence_mask fields_present);
+typedef bcmos_bool (*bcmolt_func_mem_scan) (bcmolt_buf * buf, uint32_t * extra_mem, bcmolt_presence_mask fields_present);
+
+/******************************************************************************/
+typedef struct bcmolt_group_info
+{
+    bcmolt_obj_id obj_type;
+    bcmolt_mgt_group group;
+    uint16_t subgroup;
+    uint32_t size;
+    uint32_t container_size;    /* sizeof() the key/data container struct (0 for key groups) */
+    uint32_t data_offset;       /* offsetof() data field within container struct (0 for key groups) */
+    bcmolt_func_packed_len get_packed_length;
+    bcmolt_func_pack pack;
+    bcmolt_func_unpack unpack;
+    bcmolt_func_mem_scan mem_scan;
+} bcmolt_group_info;
+
+/******************************************************************************/
+typedef struct bcmolt_group_ids
+{
+    uint32_t subgroup_count;
+    bcmolt_group_id *subgroup_ids;
+} bcmolt_group_ids;
+
+/******************************************************************************/
+typedef struct bcmolt_instance_info
+{
+    int8_t offset;
+    int8_t size;
+} bcmolt_instance_info;
+
+/******************************************************************************/
+static bcmolt_group_info group_info_ae_ni_key = { BCMOLT_OBJ_ID_AE_NI, BCMOLT_MGT_GROUP_KEY, 0, sizeof(bcmolt_ae_ni_key), 0, 0, (bcmolt_func_packed_len) bcmolt_ae_ni_key_get_packed_length, (bcmolt_func_pack) bcmolt_ae_ni_key_pack, (bcmolt_func_unpack) bcmolt_ae_ni_key_unpack, bcmolt_ae_ni_key_scan };
+static bcmolt_group_info group_info_ae_ni_cfg = { BCMOLT_OBJ_ID_AE_NI, BCMOLT_MGT_GROUP_CFG, 0, sizeof(bcmolt_ae_ni_cfg_data), sizeof(bcmolt_ae_ni_cfg), offsetof(bcmolt_ae_ni_cfg, data), (bcmolt_func_packed_len) bcmolt_ae_ni_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_ae_ni_cfg_data_pack, (bcmolt_func_unpack) bcmolt_ae_ni_cfg_data_unpack, bcmolt_ae_ni_cfg_data_scan };
+static bcmolt_group_info group_info_ae_ni_set_ae_ni_en_state = { BCMOLT_OBJ_ID_AE_NI, BCMOLT_MGT_GROUP_OPER, 0, sizeof(bcmolt_ae_ni_set_ae_ni_en_state_data), sizeof(bcmolt_ae_ni_set_ae_ni_en_state), offsetof(bcmolt_ae_ni_set_ae_ni_en_state, data), (bcmolt_func_packed_len) bcmolt_ae_ni_set_ae_ni_en_state_data_get_packed_length, (bcmolt_func_pack) bcmolt_ae_ni_set_ae_ni_en_state_data_pack, (bcmolt_func_unpack) bcmolt_ae_ni_set_ae_ni_en_state_data_unpack, bcmolt_ae_ni_set_ae_ni_en_state_data_scan };
+static bcmolt_group_info group_info_ae_path_ds_key = { BCMOLT_OBJ_ID_AE_PATH_DS, BCMOLT_MGT_GROUP_KEY, 0, sizeof(bcmolt_ae_path_ds_key), 0, 0, (bcmolt_func_packed_len) bcmolt_ae_path_ds_key_get_packed_length, (bcmolt_func_pack) bcmolt_ae_path_ds_key_pack, (bcmolt_func_unpack) bcmolt_ae_path_ds_key_unpack, bcmolt_ae_path_ds_key_scan };
+static bcmolt_group_info group_info_ae_path_ds_stat = { BCMOLT_OBJ_ID_AE_PATH_DS, BCMOLT_MGT_GROUP_STAT, 0, sizeof(bcmolt_ae_path_ds_stat_data), sizeof(bcmolt_ae_path_ds_stat), offsetof(bcmolt_ae_path_ds_stat, data), (bcmolt_func_packed_len) bcmolt_ae_path_ds_stat_data_get_packed_length, (bcmolt_func_pack) bcmolt_ae_path_ds_stat_data_pack, (bcmolt_func_unpack) bcmolt_ae_path_ds_stat_data_unpack, bcmolt_ae_path_ds_stat_data_scan };
+static bcmolt_group_info group_info_ae_path_ds_stat_cfg = { BCMOLT_OBJ_ID_AE_PATH_DS, BCMOLT_MGT_GROUP_STAT_CFG, 0, sizeof(bcmolt_ae_path_ds_stat_cfg_data), sizeof(bcmolt_ae_path_ds_stat_cfg), offsetof(bcmolt_ae_path_ds_stat_cfg, data), (bcmolt_func_packed_len) bcmolt_ae_path_ds_stat_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_ae_path_ds_stat_cfg_data_pack, (bcmolt_func_unpack) bcmolt_ae_path_ds_stat_cfg_data_unpack, bcmolt_ae_path_ds_stat_cfg_data_scan };
+static bcmolt_group_info group_info_ae_path_ds_stat_alarm_cleared = { BCMOLT_OBJ_ID_AE_PATH_DS, BCMOLT_MGT_GROUP_AUTO, 0, sizeof(bcmolt_ae_path_ds_stat_alarm_cleared_data), sizeof(bcmolt_ae_path_ds_stat_alarm_cleared), offsetof(bcmolt_ae_path_ds_stat_alarm_cleared, data), (bcmolt_func_packed_len) bcmolt_ae_path_ds_stat_alarm_cleared_data_get_packed_length, (bcmolt_func_pack) bcmolt_ae_path_ds_stat_alarm_cleared_data_pack, (bcmolt_func_unpack) bcmolt_ae_path_ds_stat_alarm_cleared_data_unpack, bcmolt_ae_path_ds_stat_alarm_cleared_data_scan };
+static bcmolt_group_info group_info_ae_path_ds_stat_alarm_raised = { BCMOLT_OBJ_ID_AE_PATH_DS, BCMOLT_MGT_GROUP_AUTO, 1, sizeof(bcmolt_ae_path_ds_stat_alarm_raised_data), sizeof(bcmolt_ae_path_ds_stat_alarm_raised), offsetof(bcmolt_ae_path_ds_stat_alarm_raised, data), (bcmolt_func_packed_len) bcmolt_ae_path_ds_stat_alarm_raised_data_get_packed_length, (bcmolt_func_pack) bcmolt_ae_path_ds_stat_alarm_raised_data_pack, (bcmolt_func_unpack) bcmolt_ae_path_ds_stat_alarm_raised_data_unpack, bcmolt_ae_path_ds_stat_alarm_raised_data_scan };
+static bcmolt_group_info group_info_ae_path_ds_auto_cfg = { BCMOLT_OBJ_ID_AE_PATH_DS, BCMOLT_MGT_GROUP_AUTO_CFG, 0, sizeof(bcmolt_ae_path_ds_auto_cfg_data), sizeof(bcmolt_ae_path_ds_auto_cfg), offsetof(bcmolt_ae_path_ds_auto_cfg, data), (bcmolt_func_packed_len) bcmolt_ae_path_ds_auto_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_ae_path_ds_auto_cfg_data_pack, (bcmolt_func_unpack) bcmolt_ae_path_ds_auto_cfg_data_unpack, bcmolt_ae_path_ds_auto_cfg_data_scan };
+static bcmolt_group_info group_info_ae_path_us_key = { BCMOLT_OBJ_ID_AE_PATH_US, BCMOLT_MGT_GROUP_KEY, 0, sizeof(bcmolt_ae_path_us_key), 0, 0, (bcmolt_func_packed_len) bcmolt_ae_path_us_key_get_packed_length, (bcmolt_func_pack) bcmolt_ae_path_us_key_pack, (bcmolt_func_unpack) bcmolt_ae_path_us_key_unpack, bcmolt_ae_path_us_key_scan };
+static bcmolt_group_info group_info_ae_path_us_stat = { BCMOLT_OBJ_ID_AE_PATH_US, BCMOLT_MGT_GROUP_STAT, 0, sizeof(bcmolt_ae_path_us_stat_data), sizeof(bcmolt_ae_path_us_stat), offsetof(bcmolt_ae_path_us_stat, data), (bcmolt_func_packed_len) bcmolt_ae_path_us_stat_data_get_packed_length, (bcmolt_func_pack) bcmolt_ae_path_us_stat_data_pack, (bcmolt_func_unpack) bcmolt_ae_path_us_stat_data_unpack, bcmolt_ae_path_us_stat_data_scan };
+static bcmolt_group_info group_info_ae_path_us_stat_cfg = { BCMOLT_OBJ_ID_AE_PATH_US, BCMOLT_MGT_GROUP_STAT_CFG, 0, sizeof(bcmolt_ae_path_us_stat_cfg_data), sizeof(bcmolt_ae_path_us_stat_cfg), offsetof(bcmolt_ae_path_us_stat_cfg, data), (bcmolt_func_packed_len) bcmolt_ae_path_us_stat_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_ae_path_us_stat_cfg_data_pack, (bcmolt_func_unpack) bcmolt_ae_path_us_stat_cfg_data_unpack, bcmolt_ae_path_us_stat_cfg_data_scan };
+static bcmolt_group_info group_info_ae_path_us_stat_alarm_cleared = { BCMOLT_OBJ_ID_AE_PATH_US, BCMOLT_MGT_GROUP_AUTO, 0, sizeof(bcmolt_ae_path_us_stat_alarm_cleared_data), sizeof(bcmolt_ae_path_us_stat_alarm_cleared), offsetof(bcmolt_ae_path_us_stat_alarm_cleared, data), (bcmolt_func_packed_len) bcmolt_ae_path_us_stat_alarm_cleared_data_get_packed_length, (bcmolt_func_pack) bcmolt_ae_path_us_stat_alarm_cleared_data_pack, (bcmolt_func_unpack) bcmolt_ae_path_us_stat_alarm_cleared_data_unpack, bcmolt_ae_path_us_stat_alarm_cleared_data_scan };
+static bcmolt_group_info group_info_ae_path_us_stat_alarm_raised = { BCMOLT_OBJ_ID_AE_PATH_US, BCMOLT_MGT_GROUP_AUTO, 1, sizeof(bcmolt_ae_path_us_stat_alarm_raised_data), sizeof(bcmolt_ae_path_us_stat_alarm_raised), offsetof(bcmolt_ae_path_us_stat_alarm_raised, data), (bcmolt_func_packed_len) bcmolt_ae_path_us_stat_alarm_raised_data_get_packed_length, (bcmolt_func_pack) bcmolt_ae_path_us_stat_alarm_raised_data_pack, (bcmolt_func_unpack) bcmolt_ae_path_us_stat_alarm_raised_data_unpack, bcmolt_ae_path_us_stat_alarm_raised_data_scan };
+static bcmolt_group_info group_info_ae_path_us_auto_cfg = { BCMOLT_OBJ_ID_AE_PATH_US, BCMOLT_MGT_GROUP_AUTO_CFG, 0, sizeof(bcmolt_ae_path_us_auto_cfg_data), sizeof(bcmolt_ae_path_us_auto_cfg), offsetof(bcmolt_ae_path_us_auto_cfg, data), (bcmolt_func_packed_len) bcmolt_ae_path_us_auto_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_ae_path_us_auto_cfg_data_pack, (bcmolt_func_unpack) bcmolt_ae_path_us_auto_cfg_data_unpack, bcmolt_ae_path_us_auto_cfg_data_scan };
+static bcmolt_group_info group_info_channel_key = { BCMOLT_OBJ_ID_CHANNEL, BCMOLT_MGT_GROUP_KEY, 0, sizeof(bcmolt_channel_key), 0, 0, (bcmolt_func_packed_len) bcmolt_channel_key_get_packed_length, (bcmolt_func_pack) bcmolt_channel_key_pack, (bcmolt_func_unpack) bcmolt_channel_key_unpack, bcmolt_channel_key_scan };
+static bcmolt_group_info group_info_channel_cfg = { BCMOLT_OBJ_ID_CHANNEL, BCMOLT_MGT_GROUP_CFG, 0, sizeof(bcmolt_channel_cfg_data), sizeof(bcmolt_channel_cfg), offsetof(bcmolt_channel_cfg, data), (bcmolt_func_packed_len) bcmolt_channel_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_channel_cfg_data_pack, (bcmolt_func_unpack) bcmolt_channel_cfg_data_unpack, bcmolt_channel_cfg_data_scan };
+static bcmolt_group_info group_info_debug_key = { BCMOLT_OBJ_ID_DEBUG, BCMOLT_MGT_GROUP_KEY, 0, sizeof(bcmolt_debug_key), 0, 0, (bcmolt_func_packed_len) bcmolt_debug_key_get_packed_length, (bcmolt_func_pack) bcmolt_debug_key_pack, (bcmolt_func_unpack) bcmolt_debug_key_unpack, bcmolt_debug_key_scan };
+static bcmolt_group_info group_info_debug_cfg = { BCMOLT_OBJ_ID_DEBUG, BCMOLT_MGT_GROUP_CFG, 0, sizeof(bcmolt_debug_cfg_data), sizeof(bcmolt_debug_cfg), offsetof(bcmolt_debug_cfg, data), (bcmolt_func_packed_len) bcmolt_debug_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_debug_cfg_data_pack, (bcmolt_func_unpack) bcmolt_debug_cfg_data_unpack, bcmolt_debug_cfg_data_scan };
+static bcmolt_group_info group_info_debug_cli_output = { BCMOLT_OBJ_ID_DEBUG, BCMOLT_MGT_GROUP_AUTO, 0, sizeof(bcmolt_debug_cli_output_data), sizeof(bcmolt_debug_cli_output), offsetof(bcmolt_debug_cli_output, data), (bcmolt_func_packed_len) bcmolt_debug_cli_output_data_get_packed_length, (bcmolt_func_pack) bcmolt_debug_cli_output_data_pack, (bcmolt_func_unpack) bcmolt_debug_cli_output_data_unpack, bcmolt_debug_cli_output_data_scan };
+static bcmolt_group_info group_info_debug_file_almost_full = { BCMOLT_OBJ_ID_DEBUG, BCMOLT_MGT_GROUP_AUTO, 1, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_debug_auto_cfg = { BCMOLT_OBJ_ID_DEBUG, BCMOLT_MGT_GROUP_AUTO_CFG, 0, sizeof(bcmolt_debug_auto_cfg_data), sizeof(bcmolt_debug_auto_cfg), offsetof(bcmolt_debug_auto_cfg, data), (bcmolt_func_packed_len) bcmolt_debug_auto_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_debug_auto_cfg_data_pack, (bcmolt_func_unpack) bcmolt_debug_auto_cfg_data_unpack, bcmolt_debug_auto_cfg_data_scan };
+static bcmolt_group_info group_info_debug_cli_input = { BCMOLT_OBJ_ID_DEBUG, BCMOLT_MGT_GROUP_OPER, 0, sizeof(bcmolt_debug_cli_input_data), sizeof(bcmolt_debug_cli_input), offsetof(bcmolt_debug_cli_input, data), (bcmolt_func_packed_len) bcmolt_debug_cli_input_data_get_packed_length, (bcmolt_func_pack) bcmolt_debug_cli_input_data_pack, (bcmolt_func_unpack) bcmolt_debug_cli_input_data_unpack, bcmolt_debug_cli_input_data_scan };
+static bcmolt_group_info group_info_debug_reset_api_capture = { BCMOLT_OBJ_ID_DEBUG, BCMOLT_MGT_GROUP_OPER, 1, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_debug_start_api_capture = { BCMOLT_OBJ_ID_DEBUG, BCMOLT_MGT_GROUP_OPER, 2, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_debug_stop_api_capture = { BCMOLT_OBJ_ID_DEBUG, BCMOLT_MGT_GROUP_OPER, 3, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_device_key = { BCMOLT_OBJ_ID_DEVICE, BCMOLT_MGT_GROUP_KEY, 0, sizeof(bcmolt_device_key), 0, 0, (bcmolt_func_packed_len) bcmolt_device_key_get_packed_length, (bcmolt_func_pack) bcmolt_device_key_pack, (bcmolt_func_unpack) bcmolt_device_key_unpack, bcmolt_device_key_scan };
+static bcmolt_group_info group_info_device_cfg = { BCMOLT_OBJ_ID_DEVICE, BCMOLT_MGT_GROUP_CFG, 0, sizeof(bcmolt_device_cfg_data), sizeof(bcmolt_device_cfg), offsetof(bcmolt_device_cfg, data), (bcmolt_func_packed_len) bcmolt_device_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_device_cfg_data_pack, (bcmolt_func_unpack) bcmolt_device_cfg_data_unpack, bcmolt_device_cfg_data_scan };
+static bcmolt_group_info group_info_device_connection_complete = { BCMOLT_OBJ_ID_DEVICE, BCMOLT_MGT_GROUP_AUTO, 0, sizeof(bcmolt_device_connection_complete_data), sizeof(bcmolt_device_connection_complete), offsetof(bcmolt_device_connection_complete, data), (bcmolt_func_packed_len) bcmolt_device_connection_complete_data_get_packed_length, (bcmolt_func_pack) bcmolt_device_connection_complete_data_pack, (bcmolt_func_unpack) bcmolt_device_connection_complete_data_unpack, bcmolt_device_connection_complete_data_scan };
+static bcmolt_group_info group_info_device_connection_established = { BCMOLT_OBJ_ID_DEVICE, BCMOLT_MGT_GROUP_AUTO, 1, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_device_connection_failure = { BCMOLT_OBJ_ID_DEVICE, BCMOLT_MGT_GROUP_AUTO, 2, sizeof(bcmolt_device_connection_failure_data), sizeof(bcmolt_device_connection_failure), offsetof(bcmolt_device_connection_failure, data), (bcmolt_func_packed_len) bcmolt_device_connection_failure_data_get_packed_length, (bcmolt_func_pack) bcmolt_device_connection_failure_data_pack, (bcmolt_func_unpack) bcmolt_device_connection_failure_data_unpack, bcmolt_device_connection_failure_data_scan };
+static bcmolt_group_info group_info_device_ddr_test_complete = { BCMOLT_OBJ_ID_DEVICE, BCMOLT_MGT_GROUP_AUTO, 3, sizeof(bcmolt_device_ddr_test_complete_data), sizeof(bcmolt_device_ddr_test_complete), offsetof(bcmolt_device_ddr_test_complete, data), (bcmolt_func_packed_len) bcmolt_device_ddr_test_complete_data_get_packed_length, (bcmolt_func_pack) bcmolt_device_ddr_test_complete_data_pack, (bcmolt_func_unpack) bcmolt_device_ddr_test_complete_data_unpack, bcmolt_device_ddr_test_complete_data_scan };
+static bcmolt_group_info group_info_device_device_keep_alive = { BCMOLT_OBJ_ID_DEVICE, BCMOLT_MGT_GROUP_AUTO, 4, sizeof(bcmolt_device_device_keep_alive_data), sizeof(bcmolt_device_device_keep_alive), offsetof(bcmolt_device_device_keep_alive, data), (bcmolt_func_packed_len) bcmolt_device_device_keep_alive_data_get_packed_length, (bcmolt_func_pack) bcmolt_device_device_keep_alive_data_pack, (bcmolt_func_unpack) bcmolt_device_device_keep_alive_data_unpack, bcmolt_device_device_keep_alive_data_scan };
+static bcmolt_group_info group_info_device_device_ready = { BCMOLT_OBJ_ID_DEVICE, BCMOLT_MGT_GROUP_AUTO, 5, sizeof(bcmolt_device_device_ready_data), sizeof(bcmolt_device_device_ready), offsetof(bcmolt_device_device_ready, data), (bcmolt_func_packed_len) bcmolt_device_device_ready_data_get_packed_length, (bcmolt_func_pack) bcmolt_device_device_ready_data_pack, (bcmolt_func_unpack) bcmolt_device_device_ready_data_unpack, bcmolt_device_device_ready_data_scan };
+static bcmolt_group_info group_info_device_disconnection_complete = { BCMOLT_OBJ_ID_DEVICE, BCMOLT_MGT_GROUP_AUTO, 6, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_device_image_transfer_complete = { BCMOLT_OBJ_ID_DEVICE, BCMOLT_MGT_GROUP_AUTO, 7, sizeof(bcmolt_device_image_transfer_complete_data), sizeof(bcmolt_device_image_transfer_complete), offsetof(bcmolt_device_image_transfer_complete, data), (bcmolt_func_packed_len) bcmolt_device_image_transfer_complete_data_get_packed_length, (bcmolt_func_pack) bcmolt_device_image_transfer_complete_data_pack, (bcmolt_func_unpack) bcmolt_device_image_transfer_complete_data_unpack, bcmolt_device_image_transfer_complete_data_scan };
+static bcmolt_group_info group_info_device_indications_dropped = { BCMOLT_OBJ_ID_DEVICE, BCMOLT_MGT_GROUP_AUTO, 8, sizeof(bcmolt_device_indications_dropped_data), sizeof(bcmolt_device_indications_dropped), offsetof(bcmolt_device_indications_dropped, data), (bcmolt_func_packed_len) bcmolt_device_indications_dropped_data_get_packed_length, (bcmolt_func_pack) bcmolt_device_indications_dropped_data_pack, (bcmolt_func_unpack) bcmolt_device_indications_dropped_data_unpack, bcmolt_device_indications_dropped_data_scan };
+static bcmolt_group_info group_info_device_sw_error = { BCMOLT_OBJ_ID_DEVICE, BCMOLT_MGT_GROUP_AUTO, 9, sizeof(bcmolt_device_sw_error_data), sizeof(bcmolt_device_sw_error), offsetof(bcmolt_device_sw_error, data), (bcmolt_func_packed_len) bcmolt_device_sw_error_data_get_packed_length, (bcmolt_func_pack) bcmolt_device_sw_error_data_pack, (bcmolt_func_unpack) bcmolt_device_sw_error_data_unpack, bcmolt_device_sw_error_data_scan };
+static bcmolt_group_info group_info_device_sw_exception = { BCMOLT_OBJ_ID_DEVICE, BCMOLT_MGT_GROUP_AUTO, 10, sizeof(bcmolt_device_sw_exception_data), sizeof(bcmolt_device_sw_exception), offsetof(bcmolt_device_sw_exception, data), (bcmolt_func_packed_len) bcmolt_device_sw_exception_data_get_packed_length, (bcmolt_func_pack) bcmolt_device_sw_exception_data_pack, (bcmolt_func_unpack) bcmolt_device_sw_exception_data_unpack, bcmolt_device_sw_exception_data_scan };
+static bcmolt_group_info group_info_device_auto_cfg = { BCMOLT_OBJ_ID_DEVICE, BCMOLT_MGT_GROUP_AUTO_CFG, 0, sizeof(bcmolt_device_auto_cfg_data), sizeof(bcmolt_device_auto_cfg), offsetof(bcmolt_device_auto_cfg, data), (bcmolt_func_packed_len) bcmolt_device_auto_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_device_auto_cfg_data_pack, (bcmolt_func_unpack) bcmolt_device_auto_cfg_data_unpack, bcmolt_device_auto_cfg_data_scan };
+static bcmolt_group_info group_info_device_connect = { BCMOLT_OBJ_ID_DEVICE, BCMOLT_MGT_GROUP_OPER, 0, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_device_disconnect = { BCMOLT_OBJ_ID_DEVICE, BCMOLT_MGT_GROUP_OPER, 1, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_device_host_keep_alive = { BCMOLT_OBJ_ID_DEVICE, BCMOLT_MGT_GROUP_OPER, 2, sizeof(bcmolt_device_host_keep_alive_data), sizeof(bcmolt_device_host_keep_alive), offsetof(bcmolt_device_host_keep_alive, data), (bcmolt_func_packed_len) bcmolt_device_host_keep_alive_data_get_packed_length, (bcmolt_func_pack) bcmolt_device_host_keep_alive_data_pack, (bcmolt_func_unpack) bcmolt_device_host_keep_alive_data_unpack, bcmolt_device_host_keep_alive_data_scan };
+static bcmolt_group_info group_info_device_image_transfer_data = { BCMOLT_OBJ_ID_DEVICE, BCMOLT_MGT_GROUP_OPER, 3, sizeof(bcmolt_device_image_transfer_data_data), sizeof(bcmolt_device_image_transfer_data), offsetof(bcmolt_device_image_transfer_data, data), (bcmolt_func_packed_len) bcmolt_device_image_transfer_data_data_get_packed_length, (bcmolt_func_pack) bcmolt_device_image_transfer_data_data_pack, (bcmolt_func_unpack) bcmolt_device_image_transfer_data_data_unpack, bcmolt_device_image_transfer_data_data_scan };
+static bcmolt_group_info group_info_device_image_transfer_start = { BCMOLT_OBJ_ID_DEVICE, BCMOLT_MGT_GROUP_OPER, 4, sizeof(bcmolt_device_image_transfer_start_data), sizeof(bcmolt_device_image_transfer_start), offsetof(bcmolt_device_image_transfer_start, data), (bcmolt_func_packed_len) bcmolt_device_image_transfer_start_data_get_packed_length, (bcmolt_func_pack) bcmolt_device_image_transfer_start_data_pack, (bcmolt_func_unpack) bcmolt_device_image_transfer_start_data_unpack, bcmolt_device_image_transfer_start_data_scan };
+static bcmolt_group_info group_info_device_reset = { BCMOLT_OBJ_ID_DEVICE, BCMOLT_MGT_GROUP_OPER, 5, sizeof(bcmolt_device_reset_data), sizeof(bcmolt_device_reset), offsetof(bcmolt_device_reset, data), (bcmolt_func_packed_len) bcmolt_device_reset_data_get_packed_length, (bcmolt_func_pack) bcmolt_device_reset_data_pack, (bcmolt_func_unpack) bcmolt_device_reset_data_unpack, bcmolt_device_reset_data_scan };
+static bcmolt_group_info group_info_device_run_ddr_test = { BCMOLT_OBJ_ID_DEVICE, BCMOLT_MGT_GROUP_OPER, 6, sizeof(bcmolt_device_run_ddr_test_data), sizeof(bcmolt_device_run_ddr_test), offsetof(bcmolt_device_run_ddr_test, data), (bcmolt_func_packed_len) bcmolt_device_run_ddr_test_data_get_packed_length, (bcmolt_func_pack) bcmolt_device_run_ddr_test_data_pack, (bcmolt_func_unpack) bcmolt_device_run_ddr_test_data_unpack, bcmolt_device_run_ddr_test_data_scan };
+static bcmolt_group_info group_info_device_sw_upgrade_activate = { BCMOLT_OBJ_ID_DEVICE, BCMOLT_MGT_GROUP_OPER, 7, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_epon_denied_link_key = { BCMOLT_OBJ_ID_EPON_DENIED_LINK, BCMOLT_MGT_GROUP_KEY, 0, sizeof(bcmolt_epon_denied_link_key), 0, 0, (bcmolt_func_packed_len) bcmolt_epon_denied_link_key_get_packed_length, (bcmolt_func_pack) bcmolt_epon_denied_link_key_pack, (bcmolt_func_unpack) bcmolt_epon_denied_link_key_unpack, bcmolt_epon_denied_link_key_scan };
+static bcmolt_group_info group_info_epon_denied_link_cfg = { BCMOLT_OBJ_ID_EPON_DENIED_LINK, BCMOLT_MGT_GROUP_CFG, 0, sizeof(bcmolt_epon_denied_link_cfg_data), sizeof(bcmolt_epon_denied_link_cfg), offsetof(bcmolt_epon_denied_link_cfg, data), (bcmolt_func_packed_len) bcmolt_epon_denied_link_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_denied_link_cfg_data_pack, (bcmolt_func_unpack) bcmolt_epon_denied_link_cfg_data_unpack, bcmolt_epon_denied_link_cfg_data_scan };
+static bcmolt_group_info group_info_epon_denied_link_laser_on_off_violation = { BCMOLT_OBJ_ID_EPON_DENIED_LINK, BCMOLT_MGT_GROUP_AUTO, 0, sizeof(bcmolt_epon_denied_link_laser_on_off_violation_data), sizeof(bcmolt_epon_denied_link_laser_on_off_violation), offsetof(bcmolt_epon_denied_link_laser_on_off_violation, data), (bcmolt_func_packed_len) bcmolt_epon_denied_link_laser_on_off_violation_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_denied_link_laser_on_off_violation_data_pack, (bcmolt_func_unpack) bcmolt_epon_denied_link_laser_on_off_violation_data_unpack, bcmolt_epon_denied_link_laser_on_off_violation_data_scan };
+static bcmolt_group_info group_info_epon_denied_link_llid_pool_empty_violation = { BCMOLT_OBJ_ID_EPON_DENIED_LINK, BCMOLT_MGT_GROUP_AUTO, 1, sizeof(bcmolt_epon_denied_link_llid_pool_empty_violation_data), sizeof(bcmolt_epon_denied_link_llid_pool_empty_violation), offsetof(bcmolt_epon_denied_link_llid_pool_empty_violation, data), (bcmolt_func_packed_len) bcmolt_epon_denied_link_llid_pool_empty_violation_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_denied_link_llid_pool_empty_violation_data_pack, (bcmolt_func_unpack) bcmolt_epon_denied_link_llid_pool_empty_violation_data_unpack, bcmolt_epon_denied_link_llid_pool_empty_violation_data_scan };
+static bcmolt_group_info group_info_epon_denied_link_max_link_violation = { BCMOLT_OBJ_ID_EPON_DENIED_LINK, BCMOLT_MGT_GROUP_AUTO, 2, sizeof(bcmolt_epon_denied_link_max_link_violation_data), sizeof(bcmolt_epon_denied_link_max_link_violation), offsetof(bcmolt_epon_denied_link_max_link_violation, data), (bcmolt_func_packed_len) bcmolt_epon_denied_link_max_link_violation_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_denied_link_max_link_violation_data_pack, (bcmolt_func_unpack) bcmolt_epon_denied_link_max_link_violation_data_unpack, bcmolt_epon_denied_link_max_link_violation_data_scan };
+static bcmolt_group_info group_info_epon_denied_link_overhead_profile_violation = { BCMOLT_OBJ_ID_EPON_DENIED_LINK, BCMOLT_MGT_GROUP_AUTO, 3, sizeof(bcmolt_epon_denied_link_overhead_profile_violation_data), sizeof(bcmolt_epon_denied_link_overhead_profile_violation), offsetof(bcmolt_epon_denied_link_overhead_profile_violation, data), (bcmolt_func_packed_len) bcmolt_epon_denied_link_overhead_profile_violation_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_denied_link_overhead_profile_violation_data_pack, (bcmolt_func_unpack) bcmolt_epon_denied_link_overhead_profile_violation_data_unpack, bcmolt_epon_denied_link_overhead_profile_violation_data_scan };
+static bcmolt_group_info group_info_epon_denied_link_range_violation = { BCMOLT_OBJ_ID_EPON_DENIED_LINK, BCMOLT_MGT_GROUP_AUTO, 4, sizeof(bcmolt_epon_denied_link_range_violation_data), sizeof(bcmolt_epon_denied_link_range_violation), offsetof(bcmolt_epon_denied_link_range_violation, data), (bcmolt_func_packed_len) bcmolt_epon_denied_link_range_violation_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_denied_link_range_violation_data_pack, (bcmolt_func_unpack) bcmolt_epon_denied_link_range_violation_data_unpack, bcmolt_epon_denied_link_range_violation_data_scan };
+static bcmolt_group_info group_info_epon_denied_link_rogue_violation = { BCMOLT_OBJ_ID_EPON_DENIED_LINK, BCMOLT_MGT_GROUP_AUTO, 5, sizeof(bcmolt_epon_denied_link_rogue_violation_data), sizeof(bcmolt_epon_denied_link_rogue_violation), offsetof(bcmolt_epon_denied_link_rogue_violation, data), (bcmolt_func_packed_len) bcmolt_epon_denied_link_rogue_violation_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_denied_link_rogue_violation_data_pack, (bcmolt_func_unpack) bcmolt_epon_denied_link_rogue_violation_data_unpack, bcmolt_epon_denied_link_rogue_violation_data_scan };
+static bcmolt_group_info group_info_epon_denied_link_system_resource_violation = { BCMOLT_OBJ_ID_EPON_DENIED_LINK, BCMOLT_MGT_GROUP_AUTO, 6, sizeof(bcmolt_epon_denied_link_system_resource_violation_data), sizeof(bcmolt_epon_denied_link_system_resource_violation), offsetof(bcmolt_epon_denied_link_system_resource_violation, data), (bcmolt_func_packed_len) bcmolt_epon_denied_link_system_resource_violation_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_denied_link_system_resource_violation_data_pack, (bcmolt_func_unpack) bcmolt_epon_denied_link_system_resource_violation_data_unpack, bcmolt_epon_denied_link_system_resource_violation_data_scan };
+static bcmolt_group_info group_info_epon_denied_link_tdm_channels_exhausted = { BCMOLT_OBJ_ID_EPON_DENIED_LINK, BCMOLT_MGT_GROUP_AUTO, 7, sizeof(bcmolt_epon_denied_link_tdm_channels_exhausted_data), sizeof(bcmolt_epon_denied_link_tdm_channels_exhausted), offsetof(bcmolt_epon_denied_link_tdm_channels_exhausted, data), (bcmolt_func_packed_len) bcmolt_epon_denied_link_tdm_channels_exhausted_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_denied_link_tdm_channels_exhausted_data_pack, (bcmolt_func_unpack) bcmolt_epon_denied_link_tdm_channels_exhausted_data_unpack, bcmolt_epon_denied_link_tdm_channels_exhausted_data_scan };
+static bcmolt_group_info group_info_epon_denied_link_unknown_link_violation = { BCMOLT_OBJ_ID_EPON_DENIED_LINK, BCMOLT_MGT_GROUP_AUTO, 8, sizeof(bcmolt_epon_denied_link_unknown_link_violation_data), sizeof(bcmolt_epon_denied_link_unknown_link_violation), offsetof(bcmolt_epon_denied_link_unknown_link_violation, data), (bcmolt_func_packed_len) bcmolt_epon_denied_link_unknown_link_violation_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_denied_link_unknown_link_violation_data_pack, (bcmolt_func_unpack) bcmolt_epon_denied_link_unknown_link_violation_data_unpack, bcmolt_epon_denied_link_unknown_link_violation_data_scan };
+static bcmolt_group_info group_info_epon_denied_link_upstream_bandwidth_violation = { BCMOLT_OBJ_ID_EPON_DENIED_LINK, BCMOLT_MGT_GROUP_AUTO, 9, sizeof(bcmolt_epon_denied_link_upstream_bandwidth_violation_data), sizeof(bcmolt_epon_denied_link_upstream_bandwidth_violation), offsetof(bcmolt_epon_denied_link_upstream_bandwidth_violation, data), (bcmolt_func_packed_len) bcmolt_epon_denied_link_upstream_bandwidth_violation_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_denied_link_upstream_bandwidth_violation_data_pack, (bcmolt_func_unpack) bcmolt_epon_denied_link_upstream_bandwidth_violation_data_unpack, bcmolt_epon_denied_link_upstream_bandwidth_violation_data_scan };
+static bcmolt_group_info group_info_epon_denied_link_auto_cfg = { BCMOLT_OBJ_ID_EPON_DENIED_LINK, BCMOLT_MGT_GROUP_AUTO_CFG, 0, sizeof(bcmolt_epon_denied_link_auto_cfg_data), sizeof(bcmolt_epon_denied_link_auto_cfg), offsetof(bcmolt_epon_denied_link_auto_cfg, data), (bcmolt_func_packed_len) bcmolt_epon_denied_link_auto_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_denied_link_auto_cfg_data_pack, (bcmolt_func_unpack) bcmolt_epon_denied_link_auto_cfg_data_unpack, bcmolt_epon_denied_link_auto_cfg_data_scan };
+static bcmolt_group_info group_info_epon_link_key = { BCMOLT_OBJ_ID_EPON_LINK, BCMOLT_MGT_GROUP_KEY, 0, sizeof(bcmolt_epon_link_key), 0, 0, (bcmolt_func_packed_len) bcmolt_epon_link_key_get_packed_length, (bcmolt_func_pack) bcmolt_epon_link_key_pack, (bcmolt_func_unpack) bcmolt_epon_link_key_unpack, bcmolt_epon_link_key_scan };
+static bcmolt_group_info group_info_epon_link_cfg = { BCMOLT_OBJ_ID_EPON_LINK, BCMOLT_MGT_GROUP_CFG, 0, sizeof(bcmolt_epon_link_cfg_data), sizeof(bcmolt_epon_link_cfg), offsetof(bcmolt_epon_link_cfg, data), (bcmolt_func_packed_len) bcmolt_epon_link_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_link_cfg_data_pack, (bcmolt_func_unpack) bcmolt_epon_link_cfg_data_unpack, bcmolt_epon_link_cfg_data_scan };
+static bcmolt_group_info group_info_epon_link_stat = { BCMOLT_OBJ_ID_EPON_LINK, BCMOLT_MGT_GROUP_STAT, 0, sizeof(bcmolt_epon_link_stat_data), sizeof(bcmolt_epon_link_stat), offsetof(bcmolt_epon_link_stat, data), (bcmolt_func_packed_len) bcmolt_epon_link_stat_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_link_stat_data_pack, (bcmolt_func_unpack) bcmolt_epon_link_stat_data_unpack, bcmolt_epon_link_stat_data_scan };
+static bcmolt_group_info group_info_epon_link_stat_cfg = { BCMOLT_OBJ_ID_EPON_LINK, BCMOLT_MGT_GROUP_STAT_CFG, 0, sizeof(bcmolt_epon_link_stat_cfg_data), sizeof(bcmolt_epon_link_stat_cfg), offsetof(bcmolt_epon_link_stat_cfg, data), (bcmolt_func_packed_len) bcmolt_epon_link_stat_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_link_stat_cfg_data_pack, (bcmolt_func_unpack) bcmolt_epon_link_stat_cfg_data_unpack, bcmolt_epon_link_stat_cfg_data_scan };
+static bcmolt_group_info group_info_epon_link_duplicate_mpcp_registration_request = { BCMOLT_OBJ_ID_EPON_LINK, BCMOLT_MGT_GROUP_AUTO, 0, sizeof(bcmolt_epon_link_duplicate_mpcp_registration_request_data), sizeof(bcmolt_epon_link_duplicate_mpcp_registration_request), offsetof(bcmolt_epon_link_duplicate_mpcp_registration_request, data), (bcmolt_func_packed_len) bcmolt_epon_link_duplicate_mpcp_registration_request_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_link_duplicate_mpcp_registration_request_data_pack, (bcmolt_func_unpack) bcmolt_epon_link_duplicate_mpcp_registration_request_data_unpack, bcmolt_epon_link_duplicate_mpcp_registration_request_data_scan };
+static bcmolt_group_info group_info_epon_link_encryption_enabled = { BCMOLT_OBJ_ID_EPON_LINK, BCMOLT_MGT_GROUP_AUTO, 1, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_epon_link_key_exchange_failure = { BCMOLT_OBJ_ID_EPON_LINK, BCMOLT_MGT_GROUP_AUTO, 2, sizeof(bcmolt_epon_link_key_exchange_failure_data), sizeof(bcmolt_epon_link_key_exchange_failure), offsetof(bcmolt_epon_link_key_exchange_failure, data), (bcmolt_func_packed_len) bcmolt_epon_link_key_exchange_failure_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_link_key_exchange_failure_data_pack, (bcmolt_func_unpack) bcmolt_epon_link_key_exchange_failure_data_unpack, bcmolt_epon_link_key_exchange_failure_data_scan };
+static bcmolt_group_info group_info_epon_link_key_exchange_started = { BCMOLT_OBJ_ID_EPON_LINK, BCMOLT_MGT_GROUP_AUTO, 3, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_epon_link_key_exchange_stopped = { BCMOLT_OBJ_ID_EPON_LINK, BCMOLT_MGT_GROUP_AUTO, 4, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_epon_link_link_deleted = { BCMOLT_OBJ_ID_EPON_LINK, BCMOLT_MGT_GROUP_AUTO, 5, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_epon_link_link_speed_mismatch = { BCMOLT_OBJ_ID_EPON_LINK, BCMOLT_MGT_GROUP_AUTO, 6, sizeof(bcmolt_epon_link_link_speed_mismatch_data), sizeof(bcmolt_epon_link_link_speed_mismatch), offsetof(bcmolt_epon_link_link_speed_mismatch, data), (bcmolt_func_packed_len) bcmolt_epon_link_link_speed_mismatch_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_link_link_speed_mismatch_data_pack, (bcmolt_func_unpack) bcmolt_epon_link_link_speed_mismatch_data_unpack, bcmolt_epon_link_link_speed_mismatch_data_scan };
+static bcmolt_group_info group_info_epon_link_mpcp_deregistered = { BCMOLT_OBJ_ID_EPON_LINK, BCMOLT_MGT_GROUP_AUTO, 7, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_epon_link_mpcp_discovered = { BCMOLT_OBJ_ID_EPON_LINK, BCMOLT_MGT_GROUP_AUTO, 8, sizeof(bcmolt_epon_link_mpcp_discovered_data), sizeof(bcmolt_epon_link_mpcp_discovered), offsetof(bcmolt_epon_link_mpcp_discovered, data), (bcmolt_func_packed_len) bcmolt_epon_link_mpcp_discovered_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_link_mpcp_discovered_data_pack, (bcmolt_func_unpack) bcmolt_epon_link_mpcp_discovered_data_unpack, bcmolt_epon_link_mpcp_discovered_data_scan };
+static bcmolt_group_info group_info_epon_link_mpcp_reg_ack_timeout = { BCMOLT_OBJ_ID_EPON_LINK, BCMOLT_MGT_GROUP_AUTO, 9, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_epon_link_mpcp_report_timeout = { BCMOLT_OBJ_ID_EPON_LINK, BCMOLT_MGT_GROUP_AUTO, 10, sizeof(bcmolt_epon_link_mpcp_report_timeout_data), sizeof(bcmolt_epon_link_mpcp_report_timeout), offsetof(bcmolt_epon_link_mpcp_report_timeout, data), (bcmolt_func_packed_len) bcmolt_epon_link_mpcp_report_timeout_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_link_mpcp_report_timeout_data_pack, (bcmolt_func_unpack) bcmolt_epon_link_mpcp_report_timeout_data_unpack, bcmolt_epon_link_mpcp_report_timeout_data_scan };
+static bcmolt_group_info group_info_epon_link_oam_keepalive_timeout = { BCMOLT_OBJ_ID_EPON_LINK, BCMOLT_MGT_GROUP_AUTO, 11, sizeof(bcmolt_epon_link_oam_keepalive_timeout_data), sizeof(bcmolt_epon_link_oam_keepalive_timeout), offsetof(bcmolt_epon_link_oam_keepalive_timeout, data), (bcmolt_func_packed_len) bcmolt_epon_link_oam_keepalive_timeout_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_link_oam_keepalive_timeout_data_pack, (bcmolt_func_unpack) bcmolt_epon_link_oam_keepalive_timeout_data_unpack, bcmolt_epon_link_oam_keepalive_timeout_data_scan };
+static bcmolt_group_info group_info_epon_link_oam_keepalive_timer_started = { BCMOLT_OBJ_ID_EPON_LINK, BCMOLT_MGT_GROUP_AUTO, 12, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_epon_link_oam_keepalive_timer_stopped = { BCMOLT_OBJ_ID_EPON_LINK, BCMOLT_MGT_GROUP_AUTO, 13, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_epon_link_preprovisioned_link_created = { BCMOLT_OBJ_ID_EPON_LINK, BCMOLT_MGT_GROUP_AUTO, 14, sizeof(bcmolt_epon_link_preprovisioned_link_created_data), sizeof(bcmolt_epon_link_preprovisioned_link_created), offsetof(bcmolt_epon_link_preprovisioned_link_created, data), (bcmolt_func_packed_len) bcmolt_epon_link_preprovisioned_link_created_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_link_preprovisioned_link_created_data_pack, (bcmolt_func_unpack) bcmolt_epon_link_preprovisioned_link_created_data_unpack, bcmolt_epon_link_preprovisioned_link_created_data_scan };
+static bcmolt_group_info group_info_epon_link_protection_switch_occurred = { BCMOLT_OBJ_ID_EPON_LINK, BCMOLT_MGT_GROUP_AUTO, 15, sizeof(bcmolt_epon_link_protection_switch_occurred_data), sizeof(bcmolt_epon_link_protection_switch_occurred), offsetof(bcmolt_epon_link_protection_switch_occurred, data), (bcmolt_func_packed_len) bcmolt_epon_link_protection_switch_occurred_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_link_protection_switch_occurred_data_pack, (bcmolt_func_unpack) bcmolt_epon_link_protection_switch_occurred_data_unpack, bcmolt_epon_link_protection_switch_occurred_data_scan };
+static bcmolt_group_info group_info_epon_link_range_value_changed = { BCMOLT_OBJ_ID_EPON_LINK, BCMOLT_MGT_GROUP_AUTO, 16, sizeof(bcmolt_epon_link_range_value_changed_data), sizeof(bcmolt_epon_link_range_value_changed), offsetof(bcmolt_epon_link_range_value_changed, data), (bcmolt_func_packed_len) bcmolt_epon_link_range_value_changed_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_link_range_value_changed_data_pack, (bcmolt_func_unpack) bcmolt_epon_link_range_value_changed_data_unpack, bcmolt_epon_link_range_value_changed_data_scan };
+static bcmolt_group_info group_info_epon_link_rerange_failure = { BCMOLT_OBJ_ID_EPON_LINK, BCMOLT_MGT_GROUP_AUTO, 17, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_epon_link_stat_alarm_cleared = { BCMOLT_OBJ_ID_EPON_LINK, BCMOLT_MGT_GROUP_AUTO, 18, sizeof(bcmolt_epon_link_stat_alarm_cleared_data), sizeof(bcmolt_epon_link_stat_alarm_cleared), offsetof(bcmolt_epon_link_stat_alarm_cleared, data), (bcmolt_func_packed_len) bcmolt_epon_link_stat_alarm_cleared_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_link_stat_alarm_cleared_data_pack, (bcmolt_func_unpack) bcmolt_epon_link_stat_alarm_cleared_data_unpack, bcmolt_epon_link_stat_alarm_cleared_data_scan };
+static bcmolt_group_info group_info_epon_link_stat_alarm_raised = { BCMOLT_OBJ_ID_EPON_LINK, BCMOLT_MGT_GROUP_AUTO, 19, sizeof(bcmolt_epon_link_stat_alarm_raised_data), sizeof(bcmolt_epon_link_stat_alarm_raised), offsetof(bcmolt_epon_link_stat_alarm_raised, data), (bcmolt_func_packed_len) bcmolt_epon_link_stat_alarm_raised_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_link_stat_alarm_raised_data_pack, (bcmolt_func_unpack) bcmolt_epon_link_stat_alarm_raised_data_unpack, bcmolt_epon_link_stat_alarm_raised_data_scan };
+static bcmolt_group_info group_info_epon_link_static_registration_done = { BCMOLT_OBJ_ID_EPON_LINK, BCMOLT_MGT_GROUP_AUTO, 20, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_epon_link_auto_cfg = { BCMOLT_OBJ_ID_EPON_LINK, BCMOLT_MGT_GROUP_AUTO_CFG, 0, sizeof(bcmolt_epon_link_auto_cfg_data), sizeof(bcmolt_epon_link_auto_cfg), offsetof(bcmolt_epon_link_auto_cfg, data), (bcmolt_func_packed_len) bcmolt_epon_link_auto_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_link_auto_cfg_data_pack, (bcmolt_func_unpack) bcmolt_epon_link_auto_cfg_data_unpack, bcmolt_epon_link_auto_cfg_data_scan };
+static bcmolt_group_info group_info_epon_link_delete_link = { BCMOLT_OBJ_ID_EPON_LINK, BCMOLT_MGT_GROUP_OPER, 0, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_epon_link_force_rediscovery = { BCMOLT_OBJ_ID_EPON_LINK, BCMOLT_MGT_GROUP_OPER, 1, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_epon_link_key_exchange_start = { BCMOLT_OBJ_ID_EPON_LINK, BCMOLT_MGT_GROUP_OPER, 2, sizeof(bcmolt_epon_link_key_exchange_start_data), sizeof(bcmolt_epon_link_key_exchange_start), offsetof(bcmolt_epon_link_key_exchange_start, data), (bcmolt_func_packed_len) bcmolt_epon_link_key_exchange_start_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_link_key_exchange_start_data_pack, (bcmolt_func_unpack) bcmolt_epon_link_key_exchange_start_data_unpack, bcmolt_epon_link_key_exchange_start_data_scan };
+static bcmolt_group_info group_info_epon_link_key_exchange_stop = { BCMOLT_OBJ_ID_EPON_LINK, BCMOLT_MGT_GROUP_OPER, 3, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_epon_link_oam_keepalive_timer_start = { BCMOLT_OBJ_ID_EPON_LINK, BCMOLT_MGT_GROUP_OPER, 4, sizeof(bcmolt_epon_link_oam_keepalive_timer_start_data), sizeof(bcmolt_epon_link_oam_keepalive_timer_start), offsetof(bcmolt_epon_link_oam_keepalive_timer_start, data), (bcmolt_func_packed_len) bcmolt_epon_link_oam_keepalive_timer_start_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_link_oam_keepalive_timer_start_data_pack, (bcmolt_func_unpack) bcmolt_epon_link_oam_keepalive_timer_start_data_unpack, bcmolt_epon_link_oam_keepalive_timer_start_data_scan };
+static bcmolt_group_info group_info_epon_link_oam_keepalive_timer_stop = { BCMOLT_OBJ_ID_EPON_LINK, BCMOLT_MGT_GROUP_OPER, 5, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_epon_link_static_registration = { BCMOLT_OBJ_ID_EPON_LINK, BCMOLT_MGT_GROUP_OPER, 6, sizeof(bcmolt_epon_link_static_registration_data), sizeof(bcmolt_epon_link_static_registration), offsetof(bcmolt_epon_link_static_registration, data), (bcmolt_func_packed_len) bcmolt_epon_link_static_registration_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_link_static_registration_data_pack, (bcmolt_func_unpack) bcmolt_epon_link_static_registration_data_unpack, bcmolt_epon_link_static_registration_data_scan };
+static bcmolt_group_info group_info_epon_link_inject_frame = { BCMOLT_OBJ_ID_EPON_LINK, BCMOLT_MGT_GROUP_PROXY, 0, sizeof(bcmolt_epon_link_inject_frame_data), sizeof(bcmolt_epon_link_inject_frame), offsetof(bcmolt_epon_link_inject_frame, data), (bcmolt_func_packed_len) bcmolt_epon_link_inject_frame_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_link_inject_frame_data_pack, (bcmolt_func_unpack) bcmolt_epon_link_inject_frame_data_unpack, bcmolt_epon_link_inject_frame_data_scan };
+static bcmolt_group_info group_info_epon_link_frame_captured = { BCMOLT_OBJ_ID_EPON_LINK, BCMOLT_MGT_GROUP_PROXY_RX, 0, sizeof(bcmolt_epon_link_frame_captured_data), sizeof(bcmolt_epon_link_frame_captured), offsetof(bcmolt_epon_link_frame_captured, data), (bcmolt_func_packed_len) bcmolt_epon_link_frame_captured_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_link_frame_captured_data_pack, (bcmolt_func_unpack) bcmolt_epon_link_frame_captured_data_unpack, bcmolt_epon_link_frame_captured_data_scan };
+static bcmolt_group_info group_info_epon_ni_key = { BCMOLT_OBJ_ID_EPON_NI, BCMOLT_MGT_GROUP_KEY, 0, sizeof(bcmolt_epon_ni_key), 0, 0, (bcmolt_func_packed_len) bcmolt_epon_ni_key_get_packed_length, (bcmolt_func_pack) bcmolt_epon_ni_key_pack, (bcmolt_func_unpack) bcmolt_epon_ni_key_unpack, bcmolt_epon_ni_key_scan };
+static bcmolt_group_info group_info_epon_ni_cfg = { BCMOLT_OBJ_ID_EPON_NI, BCMOLT_MGT_GROUP_CFG, 0, sizeof(bcmolt_epon_ni_cfg_data), sizeof(bcmolt_epon_ni_cfg), offsetof(bcmolt_epon_ni_cfg, data), (bcmolt_func_packed_len) bcmolt_epon_ni_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_ni_cfg_data_pack, (bcmolt_func_unpack) bcmolt_epon_ni_cfg_data_unpack, bcmolt_epon_ni_cfg_data_scan };
+static bcmolt_group_info group_info_epon_ni_auto_rogue_scan_10g_failure = { BCMOLT_OBJ_ID_EPON_NI, BCMOLT_MGT_GROUP_AUTO, 0, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_epon_ni_auto_rogue_scan_1g_failure = { BCMOLT_OBJ_ID_EPON_NI, BCMOLT_MGT_GROUP_AUTO, 1, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_epon_ni_llid_quarantined = { BCMOLT_OBJ_ID_EPON_NI, BCMOLT_MGT_GROUP_AUTO, 2, sizeof(bcmolt_epon_ni_llid_quarantined_data), sizeof(bcmolt_epon_ni_llid_quarantined), offsetof(bcmolt_epon_ni_llid_quarantined, data), (bcmolt_func_packed_len) bcmolt_epon_ni_llid_quarantined_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_ni_llid_quarantined_data_pack, (bcmolt_func_unpack) bcmolt_epon_ni_llid_quarantined_data_unpack, bcmolt_epon_ni_llid_quarantined_data_scan };
+static bcmolt_group_info group_info_epon_ni_mpcp_timestamp_changed = { BCMOLT_OBJ_ID_EPON_NI, BCMOLT_MGT_GROUP_AUTO, 3, sizeof(bcmolt_epon_ni_mpcp_timestamp_changed_data), sizeof(bcmolt_epon_ni_mpcp_timestamp_changed), offsetof(bcmolt_epon_ni_mpcp_timestamp_changed, data), (bcmolt_func_packed_len) bcmolt_epon_ni_mpcp_timestamp_changed_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_ni_mpcp_timestamp_changed_data_pack, (bcmolt_func_unpack) bcmolt_epon_ni_mpcp_timestamp_changed_data_unpack, bcmolt_epon_ni_mpcp_timestamp_changed_data_scan };
+static bcmolt_group_info group_info_epon_ni_no_reports = { BCMOLT_OBJ_ID_EPON_NI, BCMOLT_MGT_GROUP_AUTO, 4, sizeof(bcmolt_epon_ni_no_reports_data), sizeof(bcmolt_epon_ni_no_reports), offsetof(bcmolt_epon_ni_no_reports, data), (bcmolt_func_packed_len) bcmolt_epon_ni_no_reports_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_ni_no_reports_data_pack, (bcmolt_func_unpack) bcmolt_epon_ni_no_reports_data_unpack, bcmolt_epon_ni_no_reports_data_scan };
+static bcmolt_group_info group_info_epon_ni_onu_upgrade_complete = { BCMOLT_OBJ_ID_EPON_NI, BCMOLT_MGT_GROUP_AUTO, 5, sizeof(bcmolt_epon_ni_onu_upgrade_complete_data), sizeof(bcmolt_epon_ni_onu_upgrade_complete), offsetof(bcmolt_epon_ni_onu_upgrade_complete, data), (bcmolt_func_packed_len) bcmolt_epon_ni_onu_upgrade_complete_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_ni_onu_upgrade_complete_data_pack, (bcmolt_func_unpack) bcmolt_epon_ni_onu_upgrade_complete_data_unpack, bcmolt_epon_ni_onu_upgrade_complete_data_scan };
+static bcmolt_group_info group_info_epon_ni_rerange_failure = { BCMOLT_OBJ_ID_EPON_NI, BCMOLT_MGT_GROUP_AUTO, 6, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_epon_ni_rogue_scan_complete = { BCMOLT_OBJ_ID_EPON_NI, BCMOLT_MGT_GROUP_AUTO, 7, sizeof(bcmolt_epon_ni_rogue_scan_complete_data), sizeof(bcmolt_epon_ni_rogue_scan_complete), offsetof(bcmolt_epon_ni_rogue_scan_complete, data), (bcmolt_func_packed_len) bcmolt_epon_ni_rogue_scan_complete_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_ni_rogue_scan_complete_data_pack, (bcmolt_func_unpack) bcmolt_epon_ni_rogue_scan_complete_data_unpack, bcmolt_epon_ni_rogue_scan_complete_data_scan };
+static bcmolt_group_info group_info_epon_ni_rssi_measurement_completed = { BCMOLT_OBJ_ID_EPON_NI, BCMOLT_MGT_GROUP_AUTO, 8, sizeof(bcmolt_epon_ni_rssi_measurement_completed_data), sizeof(bcmolt_epon_ni_rssi_measurement_completed), offsetof(bcmolt_epon_ni_rssi_measurement_completed, data), (bcmolt_func_packed_len) bcmolt_epon_ni_rssi_measurement_completed_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_ni_rssi_measurement_completed_data_pack, (bcmolt_func_unpack) bcmolt_epon_ni_rssi_measurement_completed_data_unpack, bcmolt_epon_ni_rssi_measurement_completed_data_scan };
+static bcmolt_group_info group_info_epon_ni_state_change_completed = { BCMOLT_OBJ_ID_EPON_NI, BCMOLT_MGT_GROUP_AUTO, 9, sizeof(bcmolt_epon_ni_state_change_completed_data), sizeof(bcmolt_epon_ni_state_change_completed), offsetof(bcmolt_epon_ni_state_change_completed, data), (bcmolt_func_packed_len) bcmolt_epon_ni_state_change_completed_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_ni_state_change_completed_data_pack, (bcmolt_func_unpack) bcmolt_epon_ni_state_change_completed_data_unpack, bcmolt_epon_ni_state_change_completed_data_scan };
+static bcmolt_group_info group_info_epon_ni_auto_cfg = { BCMOLT_OBJ_ID_EPON_NI, BCMOLT_MGT_GROUP_AUTO_CFG, 0, sizeof(bcmolt_epon_ni_auto_cfg_data), sizeof(bcmolt_epon_ni_auto_cfg), offsetof(bcmolt_epon_ni_auto_cfg, data), (bcmolt_func_packed_len) bcmolt_epon_ni_auto_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_ni_auto_cfg_data_pack, (bcmolt_func_unpack) bcmolt_epon_ni_auto_cfg_data_unpack, bcmolt_epon_ni_auto_cfg_data_scan };
+static bcmolt_group_info group_info_epon_ni_add_link = { BCMOLT_OBJ_ID_EPON_NI, BCMOLT_MGT_GROUP_OPER, 0, sizeof(bcmolt_epon_ni_add_link_data), sizeof(bcmolt_epon_ni_add_link), offsetof(bcmolt_epon_ni_add_link, data), (bcmolt_func_packed_len) bcmolt_epon_ni_add_link_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_ni_add_link_data_pack, (bcmolt_func_unpack) bcmolt_epon_ni_add_link_data_unpack, bcmolt_epon_ni_add_link_data_scan };
+static bcmolt_group_info group_info_epon_ni_add_multicast_link = { BCMOLT_OBJ_ID_EPON_NI, BCMOLT_MGT_GROUP_OPER, 1, sizeof(bcmolt_epon_ni_add_multicast_link_data), sizeof(bcmolt_epon_ni_add_multicast_link), offsetof(bcmolt_epon_ni_add_multicast_link, data), (bcmolt_func_packed_len) bcmolt_epon_ni_add_multicast_link_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_ni_add_multicast_link_data_pack, (bcmolt_func_unpack) bcmolt_epon_ni_add_multicast_link_data_unpack, bcmolt_epon_ni_add_multicast_link_data_scan };
+static bcmolt_group_info group_info_epon_ni_add_protected_standby_link = { BCMOLT_OBJ_ID_EPON_NI, BCMOLT_MGT_GROUP_OPER, 2, sizeof(bcmolt_epon_ni_add_protected_standby_link_data), sizeof(bcmolt_epon_ni_add_protected_standby_link), offsetof(bcmolt_epon_ni_add_protected_standby_link, data), (bcmolt_func_packed_len) bcmolt_epon_ni_add_protected_standby_link_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_ni_add_protected_standby_link_data_pack, (bcmolt_func_unpack) bcmolt_epon_ni_add_protected_standby_link_data_unpack, bcmolt_epon_ni_add_protected_standby_link_data_scan };
+static bcmolt_group_info group_info_epon_ni_issue_rssi_grant = { BCMOLT_OBJ_ID_EPON_NI, BCMOLT_MGT_GROUP_OPER, 3, sizeof(bcmolt_epon_ni_issue_rssi_grant_data), sizeof(bcmolt_epon_ni_issue_rssi_grant), offsetof(bcmolt_epon_ni_issue_rssi_grant, data), (bcmolt_func_packed_len) bcmolt_epon_ni_issue_rssi_grant_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_ni_issue_rssi_grant_data_pack, (bcmolt_func_unpack) bcmolt_epon_ni_issue_rssi_grant_data_unpack, bcmolt_epon_ni_issue_rssi_grant_data_scan };
+static bcmolt_group_info group_info_epon_ni_protection_switching_apply_rerange_delta = { BCMOLT_OBJ_ID_EPON_NI, BCMOLT_MGT_GROUP_OPER, 4, sizeof(bcmolt_epon_ni_protection_switching_apply_rerange_delta_data), sizeof(bcmolt_epon_ni_protection_switching_apply_rerange_delta), offsetof(bcmolt_epon_ni_protection_switching_apply_rerange_delta, data), (bcmolt_func_packed_len) bcmolt_epon_ni_protection_switching_apply_rerange_delta_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_ni_protection_switching_apply_rerange_delta_data_pack, (bcmolt_func_unpack) bcmolt_epon_ni_protection_switching_apply_rerange_delta_data_unpack, bcmolt_epon_ni_protection_switching_apply_rerange_delta_data_scan };
+static bcmolt_group_info group_info_epon_ni_rogue_llid_scan = { BCMOLT_OBJ_ID_EPON_NI, BCMOLT_MGT_GROUP_OPER, 5, sizeof(bcmolt_epon_ni_rogue_llid_scan_data), sizeof(bcmolt_epon_ni_rogue_llid_scan), offsetof(bcmolt_epon_ni_rogue_llid_scan, data), (bcmolt_func_packed_len) bcmolt_epon_ni_rogue_llid_scan_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_ni_rogue_llid_scan_data_pack, (bcmolt_func_unpack) bcmolt_epon_ni_rogue_llid_scan_data_unpack, bcmolt_epon_ni_rogue_llid_scan_data_scan };
+static bcmolt_group_info group_info_epon_ni_set_epon_ni_en_state = { BCMOLT_OBJ_ID_EPON_NI, BCMOLT_MGT_GROUP_OPER, 6, sizeof(bcmolt_epon_ni_set_epon_ni_en_state_data), sizeof(bcmolt_epon_ni_set_epon_ni_en_state), offsetof(bcmolt_epon_ni_set_epon_ni_en_state, data), (bcmolt_func_packed_len) bcmolt_epon_ni_set_epon_ni_en_state_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_ni_set_epon_ni_en_state_data_pack, (bcmolt_func_unpack) bcmolt_epon_ni_set_epon_ni_en_state_data_unpack, bcmolt_epon_ni_set_epon_ni_en_state_data_scan };
+static bcmolt_group_info group_info_epon_ni_start_onu_upgrade = { BCMOLT_OBJ_ID_EPON_NI, BCMOLT_MGT_GROUP_OPER, 7, sizeof(bcmolt_epon_ni_start_onu_upgrade_data), sizeof(bcmolt_epon_ni_start_onu_upgrade), offsetof(bcmolt_epon_ni_start_onu_upgrade, data), (bcmolt_func_packed_len) bcmolt_epon_ni_start_onu_upgrade_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_ni_start_onu_upgrade_data_pack, (bcmolt_func_unpack) bcmolt_epon_ni_start_onu_upgrade_data_unpack, bcmolt_epon_ni_start_onu_upgrade_data_scan };
+static bcmolt_group_info group_info_epon_onu_10g_us_key = { BCMOLT_OBJ_ID_EPON_ONU_10G_US, BCMOLT_MGT_GROUP_KEY, 0, sizeof(bcmolt_epon_onu_10g_us_key), 0, 0, (bcmolt_func_packed_len) bcmolt_epon_onu_10g_us_key_get_packed_length, (bcmolt_func_pack) bcmolt_epon_onu_10g_us_key_pack, (bcmolt_func_unpack) bcmolt_epon_onu_10g_us_key_unpack, bcmolt_epon_onu_10g_us_key_scan };
+static bcmolt_group_info group_info_epon_onu_10g_us_cfg = { BCMOLT_OBJ_ID_EPON_ONU_10G_US, BCMOLT_MGT_GROUP_CFG, 0, sizeof(bcmolt_epon_onu_10g_us_cfg_data), sizeof(bcmolt_epon_onu_10g_us_cfg), offsetof(bcmolt_epon_onu_10g_us_cfg, data), (bcmolt_func_packed_len) bcmolt_epon_onu_10g_us_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_onu_10g_us_cfg_data_pack, (bcmolt_func_unpack) bcmolt_epon_onu_10g_us_cfg_data_unpack, bcmolt_epon_onu_10g_us_cfg_data_scan };
+static bcmolt_group_info group_info_epon_onu_10g_us_stat = { BCMOLT_OBJ_ID_EPON_ONU_10G_US, BCMOLT_MGT_GROUP_STAT, 0, sizeof(bcmolt_epon_onu_10g_us_stat_data), sizeof(bcmolt_epon_onu_10g_us_stat), offsetof(bcmolt_epon_onu_10g_us_stat, data), (bcmolt_func_packed_len) bcmolt_epon_onu_10g_us_stat_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_onu_10g_us_stat_data_pack, (bcmolt_func_unpack) bcmolt_epon_onu_10g_us_stat_data_unpack, bcmolt_epon_onu_10g_us_stat_data_scan };
+static bcmolt_group_info group_info_epon_onu_10g_us_stat_cfg = { BCMOLT_OBJ_ID_EPON_ONU_10G_US, BCMOLT_MGT_GROUP_STAT_CFG, 0, sizeof(bcmolt_epon_onu_10g_us_stat_cfg_data), sizeof(bcmolt_epon_onu_10g_us_stat_cfg), offsetof(bcmolt_epon_onu_10g_us_stat_cfg, data), (bcmolt_func_packed_len) bcmolt_epon_onu_10g_us_stat_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_onu_10g_us_stat_cfg_data_pack, (bcmolt_func_unpack) bcmolt_epon_onu_10g_us_stat_cfg_data_unpack, bcmolt_epon_onu_10g_us_stat_cfg_data_scan };
+static bcmolt_group_info group_info_epon_onu_10g_us_stat_alarm_cleared = { BCMOLT_OBJ_ID_EPON_ONU_10G_US, BCMOLT_MGT_GROUP_AUTO, 0, sizeof(bcmolt_epon_onu_10g_us_stat_alarm_cleared_data), sizeof(bcmolt_epon_onu_10g_us_stat_alarm_cleared), offsetof(bcmolt_epon_onu_10g_us_stat_alarm_cleared, data), (bcmolt_func_packed_len) bcmolt_epon_onu_10g_us_stat_alarm_cleared_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_onu_10g_us_stat_alarm_cleared_data_pack, (bcmolt_func_unpack) bcmolt_epon_onu_10g_us_stat_alarm_cleared_data_unpack, bcmolt_epon_onu_10g_us_stat_alarm_cleared_data_scan };
+static bcmolt_group_info group_info_epon_onu_10g_us_stat_alarm_raised = { BCMOLT_OBJ_ID_EPON_ONU_10G_US, BCMOLT_MGT_GROUP_AUTO, 1, sizeof(bcmolt_epon_onu_10g_us_stat_alarm_raised_data), sizeof(bcmolt_epon_onu_10g_us_stat_alarm_raised), offsetof(bcmolt_epon_onu_10g_us_stat_alarm_raised, data), (bcmolt_func_packed_len) bcmolt_epon_onu_10g_us_stat_alarm_raised_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_onu_10g_us_stat_alarm_raised_data_pack, (bcmolt_func_unpack) bcmolt_epon_onu_10g_us_stat_alarm_raised_data_unpack, bcmolt_epon_onu_10g_us_stat_alarm_raised_data_scan };
+static bcmolt_group_info group_info_epon_onu_10g_us_auto_cfg = { BCMOLT_OBJ_ID_EPON_ONU_10G_US, BCMOLT_MGT_GROUP_AUTO_CFG, 0, sizeof(bcmolt_epon_onu_10g_us_auto_cfg_data), sizeof(bcmolt_epon_onu_10g_us_auto_cfg), offsetof(bcmolt_epon_onu_10g_us_auto_cfg, data), (bcmolt_func_packed_len) bcmolt_epon_onu_10g_us_auto_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_onu_10g_us_auto_cfg_data_pack, (bcmolt_func_unpack) bcmolt_epon_onu_10g_us_auto_cfg_data_unpack, bcmolt_epon_onu_10g_us_auto_cfg_data_scan };
+static bcmolt_group_info group_info_epon_onu_1g_us_key = { BCMOLT_OBJ_ID_EPON_ONU_1G_US, BCMOLT_MGT_GROUP_KEY, 0, sizeof(bcmolt_epon_onu_1g_us_key), 0, 0, (bcmolt_func_packed_len) bcmolt_epon_onu_1g_us_key_get_packed_length, (bcmolt_func_pack) bcmolt_epon_onu_1g_us_key_pack, (bcmolt_func_unpack) bcmolt_epon_onu_1g_us_key_unpack, bcmolt_epon_onu_1g_us_key_scan };
+static bcmolt_group_info group_info_epon_onu_1g_us_cfg = { BCMOLT_OBJ_ID_EPON_ONU_1G_US, BCMOLT_MGT_GROUP_CFG, 0, sizeof(bcmolt_epon_onu_1g_us_cfg_data), sizeof(bcmolt_epon_onu_1g_us_cfg), offsetof(bcmolt_epon_onu_1g_us_cfg, data), (bcmolt_func_packed_len) bcmolt_epon_onu_1g_us_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_onu_1g_us_cfg_data_pack, (bcmolt_func_unpack) bcmolt_epon_onu_1g_us_cfg_data_unpack, bcmolt_epon_onu_1g_us_cfg_data_scan };
+static bcmolt_group_info group_info_epon_onu_1g_us_stat = { BCMOLT_OBJ_ID_EPON_ONU_1G_US, BCMOLT_MGT_GROUP_STAT, 0, sizeof(bcmolt_epon_onu_1g_us_stat_data), sizeof(bcmolt_epon_onu_1g_us_stat), offsetof(bcmolt_epon_onu_1g_us_stat, data), (bcmolt_func_packed_len) bcmolt_epon_onu_1g_us_stat_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_onu_1g_us_stat_data_pack, (bcmolt_func_unpack) bcmolt_epon_onu_1g_us_stat_data_unpack, bcmolt_epon_onu_1g_us_stat_data_scan };
+static bcmolt_group_info group_info_epon_onu_1g_us_stat_cfg = { BCMOLT_OBJ_ID_EPON_ONU_1G_US, BCMOLT_MGT_GROUP_STAT_CFG, 0, sizeof(bcmolt_epon_onu_1g_us_stat_cfg_data), sizeof(bcmolt_epon_onu_1g_us_stat_cfg), offsetof(bcmolt_epon_onu_1g_us_stat_cfg, data), (bcmolt_func_packed_len) bcmolt_epon_onu_1g_us_stat_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_onu_1g_us_stat_cfg_data_pack, (bcmolt_func_unpack) bcmolt_epon_onu_1g_us_stat_cfg_data_unpack, bcmolt_epon_onu_1g_us_stat_cfg_data_scan };
+static bcmolt_group_info group_info_epon_onu_1g_us_stat_alarm_cleared = { BCMOLT_OBJ_ID_EPON_ONU_1G_US, BCMOLT_MGT_GROUP_AUTO, 0, sizeof(bcmolt_epon_onu_1g_us_stat_alarm_cleared_data), sizeof(bcmolt_epon_onu_1g_us_stat_alarm_cleared), offsetof(bcmolt_epon_onu_1g_us_stat_alarm_cleared, data), (bcmolt_func_packed_len) bcmolt_epon_onu_1g_us_stat_alarm_cleared_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_onu_1g_us_stat_alarm_cleared_data_pack, (bcmolt_func_unpack) bcmolt_epon_onu_1g_us_stat_alarm_cleared_data_unpack, bcmolt_epon_onu_1g_us_stat_alarm_cleared_data_scan };
+static bcmolt_group_info group_info_epon_onu_1g_us_stat_alarm_raised = { BCMOLT_OBJ_ID_EPON_ONU_1G_US, BCMOLT_MGT_GROUP_AUTO, 1, sizeof(bcmolt_epon_onu_1g_us_stat_alarm_raised_data), sizeof(bcmolt_epon_onu_1g_us_stat_alarm_raised), offsetof(bcmolt_epon_onu_1g_us_stat_alarm_raised, data), (bcmolt_func_packed_len) bcmolt_epon_onu_1g_us_stat_alarm_raised_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_onu_1g_us_stat_alarm_raised_data_pack, (bcmolt_func_unpack) bcmolt_epon_onu_1g_us_stat_alarm_raised_data_unpack, bcmolt_epon_onu_1g_us_stat_alarm_raised_data_scan };
+static bcmolt_group_info group_info_epon_onu_1g_us_auto_cfg = { BCMOLT_OBJ_ID_EPON_ONU_1G_US, BCMOLT_MGT_GROUP_AUTO_CFG, 0, sizeof(bcmolt_epon_onu_1g_us_auto_cfg_data), sizeof(bcmolt_epon_onu_1g_us_auto_cfg), offsetof(bcmolt_epon_onu_1g_us_auto_cfg, data), (bcmolt_func_packed_len) bcmolt_epon_onu_1g_us_auto_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_onu_1g_us_auto_cfg_data_pack, (bcmolt_func_unpack) bcmolt_epon_onu_1g_us_auto_cfg_data_unpack, bcmolt_epon_onu_1g_us_auto_cfg_data_scan };
+static bcmolt_group_info group_info_epon_path_10g_ds_key = { BCMOLT_OBJ_ID_EPON_PATH_10G_DS, BCMOLT_MGT_GROUP_KEY, 0, sizeof(bcmolt_epon_path_10g_ds_key), 0, 0, (bcmolt_func_packed_len) bcmolt_epon_path_10g_ds_key_get_packed_length, (bcmolt_func_pack) bcmolt_epon_path_10g_ds_key_pack, (bcmolt_func_unpack) bcmolt_epon_path_10g_ds_key_unpack, bcmolt_epon_path_10g_ds_key_scan };
+static bcmolt_group_info group_info_epon_path_10g_ds_cfg = { BCMOLT_OBJ_ID_EPON_PATH_10G_DS, BCMOLT_MGT_GROUP_CFG, 0, sizeof(bcmolt_epon_path_10g_ds_cfg_data), sizeof(bcmolt_epon_path_10g_ds_cfg), offsetof(bcmolt_epon_path_10g_ds_cfg, data), (bcmolt_func_packed_len) bcmolt_epon_path_10g_ds_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_path_10g_ds_cfg_data_pack, (bcmolt_func_unpack) bcmolt_epon_path_10g_ds_cfg_data_unpack, bcmolt_epon_path_10g_ds_cfg_data_scan };
+static bcmolt_group_info group_info_epon_path_10g_ds_stat = { BCMOLT_OBJ_ID_EPON_PATH_10G_DS, BCMOLT_MGT_GROUP_STAT, 0, sizeof(bcmolt_epon_path_10g_ds_stat_data), sizeof(bcmolt_epon_path_10g_ds_stat), offsetof(bcmolt_epon_path_10g_ds_stat, data), (bcmolt_func_packed_len) bcmolt_epon_path_10g_ds_stat_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_path_10g_ds_stat_data_pack, (bcmolt_func_unpack) bcmolt_epon_path_10g_ds_stat_data_unpack, bcmolt_epon_path_10g_ds_stat_data_scan };
+static bcmolt_group_info group_info_epon_path_10g_ds_stat_cfg = { BCMOLT_OBJ_ID_EPON_PATH_10G_DS, BCMOLT_MGT_GROUP_STAT_CFG, 0, sizeof(bcmolt_epon_path_10g_ds_stat_cfg_data), sizeof(bcmolt_epon_path_10g_ds_stat_cfg), offsetof(bcmolt_epon_path_10g_ds_stat_cfg, data), (bcmolt_func_packed_len) bcmolt_epon_path_10g_ds_stat_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_path_10g_ds_stat_cfg_data_pack, (bcmolt_func_unpack) bcmolt_epon_path_10g_ds_stat_cfg_data_unpack, bcmolt_epon_path_10g_ds_stat_cfg_data_scan };
+static bcmolt_group_info group_info_epon_path_10g_ds_stat_alarm_cleared = { BCMOLT_OBJ_ID_EPON_PATH_10G_DS, BCMOLT_MGT_GROUP_AUTO, 0, sizeof(bcmolt_epon_path_10g_ds_stat_alarm_cleared_data), sizeof(bcmolt_epon_path_10g_ds_stat_alarm_cleared), offsetof(bcmolt_epon_path_10g_ds_stat_alarm_cleared, data), (bcmolt_func_packed_len) bcmolt_epon_path_10g_ds_stat_alarm_cleared_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_path_10g_ds_stat_alarm_cleared_data_pack, (bcmolt_func_unpack) bcmolt_epon_path_10g_ds_stat_alarm_cleared_data_unpack, bcmolt_epon_path_10g_ds_stat_alarm_cleared_data_scan };
+static bcmolt_group_info group_info_epon_path_10g_ds_stat_alarm_raised = { BCMOLT_OBJ_ID_EPON_PATH_10G_DS, BCMOLT_MGT_GROUP_AUTO, 1, sizeof(bcmolt_epon_path_10g_ds_stat_alarm_raised_data), sizeof(bcmolt_epon_path_10g_ds_stat_alarm_raised), offsetof(bcmolt_epon_path_10g_ds_stat_alarm_raised, data), (bcmolt_func_packed_len) bcmolt_epon_path_10g_ds_stat_alarm_raised_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_path_10g_ds_stat_alarm_raised_data_pack, (bcmolt_func_unpack) bcmolt_epon_path_10g_ds_stat_alarm_raised_data_unpack, bcmolt_epon_path_10g_ds_stat_alarm_raised_data_scan };
+static bcmolt_group_info group_info_epon_path_10g_ds_auto_cfg = { BCMOLT_OBJ_ID_EPON_PATH_10G_DS, BCMOLT_MGT_GROUP_AUTO_CFG, 0, sizeof(bcmolt_epon_path_10g_ds_auto_cfg_data), sizeof(bcmolt_epon_path_10g_ds_auto_cfg), offsetof(bcmolt_epon_path_10g_ds_auto_cfg, data), (bcmolt_func_packed_len) bcmolt_epon_path_10g_ds_auto_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_path_10g_ds_auto_cfg_data_pack, (bcmolt_func_unpack) bcmolt_epon_path_10g_ds_auto_cfg_data_unpack, bcmolt_epon_path_10g_ds_auto_cfg_data_scan };
+static bcmolt_group_info group_info_epon_path_10g_us_key = { BCMOLT_OBJ_ID_EPON_PATH_10G_US, BCMOLT_MGT_GROUP_KEY, 0, sizeof(bcmolt_epon_path_10g_us_key), 0, 0, (bcmolt_func_packed_len) bcmolt_epon_path_10g_us_key_get_packed_length, (bcmolt_func_pack) bcmolt_epon_path_10g_us_key_pack, (bcmolt_func_unpack) bcmolt_epon_path_10g_us_key_unpack, bcmolt_epon_path_10g_us_key_scan };
+static bcmolt_group_info group_info_epon_path_10g_us_cfg = { BCMOLT_OBJ_ID_EPON_PATH_10G_US, BCMOLT_MGT_GROUP_CFG, 0, sizeof(bcmolt_epon_path_10g_us_cfg_data), sizeof(bcmolt_epon_path_10g_us_cfg), offsetof(bcmolt_epon_path_10g_us_cfg, data), (bcmolt_func_packed_len) bcmolt_epon_path_10g_us_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_path_10g_us_cfg_data_pack, (bcmolt_func_unpack) bcmolt_epon_path_10g_us_cfg_data_unpack, bcmolt_epon_path_10g_us_cfg_data_scan };
+static bcmolt_group_info group_info_epon_path_10g_us_stat = { BCMOLT_OBJ_ID_EPON_PATH_10G_US, BCMOLT_MGT_GROUP_STAT, 0, sizeof(bcmolt_epon_path_10g_us_stat_data), sizeof(bcmolt_epon_path_10g_us_stat), offsetof(bcmolt_epon_path_10g_us_stat, data), (bcmolt_func_packed_len) bcmolt_epon_path_10g_us_stat_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_path_10g_us_stat_data_pack, (bcmolt_func_unpack) bcmolt_epon_path_10g_us_stat_data_unpack, bcmolt_epon_path_10g_us_stat_data_scan };
+static bcmolt_group_info group_info_epon_path_10g_us_stat_cfg = { BCMOLT_OBJ_ID_EPON_PATH_10G_US, BCMOLT_MGT_GROUP_STAT_CFG, 0, sizeof(bcmolt_epon_path_10g_us_stat_cfg_data), sizeof(bcmolt_epon_path_10g_us_stat_cfg), offsetof(bcmolt_epon_path_10g_us_stat_cfg, data), (bcmolt_func_packed_len) bcmolt_epon_path_10g_us_stat_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_path_10g_us_stat_cfg_data_pack, (bcmolt_func_unpack) bcmolt_epon_path_10g_us_stat_cfg_data_unpack, bcmolt_epon_path_10g_us_stat_cfg_data_scan };
+static bcmolt_group_info group_info_epon_path_10g_us_stat_alarm_cleared = { BCMOLT_OBJ_ID_EPON_PATH_10G_US, BCMOLT_MGT_GROUP_AUTO, 0, sizeof(bcmolt_epon_path_10g_us_stat_alarm_cleared_data), sizeof(bcmolt_epon_path_10g_us_stat_alarm_cleared), offsetof(bcmolt_epon_path_10g_us_stat_alarm_cleared, data), (bcmolt_func_packed_len) bcmolt_epon_path_10g_us_stat_alarm_cleared_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_path_10g_us_stat_alarm_cleared_data_pack, (bcmolt_func_unpack) bcmolt_epon_path_10g_us_stat_alarm_cleared_data_unpack, bcmolt_epon_path_10g_us_stat_alarm_cleared_data_scan };
+static bcmolt_group_info group_info_epon_path_10g_us_stat_alarm_raised = { BCMOLT_OBJ_ID_EPON_PATH_10G_US, BCMOLT_MGT_GROUP_AUTO, 1, sizeof(bcmolt_epon_path_10g_us_stat_alarm_raised_data), sizeof(bcmolt_epon_path_10g_us_stat_alarm_raised), offsetof(bcmolt_epon_path_10g_us_stat_alarm_raised, data), (bcmolt_func_packed_len) bcmolt_epon_path_10g_us_stat_alarm_raised_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_path_10g_us_stat_alarm_raised_data_pack, (bcmolt_func_unpack) bcmolt_epon_path_10g_us_stat_alarm_raised_data_unpack, bcmolt_epon_path_10g_us_stat_alarm_raised_data_scan };
+static bcmolt_group_info group_info_epon_path_10g_us_auto_cfg = { BCMOLT_OBJ_ID_EPON_PATH_10G_US, BCMOLT_MGT_GROUP_AUTO_CFG, 0, sizeof(bcmolt_epon_path_10g_us_auto_cfg_data), sizeof(bcmolt_epon_path_10g_us_auto_cfg), offsetof(bcmolt_epon_path_10g_us_auto_cfg, data), (bcmolt_func_packed_len) bcmolt_epon_path_10g_us_auto_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_path_10g_us_auto_cfg_data_pack, (bcmolt_func_unpack) bcmolt_epon_path_10g_us_auto_cfg_data_unpack, bcmolt_epon_path_10g_us_auto_cfg_data_scan };
+static bcmolt_group_info group_info_epon_path_1g_ds_key = { BCMOLT_OBJ_ID_EPON_PATH_1G_DS, BCMOLT_MGT_GROUP_KEY, 0, sizeof(bcmolt_epon_path_1g_ds_key), 0, 0, (bcmolt_func_packed_len) bcmolt_epon_path_1g_ds_key_get_packed_length, (bcmolt_func_pack) bcmolt_epon_path_1g_ds_key_pack, (bcmolt_func_unpack) bcmolt_epon_path_1g_ds_key_unpack, bcmolt_epon_path_1g_ds_key_scan };
+static bcmolt_group_info group_info_epon_path_1g_ds_cfg = { BCMOLT_OBJ_ID_EPON_PATH_1G_DS, BCMOLT_MGT_GROUP_CFG, 0, sizeof(bcmolt_epon_path_1g_ds_cfg_data), sizeof(bcmolt_epon_path_1g_ds_cfg), offsetof(bcmolt_epon_path_1g_ds_cfg, data), (bcmolt_func_packed_len) bcmolt_epon_path_1g_ds_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_path_1g_ds_cfg_data_pack, (bcmolt_func_unpack) bcmolt_epon_path_1g_ds_cfg_data_unpack, bcmolt_epon_path_1g_ds_cfg_data_scan };
+static bcmolt_group_info group_info_epon_path_1g_ds_stat = { BCMOLT_OBJ_ID_EPON_PATH_1G_DS, BCMOLT_MGT_GROUP_STAT, 0, sizeof(bcmolt_epon_path_1g_ds_stat_data), sizeof(bcmolt_epon_path_1g_ds_stat), offsetof(bcmolt_epon_path_1g_ds_stat, data), (bcmolt_func_packed_len) bcmolt_epon_path_1g_ds_stat_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_path_1g_ds_stat_data_pack, (bcmolt_func_unpack) bcmolt_epon_path_1g_ds_stat_data_unpack, bcmolt_epon_path_1g_ds_stat_data_scan };
+static bcmolt_group_info group_info_epon_path_1g_ds_stat_cfg = { BCMOLT_OBJ_ID_EPON_PATH_1G_DS, BCMOLT_MGT_GROUP_STAT_CFG, 0, sizeof(bcmolt_epon_path_1g_ds_stat_cfg_data), sizeof(bcmolt_epon_path_1g_ds_stat_cfg), offsetof(bcmolt_epon_path_1g_ds_stat_cfg, data), (bcmolt_func_packed_len) bcmolt_epon_path_1g_ds_stat_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_path_1g_ds_stat_cfg_data_pack, (bcmolt_func_unpack) bcmolt_epon_path_1g_ds_stat_cfg_data_unpack, bcmolt_epon_path_1g_ds_stat_cfg_data_scan };
+static bcmolt_group_info group_info_epon_path_1g_ds_stat_alarm_cleared = { BCMOLT_OBJ_ID_EPON_PATH_1G_DS, BCMOLT_MGT_GROUP_AUTO, 0, sizeof(bcmolt_epon_path_1g_ds_stat_alarm_cleared_data), sizeof(bcmolt_epon_path_1g_ds_stat_alarm_cleared), offsetof(bcmolt_epon_path_1g_ds_stat_alarm_cleared, data), (bcmolt_func_packed_len) bcmolt_epon_path_1g_ds_stat_alarm_cleared_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_path_1g_ds_stat_alarm_cleared_data_pack, (bcmolt_func_unpack) bcmolt_epon_path_1g_ds_stat_alarm_cleared_data_unpack, bcmolt_epon_path_1g_ds_stat_alarm_cleared_data_scan };
+static bcmolt_group_info group_info_epon_path_1g_ds_stat_alarm_raised = { BCMOLT_OBJ_ID_EPON_PATH_1G_DS, BCMOLT_MGT_GROUP_AUTO, 1, sizeof(bcmolt_epon_path_1g_ds_stat_alarm_raised_data), sizeof(bcmolt_epon_path_1g_ds_stat_alarm_raised), offsetof(bcmolt_epon_path_1g_ds_stat_alarm_raised, data), (bcmolt_func_packed_len) bcmolt_epon_path_1g_ds_stat_alarm_raised_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_path_1g_ds_stat_alarm_raised_data_pack, (bcmolt_func_unpack) bcmolt_epon_path_1g_ds_stat_alarm_raised_data_unpack, bcmolt_epon_path_1g_ds_stat_alarm_raised_data_scan };
+static bcmolt_group_info group_info_epon_path_1g_ds_auto_cfg = { BCMOLT_OBJ_ID_EPON_PATH_1G_DS, BCMOLT_MGT_GROUP_AUTO_CFG, 0, sizeof(bcmolt_epon_path_1g_ds_auto_cfg_data), sizeof(bcmolt_epon_path_1g_ds_auto_cfg), offsetof(bcmolt_epon_path_1g_ds_auto_cfg, data), (bcmolt_func_packed_len) bcmolt_epon_path_1g_ds_auto_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_path_1g_ds_auto_cfg_data_pack, (bcmolt_func_unpack) bcmolt_epon_path_1g_ds_auto_cfg_data_unpack, bcmolt_epon_path_1g_ds_auto_cfg_data_scan };
+static bcmolt_group_info group_info_epon_path_1g_us_key = { BCMOLT_OBJ_ID_EPON_PATH_1G_US, BCMOLT_MGT_GROUP_KEY, 0, sizeof(bcmolt_epon_path_1g_us_key), 0, 0, (bcmolt_func_packed_len) bcmolt_epon_path_1g_us_key_get_packed_length, (bcmolt_func_pack) bcmolt_epon_path_1g_us_key_pack, (bcmolt_func_unpack) bcmolt_epon_path_1g_us_key_unpack, bcmolt_epon_path_1g_us_key_scan };
+static bcmolt_group_info group_info_epon_path_1g_us_cfg = { BCMOLT_OBJ_ID_EPON_PATH_1G_US, BCMOLT_MGT_GROUP_CFG, 0, sizeof(bcmolt_epon_path_1g_us_cfg_data), sizeof(bcmolt_epon_path_1g_us_cfg), offsetof(bcmolt_epon_path_1g_us_cfg, data), (bcmolt_func_packed_len) bcmolt_epon_path_1g_us_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_path_1g_us_cfg_data_pack, (bcmolt_func_unpack) bcmolt_epon_path_1g_us_cfg_data_unpack, bcmolt_epon_path_1g_us_cfg_data_scan };
+static bcmolt_group_info group_info_epon_path_1g_us_stat = { BCMOLT_OBJ_ID_EPON_PATH_1G_US, BCMOLT_MGT_GROUP_STAT, 0, sizeof(bcmolt_epon_path_1g_us_stat_data), sizeof(bcmolt_epon_path_1g_us_stat), offsetof(bcmolt_epon_path_1g_us_stat, data), (bcmolt_func_packed_len) bcmolt_epon_path_1g_us_stat_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_path_1g_us_stat_data_pack, (bcmolt_func_unpack) bcmolt_epon_path_1g_us_stat_data_unpack, bcmolt_epon_path_1g_us_stat_data_scan };
+static bcmolt_group_info group_info_epon_path_1g_us_stat_cfg = { BCMOLT_OBJ_ID_EPON_PATH_1G_US, BCMOLT_MGT_GROUP_STAT_CFG, 0, sizeof(bcmolt_epon_path_1g_us_stat_cfg_data), sizeof(bcmolt_epon_path_1g_us_stat_cfg), offsetof(bcmolt_epon_path_1g_us_stat_cfg, data), (bcmolt_func_packed_len) bcmolt_epon_path_1g_us_stat_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_path_1g_us_stat_cfg_data_pack, (bcmolt_func_unpack) bcmolt_epon_path_1g_us_stat_cfg_data_unpack, bcmolt_epon_path_1g_us_stat_cfg_data_scan };
+static bcmolt_group_info group_info_epon_path_1g_us_stat_alarm_cleared = { BCMOLT_OBJ_ID_EPON_PATH_1G_US, BCMOLT_MGT_GROUP_AUTO, 0, sizeof(bcmolt_epon_path_1g_us_stat_alarm_cleared_data), sizeof(bcmolt_epon_path_1g_us_stat_alarm_cleared), offsetof(bcmolt_epon_path_1g_us_stat_alarm_cleared, data), (bcmolt_func_packed_len) bcmolt_epon_path_1g_us_stat_alarm_cleared_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_path_1g_us_stat_alarm_cleared_data_pack, (bcmolt_func_unpack) bcmolt_epon_path_1g_us_stat_alarm_cleared_data_unpack, bcmolt_epon_path_1g_us_stat_alarm_cleared_data_scan };
+static bcmolt_group_info group_info_epon_path_1g_us_stat_alarm_raised = { BCMOLT_OBJ_ID_EPON_PATH_1G_US, BCMOLT_MGT_GROUP_AUTO, 1, sizeof(bcmolt_epon_path_1g_us_stat_alarm_raised_data), sizeof(bcmolt_epon_path_1g_us_stat_alarm_raised), offsetof(bcmolt_epon_path_1g_us_stat_alarm_raised, data), (bcmolt_func_packed_len) bcmolt_epon_path_1g_us_stat_alarm_raised_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_path_1g_us_stat_alarm_raised_data_pack, (bcmolt_func_unpack) bcmolt_epon_path_1g_us_stat_alarm_raised_data_unpack, bcmolt_epon_path_1g_us_stat_alarm_raised_data_scan };
+static bcmolt_group_info group_info_epon_path_1g_us_auto_cfg = { BCMOLT_OBJ_ID_EPON_PATH_1G_US, BCMOLT_MGT_GROUP_AUTO_CFG, 0, sizeof(bcmolt_epon_path_1g_us_auto_cfg_data), sizeof(bcmolt_epon_path_1g_us_auto_cfg), offsetof(bcmolt_epon_path_1g_us_auto_cfg, data), (bcmolt_func_packed_len) bcmolt_epon_path_1g_us_auto_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_path_1g_us_auto_cfg_data_pack, (bcmolt_func_unpack) bcmolt_epon_path_1g_us_auto_cfg_data_unpack, bcmolt_epon_path_1g_us_auto_cfg_data_scan };
+static bcmolt_group_info group_info_epon_rp_key = { BCMOLT_OBJ_ID_EPON_RP, BCMOLT_MGT_GROUP_KEY, 0, sizeof(bcmolt_epon_rp_key), 0, 0, (bcmolt_func_packed_len) bcmolt_epon_rp_key_get_packed_length, (bcmolt_func_pack) bcmolt_epon_rp_key_pack, (bcmolt_func_unpack) bcmolt_epon_rp_key_unpack, bcmolt_epon_rp_key_scan };
+static bcmolt_group_info group_info_epon_rp_cfg = { BCMOLT_OBJ_ID_EPON_RP, BCMOLT_MGT_GROUP_CFG, 0, sizeof(bcmolt_epon_rp_cfg_data), sizeof(bcmolt_epon_rp_cfg), offsetof(bcmolt_epon_rp_cfg, data), (bcmolt_func_packed_len) bcmolt_epon_rp_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_epon_rp_cfg_data_pack, (bcmolt_func_unpack) bcmolt_epon_rp_cfg_data_unpack, bcmolt_epon_rp_cfg_data_scan };
+static bcmolt_group_info group_info_gpio_key = { BCMOLT_OBJ_ID_GPIO, BCMOLT_MGT_GROUP_KEY, 0, sizeof(bcmolt_gpio_key), 0, 0, (bcmolt_func_packed_len) bcmolt_gpio_key_get_packed_length, (bcmolt_func_pack) bcmolt_gpio_key_pack, (bcmolt_func_unpack) bcmolt_gpio_key_unpack, bcmolt_gpio_key_scan };
+static bcmolt_group_info group_info_gpio_cfg = { BCMOLT_OBJ_ID_GPIO, BCMOLT_MGT_GROUP_CFG, 0, sizeof(bcmolt_gpio_cfg_data), sizeof(bcmolt_gpio_cfg), offsetof(bcmolt_gpio_cfg, data), (bcmolt_func_packed_len) bcmolt_gpio_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpio_cfg_data_pack, (bcmolt_func_unpack) bcmolt_gpio_cfg_data_unpack, bcmolt_gpio_cfg_data_scan };
+static bcmolt_group_info group_info_gpon_alloc_key = { BCMOLT_OBJ_ID_GPON_ALLOC, BCMOLT_MGT_GROUP_KEY, 0, sizeof(bcmolt_gpon_alloc_key), 0, 0, (bcmolt_func_packed_len) bcmolt_gpon_alloc_key_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_alloc_key_pack, (bcmolt_func_unpack) bcmolt_gpon_alloc_key_unpack, bcmolt_gpon_alloc_key_scan };
+static bcmolt_group_info group_info_gpon_alloc_cfg = { BCMOLT_OBJ_ID_GPON_ALLOC, BCMOLT_MGT_GROUP_CFG, 0, sizeof(bcmolt_gpon_alloc_cfg_data), sizeof(bcmolt_gpon_alloc_cfg), offsetof(bcmolt_gpon_alloc_cfg, data), (bcmolt_func_packed_len) bcmolt_gpon_alloc_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_alloc_cfg_data_pack, (bcmolt_func_unpack) bcmolt_gpon_alloc_cfg_data_unpack, bcmolt_gpon_alloc_cfg_data_scan };
+static bcmolt_group_info group_info_gpon_alloc_stat = { BCMOLT_OBJ_ID_GPON_ALLOC, BCMOLT_MGT_GROUP_STAT, 0, sizeof(bcmolt_gpon_alloc_stat_data), sizeof(bcmolt_gpon_alloc_stat), offsetof(bcmolt_gpon_alloc_stat, data), (bcmolt_func_packed_len) bcmolt_gpon_alloc_stat_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_alloc_stat_data_pack, (bcmolt_func_unpack) bcmolt_gpon_alloc_stat_data_unpack, bcmolt_gpon_alloc_stat_data_scan };
+static bcmolt_group_info group_info_gpon_alloc_stat_cfg = { BCMOLT_OBJ_ID_GPON_ALLOC, BCMOLT_MGT_GROUP_STAT_CFG, 0, sizeof(bcmolt_gpon_alloc_stat_cfg_data), sizeof(bcmolt_gpon_alloc_stat_cfg), offsetof(bcmolt_gpon_alloc_stat_cfg, data), (bcmolt_func_packed_len) bcmolt_gpon_alloc_stat_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_alloc_stat_cfg_data_pack, (bcmolt_func_unpack) bcmolt_gpon_alloc_stat_cfg_data_unpack, bcmolt_gpon_alloc_stat_cfg_data_scan };
+static bcmolt_group_info group_info_gpon_alloc_configuration_completed = { BCMOLT_OBJ_ID_GPON_ALLOC, BCMOLT_MGT_GROUP_AUTO, 0, sizeof(bcmolt_gpon_alloc_configuration_completed_data), sizeof(bcmolt_gpon_alloc_configuration_completed), offsetof(bcmolt_gpon_alloc_configuration_completed, data), (bcmolt_func_packed_len) bcmolt_gpon_alloc_configuration_completed_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_alloc_configuration_completed_data_pack, (bcmolt_func_unpack) bcmolt_gpon_alloc_configuration_completed_data_unpack, bcmolt_gpon_alloc_configuration_completed_data_scan };
+static bcmolt_group_info group_info_gpon_alloc_get_alloc_stats_completed = { BCMOLT_OBJ_ID_GPON_ALLOC, BCMOLT_MGT_GROUP_AUTO, 1, sizeof(bcmolt_gpon_alloc_get_alloc_stats_completed_data), sizeof(bcmolt_gpon_alloc_get_alloc_stats_completed), offsetof(bcmolt_gpon_alloc_get_alloc_stats_completed, data), (bcmolt_func_packed_len) bcmolt_gpon_alloc_get_alloc_stats_completed_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_alloc_get_alloc_stats_completed_data_pack, (bcmolt_func_unpack) bcmolt_gpon_alloc_get_alloc_stats_completed_data_unpack, bcmolt_gpon_alloc_get_alloc_stats_completed_data_scan };
+static bcmolt_group_info group_info_gpon_alloc_stat_alarm_cleared = { BCMOLT_OBJ_ID_GPON_ALLOC, BCMOLT_MGT_GROUP_AUTO, 2, sizeof(bcmolt_gpon_alloc_stat_alarm_cleared_data), sizeof(bcmolt_gpon_alloc_stat_alarm_cleared), offsetof(bcmolt_gpon_alloc_stat_alarm_cleared, data), (bcmolt_func_packed_len) bcmolt_gpon_alloc_stat_alarm_cleared_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_alloc_stat_alarm_cleared_data_pack, (bcmolt_func_unpack) bcmolt_gpon_alloc_stat_alarm_cleared_data_unpack, bcmolt_gpon_alloc_stat_alarm_cleared_data_scan };
+static bcmolt_group_info group_info_gpon_alloc_stat_alarm_raised = { BCMOLT_OBJ_ID_GPON_ALLOC, BCMOLT_MGT_GROUP_AUTO, 3, sizeof(bcmolt_gpon_alloc_stat_alarm_raised_data), sizeof(bcmolt_gpon_alloc_stat_alarm_raised), offsetof(bcmolt_gpon_alloc_stat_alarm_raised, data), (bcmolt_func_packed_len) bcmolt_gpon_alloc_stat_alarm_raised_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_alloc_stat_alarm_raised_data_pack, (bcmolt_func_unpack) bcmolt_gpon_alloc_stat_alarm_raised_data_unpack, bcmolt_gpon_alloc_stat_alarm_raised_data_scan };
+static bcmolt_group_info group_info_gpon_alloc_auto_cfg = { BCMOLT_OBJ_ID_GPON_ALLOC, BCMOLT_MGT_GROUP_AUTO_CFG, 0, sizeof(bcmolt_gpon_alloc_auto_cfg_data), sizeof(bcmolt_gpon_alloc_auto_cfg), offsetof(bcmolt_gpon_alloc_auto_cfg, data), (bcmolt_func_packed_len) bcmolt_gpon_alloc_auto_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_alloc_auto_cfg_data_pack, (bcmolt_func_unpack) bcmolt_gpon_alloc_auto_cfg_data_unpack, bcmolt_gpon_alloc_auto_cfg_data_scan };
+static bcmolt_group_info group_info_gpon_alloc_get_stats = { BCMOLT_OBJ_ID_GPON_ALLOC, BCMOLT_MGT_GROUP_OPER, 0, sizeof(bcmolt_gpon_alloc_get_stats_data), sizeof(bcmolt_gpon_alloc_get_stats), offsetof(bcmolt_gpon_alloc_get_stats, data), (bcmolt_func_packed_len) bcmolt_gpon_alloc_get_stats_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_alloc_get_stats_data_pack, (bcmolt_func_unpack) bcmolt_gpon_alloc_get_stats_data_unpack, bcmolt_gpon_alloc_get_stats_data_scan };
+static bcmolt_group_info group_info_gpon_alloc_set_state = { BCMOLT_OBJ_ID_GPON_ALLOC, BCMOLT_MGT_GROUP_OPER, 1, sizeof(bcmolt_gpon_alloc_set_state_data), sizeof(bcmolt_gpon_alloc_set_state), offsetof(bcmolt_gpon_alloc_set_state, data), (bcmolt_func_packed_len) bcmolt_gpon_alloc_set_state_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_alloc_set_state_data_pack, (bcmolt_func_unpack) bcmolt_gpon_alloc_set_state_data_unpack, bcmolt_gpon_alloc_set_state_data_scan };
+static bcmolt_group_info group_info_gpon_gem_port_key = { BCMOLT_OBJ_ID_GPON_GEM_PORT, BCMOLT_MGT_GROUP_KEY, 0, sizeof(bcmolt_gpon_gem_port_key), 0, 0, (bcmolt_func_packed_len) bcmolt_gpon_gem_port_key_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_gem_port_key_pack, (bcmolt_func_unpack) bcmolt_gpon_gem_port_key_unpack, bcmolt_gpon_gem_port_key_scan };
+static bcmolt_group_info group_info_gpon_gem_port_cfg = { BCMOLT_OBJ_ID_GPON_GEM_PORT, BCMOLT_MGT_GROUP_CFG, 0, sizeof(bcmolt_gpon_gem_port_cfg_data), sizeof(bcmolt_gpon_gem_port_cfg), offsetof(bcmolt_gpon_gem_port_cfg, data), (bcmolt_func_packed_len) bcmolt_gpon_gem_port_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_gem_port_cfg_data_pack, (bcmolt_func_unpack) bcmolt_gpon_gem_port_cfg_data_unpack, bcmolt_gpon_gem_port_cfg_data_scan };
+static bcmolt_group_info group_info_gpon_gem_port_stat = { BCMOLT_OBJ_ID_GPON_GEM_PORT, BCMOLT_MGT_GROUP_STAT, 0, sizeof(bcmolt_gpon_gem_port_stat_data), sizeof(bcmolt_gpon_gem_port_stat), offsetof(bcmolt_gpon_gem_port_stat, data), (bcmolt_func_packed_len) bcmolt_gpon_gem_port_stat_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_gem_port_stat_data_pack, (bcmolt_func_unpack) bcmolt_gpon_gem_port_stat_data_unpack, bcmolt_gpon_gem_port_stat_data_scan };
+static bcmolt_group_info group_info_gpon_gem_port_stat_cfg = { BCMOLT_OBJ_ID_GPON_GEM_PORT, BCMOLT_MGT_GROUP_STAT_CFG, 0, sizeof(bcmolt_gpon_gem_port_stat_cfg_data), sizeof(bcmolt_gpon_gem_port_stat_cfg), offsetof(bcmolt_gpon_gem_port_stat_cfg, data), (bcmolt_func_packed_len) bcmolt_gpon_gem_port_stat_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_gem_port_stat_cfg_data_pack, (bcmolt_func_unpack) bcmolt_gpon_gem_port_stat_cfg_data_unpack, bcmolt_gpon_gem_port_stat_cfg_data_scan };
+static bcmolt_group_info group_info_gpon_gem_port_configuration_completed = { BCMOLT_OBJ_ID_GPON_GEM_PORT, BCMOLT_MGT_GROUP_AUTO, 0, sizeof(bcmolt_gpon_gem_port_configuration_completed_data), sizeof(bcmolt_gpon_gem_port_configuration_completed), offsetof(bcmolt_gpon_gem_port_configuration_completed, data), (bcmolt_func_packed_len) bcmolt_gpon_gem_port_configuration_completed_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_gem_port_configuration_completed_data_pack, (bcmolt_func_unpack) bcmolt_gpon_gem_port_configuration_completed_data_unpack, bcmolt_gpon_gem_port_configuration_completed_data_scan };
+static bcmolt_group_info group_info_gpon_gem_port_stat_alarm_cleared = { BCMOLT_OBJ_ID_GPON_GEM_PORT, BCMOLT_MGT_GROUP_AUTO, 1, sizeof(bcmolt_gpon_gem_port_stat_alarm_cleared_data), sizeof(bcmolt_gpon_gem_port_stat_alarm_cleared), offsetof(bcmolt_gpon_gem_port_stat_alarm_cleared, data), (bcmolt_func_packed_len) bcmolt_gpon_gem_port_stat_alarm_cleared_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_gem_port_stat_alarm_cleared_data_pack, (bcmolt_func_unpack) bcmolt_gpon_gem_port_stat_alarm_cleared_data_unpack, bcmolt_gpon_gem_port_stat_alarm_cleared_data_scan };
+static bcmolt_group_info group_info_gpon_gem_port_stat_alarm_raised = { BCMOLT_OBJ_ID_GPON_GEM_PORT, BCMOLT_MGT_GROUP_AUTO, 2, sizeof(bcmolt_gpon_gem_port_stat_alarm_raised_data), sizeof(bcmolt_gpon_gem_port_stat_alarm_raised), offsetof(bcmolt_gpon_gem_port_stat_alarm_raised, data), (bcmolt_func_packed_len) bcmolt_gpon_gem_port_stat_alarm_raised_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_gem_port_stat_alarm_raised_data_pack, (bcmolt_func_unpack) bcmolt_gpon_gem_port_stat_alarm_raised_data_unpack, bcmolt_gpon_gem_port_stat_alarm_raised_data_scan };
+static bcmolt_group_info group_info_gpon_gem_port_auto_cfg = { BCMOLT_OBJ_ID_GPON_GEM_PORT, BCMOLT_MGT_GROUP_AUTO_CFG, 0, sizeof(bcmolt_gpon_gem_port_auto_cfg_data), sizeof(bcmolt_gpon_gem_port_auto_cfg), offsetof(bcmolt_gpon_gem_port_auto_cfg, data), (bcmolt_func_packed_len) bcmolt_gpon_gem_port_auto_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_gem_port_auto_cfg_data_pack, (bcmolt_func_unpack) bcmolt_gpon_gem_port_auto_cfg_data_unpack, bcmolt_gpon_gem_port_auto_cfg_data_scan };
+static bcmolt_group_info group_info_gpon_gem_port_set_state = { BCMOLT_OBJ_ID_GPON_GEM_PORT, BCMOLT_MGT_GROUP_OPER, 0, sizeof(bcmolt_gpon_gem_port_set_state_data), sizeof(bcmolt_gpon_gem_port_set_state), offsetof(bcmolt_gpon_gem_port_set_state, data), (bcmolt_func_packed_len) bcmolt_gpon_gem_port_set_state_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_gem_port_set_state_data_pack, (bcmolt_func_unpack) bcmolt_gpon_gem_port_set_state_data_unpack, bcmolt_gpon_gem_port_set_state_data_scan };
+static bcmolt_group_info group_info_gpon_iwf_key = { BCMOLT_OBJ_ID_GPON_IWF, BCMOLT_MGT_GROUP_KEY, 0, sizeof(bcmolt_gpon_iwf_key), 0, 0, (bcmolt_func_packed_len) bcmolt_gpon_iwf_key_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_iwf_key_pack, (bcmolt_func_unpack) bcmolt_gpon_iwf_key_unpack, bcmolt_gpon_iwf_key_scan };
+static bcmolt_group_info group_info_gpon_iwf_cfg = { BCMOLT_OBJ_ID_GPON_IWF, BCMOLT_MGT_GROUP_CFG, 0, sizeof(bcmolt_gpon_iwf_cfg_data), sizeof(bcmolt_gpon_iwf_cfg), offsetof(bcmolt_gpon_iwf_cfg, data), (bcmolt_func_packed_len) bcmolt_gpon_iwf_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_iwf_cfg_data_pack, (bcmolt_func_unpack) bcmolt_gpon_iwf_cfg_data_unpack, bcmolt_gpon_iwf_cfg_data_scan };
+static bcmolt_group_info group_info_gpon_iwf_stat = { BCMOLT_OBJ_ID_GPON_IWF, BCMOLT_MGT_GROUP_STAT, 0, sizeof(bcmolt_gpon_iwf_stat_data), sizeof(bcmolt_gpon_iwf_stat), offsetof(bcmolt_gpon_iwf_stat, data), (bcmolt_func_packed_len) bcmolt_gpon_iwf_stat_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_iwf_stat_data_pack, (bcmolt_func_unpack) bcmolt_gpon_iwf_stat_data_unpack, bcmolt_gpon_iwf_stat_data_scan };
+static bcmolt_group_info group_info_gpon_iwf_stat_cfg = { BCMOLT_OBJ_ID_GPON_IWF, BCMOLT_MGT_GROUP_STAT_CFG, 0, sizeof(bcmolt_gpon_iwf_stat_cfg_data), sizeof(bcmolt_gpon_iwf_stat_cfg), offsetof(bcmolt_gpon_iwf_stat_cfg, data), (bcmolt_func_packed_len) bcmolt_gpon_iwf_stat_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_iwf_stat_cfg_data_pack, (bcmolt_func_unpack) bcmolt_gpon_iwf_stat_cfg_data_unpack, bcmolt_gpon_iwf_stat_cfg_data_scan };
+static bcmolt_group_info group_info_gpon_iwf_flush_mac_table_completed = { BCMOLT_OBJ_ID_GPON_IWF, BCMOLT_MGT_GROUP_AUTO, 0, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_gpon_iwf_scan_mac_table_completed = { BCMOLT_OBJ_ID_GPON_IWF, BCMOLT_MGT_GROUP_AUTO, 1, sizeof(bcmolt_gpon_iwf_scan_mac_table_completed_data), sizeof(bcmolt_gpon_iwf_scan_mac_table_completed), offsetof(bcmolt_gpon_iwf_scan_mac_table_completed, data), (bcmolt_func_packed_len) bcmolt_gpon_iwf_scan_mac_table_completed_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_iwf_scan_mac_table_completed_data_pack, (bcmolt_func_unpack) bcmolt_gpon_iwf_scan_mac_table_completed_data_unpack, bcmolt_gpon_iwf_scan_mac_table_completed_data_scan };
+static bcmolt_group_info group_info_gpon_iwf_stat_alarm_cleared = { BCMOLT_OBJ_ID_GPON_IWF, BCMOLT_MGT_GROUP_AUTO, 2, sizeof(bcmolt_gpon_iwf_stat_alarm_cleared_data), sizeof(bcmolt_gpon_iwf_stat_alarm_cleared), offsetof(bcmolt_gpon_iwf_stat_alarm_cleared, data), (bcmolt_func_packed_len) bcmolt_gpon_iwf_stat_alarm_cleared_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_iwf_stat_alarm_cleared_data_pack, (bcmolt_func_unpack) bcmolt_gpon_iwf_stat_alarm_cleared_data_unpack, bcmolt_gpon_iwf_stat_alarm_cleared_data_scan };
+static bcmolt_group_info group_info_gpon_iwf_stat_alarm_raised = { BCMOLT_OBJ_ID_GPON_IWF, BCMOLT_MGT_GROUP_AUTO, 3, sizeof(bcmolt_gpon_iwf_stat_alarm_raised_data), sizeof(bcmolt_gpon_iwf_stat_alarm_raised), offsetof(bcmolt_gpon_iwf_stat_alarm_raised, data), (bcmolt_func_packed_len) bcmolt_gpon_iwf_stat_alarm_raised_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_iwf_stat_alarm_raised_data_pack, (bcmolt_func_unpack) bcmolt_gpon_iwf_stat_alarm_raised_data_unpack, bcmolt_gpon_iwf_stat_alarm_raised_data_scan };
+static bcmolt_group_info group_info_gpon_iwf_auto_cfg = { BCMOLT_OBJ_ID_GPON_IWF, BCMOLT_MGT_GROUP_AUTO_CFG, 0, sizeof(bcmolt_gpon_iwf_auto_cfg_data), sizeof(bcmolt_gpon_iwf_auto_cfg), offsetof(bcmolt_gpon_iwf_auto_cfg, data), (bcmolt_func_packed_len) bcmolt_gpon_iwf_auto_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_iwf_auto_cfg_data_pack, (bcmolt_func_unpack) bcmolt_gpon_iwf_auto_cfg_data_unpack, bcmolt_gpon_iwf_auto_cfg_data_scan };
+static bcmolt_group_info group_info_gpon_iwf_flush_mac_table = { BCMOLT_OBJ_ID_GPON_IWF, BCMOLT_MGT_GROUP_OPER, 0, sizeof(bcmolt_gpon_iwf_flush_mac_table_data), sizeof(bcmolt_gpon_iwf_flush_mac_table), offsetof(bcmolt_gpon_iwf_flush_mac_table, data), (bcmolt_func_packed_len) bcmolt_gpon_iwf_flush_mac_table_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_iwf_flush_mac_table_data_pack, (bcmolt_func_unpack) bcmolt_gpon_iwf_flush_mac_table_data_unpack, bcmolt_gpon_iwf_flush_mac_table_data_scan };
+static bcmolt_group_info group_info_gpon_iwf_scan_mac_table = { BCMOLT_OBJ_ID_GPON_IWF, BCMOLT_MGT_GROUP_OPER, 1, sizeof(bcmolt_gpon_iwf_scan_mac_table_data), sizeof(bcmolt_gpon_iwf_scan_mac_table), offsetof(bcmolt_gpon_iwf_scan_mac_table, data), (bcmolt_func_packed_len) bcmolt_gpon_iwf_scan_mac_table_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_iwf_scan_mac_table_data_pack, (bcmolt_func_unpack) bcmolt_gpon_iwf_scan_mac_table_data_unpack, bcmolt_gpon_iwf_scan_mac_table_data_scan };
+static bcmolt_group_info group_info_gpon_iwf_ds_egress_flow_key = { BCMOLT_OBJ_ID_GPON_IWF_DS_EGRESS_FLOW, BCMOLT_MGT_GROUP_KEY, 0, sizeof(bcmolt_gpon_iwf_ds_egress_flow_key), 0, 0, (bcmolt_func_packed_len) bcmolt_gpon_iwf_ds_egress_flow_key_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_iwf_ds_egress_flow_key_pack, (bcmolt_func_unpack) bcmolt_gpon_iwf_ds_egress_flow_key_unpack, bcmolt_gpon_iwf_ds_egress_flow_key_scan };
+static bcmolt_group_info group_info_gpon_iwf_ds_egress_flow_cfg = { BCMOLT_OBJ_ID_GPON_IWF_DS_EGRESS_FLOW, BCMOLT_MGT_GROUP_CFG, 0, sizeof(bcmolt_gpon_iwf_ds_egress_flow_cfg_data), sizeof(bcmolt_gpon_iwf_ds_egress_flow_cfg), offsetof(bcmolt_gpon_iwf_ds_egress_flow_cfg, data), (bcmolt_func_packed_len) bcmolt_gpon_iwf_ds_egress_flow_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_iwf_ds_egress_flow_cfg_data_pack, (bcmolt_func_unpack) bcmolt_gpon_iwf_ds_egress_flow_cfg_data_unpack, bcmolt_gpon_iwf_ds_egress_flow_cfg_data_scan };
+static bcmolt_group_info group_info_gpon_iwf_ds_ingress_flow_key = { BCMOLT_OBJ_ID_GPON_IWF_DS_INGRESS_FLOW, BCMOLT_MGT_GROUP_KEY, 0, sizeof(bcmolt_gpon_iwf_ds_ingress_flow_key), 0, 0, (bcmolt_func_packed_len) bcmolt_gpon_iwf_ds_ingress_flow_key_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_iwf_ds_ingress_flow_key_pack, (bcmolt_func_unpack) bcmolt_gpon_iwf_ds_ingress_flow_key_unpack, bcmolt_gpon_iwf_ds_ingress_flow_key_scan };
+static bcmolt_group_info group_info_gpon_iwf_ds_ingress_flow_cfg = { BCMOLT_OBJ_ID_GPON_IWF_DS_INGRESS_FLOW, BCMOLT_MGT_GROUP_CFG, 0, sizeof(bcmolt_gpon_iwf_ds_ingress_flow_cfg_data), sizeof(bcmolt_gpon_iwf_ds_ingress_flow_cfg), offsetof(bcmolt_gpon_iwf_ds_ingress_flow_cfg, data), (bcmolt_func_packed_len) bcmolt_gpon_iwf_ds_ingress_flow_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_iwf_ds_ingress_flow_cfg_data_pack, (bcmolt_func_unpack) bcmolt_gpon_iwf_ds_ingress_flow_cfg_data_unpack, bcmolt_gpon_iwf_ds_ingress_flow_cfg_data_scan };
+static bcmolt_group_info group_info_gpon_iwf_mac_table_key = { BCMOLT_OBJ_ID_GPON_IWF_MAC_TABLE, BCMOLT_MGT_GROUP_KEY, 0, sizeof(bcmolt_gpon_iwf_mac_table_key), 0, 0, (bcmolt_func_packed_len) bcmolt_gpon_iwf_mac_table_key_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_iwf_mac_table_key_pack, (bcmolt_func_unpack) bcmolt_gpon_iwf_mac_table_key_unpack, bcmolt_gpon_iwf_mac_table_key_scan };
+static bcmolt_group_info group_info_gpon_iwf_mac_table_cfg = { BCMOLT_OBJ_ID_GPON_IWF_MAC_TABLE, BCMOLT_MGT_GROUP_CFG, 0, sizeof(bcmolt_gpon_iwf_mac_table_cfg_data), sizeof(bcmolt_gpon_iwf_mac_table_cfg), offsetof(bcmolt_gpon_iwf_mac_table_cfg, data), (bcmolt_func_packed_len) bcmolt_gpon_iwf_mac_table_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_iwf_mac_table_cfg_data_pack, (bcmolt_func_unpack) bcmolt_gpon_iwf_mac_table_cfg_data_unpack, bcmolt_gpon_iwf_mac_table_cfg_data_scan };
+static bcmolt_group_info group_info_gpon_iwf_mac_table_mac_aged = { BCMOLT_OBJ_ID_GPON_IWF_MAC_TABLE, BCMOLT_MGT_GROUP_AUTO, 0, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_gpon_iwf_mac_table_mac_dropped = { BCMOLT_OBJ_ID_GPON_IWF_MAC_TABLE, BCMOLT_MGT_GROUP_AUTO, 1, sizeof(bcmolt_gpon_iwf_mac_table_mac_dropped_data), sizeof(bcmolt_gpon_iwf_mac_table_mac_dropped), offsetof(bcmolt_gpon_iwf_mac_table_mac_dropped, data), (bcmolt_func_packed_len) bcmolt_gpon_iwf_mac_table_mac_dropped_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_iwf_mac_table_mac_dropped_data_pack, (bcmolt_func_unpack) bcmolt_gpon_iwf_mac_table_mac_dropped_data_unpack, bcmolt_gpon_iwf_mac_table_mac_dropped_data_scan };
+static bcmolt_group_info group_info_gpon_iwf_mac_table_mac_move = { BCMOLT_OBJ_ID_GPON_IWF_MAC_TABLE, BCMOLT_MGT_GROUP_AUTO, 2, sizeof(bcmolt_gpon_iwf_mac_table_mac_move_data), sizeof(bcmolt_gpon_iwf_mac_table_mac_move), offsetof(bcmolt_gpon_iwf_mac_table_mac_move, data), (bcmolt_func_packed_len) bcmolt_gpon_iwf_mac_table_mac_move_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_iwf_mac_table_mac_move_data_pack, (bcmolt_func_unpack) bcmolt_gpon_iwf_mac_table_mac_move_data_unpack, bcmolt_gpon_iwf_mac_table_mac_move_data_scan };
+static bcmolt_group_info group_info_gpon_iwf_mac_table_new_mac = { BCMOLT_OBJ_ID_GPON_IWF_MAC_TABLE, BCMOLT_MGT_GROUP_AUTO, 3, sizeof(bcmolt_gpon_iwf_mac_table_new_mac_data), sizeof(bcmolt_gpon_iwf_mac_table_new_mac), offsetof(bcmolt_gpon_iwf_mac_table_new_mac, data), (bcmolt_func_packed_len) bcmolt_gpon_iwf_mac_table_new_mac_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_iwf_mac_table_new_mac_data_pack, (bcmolt_func_unpack) bcmolt_gpon_iwf_mac_table_new_mac_data_unpack, bcmolt_gpon_iwf_mac_table_new_mac_data_scan };
+static bcmolt_group_info group_info_gpon_iwf_mac_table_auto_cfg = { BCMOLT_OBJ_ID_GPON_IWF_MAC_TABLE, BCMOLT_MGT_GROUP_AUTO_CFG, 0, sizeof(bcmolt_gpon_iwf_mac_table_auto_cfg_data), sizeof(bcmolt_gpon_iwf_mac_table_auto_cfg), offsetof(bcmolt_gpon_iwf_mac_table_auto_cfg, data), (bcmolt_func_packed_len) bcmolt_gpon_iwf_mac_table_auto_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_iwf_mac_table_auto_cfg_data_pack, (bcmolt_func_unpack) bcmolt_gpon_iwf_mac_table_auto_cfg_data_unpack, bcmolt_gpon_iwf_mac_table_auto_cfg_data_scan };
+static bcmolt_group_info group_info_gpon_iwf_us_flow_key = { BCMOLT_OBJ_ID_GPON_IWF_US_FLOW, BCMOLT_MGT_GROUP_KEY, 0, sizeof(bcmolt_gpon_iwf_us_flow_key), 0, 0, (bcmolt_func_packed_len) bcmolt_gpon_iwf_us_flow_key_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_iwf_us_flow_key_pack, (bcmolt_func_unpack) bcmolt_gpon_iwf_us_flow_key_unpack, bcmolt_gpon_iwf_us_flow_key_scan };
+static bcmolt_group_info group_info_gpon_iwf_us_flow_cfg = { BCMOLT_OBJ_ID_GPON_IWF_US_FLOW, BCMOLT_MGT_GROUP_CFG, 0, sizeof(bcmolt_gpon_iwf_us_flow_cfg_data), sizeof(bcmolt_gpon_iwf_us_flow_cfg), offsetof(bcmolt_gpon_iwf_us_flow_cfg, data), (bcmolt_func_packed_len) bcmolt_gpon_iwf_us_flow_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_iwf_us_flow_cfg_data_pack, (bcmolt_func_unpack) bcmolt_gpon_iwf_us_flow_cfg_data_unpack, bcmolt_gpon_iwf_us_flow_cfg_data_scan };
+static bcmolt_group_info group_info_gpon_ni_key = { BCMOLT_OBJ_ID_GPON_NI, BCMOLT_MGT_GROUP_KEY, 0, sizeof(bcmolt_gpon_ni_key), 0, 0, (bcmolt_func_packed_len) bcmolt_gpon_ni_key_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_ni_key_pack, (bcmolt_func_unpack) bcmolt_gpon_ni_key_unpack, bcmolt_gpon_ni_key_scan };
+static bcmolt_group_info group_info_gpon_ni_cfg = { BCMOLT_OBJ_ID_GPON_NI, BCMOLT_MGT_GROUP_CFG, 0, sizeof(bcmolt_gpon_ni_cfg_data), sizeof(bcmolt_gpon_ni_cfg), offsetof(bcmolt_gpon_ni_cfg, data), (bcmolt_func_packed_len) bcmolt_gpon_ni_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_ni_cfg_data_pack, (bcmolt_func_unpack) bcmolt_gpon_ni_cfg_data_unpack, bcmolt_gpon_ni_cfg_data_scan };
+static bcmolt_group_info group_info_gpon_ni_stat = { BCMOLT_OBJ_ID_GPON_NI, BCMOLT_MGT_GROUP_STAT, 0, sizeof(bcmolt_gpon_ni_stat_data), sizeof(bcmolt_gpon_ni_stat), offsetof(bcmolt_gpon_ni_stat, data), (bcmolt_func_packed_len) bcmolt_gpon_ni_stat_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_ni_stat_data_pack, (bcmolt_func_unpack) bcmolt_gpon_ni_stat_data_unpack, bcmolt_gpon_ni_stat_data_scan };
+static bcmolt_group_info group_info_gpon_ni_stat_cfg = { BCMOLT_OBJ_ID_GPON_NI, BCMOLT_MGT_GROUP_STAT_CFG, 0, sizeof(bcmolt_gpon_ni_stat_cfg_data), sizeof(bcmolt_gpon_ni_stat_cfg), offsetof(bcmolt_gpon_ni_stat_cfg, data), (bcmolt_func_packed_len) bcmolt_gpon_ni_stat_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_ni_stat_cfg_data_pack, (bcmolt_func_unpack) bcmolt_gpon_ni_stat_cfg_data_unpack, bcmolt_gpon_ni_stat_cfg_data_scan };
+static bcmolt_group_info group_info_gpon_ni_activate_all_onus_completed = { BCMOLT_OBJ_ID_GPON_NI, BCMOLT_MGT_GROUP_AUTO, 0, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_gpon_ni_cpu_packets_failure = { BCMOLT_OBJ_ID_GPON_NI, BCMOLT_MGT_GROUP_AUTO, 1, sizeof(bcmolt_gpon_ni_cpu_packets_failure_data), sizeof(bcmolt_gpon_ni_cpu_packets_failure), offsetof(bcmolt_gpon_ni_cpu_packets_failure, data), (bcmolt_func_packed_len) bcmolt_gpon_ni_cpu_packets_failure_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_ni_cpu_packets_failure_data_pack, (bcmolt_func_unpack) bcmolt_gpon_ni_cpu_packets_failure_data_unpack, bcmolt_gpon_ni_cpu_packets_failure_data_scan };
+static bcmolt_group_info group_info_gpon_ni_deactivate_all_onus_completed = { BCMOLT_OBJ_ID_GPON_NI, BCMOLT_MGT_GROUP_AUTO, 2, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_gpon_ni_disable_all_onus_completed = { BCMOLT_OBJ_ID_GPON_NI, BCMOLT_MGT_GROUP_AUTO, 3, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_gpon_ni_enable_all_onus_completed = { BCMOLT_OBJ_ID_GPON_NI, BCMOLT_MGT_GROUP_AUTO, 4, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_gpon_ni_los = { BCMOLT_OBJ_ID_GPON_NI, BCMOLT_MGT_GROUP_AUTO, 5, sizeof(bcmolt_gpon_ni_los_data), sizeof(bcmolt_gpon_ni_los), offsetof(bcmolt_gpon_ni_los, data), (bcmolt_func_packed_len) bcmolt_gpon_ni_los_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_ni_los_data_pack, (bcmolt_func_unpack) bcmolt_gpon_ni_los_data_unpack, bcmolt_gpon_ni_los_data_scan };
+static bcmolt_group_info group_info_gpon_ni_onu_discovered = { BCMOLT_OBJ_ID_GPON_NI, BCMOLT_MGT_GROUP_AUTO, 6, sizeof(bcmolt_gpon_ni_onu_discovered_data), sizeof(bcmolt_gpon_ni_onu_discovered), offsetof(bcmolt_gpon_ni_onu_discovered, data), (bcmolt_func_packed_len) bcmolt_gpon_ni_onu_discovered_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_ni_onu_discovered_data_pack, (bcmolt_func_unpack) bcmolt_gpon_ni_onu_discovered_data_unpack, bcmolt_gpon_ni_onu_discovered_data_scan };
+static bcmolt_group_info group_info_gpon_ni_onu_upgrade_complete = { BCMOLT_OBJ_ID_GPON_NI, BCMOLT_MGT_GROUP_AUTO, 7, sizeof(bcmolt_gpon_ni_onu_upgrade_complete_data), sizeof(bcmolt_gpon_ni_onu_upgrade_complete), offsetof(bcmolt_gpon_ni_onu_upgrade_complete, data), (bcmolt_func_packed_len) bcmolt_gpon_ni_onu_upgrade_complete_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_ni_onu_upgrade_complete_data_pack, (bcmolt_func_unpack) bcmolt_gpon_ni_onu_upgrade_complete_data_unpack, bcmolt_gpon_ni_onu_upgrade_complete_data_scan };
+static bcmolt_group_info group_info_gpon_ni_protection_switching_onus_ranged = { BCMOLT_OBJ_ID_GPON_NI, BCMOLT_MGT_GROUP_AUTO, 8, sizeof(bcmolt_gpon_ni_protection_switching_onus_ranged_data), sizeof(bcmolt_gpon_ni_protection_switching_onus_ranged), offsetof(bcmolt_gpon_ni_protection_switching_onus_ranged, data), (bcmolt_func_packed_len) bcmolt_gpon_ni_protection_switching_onus_ranged_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_ni_protection_switching_onus_ranged_data_pack, (bcmolt_func_unpack) bcmolt_gpon_ni_protection_switching_onus_ranged_data_unpack, bcmolt_gpon_ni_protection_switching_onus_ranged_data_scan };
+static bcmolt_group_info group_info_gpon_ni_protection_switching_switchover_completed = { BCMOLT_OBJ_ID_GPON_NI, BCMOLT_MGT_GROUP_AUTO, 9, sizeof(bcmolt_gpon_ni_protection_switching_switchover_completed_data), sizeof(bcmolt_gpon_ni_protection_switching_switchover_completed), offsetof(bcmolt_gpon_ni_protection_switching_switchover_completed, data), (bcmolt_func_packed_len) bcmolt_gpon_ni_protection_switching_switchover_completed_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_ni_protection_switching_switchover_completed_data_pack, (bcmolt_func_unpack) bcmolt_gpon_ni_protection_switching_switchover_completed_data_unpack, bcmolt_gpon_ni_protection_switching_switchover_completed_data_scan };
+static bcmolt_group_info group_info_gpon_ni_protection_switching_traffic_resume = { BCMOLT_OBJ_ID_GPON_NI, BCMOLT_MGT_GROUP_AUTO, 10, sizeof(bcmolt_gpon_ni_protection_switching_traffic_resume_data), sizeof(bcmolt_gpon_ni_protection_switching_traffic_resume), offsetof(bcmolt_gpon_ni_protection_switching_traffic_resume, data), (bcmolt_func_packed_len) bcmolt_gpon_ni_protection_switching_traffic_resume_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_ni_protection_switching_traffic_resume_data_pack, (bcmolt_func_unpack) bcmolt_gpon_ni_protection_switching_traffic_resume_data_unpack, bcmolt_gpon_ni_protection_switching_traffic_resume_data_scan };
+static bcmolt_group_info group_info_gpon_ni_rogue_detection_completed = { BCMOLT_OBJ_ID_GPON_NI, BCMOLT_MGT_GROUP_AUTO, 11, sizeof(bcmolt_gpon_ni_rogue_detection_completed_data), sizeof(bcmolt_gpon_ni_rogue_detection_completed), offsetof(bcmolt_gpon_ni_rogue_detection_completed, data), (bcmolt_func_packed_len) bcmolt_gpon_ni_rogue_detection_completed_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_ni_rogue_detection_completed_data_pack, (bcmolt_func_unpack) bcmolt_gpon_ni_rogue_detection_completed_data_unpack, bcmolt_gpon_ni_rogue_detection_completed_data_scan };
+static bcmolt_group_info group_info_gpon_ni_rogue_onu_special_map_cycle_start = { BCMOLT_OBJ_ID_GPON_NI, BCMOLT_MGT_GROUP_AUTO, 12, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_gpon_ni_serial_number_acquisition_cycle_start = { BCMOLT_OBJ_ID_GPON_NI, BCMOLT_MGT_GROUP_AUTO, 13, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_gpon_ni_standby_pon_monitoring_cycle_completed = { BCMOLT_OBJ_ID_GPON_NI, BCMOLT_MGT_GROUP_AUTO, 14, sizeof(bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_data), sizeof(bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed), offsetof(bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed, data), (bcmolt_func_packed_len) bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_data_pack, (bcmolt_func_unpack) bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_data_unpack, bcmolt_gpon_ni_standby_pon_monitoring_cycle_completed_data_scan };
+static bcmolt_group_info group_info_gpon_ni_stat_alarm_cleared = { BCMOLT_OBJ_ID_GPON_NI, BCMOLT_MGT_GROUP_AUTO, 15, sizeof(bcmolt_gpon_ni_stat_alarm_cleared_data), sizeof(bcmolt_gpon_ni_stat_alarm_cleared), offsetof(bcmolt_gpon_ni_stat_alarm_cleared, data), (bcmolt_func_packed_len) bcmolt_gpon_ni_stat_alarm_cleared_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_ni_stat_alarm_cleared_data_pack, (bcmolt_func_unpack) bcmolt_gpon_ni_stat_alarm_cleared_data_unpack, bcmolt_gpon_ni_stat_alarm_cleared_data_scan };
+static bcmolt_group_info group_info_gpon_ni_stat_alarm_raised = { BCMOLT_OBJ_ID_GPON_NI, BCMOLT_MGT_GROUP_AUTO, 16, sizeof(bcmolt_gpon_ni_stat_alarm_raised_data), sizeof(bcmolt_gpon_ni_stat_alarm_raised), offsetof(bcmolt_gpon_ni_stat_alarm_raised, data), (bcmolt_func_packed_len) bcmolt_gpon_ni_stat_alarm_raised_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_ni_stat_alarm_raised_data_pack, (bcmolt_func_unpack) bcmolt_gpon_ni_stat_alarm_raised_data_unpack, bcmolt_gpon_ni_stat_alarm_raised_data_scan };
+static bcmolt_group_info group_info_gpon_ni_state_change_completed = { BCMOLT_OBJ_ID_GPON_NI, BCMOLT_MGT_GROUP_AUTO, 17, sizeof(bcmolt_gpon_ni_state_change_completed_data), sizeof(bcmolt_gpon_ni_state_change_completed), offsetof(bcmolt_gpon_ni_state_change_completed, data), (bcmolt_func_packed_len) bcmolt_gpon_ni_state_change_completed_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_ni_state_change_completed_data_pack, (bcmolt_func_unpack) bcmolt_gpon_ni_state_change_completed_data_unpack, bcmolt_gpon_ni_state_change_completed_data_scan };
+static bcmolt_group_info group_info_gpon_ni_tod_request_completed = { BCMOLT_OBJ_ID_GPON_NI, BCMOLT_MGT_GROUP_AUTO, 18, sizeof(bcmolt_gpon_ni_tod_request_completed_data), sizeof(bcmolt_gpon_ni_tod_request_completed), offsetof(bcmolt_gpon_ni_tod_request_completed, data), (bcmolt_func_packed_len) bcmolt_gpon_ni_tod_request_completed_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_ni_tod_request_completed_data_pack, (bcmolt_func_unpack) bcmolt_gpon_ni_tod_request_completed_data_unpack, bcmolt_gpon_ni_tod_request_completed_data_scan };
+static bcmolt_group_info group_info_gpon_ni_auto_cfg = { BCMOLT_OBJ_ID_GPON_NI, BCMOLT_MGT_GROUP_AUTO_CFG, 0, sizeof(bcmolt_gpon_ni_auto_cfg_data), sizeof(bcmolt_gpon_ni_auto_cfg), offsetof(bcmolt_gpon_ni_auto_cfg, data), (bcmolt_func_packed_len) bcmolt_gpon_ni_auto_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_ni_auto_cfg_data_pack, (bcmolt_func_unpack) bcmolt_gpon_ni_auto_cfg_data_unpack, bcmolt_gpon_ni_auto_cfg_data_scan };
+static bcmolt_group_info group_info_gpon_ni_disable_serial_number = { BCMOLT_OBJ_ID_GPON_NI, BCMOLT_MGT_GROUP_OPER, 0, sizeof(bcmolt_gpon_ni_disable_serial_number_data), sizeof(bcmolt_gpon_ni_disable_serial_number), offsetof(bcmolt_gpon_ni_disable_serial_number, data), (bcmolt_func_packed_len) bcmolt_gpon_ni_disable_serial_number_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_ni_disable_serial_number_data_pack, (bcmolt_func_unpack) bcmolt_gpon_ni_disable_serial_number_data_unpack, bcmolt_gpon_ni_disable_serial_number_data_scan };
+static bcmolt_group_info group_info_gpon_ni_protection_switching_type_c_set_multiple_onu_state = { BCMOLT_OBJ_ID_GPON_NI, BCMOLT_MGT_GROUP_OPER, 1, sizeof(bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_data), sizeof(bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state), offsetof(bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state, data), (bcmolt_func_packed_len) bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_data_pack, (bcmolt_func_unpack) bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_data_unpack, bcmolt_gpon_ni_protection_switching_type_c_set_multiple_onu_state_data_scan };
+static bcmolt_group_info group_info_gpon_ni_reset = { BCMOLT_OBJ_ID_GPON_NI, BCMOLT_MGT_GROUP_OPER, 2, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_gpon_ni_rogue_detection_window = { BCMOLT_OBJ_ID_GPON_NI, BCMOLT_MGT_GROUP_OPER, 3, sizeof(bcmolt_gpon_ni_rogue_detection_window_data), sizeof(bcmolt_gpon_ni_rogue_detection_window), offsetof(bcmolt_gpon_ni_rogue_detection_window, data), (bcmolt_func_packed_len) bcmolt_gpon_ni_rogue_detection_window_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_ni_rogue_detection_window_data_pack, (bcmolt_func_unpack) bcmolt_gpon_ni_rogue_detection_window_data_unpack, bcmolt_gpon_ni_rogue_detection_window_data_scan };
+static bcmolt_group_info group_info_gpon_ni_set_onu_state = { BCMOLT_OBJ_ID_GPON_NI, BCMOLT_MGT_GROUP_OPER, 4, sizeof(bcmolt_gpon_ni_set_onu_state_data), sizeof(bcmolt_gpon_ni_set_onu_state), offsetof(bcmolt_gpon_ni_set_onu_state, data), (bcmolt_func_packed_len) bcmolt_gpon_ni_set_onu_state_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_ni_set_onu_state_data_pack, (bcmolt_func_unpack) bcmolt_gpon_ni_set_onu_state_data_unpack, bcmolt_gpon_ni_set_onu_state_data_scan };
+static bcmolt_group_info group_info_gpon_ni_set_pon_state = { BCMOLT_OBJ_ID_GPON_NI, BCMOLT_MGT_GROUP_OPER, 5, sizeof(bcmolt_gpon_ni_set_pon_state_data), sizeof(bcmolt_gpon_ni_set_pon_state), offsetof(bcmolt_gpon_ni_set_pon_state, data), (bcmolt_func_packed_len) bcmolt_gpon_ni_set_pon_state_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_ni_set_pon_state_data_pack, (bcmolt_func_unpack) bcmolt_gpon_ni_set_pon_state_data_unpack, bcmolt_gpon_ni_set_pon_state_data_scan };
+static bcmolt_group_info group_info_gpon_ni_single_request_standby_pon_monitoring = { BCMOLT_OBJ_ID_GPON_NI, BCMOLT_MGT_GROUP_OPER, 6, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_gpon_ni_start_onu_upgrade = { BCMOLT_OBJ_ID_GPON_NI, BCMOLT_MGT_GROUP_OPER, 7, sizeof(bcmolt_gpon_ni_start_onu_upgrade_data), sizeof(bcmolt_gpon_ni_start_onu_upgrade), offsetof(bcmolt_gpon_ni_start_onu_upgrade, data), (bcmolt_func_packed_len) bcmolt_gpon_ni_start_onu_upgrade_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_ni_start_onu_upgrade_data_pack, (bcmolt_func_unpack) bcmolt_gpon_ni_start_onu_upgrade_data_unpack, bcmolt_gpon_ni_start_onu_upgrade_data_scan };
+static bcmolt_group_info group_info_gpon_ni_tod_request = { BCMOLT_OBJ_ID_GPON_NI, BCMOLT_MGT_GROUP_OPER, 8, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_gpon_ni_broadcast_ploam_packet = { BCMOLT_OBJ_ID_GPON_NI, BCMOLT_MGT_GROUP_PROXY, 0, sizeof(bcmolt_gpon_ni_broadcast_ploam_packet_data), sizeof(bcmolt_gpon_ni_broadcast_ploam_packet), offsetof(bcmolt_gpon_ni_broadcast_ploam_packet, data), (bcmolt_func_packed_len) bcmolt_gpon_ni_broadcast_ploam_packet_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_ni_broadcast_ploam_packet_data_pack, (bcmolt_func_unpack) bcmolt_gpon_ni_broadcast_ploam_packet_data_unpack, bcmolt_gpon_ni_broadcast_ploam_packet_data_scan };
+static bcmolt_group_info group_info_gpon_ni_cpu_packets = { BCMOLT_OBJ_ID_GPON_NI, BCMOLT_MGT_GROUP_PROXY, 1, sizeof(bcmolt_gpon_ni_cpu_packets_data), sizeof(bcmolt_gpon_ni_cpu_packets), offsetof(bcmolt_gpon_ni_cpu_packets, data), (bcmolt_func_packed_len) bcmolt_gpon_ni_cpu_packets_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_ni_cpu_packets_data_pack, (bcmolt_func_unpack) bcmolt_gpon_ni_cpu_packets_data_unpack, bcmolt_gpon_ni_cpu_packets_data_scan };
+static bcmolt_group_info group_info_gpon_onu_key = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_KEY, 0, sizeof(bcmolt_gpon_onu_key), 0, 0, (bcmolt_func_packed_len) bcmolt_gpon_onu_key_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_onu_key_pack, (bcmolt_func_unpack) bcmolt_gpon_onu_key_unpack, bcmolt_gpon_onu_key_scan };
+static bcmolt_group_info group_info_gpon_onu_cfg = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_CFG, 0, sizeof(bcmolt_gpon_onu_cfg_data), sizeof(bcmolt_gpon_onu_cfg), offsetof(bcmolt_gpon_onu_cfg, data), (bcmolt_func_packed_len) bcmolt_gpon_onu_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_onu_cfg_data_pack, (bcmolt_func_unpack) bcmolt_gpon_onu_cfg_data_unpack, bcmolt_gpon_onu_cfg_data_scan };
+static bcmolt_group_info group_info_gpon_onu_stat = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_STAT, 0, sizeof(bcmolt_gpon_onu_stat_data), sizeof(bcmolt_gpon_onu_stat), offsetof(bcmolt_gpon_onu_stat, data), (bcmolt_func_packed_len) bcmolt_gpon_onu_stat_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_onu_stat_data_pack, (bcmolt_func_unpack) bcmolt_gpon_onu_stat_data_unpack, bcmolt_gpon_onu_stat_data_scan };
+static bcmolt_group_info group_info_gpon_onu_stat_cfg = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_STAT_CFG, 0, sizeof(bcmolt_gpon_onu_stat_cfg_data), sizeof(bcmolt_gpon_onu_stat_cfg), offsetof(bcmolt_gpon_onu_stat_cfg, data), (bcmolt_func_packed_len) bcmolt_gpon_onu_stat_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_onu_stat_cfg_data_pack, (bcmolt_func_unpack) bcmolt_gpon_onu_stat_cfg_data_unpack, bcmolt_gpon_onu_stat_cfg_data_scan };
+static bcmolt_group_info group_info_gpon_onu_ber_interval_configuration_completed = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_AUTO, 0, sizeof(bcmolt_gpon_onu_ber_interval_configuration_completed_data), sizeof(bcmolt_gpon_onu_ber_interval_configuration_completed), offsetof(bcmolt_gpon_onu_ber_interval_configuration_completed, data), (bcmolt_func_packed_len) bcmolt_gpon_onu_ber_interval_configuration_completed_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_onu_ber_interval_configuration_completed_data_pack, (bcmolt_func_unpack) bcmolt_gpon_onu_ber_interval_configuration_completed_data_unpack, bcmolt_gpon_onu_ber_interval_configuration_completed_data_scan };
+static bcmolt_group_info group_info_gpon_onu_dfi = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_AUTO, 1, sizeof(bcmolt_gpon_onu_dfi_data), sizeof(bcmolt_gpon_onu_dfi), offsetof(bcmolt_gpon_onu_dfi, data), (bcmolt_func_packed_len) bcmolt_gpon_onu_dfi_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_onu_dfi_data_pack, (bcmolt_func_unpack) bcmolt_gpon_onu_dfi_data_unpack, bcmolt_gpon_onu_dfi_data_scan };
+static bcmolt_group_info group_info_gpon_onu_dgi = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_AUTO, 2, sizeof(bcmolt_gpon_onu_dgi_data), sizeof(bcmolt_gpon_onu_dgi), offsetof(bcmolt_gpon_onu_dgi, data), (bcmolt_func_packed_len) bcmolt_gpon_onu_dgi_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_onu_dgi_data_pack, (bcmolt_func_unpack) bcmolt_gpon_onu_dgi_data_unpack, bcmolt_gpon_onu_dgi_data_scan };
+static bcmolt_group_info group_info_gpon_onu_dowi = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_AUTO, 3, sizeof(bcmolt_gpon_onu_dowi_data), sizeof(bcmolt_gpon_onu_dowi), offsetof(bcmolt_gpon_onu_dowi, data), (bcmolt_func_packed_len) bcmolt_gpon_onu_dowi_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_onu_dowi_data_pack, (bcmolt_func_unpack) bcmolt_gpon_onu_dowi_data_unpack, bcmolt_gpon_onu_dowi_data_scan };
+static bcmolt_group_info group_info_gpon_onu_err = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_AUTO, 4, sizeof(bcmolt_gpon_onu_err_data), sizeof(bcmolt_gpon_onu_err), offsetof(bcmolt_gpon_onu_err, data), (bcmolt_func_packed_len) bcmolt_gpon_onu_err_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_onu_err_data_pack, (bcmolt_func_unpack) bcmolt_gpon_onu_err_data_unpack, bcmolt_gpon_onu_err_data_scan };
+static bcmolt_group_info group_info_gpon_onu_invalid_dbru_report = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_AUTO, 5, sizeof(bcmolt_gpon_onu_invalid_dbru_report_data), sizeof(bcmolt_gpon_onu_invalid_dbru_report), offsetof(bcmolt_gpon_onu_invalid_dbru_report, data), (bcmolt_func_packed_len) bcmolt_gpon_onu_invalid_dbru_report_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_onu_invalid_dbru_report_data_pack, (bcmolt_func_unpack) bcmolt_gpon_onu_invalid_dbru_report_data_unpack, bcmolt_gpon_onu_invalid_dbru_report_data_scan };
+static bcmolt_group_info group_info_gpon_onu_key_exchange_completed = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_AUTO, 6, sizeof(bcmolt_gpon_onu_key_exchange_completed_data), sizeof(bcmolt_gpon_onu_key_exchange_completed), offsetof(bcmolt_gpon_onu_key_exchange_completed, data), (bcmolt_func_packed_len) bcmolt_gpon_onu_key_exchange_completed_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_onu_key_exchange_completed_data_pack, (bcmolt_func_unpack) bcmolt_gpon_onu_key_exchange_completed_data_unpack, bcmolt_gpon_onu_key_exchange_completed_data_scan };
+static bcmolt_group_info group_info_gpon_onu_key_exchange_cycle_skipped = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_AUTO, 7, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_gpon_onu_key_exchange_decrypt_required = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_AUTO, 8, sizeof(bcmolt_gpon_onu_key_exchange_decrypt_required_data), sizeof(bcmolt_gpon_onu_key_exchange_decrypt_required), offsetof(bcmolt_gpon_onu_key_exchange_decrypt_required, data), (bcmolt_func_packed_len) bcmolt_gpon_onu_key_exchange_decrypt_required_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_onu_key_exchange_decrypt_required_data_pack, (bcmolt_func_unpack) bcmolt_gpon_onu_key_exchange_decrypt_required_data_unpack, bcmolt_gpon_onu_key_exchange_decrypt_required_data_scan };
+static bcmolt_group_info group_info_gpon_onu_key_exchange_key_mismatch = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_AUTO, 9, sizeof(bcmolt_gpon_onu_key_exchange_key_mismatch_data), sizeof(bcmolt_gpon_onu_key_exchange_key_mismatch), offsetof(bcmolt_gpon_onu_key_exchange_key_mismatch, data), (bcmolt_func_packed_len) bcmolt_gpon_onu_key_exchange_key_mismatch_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_onu_key_exchange_key_mismatch_data_pack, (bcmolt_func_unpack) bcmolt_gpon_onu_key_exchange_key_mismatch_data_unpack, bcmolt_gpon_onu_key_exchange_key_mismatch_data_scan };
+static bcmolt_group_info group_info_gpon_onu_key_exchange_key_request_timeout = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_AUTO, 10, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_gpon_onu_key_exchange_unconsecutive_index = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_AUTO, 11, sizeof(bcmolt_gpon_onu_key_exchange_unconsecutive_index_data), sizeof(bcmolt_gpon_onu_key_exchange_unconsecutive_index), offsetof(bcmolt_gpon_onu_key_exchange_unconsecutive_index, data), (bcmolt_func_packed_len) bcmolt_gpon_onu_key_exchange_unconsecutive_index_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_onu_key_exchange_unconsecutive_index_data_pack, (bcmolt_func_unpack) bcmolt_gpon_onu_key_exchange_unconsecutive_index_data_unpack, bcmolt_gpon_onu_key_exchange_unconsecutive_index_data_scan };
+static bcmolt_group_info group_info_gpon_onu_loai = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_AUTO, 12, sizeof(bcmolt_gpon_onu_loai_data), sizeof(bcmolt_gpon_onu_loai), offsetof(bcmolt_gpon_onu_loai, data), (bcmolt_func_packed_len) bcmolt_gpon_onu_loai_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_onu_loai_data_pack, (bcmolt_func_unpack) bcmolt_gpon_onu_loai_data_unpack, bcmolt_gpon_onu_loai_data_scan };
+static bcmolt_group_info group_info_gpon_onu_loki = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_AUTO, 13, sizeof(bcmolt_gpon_onu_loki_data), sizeof(bcmolt_gpon_onu_loki), offsetof(bcmolt_gpon_onu_loki, data), (bcmolt_func_packed_len) bcmolt_gpon_onu_loki_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_onu_loki_data_pack, (bcmolt_func_unpack) bcmolt_gpon_onu_loki_data_unpack, bcmolt_gpon_onu_loki_data_scan };
+static bcmolt_group_info group_info_gpon_onu_memi = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_AUTO, 14, sizeof(bcmolt_gpon_onu_memi_data), sizeof(bcmolt_gpon_onu_memi), offsetof(bcmolt_gpon_onu_memi, data), (bcmolt_func_packed_len) bcmolt_gpon_onu_memi_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_onu_memi_data_pack, (bcmolt_func_unpack) bcmolt_gpon_onu_memi_data_unpack, bcmolt_gpon_onu_memi_data_scan };
+static bcmolt_group_info group_info_gpon_onu_omci_port_id_configuration_completed = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_AUTO, 15, sizeof(bcmolt_gpon_onu_omci_port_id_configuration_completed_data), sizeof(bcmolt_gpon_onu_omci_port_id_configuration_completed), offsetof(bcmolt_gpon_onu_omci_port_id_configuration_completed, data), (bcmolt_func_packed_len) bcmolt_gpon_onu_omci_port_id_configuration_completed_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_onu_omci_port_id_configuration_completed_data_pack, (bcmolt_func_unpack) bcmolt_gpon_onu_omci_port_id_configuration_completed_data_unpack, bcmolt_gpon_onu_omci_port_id_configuration_completed_data_scan };
+static bcmolt_group_info group_info_gpon_onu_onu_activation_completed = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_AUTO, 16, sizeof(bcmolt_gpon_onu_onu_activation_completed_data), sizeof(bcmolt_gpon_onu_onu_activation_completed), offsetof(bcmolt_gpon_onu_onu_activation_completed, data), (bcmolt_func_packed_len) bcmolt_gpon_onu_onu_activation_completed_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_onu_onu_activation_completed_data_pack, (bcmolt_func_unpack) bcmolt_gpon_onu_onu_activation_completed_data_unpack, bcmolt_gpon_onu_onu_activation_completed_data_scan };
+static bcmolt_group_info group_info_gpon_onu_onu_activation_standby_completed = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_AUTO, 17, sizeof(bcmolt_gpon_onu_onu_activation_standby_completed_data), sizeof(bcmolt_gpon_onu_onu_activation_standby_completed), offsetof(bcmolt_gpon_onu_onu_activation_standby_completed, data), (bcmolt_func_packed_len) bcmolt_gpon_onu_onu_activation_standby_completed_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_onu_onu_activation_standby_completed_data_pack, (bcmolt_func_unpack) bcmolt_gpon_onu_onu_activation_standby_completed_data_unpack, bcmolt_gpon_onu_onu_activation_standby_completed_data_scan };
+static bcmolt_group_info group_info_gpon_onu_onu_alarm = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_AUTO, 18, sizeof(bcmolt_gpon_onu_onu_alarm_data), sizeof(bcmolt_gpon_onu_onu_alarm), offsetof(bcmolt_gpon_onu_onu_alarm, data), (bcmolt_func_packed_len) bcmolt_gpon_onu_onu_alarm_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_onu_onu_alarm_data_pack, (bcmolt_func_unpack) bcmolt_gpon_onu_onu_alarm_data_unpack, bcmolt_gpon_onu_onu_alarm_data_scan };
+static bcmolt_group_info group_info_gpon_onu_onu_deactivation_completed = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_AUTO, 19, sizeof(bcmolt_gpon_onu_onu_deactivation_completed_data), sizeof(bcmolt_gpon_onu_onu_deactivation_completed), offsetof(bcmolt_gpon_onu_onu_deactivation_completed, data), (bcmolt_func_packed_len) bcmolt_gpon_onu_onu_deactivation_completed_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_onu_onu_deactivation_completed_data_pack, (bcmolt_func_unpack) bcmolt_gpon_onu_onu_deactivation_completed_data_unpack, bcmolt_gpon_onu_onu_deactivation_completed_data_scan };
+static bcmolt_group_info group_info_gpon_onu_onu_disable_completed = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_AUTO, 20, sizeof(bcmolt_gpon_onu_onu_disable_completed_data), sizeof(bcmolt_gpon_onu_onu_disable_completed), offsetof(bcmolt_gpon_onu_onu_disable_completed, data), (bcmolt_func_packed_len) bcmolt_gpon_onu_onu_disable_completed_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_onu_onu_disable_completed_data_pack, (bcmolt_func_unpack) bcmolt_gpon_onu_onu_disable_completed_data_unpack, bcmolt_gpon_onu_onu_disable_completed_data_scan };
+static bcmolt_group_info group_info_gpon_onu_onu_enable_completed = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_AUTO, 21, sizeof(bcmolt_gpon_onu_onu_enable_completed_data), sizeof(bcmolt_gpon_onu_onu_enable_completed), offsetof(bcmolt_gpon_onu_onu_enable_completed, data), (bcmolt_func_packed_len) bcmolt_gpon_onu_onu_enable_completed_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_onu_onu_enable_completed_data_pack, (bcmolt_func_unpack) bcmolt_gpon_onu_onu_enable_completed_data_unpack, bcmolt_gpon_onu_onu_enable_completed_data_scan };
+static bcmolt_group_info group_info_gpon_onu_optical_reflection = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_AUTO, 22, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_gpon_onu_password_authentication_completed = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_AUTO, 23, sizeof(bcmolt_gpon_onu_password_authentication_completed_data), sizeof(bcmolt_gpon_onu_password_authentication_completed), offsetof(bcmolt_gpon_onu_password_authentication_completed, data), (bcmolt_func_packed_len) bcmolt_gpon_onu_password_authentication_completed_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_onu_password_authentication_completed_data_pack, (bcmolt_func_unpack) bcmolt_gpon_onu_password_authentication_completed_data_unpack, bcmolt_gpon_onu_password_authentication_completed_data_scan };
+static bcmolt_group_info group_info_gpon_onu_pee = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_AUTO, 24, sizeof(bcmolt_gpon_onu_pee_data), sizeof(bcmolt_gpon_onu_pee), offsetof(bcmolt_gpon_onu_pee, data), (bcmolt_func_packed_len) bcmolt_gpon_onu_pee_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_onu_pee_data_pack, (bcmolt_func_unpack) bcmolt_gpon_onu_pee_data_unpack, bcmolt_gpon_onu_pee_data_scan };
+static bcmolt_group_info group_info_gpon_onu_possible_drift = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_AUTO, 25, sizeof(bcmolt_gpon_onu_possible_drift_data), sizeof(bcmolt_gpon_onu_possible_drift), offsetof(bcmolt_gpon_onu_possible_drift, data), (bcmolt_func_packed_len) bcmolt_gpon_onu_possible_drift_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_onu_possible_drift_data_pack, (bcmolt_func_unpack) bcmolt_gpon_onu_possible_drift_data_unpack, bcmolt_gpon_onu_possible_drift_data_scan };
+static bcmolt_group_info group_info_gpon_onu_power_management_state_change = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_AUTO, 26, sizeof(bcmolt_gpon_onu_power_management_state_change_data), sizeof(bcmolt_gpon_onu_power_management_state_change), offsetof(bcmolt_gpon_onu_power_management_state_change, data), (bcmolt_func_packed_len) bcmolt_gpon_onu_power_management_state_change_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_onu_power_management_state_change_data_pack, (bcmolt_func_unpack) bcmolt_gpon_onu_power_management_state_change_data_unpack, bcmolt_gpon_onu_power_management_state_change_data_scan };
+static bcmolt_group_info group_info_gpon_onu_pst = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_AUTO, 27, sizeof(bcmolt_gpon_onu_pst_data), sizeof(bcmolt_gpon_onu_pst), offsetof(bcmolt_gpon_onu_pst, data), (bcmolt_func_packed_len) bcmolt_gpon_onu_pst_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_onu_pst_data_pack, (bcmolt_func_unpack) bcmolt_gpon_onu_pst_data_unpack, bcmolt_gpon_onu_pst_data_scan };
+static bcmolt_group_info group_info_gpon_onu_ranging_completed = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_AUTO, 28, sizeof(bcmolt_gpon_onu_ranging_completed_data), sizeof(bcmolt_gpon_onu_ranging_completed), offsetof(bcmolt_gpon_onu_ranging_completed, data), (bcmolt_func_packed_len) bcmolt_gpon_onu_ranging_completed_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_onu_ranging_completed_data_pack, (bcmolt_func_unpack) bcmolt_gpon_onu_ranging_completed_data_unpack, bcmolt_gpon_onu_ranging_completed_data_scan };
+static bcmolt_group_info group_info_gpon_onu_rei = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_AUTO, 29, sizeof(bcmolt_gpon_onu_rei_data), sizeof(bcmolt_gpon_onu_rei), offsetof(bcmolt_gpon_onu_rei, data), (bcmolt_func_packed_len) bcmolt_gpon_onu_rei_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_onu_rei_data_pack, (bcmolt_func_unpack) bcmolt_gpon_onu_rei_data_unpack, bcmolt_gpon_onu_rei_data_scan };
+static bcmolt_group_info group_info_gpon_onu_rssi_measurement_completed = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_AUTO, 30, sizeof(bcmolt_gpon_onu_rssi_measurement_completed_data), sizeof(bcmolt_gpon_onu_rssi_measurement_completed), offsetof(bcmolt_gpon_onu_rssi_measurement_completed, data), (bcmolt_func_packed_len) bcmolt_gpon_onu_rssi_measurement_completed_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_onu_rssi_measurement_completed_data_pack, (bcmolt_func_unpack) bcmolt_gpon_onu_rssi_measurement_completed_data_unpack, bcmolt_gpon_onu_rssi_measurement_completed_data_scan };
+static bcmolt_group_info group_info_gpon_onu_sdi = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_AUTO, 31, sizeof(bcmolt_gpon_onu_sdi_data), sizeof(bcmolt_gpon_onu_sdi), offsetof(bcmolt_gpon_onu_sdi, data), (bcmolt_func_packed_len) bcmolt_gpon_onu_sdi_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_onu_sdi_data_pack, (bcmolt_func_unpack) bcmolt_gpon_onu_sdi_data_unpack, bcmolt_gpon_onu_sdi_data_scan };
+static bcmolt_group_info group_info_gpon_onu_sfi = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_AUTO, 32, sizeof(bcmolt_gpon_onu_sfi_data), sizeof(bcmolt_gpon_onu_sfi), offsetof(bcmolt_gpon_onu_sfi, data), (bcmolt_func_packed_len) bcmolt_gpon_onu_sfi_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_onu_sfi_data_pack, (bcmolt_func_unpack) bcmolt_gpon_onu_sfi_data_unpack, bcmolt_gpon_onu_sfi_data_scan };
+static bcmolt_group_info group_info_gpon_onu_stat_alarm_cleared = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_AUTO, 33, sizeof(bcmolt_gpon_onu_stat_alarm_cleared_data), sizeof(bcmolt_gpon_onu_stat_alarm_cleared), offsetof(bcmolt_gpon_onu_stat_alarm_cleared, data), (bcmolt_func_packed_len) bcmolt_gpon_onu_stat_alarm_cleared_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_onu_stat_alarm_cleared_data_pack, (bcmolt_func_unpack) bcmolt_gpon_onu_stat_alarm_cleared_data_unpack, bcmolt_gpon_onu_stat_alarm_cleared_data_scan };
+static bcmolt_group_info group_info_gpon_onu_stat_alarm_raised = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_AUTO, 34, sizeof(bcmolt_gpon_onu_stat_alarm_raised_data), sizeof(bcmolt_gpon_onu_stat_alarm_raised), offsetof(bcmolt_gpon_onu_stat_alarm_raised, data), (bcmolt_func_packed_len) bcmolt_gpon_onu_stat_alarm_raised_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_onu_stat_alarm_raised_data_pack, (bcmolt_func_unpack) bcmolt_gpon_onu_stat_alarm_raised_data_unpack, bcmolt_gpon_onu_stat_alarm_raised_data_scan };
+static bcmolt_group_info group_info_gpon_onu_sufi = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_AUTO, 35, sizeof(bcmolt_gpon_onu_sufi_data), sizeof(bcmolt_gpon_onu_sufi), offsetof(bcmolt_gpon_onu_sufi, data), (bcmolt_func_packed_len) bcmolt_gpon_onu_sufi_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_onu_sufi_data_pack, (bcmolt_func_unpack) bcmolt_gpon_onu_sufi_data_unpack, bcmolt_gpon_onu_sufi_data_scan };
+static bcmolt_group_info group_info_gpon_onu_tiwi = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_AUTO, 36, sizeof(bcmolt_gpon_onu_tiwi_data), sizeof(bcmolt_gpon_onu_tiwi), offsetof(bcmolt_gpon_onu_tiwi, data), (bcmolt_func_packed_len) bcmolt_gpon_onu_tiwi_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_onu_tiwi_data_pack, (bcmolt_func_unpack) bcmolt_gpon_onu_tiwi_data_unpack, bcmolt_gpon_onu_tiwi_data_scan };
+static bcmolt_group_info group_info_gpon_onu_auto_cfg = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_AUTO_CFG, 0, sizeof(bcmolt_gpon_onu_auto_cfg_data), sizeof(bcmolt_gpon_onu_auto_cfg), offsetof(bcmolt_gpon_onu_auto_cfg, data), (bcmolt_func_packed_len) bcmolt_gpon_onu_auto_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_onu_auto_cfg_data_pack, (bcmolt_func_unpack) bcmolt_gpon_onu_auto_cfg_data_unpack, bcmolt_gpon_onu_auto_cfg_data_scan };
+static bcmolt_group_info group_info_gpon_onu_change_power_level = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_OPER, 0, sizeof(bcmolt_gpon_onu_change_power_level_data), sizeof(bcmolt_gpon_onu_change_power_level), offsetof(bcmolt_gpon_onu_change_power_level, data), (bcmolt_func_packed_len) bcmolt_gpon_onu_change_power_level_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_onu_change_power_level_data_pack, (bcmolt_func_unpack) bcmolt_gpon_onu_change_power_level_data_unpack, bcmolt_gpon_onu_change_power_level_data_scan };
+static bcmolt_group_info group_info_gpon_onu_rssi_measurement = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_OPER, 1, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_gpon_onu_set_onu_state = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_OPER, 2, sizeof(bcmolt_gpon_onu_set_onu_state_data), sizeof(bcmolt_gpon_onu_set_onu_state), offsetof(bcmolt_gpon_onu_set_onu_state, data), (bcmolt_func_packed_len) bcmolt_gpon_onu_set_onu_state_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_onu_set_onu_state_data_pack, (bcmolt_func_unpack) bcmolt_gpon_onu_set_onu_state_data_unpack, bcmolt_gpon_onu_set_onu_state_data_scan };
+static bcmolt_group_info group_info_gpon_onu_cpu_packets = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_PROXY, 0, sizeof(bcmolt_gpon_onu_cpu_packets_data), sizeof(bcmolt_gpon_onu_cpu_packets), offsetof(bcmolt_gpon_onu_cpu_packets, data), (bcmolt_func_packed_len) bcmolt_gpon_onu_cpu_packets_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_onu_cpu_packets_data_pack, (bcmolt_func_unpack) bcmolt_gpon_onu_cpu_packets_data_unpack, bcmolt_gpon_onu_cpu_packets_data_scan };
+static bcmolt_group_info group_info_gpon_onu_ploam_packet = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_PROXY, 1, sizeof(bcmolt_gpon_onu_ploam_packet_data), sizeof(bcmolt_gpon_onu_ploam_packet), offsetof(bcmolt_gpon_onu_ploam_packet, data), (bcmolt_func_packed_len) bcmolt_gpon_onu_ploam_packet_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_onu_ploam_packet_data_pack, (bcmolt_func_unpack) bcmolt_gpon_onu_ploam_packet_data_unpack, bcmolt_gpon_onu_ploam_packet_data_scan };
+static bcmolt_group_info group_info_gpon_onu_cpu_packet = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_PROXY_RX, 0, sizeof(bcmolt_gpon_onu_cpu_packet_data), sizeof(bcmolt_gpon_onu_cpu_packet), offsetof(bcmolt_gpon_onu_cpu_packet, data), (bcmolt_func_packed_len) bcmolt_gpon_onu_cpu_packet_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_onu_cpu_packet_data_pack, (bcmolt_func_unpack) bcmolt_gpon_onu_cpu_packet_data_unpack, bcmolt_gpon_onu_cpu_packet_data_scan };
+static bcmolt_group_info group_info_gpon_onu_omci_packet = { BCMOLT_OBJ_ID_GPON_ONU, BCMOLT_MGT_GROUP_PROXY_RX, 1, sizeof(bcmolt_gpon_onu_omci_packet_data), sizeof(bcmolt_gpon_onu_omci_packet), offsetof(bcmolt_gpon_onu_omci_packet, data), (bcmolt_func_packed_len) bcmolt_gpon_onu_omci_packet_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_onu_omci_packet_data_pack, (bcmolt_func_unpack) bcmolt_gpon_onu_omci_packet_data_unpack, bcmolt_gpon_onu_omci_packet_data_scan };
+static bcmolt_group_info group_info_gpon_trx_key = { BCMOLT_OBJ_ID_GPON_TRX, BCMOLT_MGT_GROUP_KEY, 0, sizeof(bcmolt_gpon_trx_key), 0, 0, (bcmolt_func_packed_len) bcmolt_gpon_trx_key_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_trx_key_pack, (bcmolt_func_unpack) bcmolt_gpon_trx_key_unpack, bcmolt_gpon_trx_key_scan };
+static bcmolt_group_info group_info_gpon_trx_cfg = { BCMOLT_OBJ_ID_GPON_TRX, BCMOLT_MGT_GROUP_CFG, 0, sizeof(bcmolt_gpon_trx_cfg_data), sizeof(bcmolt_gpon_trx_cfg), offsetof(bcmolt_gpon_trx_cfg, data), (bcmolt_func_packed_len) bcmolt_gpon_trx_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_gpon_trx_cfg_data_pack, (bcmolt_func_unpack) bcmolt_gpon_trx_cfg_data_unpack, bcmolt_gpon_trx_cfg_data_scan };
+static bcmolt_group_info group_info_log_entry_key = { BCMOLT_OBJ_ID_LOG_ENTRY, BCMOLT_MGT_GROUP_KEY, 0, sizeof(bcmolt_log_entry_key), 0, 0, (bcmolt_func_packed_len) bcmolt_log_entry_key_get_packed_length, (bcmolt_func_pack) bcmolt_log_entry_key_pack, (bcmolt_func_unpack) bcmolt_log_entry_key_unpack, bcmolt_log_entry_key_scan };
+static bcmolt_group_info group_info_log_entry_cfg = { BCMOLT_OBJ_ID_LOG_ENTRY, BCMOLT_MGT_GROUP_CFG, 0, sizeof(bcmolt_log_entry_cfg_data), sizeof(bcmolt_log_entry_cfg), offsetof(bcmolt_log_entry_cfg, data), (bcmolt_func_packed_len) bcmolt_log_entry_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_log_entry_cfg_data_pack, (bcmolt_func_unpack) bcmolt_log_entry_cfg_data_unpack, bcmolt_log_entry_cfg_data_scan };
+static bcmolt_group_info group_info_log_entry_stat = { BCMOLT_OBJ_ID_LOG_ENTRY, BCMOLT_MGT_GROUP_STAT, 0, sizeof(bcmolt_log_entry_stat_data), sizeof(bcmolt_log_entry_stat), offsetof(bcmolt_log_entry_stat, data), (bcmolt_func_packed_len) bcmolt_log_entry_stat_data_get_packed_length, (bcmolt_func_pack) bcmolt_log_entry_stat_data_pack, (bcmolt_func_unpack) bcmolt_log_entry_stat_data_unpack, bcmolt_log_entry_stat_data_scan };
+static bcmolt_group_info group_info_log_entry_stat_cfg = { BCMOLT_OBJ_ID_LOG_ENTRY, BCMOLT_MGT_GROUP_STAT_CFG, 0, sizeof(bcmolt_log_entry_stat_cfg_data), sizeof(bcmolt_log_entry_stat_cfg), offsetof(bcmolt_log_entry_stat_cfg, data), (bcmolt_func_packed_len) bcmolt_log_entry_stat_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_log_entry_stat_cfg_data_pack, (bcmolt_func_unpack) bcmolt_log_entry_stat_cfg_data_unpack, bcmolt_log_entry_stat_cfg_data_scan };
+static bcmolt_group_info group_info_log_entry_stat_alarm_cleared = { BCMOLT_OBJ_ID_LOG_ENTRY, BCMOLT_MGT_GROUP_AUTO, 0, sizeof(bcmolt_log_entry_stat_alarm_cleared_data), sizeof(bcmolt_log_entry_stat_alarm_cleared), offsetof(bcmolt_log_entry_stat_alarm_cleared, data), (bcmolt_func_packed_len) bcmolt_log_entry_stat_alarm_cleared_data_get_packed_length, (bcmolt_func_pack) bcmolt_log_entry_stat_alarm_cleared_data_pack, (bcmolt_func_unpack) bcmolt_log_entry_stat_alarm_cleared_data_unpack, bcmolt_log_entry_stat_alarm_cleared_data_scan };
+static bcmolt_group_info group_info_log_entry_stat_alarm_raised = { BCMOLT_OBJ_ID_LOG_ENTRY, BCMOLT_MGT_GROUP_AUTO, 1, sizeof(bcmolt_log_entry_stat_alarm_raised_data), sizeof(bcmolt_log_entry_stat_alarm_raised), offsetof(bcmolt_log_entry_stat_alarm_raised, data), (bcmolt_func_packed_len) bcmolt_log_entry_stat_alarm_raised_data_get_packed_length, (bcmolt_func_pack) bcmolt_log_entry_stat_alarm_raised_data_pack, (bcmolt_func_unpack) bcmolt_log_entry_stat_alarm_raised_data_unpack, bcmolt_log_entry_stat_alarm_raised_data_scan };
+static bcmolt_group_info group_info_log_entry_auto_cfg = { BCMOLT_OBJ_ID_LOG_ENTRY, BCMOLT_MGT_GROUP_AUTO_CFG, 0, sizeof(bcmolt_log_entry_auto_cfg_data), sizeof(bcmolt_log_entry_auto_cfg), offsetof(bcmolt_log_entry_auto_cfg, data), (bcmolt_func_packed_len) bcmolt_log_entry_auto_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_log_entry_auto_cfg_data_pack, (bcmolt_func_unpack) bcmolt_log_entry_auto_cfg_data_unpack, bcmolt_log_entry_auto_cfg_data_scan };
+static bcmolt_group_info group_info_logger_key = { BCMOLT_OBJ_ID_LOGGER, BCMOLT_MGT_GROUP_KEY, 0, sizeof(bcmolt_logger_key), 0, 0, (bcmolt_func_packed_len) bcmolt_logger_key_get_packed_length, (bcmolt_func_pack) bcmolt_logger_key_pack, (bcmolt_func_unpack) bcmolt_logger_key_unpack, bcmolt_logger_key_scan };
+static bcmolt_group_info group_info_logger_cfg = { BCMOLT_OBJ_ID_LOGGER, BCMOLT_MGT_GROUP_CFG, 0, sizeof(bcmolt_logger_cfg_data), sizeof(bcmolt_logger_cfg), offsetof(bcmolt_logger_cfg, data), (bcmolt_func_packed_len) bcmolt_logger_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_logger_cfg_data_pack, (bcmolt_func_unpack) bcmolt_logger_cfg_data_unpack, bcmolt_logger_cfg_data_scan };
+static bcmolt_group_info group_info_logger_stat = { BCMOLT_OBJ_ID_LOGGER, BCMOLT_MGT_GROUP_STAT, 0, sizeof(bcmolt_logger_stat_data), sizeof(bcmolt_logger_stat), offsetof(bcmolt_logger_stat, data), (bcmolt_func_packed_len) bcmolt_logger_stat_data_get_packed_length, (bcmolt_func_pack) bcmolt_logger_stat_data_pack, (bcmolt_func_unpack) bcmolt_logger_stat_data_unpack, bcmolt_logger_stat_data_scan };
+static bcmolt_group_info group_info_logger_stat_cfg = { BCMOLT_OBJ_ID_LOGGER, BCMOLT_MGT_GROUP_STAT_CFG, 0, sizeof(bcmolt_logger_stat_cfg_data), sizeof(bcmolt_logger_stat_cfg), offsetof(bcmolt_logger_stat_cfg, data), (bcmolt_func_packed_len) bcmolt_logger_stat_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_logger_stat_cfg_data_pack, (bcmolt_func_unpack) bcmolt_logger_stat_cfg_data_unpack, bcmolt_logger_stat_cfg_data_scan };
+static bcmolt_group_info group_info_logger_stat_alarm_cleared = { BCMOLT_OBJ_ID_LOGGER, BCMOLT_MGT_GROUP_AUTO, 0, sizeof(bcmolt_logger_stat_alarm_cleared_data), sizeof(bcmolt_logger_stat_alarm_cleared), offsetof(bcmolt_logger_stat_alarm_cleared, data), (bcmolt_func_packed_len) bcmolt_logger_stat_alarm_cleared_data_get_packed_length, (bcmolt_func_pack) bcmolt_logger_stat_alarm_cleared_data_pack, (bcmolt_func_unpack) bcmolt_logger_stat_alarm_cleared_data_unpack, bcmolt_logger_stat_alarm_cleared_data_scan };
+static bcmolt_group_info group_info_logger_stat_alarm_raised = { BCMOLT_OBJ_ID_LOGGER, BCMOLT_MGT_GROUP_AUTO, 1, sizeof(bcmolt_logger_stat_alarm_raised_data), sizeof(bcmolt_logger_stat_alarm_raised), offsetof(bcmolt_logger_stat_alarm_raised, data), (bcmolt_func_packed_len) bcmolt_logger_stat_alarm_raised_data_get_packed_length, (bcmolt_func_pack) bcmolt_logger_stat_alarm_raised_data_pack, (bcmolt_func_unpack) bcmolt_logger_stat_alarm_raised_data_unpack, bcmolt_logger_stat_alarm_raised_data_scan };
+static bcmolt_group_info group_info_logger_auto_cfg = { BCMOLT_OBJ_ID_LOGGER, BCMOLT_MGT_GROUP_AUTO_CFG, 0, sizeof(bcmolt_logger_auto_cfg_data), sizeof(bcmolt_logger_auto_cfg), offsetof(bcmolt_logger_auto_cfg, data), (bcmolt_func_packed_len) bcmolt_logger_auto_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_logger_auto_cfg_data_pack, (bcmolt_func_unpack) bcmolt_logger_auto_cfg_data_unpack, bcmolt_logger_auto_cfg_data_scan };
+static bcmolt_group_info group_info_logger_clear_log = { BCMOLT_OBJ_ID_LOGGER, BCMOLT_MGT_GROUP_OPER, 0, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_nni_key = { BCMOLT_OBJ_ID_NNI, BCMOLT_MGT_GROUP_KEY, 0, sizeof(bcmolt_nni_key), 0, 0, (bcmolt_func_packed_len) bcmolt_nni_key_get_packed_length, (bcmolt_func_pack) bcmolt_nni_key_pack, (bcmolt_func_unpack) bcmolt_nni_key_unpack, bcmolt_nni_key_scan };
+static bcmolt_group_info group_info_nni_cfg = { BCMOLT_OBJ_ID_NNI, BCMOLT_MGT_GROUP_CFG, 0, sizeof(bcmolt_nni_cfg_data), sizeof(bcmolt_nni_cfg), offsetof(bcmolt_nni_cfg, data), (bcmolt_func_packed_len) bcmolt_nni_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_nni_cfg_data_pack, (bcmolt_func_unpack) bcmolt_nni_cfg_data_unpack, bcmolt_nni_cfg_data_scan };
+static bcmolt_group_info group_info_nni_stat = { BCMOLT_OBJ_ID_NNI, BCMOLT_MGT_GROUP_STAT, 0, sizeof(bcmolt_nni_stat_data), sizeof(bcmolt_nni_stat), offsetof(bcmolt_nni_stat, data), (bcmolt_func_packed_len) bcmolt_nni_stat_data_get_packed_length, (bcmolt_func_pack) bcmolt_nni_stat_data_pack, (bcmolt_func_unpack) bcmolt_nni_stat_data_unpack, bcmolt_nni_stat_data_scan };
+static bcmolt_group_info group_info_nni_stat_cfg = { BCMOLT_OBJ_ID_NNI, BCMOLT_MGT_GROUP_STAT_CFG, 0, sizeof(bcmolt_nni_stat_cfg_data), sizeof(bcmolt_nni_stat_cfg), offsetof(bcmolt_nni_stat_cfg, data), (bcmolt_func_packed_len) bcmolt_nni_stat_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_nni_stat_cfg_data_pack, (bcmolt_func_unpack) bcmolt_nni_stat_cfg_data_unpack, bcmolt_nni_stat_cfg_data_scan };
+static bcmolt_group_info group_info_nni_stat_alarm_cleared = { BCMOLT_OBJ_ID_NNI, BCMOLT_MGT_GROUP_AUTO, 0, sizeof(bcmolt_nni_stat_alarm_cleared_data), sizeof(bcmolt_nni_stat_alarm_cleared), offsetof(bcmolt_nni_stat_alarm_cleared, data), (bcmolt_func_packed_len) bcmolt_nni_stat_alarm_cleared_data_get_packed_length, (bcmolt_func_pack) bcmolt_nni_stat_alarm_cleared_data_pack, (bcmolt_func_unpack) bcmolt_nni_stat_alarm_cleared_data_unpack, bcmolt_nni_stat_alarm_cleared_data_scan };
+static bcmolt_group_info group_info_nni_stat_alarm_raised = { BCMOLT_OBJ_ID_NNI, BCMOLT_MGT_GROUP_AUTO, 1, sizeof(bcmolt_nni_stat_alarm_raised_data), sizeof(bcmolt_nni_stat_alarm_raised), offsetof(bcmolt_nni_stat_alarm_raised, data), (bcmolt_func_packed_len) bcmolt_nni_stat_alarm_raised_data_get_packed_length, (bcmolt_func_pack) bcmolt_nni_stat_alarm_raised_data_pack, (bcmolt_func_unpack) bcmolt_nni_stat_alarm_raised_data_unpack, bcmolt_nni_stat_alarm_raised_data_scan };
+static bcmolt_group_info group_info_nni_status_changed = { BCMOLT_OBJ_ID_NNI, BCMOLT_MGT_GROUP_AUTO, 2, sizeof(bcmolt_nni_status_changed_data), sizeof(bcmolt_nni_status_changed), offsetof(bcmolt_nni_status_changed, data), (bcmolt_func_packed_len) bcmolt_nni_status_changed_data_get_packed_length, (bcmolt_func_pack) bcmolt_nni_status_changed_data_pack, (bcmolt_func_unpack) bcmolt_nni_status_changed_data_unpack, bcmolt_nni_status_changed_data_scan };
+static bcmolt_group_info group_info_nni_auto_cfg = { BCMOLT_OBJ_ID_NNI, BCMOLT_MGT_GROUP_AUTO_CFG, 0, sizeof(bcmolt_nni_auto_cfg_data), sizeof(bcmolt_nni_auto_cfg), offsetof(bcmolt_nni_auto_cfg, data), (bcmolt_func_packed_len) bcmolt_nni_auto_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_nni_auto_cfg_data_pack, (bcmolt_func_unpack) bcmolt_nni_auto_cfg_data_unpack, bcmolt_nni_auto_cfg_data_scan };
+static bcmolt_group_info group_info_nni_serdes_key = { BCMOLT_OBJ_ID_NNI_SERDES, BCMOLT_MGT_GROUP_KEY, 0, sizeof(bcmolt_nni_serdes_key), 0, 0, (bcmolt_func_packed_len) bcmolt_nni_serdes_key_get_packed_length, (bcmolt_func_pack) bcmolt_nni_serdes_key_pack, (bcmolt_func_unpack) bcmolt_nni_serdes_key_unpack, bcmolt_nni_serdes_key_scan };
+static bcmolt_group_info group_info_nni_serdes_cfg = { BCMOLT_OBJ_ID_NNI_SERDES, BCMOLT_MGT_GROUP_CFG, 0, sizeof(bcmolt_nni_serdes_cfg_data), sizeof(bcmolt_nni_serdes_cfg), offsetof(bcmolt_nni_serdes_cfg, data), (bcmolt_func_packed_len) bcmolt_nni_serdes_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_nni_serdes_cfg_data_pack, (bcmolt_func_unpack) bcmolt_nni_serdes_cfg_data_unpack, bcmolt_nni_serdes_cfg_data_scan };
+static bcmolt_group_info group_info_software_error_key = { BCMOLT_OBJ_ID_SOFTWARE_ERROR, BCMOLT_MGT_GROUP_KEY, 0, sizeof(bcmolt_software_error_key), 0, 0, (bcmolt_func_packed_len) bcmolt_software_error_key_get_packed_length, (bcmolt_func_pack) bcmolt_software_error_key_pack, (bcmolt_func_unpack) bcmolt_software_error_key_unpack, bcmolt_software_error_key_scan };
+static bcmolt_group_info group_info_software_error_cfg = { BCMOLT_OBJ_ID_SOFTWARE_ERROR, BCMOLT_MGT_GROUP_CFG, 0, sizeof(bcmolt_software_error_cfg_data), sizeof(bcmolt_software_error_cfg), offsetof(bcmolt_software_error_cfg, data), (bcmolt_func_packed_len) bcmolt_software_error_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_software_error_cfg_data_pack, (bcmolt_func_unpack) bcmolt_software_error_cfg_data_unpack, bcmolt_software_error_cfg_data_scan };
+static bcmolt_group_info group_info_trx_calibration_key = { BCMOLT_OBJ_ID_TRX_CALIBRATION, BCMOLT_MGT_GROUP_KEY, 0, sizeof(bcmolt_trx_calibration_key), 0, 0, (bcmolt_func_packed_len) bcmolt_trx_calibration_key_get_packed_length, (bcmolt_func_pack) bcmolt_trx_calibration_key_pack, (bcmolt_func_unpack) bcmolt_trx_calibration_key_unpack, bcmolt_trx_calibration_key_scan };
+static bcmolt_group_info group_info_trx_calibration_capture_window_and_statistic_completed = { BCMOLT_OBJ_ID_TRX_CALIBRATION, BCMOLT_MGT_GROUP_AUTO, 0, sizeof(bcmolt_trx_calibration_capture_window_and_statistic_completed_data), sizeof(bcmolt_trx_calibration_capture_window_and_statistic_completed), offsetof(bcmolt_trx_calibration_capture_window_and_statistic_completed, data), (bcmolt_func_packed_len) bcmolt_trx_calibration_capture_window_and_statistic_completed_data_get_packed_length, (bcmolt_func_pack) bcmolt_trx_calibration_capture_window_and_statistic_completed_data_pack, (bcmolt_func_unpack) bcmolt_trx_calibration_capture_window_and_statistic_completed_data_unpack, bcmolt_trx_calibration_capture_window_and_statistic_completed_data_scan };
+static bcmolt_group_info group_info_trx_calibration_auto_cfg = { BCMOLT_OBJ_ID_TRX_CALIBRATION, BCMOLT_MGT_GROUP_AUTO_CFG, 0, sizeof(bcmolt_trx_calibration_auto_cfg_data), sizeof(bcmolt_trx_calibration_auto_cfg), offsetof(bcmolt_trx_calibration_auto_cfg, data), (bcmolt_func_packed_len) bcmolt_trx_calibration_auto_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_trx_calibration_auto_cfg_data_pack, (bcmolt_func_unpack) bcmolt_trx_calibration_auto_cfg_data_unpack, bcmolt_trx_calibration_auto_cfg_data_scan };
+static bcmolt_group_info group_info_trx_calibration_start_capture_window = { BCMOLT_OBJ_ID_TRX_CALIBRATION, BCMOLT_MGT_GROUP_OPER, 0, sizeof(bcmolt_trx_calibration_start_capture_window_data), sizeof(bcmolt_trx_calibration_start_capture_window), offsetof(bcmolt_trx_calibration_start_capture_window, data), (bcmolt_func_packed_len) bcmolt_trx_calibration_start_capture_window_data_get_packed_length, (bcmolt_func_pack) bcmolt_trx_calibration_start_capture_window_data_pack, (bcmolt_func_unpack) bcmolt_trx_calibration_start_capture_window_data_unpack, bcmolt_trx_calibration_start_capture_window_data_scan };
+static bcmolt_group_info group_info_trx_calibration_stop_capture_window = { BCMOLT_OBJ_ID_TRX_CALIBRATION, BCMOLT_MGT_GROUP_OPER, 1, sizeof(bcmolt_trx_calibration_stop_capture_window_data), sizeof(bcmolt_trx_calibration_stop_capture_window), offsetof(bcmolt_trx_calibration_stop_capture_window, data), (bcmolt_func_packed_len) bcmolt_trx_calibration_stop_capture_window_data_get_packed_length, (bcmolt_func_pack) bcmolt_trx_calibration_stop_capture_window_data_pack, (bcmolt_func_unpack) bcmolt_trx_calibration_stop_capture_window_data_unpack, bcmolt_trx_calibration_stop_capture_window_data_scan };
+static bcmolt_group_info group_info_xgpon_alloc_key = { BCMOLT_OBJ_ID_XGPON_ALLOC, BCMOLT_MGT_GROUP_KEY, 0, sizeof(bcmolt_xgpon_alloc_key), 0, 0, (bcmolt_func_packed_len) bcmolt_xgpon_alloc_key_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_alloc_key_pack, (bcmolt_func_unpack) bcmolt_xgpon_alloc_key_unpack, bcmolt_xgpon_alloc_key_scan };
+static bcmolt_group_info group_info_xgpon_alloc_cfg = { BCMOLT_OBJ_ID_XGPON_ALLOC, BCMOLT_MGT_GROUP_CFG, 0, sizeof(bcmolt_xgpon_alloc_cfg_data), sizeof(bcmolt_xgpon_alloc_cfg), offsetof(bcmolt_xgpon_alloc_cfg, data), (bcmolt_func_packed_len) bcmolt_xgpon_alloc_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_alloc_cfg_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_alloc_cfg_data_unpack, bcmolt_xgpon_alloc_cfg_data_scan };
+static bcmolt_group_info group_info_xgpon_alloc_stat = { BCMOLT_OBJ_ID_XGPON_ALLOC, BCMOLT_MGT_GROUP_STAT, 0, sizeof(bcmolt_xgpon_alloc_stat_data), sizeof(bcmolt_xgpon_alloc_stat), offsetof(bcmolt_xgpon_alloc_stat, data), (bcmolt_func_packed_len) bcmolt_xgpon_alloc_stat_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_alloc_stat_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_alloc_stat_data_unpack, bcmolt_xgpon_alloc_stat_data_scan };
+static bcmolt_group_info group_info_xgpon_alloc_stat_cfg = { BCMOLT_OBJ_ID_XGPON_ALLOC, BCMOLT_MGT_GROUP_STAT_CFG, 0, sizeof(bcmolt_xgpon_alloc_stat_cfg_data), sizeof(bcmolt_xgpon_alloc_stat_cfg), offsetof(bcmolt_xgpon_alloc_stat_cfg, data), (bcmolt_func_packed_len) bcmolt_xgpon_alloc_stat_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_alloc_stat_cfg_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_alloc_stat_cfg_data_unpack, bcmolt_xgpon_alloc_stat_cfg_data_scan };
+static bcmolt_group_info group_info_xgpon_alloc_configuration_completed = { BCMOLT_OBJ_ID_XGPON_ALLOC, BCMOLT_MGT_GROUP_AUTO, 0, sizeof(bcmolt_xgpon_alloc_configuration_completed_data), sizeof(bcmolt_xgpon_alloc_configuration_completed), offsetof(bcmolt_xgpon_alloc_configuration_completed, data), (bcmolt_func_packed_len) bcmolt_xgpon_alloc_configuration_completed_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_alloc_configuration_completed_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_alloc_configuration_completed_data_unpack, bcmolt_xgpon_alloc_configuration_completed_data_scan };
+static bcmolt_group_info group_info_xgpon_alloc_get_alloc_stats_completed = { BCMOLT_OBJ_ID_XGPON_ALLOC, BCMOLT_MGT_GROUP_AUTO, 1, sizeof(bcmolt_xgpon_alloc_get_alloc_stats_completed_data), sizeof(bcmolt_xgpon_alloc_get_alloc_stats_completed), offsetof(bcmolt_xgpon_alloc_get_alloc_stats_completed, data), (bcmolt_func_packed_len) bcmolt_xgpon_alloc_get_alloc_stats_completed_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_alloc_get_alloc_stats_completed_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_alloc_get_alloc_stats_completed_data_unpack, bcmolt_xgpon_alloc_get_alloc_stats_completed_data_scan };
+static bcmolt_group_info group_info_xgpon_alloc_stat_alarm_cleared = { BCMOLT_OBJ_ID_XGPON_ALLOC, BCMOLT_MGT_GROUP_AUTO, 2, sizeof(bcmolt_xgpon_alloc_stat_alarm_cleared_data), sizeof(bcmolt_xgpon_alloc_stat_alarm_cleared), offsetof(bcmolt_xgpon_alloc_stat_alarm_cleared, data), (bcmolt_func_packed_len) bcmolt_xgpon_alloc_stat_alarm_cleared_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_alloc_stat_alarm_cleared_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_alloc_stat_alarm_cleared_data_unpack, bcmolt_xgpon_alloc_stat_alarm_cleared_data_scan };
+static bcmolt_group_info group_info_xgpon_alloc_stat_alarm_raised = { BCMOLT_OBJ_ID_XGPON_ALLOC, BCMOLT_MGT_GROUP_AUTO, 3, sizeof(bcmolt_xgpon_alloc_stat_alarm_raised_data), sizeof(bcmolt_xgpon_alloc_stat_alarm_raised), offsetof(bcmolt_xgpon_alloc_stat_alarm_raised, data), (bcmolt_func_packed_len) bcmolt_xgpon_alloc_stat_alarm_raised_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_alloc_stat_alarm_raised_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_alloc_stat_alarm_raised_data_unpack, bcmolt_xgpon_alloc_stat_alarm_raised_data_scan };
+static bcmolt_group_info group_info_xgpon_alloc_auto_cfg = { BCMOLT_OBJ_ID_XGPON_ALLOC, BCMOLT_MGT_GROUP_AUTO_CFG, 0, sizeof(bcmolt_xgpon_alloc_auto_cfg_data), sizeof(bcmolt_xgpon_alloc_auto_cfg), offsetof(bcmolt_xgpon_alloc_auto_cfg, data), (bcmolt_func_packed_len) bcmolt_xgpon_alloc_auto_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_alloc_auto_cfg_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_alloc_auto_cfg_data_unpack, bcmolt_xgpon_alloc_auto_cfg_data_scan };
+static bcmolt_group_info group_info_xgpon_alloc_get_stats = { BCMOLT_OBJ_ID_XGPON_ALLOC, BCMOLT_MGT_GROUP_OPER, 0, sizeof(bcmolt_xgpon_alloc_get_stats_data), sizeof(bcmolt_xgpon_alloc_get_stats), offsetof(bcmolt_xgpon_alloc_get_stats, data), (bcmolt_func_packed_len) bcmolt_xgpon_alloc_get_stats_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_alloc_get_stats_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_alloc_get_stats_data_unpack, bcmolt_xgpon_alloc_get_stats_data_scan };
+static bcmolt_group_info group_info_xgpon_alloc_set_state = { BCMOLT_OBJ_ID_XGPON_ALLOC, BCMOLT_MGT_GROUP_OPER, 1, sizeof(bcmolt_xgpon_alloc_set_state_data), sizeof(bcmolt_xgpon_alloc_set_state), offsetof(bcmolt_xgpon_alloc_set_state, data), (bcmolt_func_packed_len) bcmolt_xgpon_alloc_set_state_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_alloc_set_state_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_alloc_set_state_data_unpack, bcmolt_xgpon_alloc_set_state_data_scan };
+static bcmolt_group_info group_info_xgpon_gem_port_key = { BCMOLT_OBJ_ID_XGPON_GEM_PORT, BCMOLT_MGT_GROUP_KEY, 0, sizeof(bcmolt_xgpon_gem_port_key), 0, 0, (bcmolt_func_packed_len) bcmolt_xgpon_gem_port_key_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_gem_port_key_pack, (bcmolt_func_unpack) bcmolt_xgpon_gem_port_key_unpack, bcmolt_xgpon_gem_port_key_scan };
+static bcmolt_group_info group_info_xgpon_gem_port_cfg = { BCMOLT_OBJ_ID_XGPON_GEM_PORT, BCMOLT_MGT_GROUP_CFG, 0, sizeof(bcmolt_xgpon_gem_port_cfg_data), sizeof(bcmolt_xgpon_gem_port_cfg), offsetof(bcmolt_xgpon_gem_port_cfg, data), (bcmolt_func_packed_len) bcmolt_xgpon_gem_port_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_gem_port_cfg_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_gem_port_cfg_data_unpack, bcmolt_xgpon_gem_port_cfg_data_scan };
+static bcmolt_group_info group_info_xgpon_gem_port_stat = { BCMOLT_OBJ_ID_XGPON_GEM_PORT, BCMOLT_MGT_GROUP_STAT, 0, sizeof(bcmolt_xgpon_gem_port_stat_data), sizeof(bcmolt_xgpon_gem_port_stat), offsetof(bcmolt_xgpon_gem_port_stat, data), (bcmolt_func_packed_len) bcmolt_xgpon_gem_port_stat_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_gem_port_stat_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_gem_port_stat_data_unpack, bcmolt_xgpon_gem_port_stat_data_scan };
+static bcmolt_group_info group_info_xgpon_gem_port_stat_cfg = { BCMOLT_OBJ_ID_XGPON_GEM_PORT, BCMOLT_MGT_GROUP_STAT_CFG, 0, sizeof(bcmolt_xgpon_gem_port_stat_cfg_data), sizeof(bcmolt_xgpon_gem_port_stat_cfg), offsetof(bcmolt_xgpon_gem_port_stat_cfg, data), (bcmolt_func_packed_len) bcmolt_xgpon_gem_port_stat_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_gem_port_stat_cfg_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_gem_port_stat_cfg_data_unpack, bcmolt_xgpon_gem_port_stat_cfg_data_scan };
+static bcmolt_group_info group_info_xgpon_gem_port_stat_alarm_cleared = { BCMOLT_OBJ_ID_XGPON_GEM_PORT, BCMOLT_MGT_GROUP_AUTO, 0, sizeof(bcmolt_xgpon_gem_port_stat_alarm_cleared_data), sizeof(bcmolt_xgpon_gem_port_stat_alarm_cleared), offsetof(bcmolt_xgpon_gem_port_stat_alarm_cleared, data), (bcmolt_func_packed_len) bcmolt_xgpon_gem_port_stat_alarm_cleared_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_gem_port_stat_alarm_cleared_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_gem_port_stat_alarm_cleared_data_unpack, bcmolt_xgpon_gem_port_stat_alarm_cleared_data_scan };
+static bcmolt_group_info group_info_xgpon_gem_port_stat_alarm_raised = { BCMOLT_OBJ_ID_XGPON_GEM_PORT, BCMOLT_MGT_GROUP_AUTO, 1, sizeof(bcmolt_xgpon_gem_port_stat_alarm_raised_data), sizeof(bcmolt_xgpon_gem_port_stat_alarm_raised), offsetof(bcmolt_xgpon_gem_port_stat_alarm_raised, data), (bcmolt_func_packed_len) bcmolt_xgpon_gem_port_stat_alarm_raised_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_gem_port_stat_alarm_raised_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_gem_port_stat_alarm_raised_data_unpack, bcmolt_xgpon_gem_port_stat_alarm_raised_data_scan };
+static bcmolt_group_info group_info_xgpon_gem_port_auto_cfg = { BCMOLT_OBJ_ID_XGPON_GEM_PORT, BCMOLT_MGT_GROUP_AUTO_CFG, 0, sizeof(bcmolt_xgpon_gem_port_auto_cfg_data), sizeof(bcmolt_xgpon_gem_port_auto_cfg), offsetof(bcmolt_xgpon_gem_port_auto_cfg, data), (bcmolt_func_packed_len) bcmolt_xgpon_gem_port_auto_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_gem_port_auto_cfg_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_gem_port_auto_cfg_data_unpack, bcmolt_xgpon_gem_port_auto_cfg_data_scan };
+static bcmolt_group_info group_info_xgpon_iwf_key = { BCMOLT_OBJ_ID_XGPON_IWF, BCMOLT_MGT_GROUP_KEY, 0, sizeof(bcmolt_xgpon_iwf_key), 0, 0, (bcmolt_func_packed_len) bcmolt_xgpon_iwf_key_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_iwf_key_pack, (bcmolt_func_unpack) bcmolt_xgpon_iwf_key_unpack, bcmolt_xgpon_iwf_key_scan };
+static bcmolt_group_info group_info_xgpon_iwf_cfg = { BCMOLT_OBJ_ID_XGPON_IWF, BCMOLT_MGT_GROUP_CFG, 0, sizeof(bcmolt_xgpon_iwf_cfg_data), sizeof(bcmolt_xgpon_iwf_cfg), offsetof(bcmolt_xgpon_iwf_cfg, data), (bcmolt_func_packed_len) bcmolt_xgpon_iwf_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_iwf_cfg_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_iwf_cfg_data_unpack, bcmolt_xgpon_iwf_cfg_data_scan };
+static bcmolt_group_info group_info_xgpon_ni_key = { BCMOLT_OBJ_ID_XGPON_NI, BCMOLT_MGT_GROUP_KEY, 0, sizeof(bcmolt_xgpon_ni_key), 0, 0, (bcmolt_func_packed_len) bcmolt_xgpon_ni_key_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_ni_key_pack, (bcmolt_func_unpack) bcmolt_xgpon_ni_key_unpack, bcmolt_xgpon_ni_key_scan };
+static bcmolt_group_info group_info_xgpon_ni_cfg = { BCMOLT_OBJ_ID_XGPON_NI, BCMOLT_MGT_GROUP_CFG, 0, sizeof(bcmolt_xgpon_ni_cfg_data), sizeof(bcmolt_xgpon_ni_cfg), offsetof(bcmolt_xgpon_ni_cfg, data), (bcmolt_func_packed_len) bcmolt_xgpon_ni_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_ni_cfg_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_ni_cfg_data_unpack, bcmolt_xgpon_ni_cfg_data_scan };
+static bcmolt_group_info group_info_xgpon_ni_stat = { BCMOLT_OBJ_ID_XGPON_NI, BCMOLT_MGT_GROUP_STAT, 0, sizeof(bcmolt_xgpon_ni_stat_data), sizeof(bcmolt_xgpon_ni_stat), offsetof(bcmolt_xgpon_ni_stat, data), (bcmolt_func_packed_len) bcmolt_xgpon_ni_stat_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_ni_stat_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_ni_stat_data_unpack, bcmolt_xgpon_ni_stat_data_scan };
+static bcmolt_group_info group_info_xgpon_ni_stat_cfg = { BCMOLT_OBJ_ID_XGPON_NI, BCMOLT_MGT_GROUP_STAT_CFG, 0, sizeof(bcmolt_xgpon_ni_stat_cfg_data), sizeof(bcmolt_xgpon_ni_stat_cfg), offsetof(bcmolt_xgpon_ni_stat_cfg, data), (bcmolt_func_packed_len) bcmolt_xgpon_ni_stat_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_ni_stat_cfg_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_ni_stat_cfg_data_unpack, bcmolt_xgpon_ni_stat_cfg_data_scan };
+static bcmolt_group_info group_info_xgpon_ni_activate_all_onus_completed = { BCMOLT_OBJ_ID_XGPON_NI, BCMOLT_MGT_GROUP_AUTO, 0, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_xgpon_ni_cpu_packets_failure = { BCMOLT_OBJ_ID_XGPON_NI, BCMOLT_MGT_GROUP_AUTO, 1, sizeof(bcmolt_xgpon_ni_cpu_packets_failure_data), sizeof(bcmolt_xgpon_ni_cpu_packets_failure), offsetof(bcmolt_xgpon_ni_cpu_packets_failure, data), (bcmolt_func_packed_len) bcmolt_xgpon_ni_cpu_packets_failure_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_ni_cpu_packets_failure_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_ni_cpu_packets_failure_data_unpack, bcmolt_xgpon_ni_cpu_packets_failure_data_scan };
+static bcmolt_group_info group_info_xgpon_ni_deactivate_all_onus_completed = { BCMOLT_OBJ_ID_XGPON_NI, BCMOLT_MGT_GROUP_AUTO, 2, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_xgpon_ni_disable_all_onus_completed = { BCMOLT_OBJ_ID_XGPON_NI, BCMOLT_MGT_GROUP_AUTO, 3, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_xgpon_ni_enable_all_onus_completed = { BCMOLT_OBJ_ID_XGPON_NI, BCMOLT_MGT_GROUP_AUTO, 4, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_xgpon_ni_los = { BCMOLT_OBJ_ID_XGPON_NI, BCMOLT_MGT_GROUP_AUTO, 5, sizeof(bcmolt_xgpon_ni_los_data), sizeof(bcmolt_xgpon_ni_los), offsetof(bcmolt_xgpon_ni_los, data), (bcmolt_func_packed_len) bcmolt_xgpon_ni_los_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_ni_los_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_ni_los_data_unpack, bcmolt_xgpon_ni_los_data_scan };
+static bcmolt_group_info group_info_xgpon_ni_onu_discovered = { BCMOLT_OBJ_ID_XGPON_NI, BCMOLT_MGT_GROUP_AUTO, 6, sizeof(bcmolt_xgpon_ni_onu_discovered_data), sizeof(bcmolt_xgpon_ni_onu_discovered), offsetof(bcmolt_xgpon_ni_onu_discovered, data), (bcmolt_func_packed_len) bcmolt_xgpon_ni_onu_discovered_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_ni_onu_discovered_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_ni_onu_discovered_data_unpack, bcmolt_xgpon_ni_onu_discovered_data_scan };
+static bcmolt_group_info group_info_xgpon_ni_onu_upgrade_complete = { BCMOLT_OBJ_ID_XGPON_NI, BCMOLT_MGT_GROUP_AUTO, 7, sizeof(bcmolt_xgpon_ni_onu_upgrade_complete_data), sizeof(bcmolt_xgpon_ni_onu_upgrade_complete), offsetof(bcmolt_xgpon_ni_onu_upgrade_complete, data), (bcmolt_func_packed_len) bcmolt_xgpon_ni_onu_upgrade_complete_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_ni_onu_upgrade_complete_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_ni_onu_upgrade_complete_data_unpack, bcmolt_xgpon_ni_onu_upgrade_complete_data_scan };
+static bcmolt_group_info group_info_xgpon_ni_protection_switching_onus_ranged = { BCMOLT_OBJ_ID_XGPON_NI, BCMOLT_MGT_GROUP_AUTO, 8, sizeof(bcmolt_xgpon_ni_protection_switching_onus_ranged_data), sizeof(bcmolt_xgpon_ni_protection_switching_onus_ranged), offsetof(bcmolt_xgpon_ni_protection_switching_onus_ranged, data), (bcmolt_func_packed_len) bcmolt_xgpon_ni_protection_switching_onus_ranged_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_ni_protection_switching_onus_ranged_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_ni_protection_switching_onus_ranged_data_unpack, bcmolt_xgpon_ni_protection_switching_onus_ranged_data_scan };
+static bcmolt_group_info group_info_xgpon_ni_protection_switching_switchover_completed = { BCMOLT_OBJ_ID_XGPON_NI, BCMOLT_MGT_GROUP_AUTO, 9, sizeof(bcmolt_xgpon_ni_protection_switching_switchover_completed_data), sizeof(bcmolt_xgpon_ni_protection_switching_switchover_completed), offsetof(bcmolt_xgpon_ni_protection_switching_switchover_completed, data), (bcmolt_func_packed_len) bcmolt_xgpon_ni_protection_switching_switchover_completed_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_ni_protection_switching_switchover_completed_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_ni_protection_switching_switchover_completed_data_unpack, bcmolt_xgpon_ni_protection_switching_switchover_completed_data_scan };
+static bcmolt_group_info group_info_xgpon_ni_protection_switching_traffic_resume = { BCMOLT_OBJ_ID_XGPON_NI, BCMOLT_MGT_GROUP_AUTO, 10, sizeof(bcmolt_xgpon_ni_protection_switching_traffic_resume_data), sizeof(bcmolt_xgpon_ni_protection_switching_traffic_resume), offsetof(bcmolt_xgpon_ni_protection_switching_traffic_resume, data), (bcmolt_func_packed_len) bcmolt_xgpon_ni_protection_switching_traffic_resume_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_ni_protection_switching_traffic_resume_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_ni_protection_switching_traffic_resume_data_unpack, bcmolt_xgpon_ni_protection_switching_traffic_resume_data_scan };
+static bcmolt_group_info group_info_xgpon_ni_rogue_detection_completed = { BCMOLT_OBJ_ID_XGPON_NI, BCMOLT_MGT_GROUP_AUTO, 11, sizeof(bcmolt_xgpon_ni_rogue_detection_completed_data), sizeof(bcmolt_xgpon_ni_rogue_detection_completed), offsetof(bcmolt_xgpon_ni_rogue_detection_completed, data), (bcmolt_func_packed_len) bcmolt_xgpon_ni_rogue_detection_completed_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_ni_rogue_detection_completed_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_ni_rogue_detection_completed_data_unpack, bcmolt_xgpon_ni_rogue_detection_completed_data_scan };
+static bcmolt_group_info group_info_xgpon_ni_rogue_onu_special_map_cycle_start = { BCMOLT_OBJ_ID_XGPON_NI, BCMOLT_MGT_GROUP_AUTO, 12, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_xgpon_ni_serial_number_acquisition_cycle_start = { BCMOLT_OBJ_ID_XGPON_NI, BCMOLT_MGT_GROUP_AUTO, 13, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_xgpon_ni_standby_pon_monitoring_cycle_completed = { BCMOLT_OBJ_ID_XGPON_NI, BCMOLT_MGT_GROUP_AUTO, 14, sizeof(bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_data), sizeof(bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed), offsetof(bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed, data), (bcmolt_func_packed_len) bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_data_unpack, bcmolt_xgpon_ni_standby_pon_monitoring_cycle_completed_data_scan };
+static bcmolt_group_info group_info_xgpon_ni_stat_alarm_cleared = { BCMOLT_OBJ_ID_XGPON_NI, BCMOLT_MGT_GROUP_AUTO, 15, sizeof(bcmolt_xgpon_ni_stat_alarm_cleared_data), sizeof(bcmolt_xgpon_ni_stat_alarm_cleared), offsetof(bcmolt_xgpon_ni_stat_alarm_cleared, data), (bcmolt_func_packed_len) bcmolt_xgpon_ni_stat_alarm_cleared_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_ni_stat_alarm_cleared_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_ni_stat_alarm_cleared_data_unpack, bcmolt_xgpon_ni_stat_alarm_cleared_data_scan };
+static bcmolt_group_info group_info_xgpon_ni_stat_alarm_raised = { BCMOLT_OBJ_ID_XGPON_NI, BCMOLT_MGT_GROUP_AUTO, 16, sizeof(bcmolt_xgpon_ni_stat_alarm_raised_data), sizeof(bcmolt_xgpon_ni_stat_alarm_raised), offsetof(bcmolt_xgpon_ni_stat_alarm_raised, data), (bcmolt_func_packed_len) bcmolt_xgpon_ni_stat_alarm_raised_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_ni_stat_alarm_raised_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_ni_stat_alarm_raised_data_unpack, bcmolt_xgpon_ni_stat_alarm_raised_data_scan };
+static bcmolt_group_info group_info_xgpon_ni_state_change_completed = { BCMOLT_OBJ_ID_XGPON_NI, BCMOLT_MGT_GROUP_AUTO, 17, sizeof(bcmolt_xgpon_ni_state_change_completed_data), sizeof(bcmolt_xgpon_ni_state_change_completed), offsetof(bcmolt_xgpon_ni_state_change_completed, data), (bcmolt_func_packed_len) bcmolt_xgpon_ni_state_change_completed_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_ni_state_change_completed_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_ni_state_change_completed_data_unpack, bcmolt_xgpon_ni_state_change_completed_data_scan };
+static bcmolt_group_info group_info_xgpon_ni_tod_request_completed = { BCMOLT_OBJ_ID_XGPON_NI, BCMOLT_MGT_GROUP_AUTO, 18, sizeof(bcmolt_xgpon_ni_tod_request_completed_data), sizeof(bcmolt_xgpon_ni_tod_request_completed), offsetof(bcmolt_xgpon_ni_tod_request_completed, data), (bcmolt_func_packed_len) bcmolt_xgpon_ni_tod_request_completed_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_ni_tod_request_completed_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_ni_tod_request_completed_data_unpack, bcmolt_xgpon_ni_tod_request_completed_data_scan };
+static bcmolt_group_info group_info_xgpon_ni_auto_cfg = { BCMOLT_OBJ_ID_XGPON_NI, BCMOLT_MGT_GROUP_AUTO_CFG, 0, sizeof(bcmolt_xgpon_ni_auto_cfg_data), sizeof(bcmolt_xgpon_ni_auto_cfg), offsetof(bcmolt_xgpon_ni_auto_cfg, data), (bcmolt_func_packed_len) bcmolt_xgpon_ni_auto_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_ni_auto_cfg_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_ni_auto_cfg_data_unpack, bcmolt_xgpon_ni_auto_cfg_data_scan };
+static bcmolt_group_info group_info_xgpon_ni_adjust_tx_wavelength = { BCMOLT_OBJ_ID_XGPON_NI, BCMOLT_MGT_GROUP_OPER, 0, sizeof(bcmolt_xgpon_ni_adjust_tx_wavelength_data), sizeof(bcmolt_xgpon_ni_adjust_tx_wavelength), offsetof(bcmolt_xgpon_ni_adjust_tx_wavelength, data), (bcmolt_func_packed_len) bcmolt_xgpon_ni_adjust_tx_wavelength_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_ni_adjust_tx_wavelength_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_ni_adjust_tx_wavelength_data_unpack, bcmolt_xgpon_ni_adjust_tx_wavelength_data_scan };
+static bcmolt_group_info group_info_xgpon_ni_disable_serial_number = { BCMOLT_OBJ_ID_XGPON_NI, BCMOLT_MGT_GROUP_OPER, 1, sizeof(bcmolt_xgpon_ni_disable_serial_number_data), sizeof(bcmolt_xgpon_ni_disable_serial_number), offsetof(bcmolt_xgpon_ni_disable_serial_number, data), (bcmolt_func_packed_len) bcmolt_xgpon_ni_disable_serial_number_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_ni_disable_serial_number_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_ni_disable_serial_number_data_unpack, bcmolt_xgpon_ni_disable_serial_number_data_scan };
+static bcmolt_group_info group_info_xgpon_ni_reset = { BCMOLT_OBJ_ID_XGPON_NI, BCMOLT_MGT_GROUP_OPER, 2, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_xgpon_ni_rogue_detection_window = { BCMOLT_OBJ_ID_XGPON_NI, BCMOLT_MGT_GROUP_OPER, 3, sizeof(bcmolt_xgpon_ni_rogue_detection_window_data), sizeof(bcmolt_xgpon_ni_rogue_detection_window), offsetof(bcmolt_xgpon_ni_rogue_detection_window, data), (bcmolt_func_packed_len) bcmolt_xgpon_ni_rogue_detection_window_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_ni_rogue_detection_window_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_ni_rogue_detection_window_data_unpack, bcmolt_xgpon_ni_rogue_detection_window_data_scan };
+static bcmolt_group_info group_info_xgpon_ni_run_special_bw_map = { BCMOLT_OBJ_ID_XGPON_NI, BCMOLT_MGT_GROUP_OPER, 4, sizeof(bcmolt_xgpon_ni_run_special_bw_map_data), sizeof(bcmolt_xgpon_ni_run_special_bw_map), offsetof(bcmolt_xgpon_ni_run_special_bw_map, data), (bcmolt_func_packed_len) bcmolt_xgpon_ni_run_special_bw_map_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_ni_run_special_bw_map_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_ni_run_special_bw_map_data_unpack, bcmolt_xgpon_ni_run_special_bw_map_data_scan };
+static bcmolt_group_info group_info_xgpon_ni_set_onu_state = { BCMOLT_OBJ_ID_XGPON_NI, BCMOLT_MGT_GROUP_OPER, 5, sizeof(bcmolt_xgpon_ni_set_onu_state_data), sizeof(bcmolt_xgpon_ni_set_onu_state), offsetof(bcmolt_xgpon_ni_set_onu_state, data), (bcmolt_func_packed_len) bcmolt_xgpon_ni_set_onu_state_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_ni_set_onu_state_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_ni_set_onu_state_data_unpack, bcmolt_xgpon_ni_set_onu_state_data_scan };
+static bcmolt_group_info group_info_xgpon_ni_set_pon_state = { BCMOLT_OBJ_ID_XGPON_NI, BCMOLT_MGT_GROUP_OPER, 6, sizeof(bcmolt_xgpon_ni_set_pon_state_data), sizeof(bcmolt_xgpon_ni_set_pon_state), offsetof(bcmolt_xgpon_ni_set_pon_state, data), (bcmolt_func_packed_len) bcmolt_xgpon_ni_set_pon_state_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_ni_set_pon_state_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_ni_set_pon_state_data_unpack, bcmolt_xgpon_ni_set_pon_state_data_scan };
+static bcmolt_group_info group_info_xgpon_ni_single_request_standby_pon_monitoring = { BCMOLT_OBJ_ID_XGPON_NI, BCMOLT_MGT_GROUP_OPER, 7, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_xgpon_ni_start_onu_upgrade = { BCMOLT_OBJ_ID_XGPON_NI, BCMOLT_MGT_GROUP_OPER, 8, sizeof(bcmolt_xgpon_ni_start_onu_upgrade_data), sizeof(bcmolt_xgpon_ni_start_onu_upgrade), offsetof(bcmolt_xgpon_ni_start_onu_upgrade, data), (bcmolt_func_packed_len) bcmolt_xgpon_ni_start_onu_upgrade_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_ni_start_onu_upgrade_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_ni_start_onu_upgrade_data_unpack, bcmolt_xgpon_ni_start_onu_upgrade_data_scan };
+static bcmolt_group_info group_info_xgpon_ni_tod_request = { BCMOLT_OBJ_ID_XGPON_NI, BCMOLT_MGT_GROUP_OPER, 9, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_xgpon_ni_broadcast_ploam_packet = { BCMOLT_OBJ_ID_XGPON_NI, BCMOLT_MGT_GROUP_PROXY, 0, sizeof(bcmolt_xgpon_ni_broadcast_ploam_packet_data), sizeof(bcmolt_xgpon_ni_broadcast_ploam_packet), offsetof(bcmolt_xgpon_ni_broadcast_ploam_packet, data), (bcmolt_func_packed_len) bcmolt_xgpon_ni_broadcast_ploam_packet_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_ni_broadcast_ploam_packet_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_ni_broadcast_ploam_packet_data_unpack, bcmolt_xgpon_ni_broadcast_ploam_packet_data_scan };
+static bcmolt_group_info group_info_xgpon_ni_cpu_packets = { BCMOLT_OBJ_ID_XGPON_NI, BCMOLT_MGT_GROUP_PROXY, 1, sizeof(bcmolt_xgpon_ni_cpu_packets_data), sizeof(bcmolt_xgpon_ni_cpu_packets), offsetof(bcmolt_xgpon_ni_cpu_packets, data), (bcmolt_func_packed_len) bcmolt_xgpon_ni_cpu_packets_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_ni_cpu_packets_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_ni_cpu_packets_data_unpack, bcmolt_xgpon_ni_cpu_packets_data_scan };
+static bcmolt_group_info group_info_xgpon_onu_key = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_KEY, 0, sizeof(bcmolt_xgpon_onu_key), 0, 0, (bcmolt_func_packed_len) bcmolt_xgpon_onu_key_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_onu_key_pack, (bcmolt_func_unpack) bcmolt_xgpon_onu_key_unpack, bcmolt_xgpon_onu_key_scan };
+static bcmolt_group_info group_info_xgpon_onu_cfg = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_CFG, 0, sizeof(bcmolt_xgpon_onu_cfg_data), sizeof(bcmolt_xgpon_onu_cfg), offsetof(bcmolt_xgpon_onu_cfg, data), (bcmolt_func_packed_len) bcmolt_xgpon_onu_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_onu_cfg_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_onu_cfg_data_unpack, bcmolt_xgpon_onu_cfg_data_scan };
+static bcmolt_group_info group_info_xgpon_onu_stat = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_STAT, 0, sizeof(bcmolt_xgpon_onu_stat_data), sizeof(bcmolt_xgpon_onu_stat), offsetof(bcmolt_xgpon_onu_stat, data), (bcmolt_func_packed_len) bcmolt_xgpon_onu_stat_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_onu_stat_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_onu_stat_data_unpack, bcmolt_xgpon_onu_stat_data_scan };
+static bcmolt_group_info group_info_xgpon_onu_stat_cfg = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_STAT_CFG, 0, sizeof(bcmolt_xgpon_onu_stat_cfg_data), sizeof(bcmolt_xgpon_onu_stat_cfg), offsetof(bcmolt_xgpon_onu_stat_cfg, data), (bcmolt_func_packed_len) bcmolt_xgpon_onu_stat_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_onu_stat_cfg_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_onu_stat_cfg_data_unpack, bcmolt_xgpon_onu_stat_cfg_data_scan };
+static bcmolt_group_info group_info_xgpon_onu_dfi = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_AUTO, 0, sizeof(bcmolt_xgpon_onu_dfi_data), sizeof(bcmolt_xgpon_onu_dfi), offsetof(bcmolt_xgpon_onu_dfi, data), (bcmolt_func_packed_len) bcmolt_xgpon_onu_dfi_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_onu_dfi_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_onu_dfi_data_unpack, bcmolt_xgpon_onu_dfi_data_scan };
+static bcmolt_group_info group_info_xgpon_onu_dgi = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_AUTO, 1, sizeof(bcmolt_xgpon_onu_dgi_data), sizeof(bcmolt_xgpon_onu_dgi), offsetof(bcmolt_xgpon_onu_dgi, data), (bcmolt_func_packed_len) bcmolt_xgpon_onu_dgi_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_onu_dgi_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_onu_dgi_data_unpack, bcmolt_xgpon_onu_dgi_data_scan };
+static bcmolt_group_info group_info_xgpon_onu_dowi = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_AUTO, 2, sizeof(bcmolt_xgpon_onu_dowi_data), sizeof(bcmolt_xgpon_onu_dowi), offsetof(bcmolt_xgpon_onu_dowi, data), (bcmolt_func_packed_len) bcmolt_xgpon_onu_dowi_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_onu_dowi_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_onu_dowi_data_unpack, bcmolt_xgpon_onu_dowi_data_scan };
+static bcmolt_group_info group_info_xgpon_onu_invalid_dbru_report = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_AUTO, 3, sizeof(bcmolt_xgpon_onu_invalid_dbru_report_data), sizeof(bcmolt_xgpon_onu_invalid_dbru_report), offsetof(bcmolt_xgpon_onu_invalid_dbru_report, data), (bcmolt_func_packed_len) bcmolt_xgpon_onu_invalid_dbru_report_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_onu_invalid_dbru_report_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_onu_invalid_dbru_report_data_unpack, bcmolt_xgpon_onu_invalid_dbru_report_data_scan };
+static bcmolt_group_info group_info_xgpon_onu_key_exchange_completed = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_AUTO, 4, sizeof(bcmolt_xgpon_onu_key_exchange_completed_data), sizeof(bcmolt_xgpon_onu_key_exchange_completed), offsetof(bcmolt_xgpon_onu_key_exchange_completed, data), (bcmolt_func_packed_len) bcmolt_xgpon_onu_key_exchange_completed_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_onu_key_exchange_completed_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_onu_key_exchange_completed_data_unpack, bcmolt_xgpon_onu_key_exchange_completed_data_scan };
+static bcmolt_group_info group_info_xgpon_onu_key_exchange_cycle_skipped = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_AUTO, 5, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_xgpon_onu_key_exchange_key_mismatch = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_AUTO, 6, sizeof(bcmolt_xgpon_onu_key_exchange_key_mismatch_data), sizeof(bcmolt_xgpon_onu_key_exchange_key_mismatch), offsetof(bcmolt_xgpon_onu_key_exchange_key_mismatch, data), (bcmolt_func_packed_len) bcmolt_xgpon_onu_key_exchange_key_mismatch_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_onu_key_exchange_key_mismatch_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_onu_key_exchange_key_mismatch_data_unpack, bcmolt_xgpon_onu_key_exchange_key_mismatch_data_scan };
+static bcmolt_group_info group_info_xgpon_onu_key_exchange_key_request_timeout = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_AUTO, 7, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_xgpon_onu_looci = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_AUTO, 8, sizeof(bcmolt_xgpon_onu_looci_data), sizeof(bcmolt_xgpon_onu_looci), offsetof(bcmolt_xgpon_onu_looci, data), (bcmolt_func_packed_len) bcmolt_xgpon_onu_looci_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_onu_looci_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_onu_looci_data_unpack, bcmolt_xgpon_onu_looci_data_scan };
+static bcmolt_group_info group_info_xgpon_onu_onu_activation_completed = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_AUTO, 9, sizeof(bcmolt_xgpon_onu_onu_activation_completed_data), sizeof(bcmolt_xgpon_onu_onu_activation_completed), offsetof(bcmolt_xgpon_onu_onu_activation_completed, data), (bcmolt_func_packed_len) bcmolt_xgpon_onu_onu_activation_completed_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_onu_onu_activation_completed_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_onu_onu_activation_completed_data_unpack, bcmolt_xgpon_onu_onu_activation_completed_data_scan };
+static bcmolt_group_info group_info_xgpon_onu_onu_alarm = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_AUTO, 10, sizeof(bcmolt_xgpon_onu_onu_alarm_data), sizeof(bcmolt_xgpon_onu_onu_alarm), offsetof(bcmolt_xgpon_onu_onu_alarm, data), (bcmolt_func_packed_len) bcmolt_xgpon_onu_onu_alarm_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_onu_onu_alarm_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_onu_onu_alarm_data_unpack, bcmolt_xgpon_onu_onu_alarm_data_scan };
+static bcmolt_group_info group_info_xgpon_onu_onu_deactivation_completed = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_AUTO, 11, sizeof(bcmolt_xgpon_onu_onu_deactivation_completed_data), sizeof(bcmolt_xgpon_onu_onu_deactivation_completed), offsetof(bcmolt_xgpon_onu_onu_deactivation_completed, data), (bcmolt_func_packed_len) bcmolt_xgpon_onu_onu_deactivation_completed_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_onu_onu_deactivation_completed_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_onu_onu_deactivation_completed_data_unpack, bcmolt_xgpon_onu_onu_deactivation_completed_data_scan };
+static bcmolt_group_info group_info_xgpon_onu_onu_disable_completed = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_AUTO, 12, sizeof(bcmolt_xgpon_onu_onu_disable_completed_data), sizeof(bcmolt_xgpon_onu_onu_disable_completed), offsetof(bcmolt_xgpon_onu_onu_disable_completed, data), (bcmolt_func_packed_len) bcmolt_xgpon_onu_onu_disable_completed_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_onu_onu_disable_completed_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_onu_onu_disable_completed_data_unpack, bcmolt_xgpon_onu_onu_disable_completed_data_scan };
+static bcmolt_group_info group_info_xgpon_onu_onu_enable_completed = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_AUTO, 13, sizeof(bcmolt_xgpon_onu_onu_enable_completed_data), sizeof(bcmolt_xgpon_onu_onu_enable_completed), offsetof(bcmolt_xgpon_onu_onu_enable_completed, data), (bcmolt_func_packed_len) bcmolt_xgpon_onu_onu_enable_completed_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_onu_onu_enable_completed_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_onu_onu_enable_completed_data_unpack, bcmolt_xgpon_onu_onu_enable_completed_data_scan };
+static bcmolt_group_info group_info_xgpon_onu_onu_tuning_in_completed = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_AUTO, 14, sizeof(bcmolt_xgpon_onu_onu_tuning_in_completed_data), sizeof(bcmolt_xgpon_onu_onu_tuning_in_completed), offsetof(bcmolt_xgpon_onu_onu_tuning_in_completed, data), (bcmolt_func_packed_len) bcmolt_xgpon_onu_onu_tuning_in_completed_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_onu_onu_tuning_in_completed_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_onu_onu_tuning_in_completed_data_unpack, bcmolt_xgpon_onu_onu_tuning_in_completed_data_scan };
+static bcmolt_group_info group_info_xgpon_onu_onu_tuning_out_completed = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_AUTO, 15, sizeof(bcmolt_xgpon_onu_onu_tuning_out_completed_data), sizeof(bcmolt_xgpon_onu_onu_tuning_out_completed), offsetof(bcmolt_xgpon_onu_onu_tuning_out_completed, data), (bcmolt_func_packed_len) bcmolt_xgpon_onu_onu_tuning_out_completed_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_onu_onu_tuning_out_completed_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_onu_onu_tuning_out_completed_data_unpack, bcmolt_xgpon_onu_onu_tuning_out_completed_data_scan };
+static bcmolt_group_info group_info_xgpon_onu_optical_reflection = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_AUTO, 16, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_xgpon_onu_possible_drift = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_AUTO, 17, sizeof(bcmolt_xgpon_onu_possible_drift_data), sizeof(bcmolt_xgpon_onu_possible_drift), offsetof(bcmolt_xgpon_onu_possible_drift, data), (bcmolt_func_packed_len) bcmolt_xgpon_onu_possible_drift_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_onu_possible_drift_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_onu_possible_drift_data_unpack, bcmolt_xgpon_onu_possible_drift_data_scan };
+static bcmolt_group_info group_info_xgpon_onu_power_consumption_report = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_AUTO, 18, sizeof(bcmolt_xgpon_onu_power_consumption_report_data), sizeof(bcmolt_xgpon_onu_power_consumption_report), offsetof(bcmolt_xgpon_onu_power_consumption_report, data), (bcmolt_func_packed_len) bcmolt_xgpon_onu_power_consumption_report_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_onu_power_consumption_report_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_onu_power_consumption_report_data_unpack, bcmolt_xgpon_onu_power_consumption_report_data_scan };
+static bcmolt_group_info group_info_xgpon_onu_power_level_report = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_AUTO, 19, sizeof(bcmolt_xgpon_onu_power_level_report_data), sizeof(bcmolt_xgpon_onu_power_level_report), offsetof(bcmolt_xgpon_onu_power_level_report, data), (bcmolt_func_packed_len) bcmolt_xgpon_onu_power_level_report_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_onu_power_level_report_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_onu_power_level_report_data_unpack, bcmolt_xgpon_onu_power_level_report_data_scan };
+static bcmolt_group_info group_info_xgpon_onu_power_management_state_change = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_AUTO, 20, sizeof(bcmolt_xgpon_onu_power_management_state_change_data), sizeof(bcmolt_xgpon_onu_power_management_state_change), offsetof(bcmolt_xgpon_onu_power_management_state_change, data), (bcmolt_func_packed_len) bcmolt_xgpon_onu_power_management_state_change_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_onu_power_management_state_change_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_onu_power_management_state_change_data_unpack, bcmolt_xgpon_onu_power_management_state_change_data_scan };
+static bcmolt_group_info group_info_xgpon_onu_pqsi = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_AUTO, 21, sizeof(bcmolt_xgpon_onu_pqsi_data), sizeof(bcmolt_xgpon_onu_pqsi), offsetof(bcmolt_xgpon_onu_pqsi, data), (bcmolt_func_packed_len) bcmolt_xgpon_onu_pqsi_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_onu_pqsi_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_onu_pqsi_data_unpack, bcmolt_xgpon_onu_pqsi_data_scan };
+static bcmolt_group_info group_info_xgpon_onu_ranging_completed = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_AUTO, 22, sizeof(bcmolt_xgpon_onu_ranging_completed_data), sizeof(bcmolt_xgpon_onu_ranging_completed), offsetof(bcmolt_xgpon_onu_ranging_completed, data), (bcmolt_func_packed_len) bcmolt_xgpon_onu_ranging_completed_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_onu_ranging_completed_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_onu_ranging_completed_data_unpack, bcmolt_xgpon_onu_ranging_completed_data_scan };
+static bcmolt_group_info group_info_xgpon_onu_registration_id = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_AUTO, 23, sizeof(bcmolt_xgpon_onu_registration_id_data), sizeof(bcmolt_xgpon_onu_registration_id), offsetof(bcmolt_xgpon_onu_registration_id, data), (bcmolt_func_packed_len) bcmolt_xgpon_onu_registration_id_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_onu_registration_id_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_onu_registration_id_data_unpack, bcmolt_xgpon_onu_registration_id_data_scan };
+static bcmolt_group_info group_info_xgpon_onu_rssi_measurement_completed = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_AUTO, 24, sizeof(bcmolt_xgpon_onu_rssi_measurement_completed_data), sizeof(bcmolt_xgpon_onu_rssi_measurement_completed), offsetof(bcmolt_xgpon_onu_rssi_measurement_completed, data), (bcmolt_func_packed_len) bcmolt_xgpon_onu_rssi_measurement_completed_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_onu_rssi_measurement_completed_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_onu_rssi_measurement_completed_data_unpack, bcmolt_xgpon_onu_rssi_measurement_completed_data_scan };
+static bcmolt_group_info group_info_xgpon_onu_sdi = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_AUTO, 25, sizeof(bcmolt_xgpon_onu_sdi_data), sizeof(bcmolt_xgpon_onu_sdi), offsetof(bcmolt_xgpon_onu_sdi, data), (bcmolt_func_packed_len) bcmolt_xgpon_onu_sdi_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_onu_sdi_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_onu_sdi_data_unpack, bcmolt_xgpon_onu_sdi_data_scan };
+static bcmolt_group_info group_info_xgpon_onu_secure_mutual_authentication_failure = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_AUTO, 26, sizeof(bcmolt_xgpon_onu_secure_mutual_authentication_failure_data), sizeof(bcmolt_xgpon_onu_secure_mutual_authentication_failure), offsetof(bcmolt_xgpon_onu_secure_mutual_authentication_failure, data), (bcmolt_func_packed_len) bcmolt_xgpon_onu_secure_mutual_authentication_failure_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_onu_secure_mutual_authentication_failure_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_onu_secure_mutual_authentication_failure_data_unpack, bcmolt_xgpon_onu_secure_mutual_authentication_failure_data_scan };
+static bcmolt_group_info group_info_xgpon_onu_sfi = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_AUTO, 27, sizeof(bcmolt_xgpon_onu_sfi_data), sizeof(bcmolt_xgpon_onu_sfi), offsetof(bcmolt_xgpon_onu_sfi, data), (bcmolt_func_packed_len) bcmolt_xgpon_onu_sfi_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_onu_sfi_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_onu_sfi_data_unpack, bcmolt_xgpon_onu_sfi_data_scan };
+static bcmolt_group_info group_info_xgpon_onu_stat_alarm_cleared = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_AUTO, 28, sizeof(bcmolt_xgpon_onu_stat_alarm_cleared_data), sizeof(bcmolt_xgpon_onu_stat_alarm_cleared), offsetof(bcmolt_xgpon_onu_stat_alarm_cleared, data), (bcmolt_func_packed_len) bcmolt_xgpon_onu_stat_alarm_cleared_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_onu_stat_alarm_cleared_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_onu_stat_alarm_cleared_data_unpack, bcmolt_xgpon_onu_stat_alarm_cleared_data_scan };
+static bcmolt_group_info group_info_xgpon_onu_stat_alarm_raised = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_AUTO, 29, sizeof(bcmolt_xgpon_onu_stat_alarm_raised_data), sizeof(bcmolt_xgpon_onu_stat_alarm_raised), offsetof(bcmolt_xgpon_onu_stat_alarm_raised, data), (bcmolt_func_packed_len) bcmolt_xgpon_onu_stat_alarm_raised_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_onu_stat_alarm_raised_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_onu_stat_alarm_raised_data_unpack, bcmolt_xgpon_onu_stat_alarm_raised_data_scan };
+static bcmolt_group_info group_info_xgpon_onu_sufi = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_AUTO, 30, sizeof(bcmolt_xgpon_onu_sufi_data), sizeof(bcmolt_xgpon_onu_sufi), offsetof(bcmolt_xgpon_onu_sufi, data), (bcmolt_func_packed_len) bcmolt_xgpon_onu_sufi_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_onu_sufi_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_onu_sufi_data_unpack, bcmolt_xgpon_onu_sufi_data_scan };
+static bcmolt_group_info group_info_xgpon_onu_tiwi = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_AUTO, 31, sizeof(bcmolt_xgpon_onu_tiwi_data), sizeof(bcmolt_xgpon_onu_tiwi), offsetof(bcmolt_xgpon_onu_tiwi, data), (bcmolt_func_packed_len) bcmolt_xgpon_onu_tiwi_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_onu_tiwi_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_onu_tiwi_data_unpack, bcmolt_xgpon_onu_tiwi_data_scan };
+static bcmolt_group_info group_info_xgpon_onu_tuning_response = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_AUTO, 32, sizeof(bcmolt_xgpon_onu_tuning_response_data), sizeof(bcmolt_xgpon_onu_tuning_response), offsetof(bcmolt_xgpon_onu_tuning_response, data), (bcmolt_func_packed_len) bcmolt_xgpon_onu_tuning_response_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_onu_tuning_response_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_onu_tuning_response_data_unpack, bcmolt_xgpon_onu_tuning_response_data_scan };
+static bcmolt_group_info group_info_xgpon_onu_auto_cfg = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_AUTO_CFG, 0, sizeof(bcmolt_xgpon_onu_auto_cfg_data), sizeof(bcmolt_xgpon_onu_auto_cfg), offsetof(bcmolt_xgpon_onu_auto_cfg, data), (bcmolt_func_packed_len) bcmolt_xgpon_onu_auto_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_onu_auto_cfg_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_onu_auto_cfg_data_unpack, bcmolt_xgpon_onu_auto_cfg_data_scan };
+static bcmolt_group_info group_info_xgpon_onu_adjust_tx_wavelength = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_OPER, 0, sizeof(bcmolt_xgpon_onu_adjust_tx_wavelength_data), sizeof(bcmolt_xgpon_onu_adjust_tx_wavelength), offsetof(bcmolt_xgpon_onu_adjust_tx_wavelength, data), (bcmolt_func_packed_len) bcmolt_xgpon_onu_adjust_tx_wavelength_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_onu_adjust_tx_wavelength_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_onu_adjust_tx_wavelength_data_unpack, bcmolt_xgpon_onu_adjust_tx_wavelength_data_scan };
+static bcmolt_group_info group_info_xgpon_onu_change_power_levelling = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_OPER, 1, sizeof(bcmolt_xgpon_onu_change_power_levelling_data), sizeof(bcmolt_xgpon_onu_change_power_levelling), offsetof(bcmolt_xgpon_onu_change_power_levelling, data), (bcmolt_func_packed_len) bcmolt_xgpon_onu_change_power_levelling_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_onu_change_power_levelling_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_onu_change_power_levelling_data_unpack, bcmolt_xgpon_onu_change_power_levelling_data_scan };
+static bcmolt_group_info group_info_xgpon_onu_get_power_consumption = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_OPER, 2, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_xgpon_onu_get_power_level = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_OPER, 3, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_xgpon_onu_onu_tuning_in = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_OPER, 4, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_xgpon_onu_onu_tuning_out = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_OPER, 5, sizeof(bcmolt_xgpon_onu_onu_tuning_out_data), sizeof(bcmolt_xgpon_onu_onu_tuning_out), offsetof(bcmolt_xgpon_onu_onu_tuning_out, data), (bcmolt_func_packed_len) bcmolt_xgpon_onu_onu_tuning_out_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_onu_onu_tuning_out_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_onu_onu_tuning_out_data_unpack, bcmolt_xgpon_onu_onu_tuning_out_data_scan };
+static bcmolt_group_info group_info_xgpon_onu_request_registration = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_OPER, 6, sizeof(bcmolt_xgpon_onu_request_registration_data), sizeof(bcmolt_xgpon_onu_request_registration), offsetof(bcmolt_xgpon_onu_request_registration, data), (bcmolt_func_packed_len) bcmolt_xgpon_onu_request_registration_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_onu_request_registration_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_onu_request_registration_data_unpack, bcmolt_xgpon_onu_request_registration_data_scan };
+static bcmolt_group_info group_info_xgpon_onu_rssi_measurement = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_OPER, 7, 0, 0, 0, NULL, NULL, NULL };
+static bcmolt_group_info group_info_xgpon_onu_secure_mutual_authentication = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_OPER, 8, sizeof(bcmolt_xgpon_onu_secure_mutual_authentication_data), sizeof(bcmolt_xgpon_onu_secure_mutual_authentication), offsetof(bcmolt_xgpon_onu_secure_mutual_authentication, data), (bcmolt_func_packed_len) bcmolt_xgpon_onu_secure_mutual_authentication_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_onu_secure_mutual_authentication_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_onu_secure_mutual_authentication_data_unpack, bcmolt_xgpon_onu_secure_mutual_authentication_data_scan };
+static bcmolt_group_info group_info_xgpon_onu_set_onu_state = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_OPER, 9, sizeof(bcmolt_xgpon_onu_set_onu_state_data), sizeof(bcmolt_xgpon_onu_set_onu_state), offsetof(bcmolt_xgpon_onu_set_onu_state, data), (bcmolt_func_packed_len) bcmolt_xgpon_onu_set_onu_state_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_onu_set_onu_state_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_onu_set_onu_state_data_unpack, bcmolt_xgpon_onu_set_onu_state_data_scan };
+static bcmolt_group_info group_info_xgpon_onu_cpu_packets = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_PROXY, 0, sizeof(bcmolt_xgpon_onu_cpu_packets_data), sizeof(bcmolt_xgpon_onu_cpu_packets), offsetof(bcmolt_xgpon_onu_cpu_packets, data), (bcmolt_func_packed_len) bcmolt_xgpon_onu_cpu_packets_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_onu_cpu_packets_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_onu_cpu_packets_data_unpack, bcmolt_xgpon_onu_cpu_packets_data_scan };
+static bcmolt_group_info group_info_xgpon_onu_ploam_packet = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_PROXY, 1, sizeof(bcmolt_xgpon_onu_ploam_packet_data), sizeof(bcmolt_xgpon_onu_ploam_packet), offsetof(bcmolt_xgpon_onu_ploam_packet, data), (bcmolt_func_packed_len) bcmolt_xgpon_onu_ploam_packet_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_onu_ploam_packet_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_onu_ploam_packet_data_unpack, bcmolt_xgpon_onu_ploam_packet_data_scan };
+static bcmolt_group_info group_info_xgpon_onu_cpu_packet = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_PROXY_RX, 0, sizeof(bcmolt_xgpon_onu_cpu_packet_data), sizeof(bcmolt_xgpon_onu_cpu_packet), offsetof(bcmolt_xgpon_onu_cpu_packet, data), (bcmolt_func_packed_len) bcmolt_xgpon_onu_cpu_packet_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_onu_cpu_packet_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_onu_cpu_packet_data_unpack, bcmolt_xgpon_onu_cpu_packet_data_scan };
+static bcmolt_group_info group_info_xgpon_onu_omci_packet = { BCMOLT_OBJ_ID_XGPON_ONU, BCMOLT_MGT_GROUP_PROXY_RX, 1, sizeof(bcmolt_xgpon_onu_omci_packet_data), sizeof(bcmolt_xgpon_onu_omci_packet), offsetof(bcmolt_xgpon_onu_omci_packet, data), (bcmolt_func_packed_len) bcmolt_xgpon_onu_omci_packet_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_onu_omci_packet_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_onu_omci_packet_data_unpack, bcmolt_xgpon_onu_omci_packet_data_scan };
+static bcmolt_group_info group_info_xgpon_trx_key = { BCMOLT_OBJ_ID_XGPON_TRX, BCMOLT_MGT_GROUP_KEY, 0, sizeof(bcmolt_xgpon_trx_key), 0, 0, (bcmolt_func_packed_len) bcmolt_xgpon_trx_key_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_trx_key_pack, (bcmolt_func_unpack) bcmolt_xgpon_trx_key_unpack, bcmolt_xgpon_trx_key_scan };
+static bcmolt_group_info group_info_xgpon_trx_cfg = { BCMOLT_OBJ_ID_XGPON_TRX, BCMOLT_MGT_GROUP_CFG, 0, sizeof(bcmolt_xgpon_trx_cfg_data), sizeof(bcmolt_xgpon_trx_cfg), offsetof(bcmolt_xgpon_trx_cfg, data), (bcmolt_func_packed_len) bcmolt_xgpon_trx_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_xgpon_trx_cfg_data_pack, (bcmolt_func_unpack) bcmolt_xgpon_trx_cfg_data_unpack, bcmolt_xgpon_trx_cfg_data_scan };
+static bcmolt_group_info group_info_xpon_serdes_key = { BCMOLT_OBJ_ID_XPON_SERDES, BCMOLT_MGT_GROUP_KEY, 0, sizeof(bcmolt_xpon_serdes_key), 0, 0, (bcmolt_func_packed_len) bcmolt_xpon_serdes_key_get_packed_length, (bcmolt_func_pack) bcmolt_xpon_serdes_key_pack, (bcmolt_func_unpack) bcmolt_xpon_serdes_key_unpack, bcmolt_xpon_serdes_key_scan };
+static bcmolt_group_info group_info_xpon_serdes_cfg = { BCMOLT_OBJ_ID_XPON_SERDES, BCMOLT_MGT_GROUP_CFG, 0, sizeof(bcmolt_xpon_serdes_cfg_data), sizeof(bcmolt_xpon_serdes_cfg), offsetof(bcmolt_xpon_serdes_cfg, data), (bcmolt_func_packed_len) bcmolt_xpon_serdes_cfg_data_get_packed_length, (bcmolt_func_pack) bcmolt_xpon_serdes_cfg_data_pack, (bcmolt_func_unpack) bcmolt_xpon_serdes_cfg_data_unpack, bcmolt_xpon_serdes_cfg_data_scan };
+static bcmolt_group_info *group_info[] =
+{
+    &group_info_ae_ni_key,
+    &group_info_ae_ni_cfg,
+    &group_info_ae_ni_set_ae_ni_en_state,
+    &group_info_ae_path_ds_key,
+    &group_info_ae_path_ds_stat,
+    &group_info_ae_path_ds_stat_cfg,
+    &group_info_ae_path_ds_stat_cfg,
+    &group_info_ae_path_ds_stat_cfg,
+    &group_info_ae_path_ds_stat_cfg,
+    &group_info_ae_path_ds_stat_cfg,
+    &group_info_ae_path_ds_stat_cfg,
+    &group_info_ae_path_ds_stat_cfg,
+    &group_info_ae_path_ds_stat_cfg,
+    &group_info_ae_path_ds_stat_cfg,
+    &group_info_ae_path_ds_stat_cfg,
+    &group_info_ae_path_ds_stat_cfg,
+    &group_info_ae_path_ds_stat_cfg,
+    &group_info_ae_path_ds_stat_cfg,
+    &group_info_ae_path_ds_stat_cfg,
+    &group_info_ae_path_ds_stat_cfg,
+    &group_info_ae_path_ds_stat_cfg,
+    &group_info_ae_path_ds_stat_cfg,
+    &group_info_ae_path_ds_stat_alarm_cleared,
+    &group_info_ae_path_ds_stat_alarm_raised,
+    &group_info_ae_path_ds_auto_cfg,
+    &group_info_ae_path_us_key,
+    &group_info_ae_path_us_stat,
+    &group_info_ae_path_us_stat_cfg,
+    &group_info_ae_path_us_stat_cfg,
+    &group_info_ae_path_us_stat_cfg,
+    &group_info_ae_path_us_stat_cfg,
+    &group_info_ae_path_us_stat_cfg,
+    &group_info_ae_path_us_stat_cfg,
+    &group_info_ae_path_us_stat_cfg,
+    &group_info_ae_path_us_stat_cfg,
+    &group_info_ae_path_us_stat_cfg,
+    &group_info_ae_path_us_stat_cfg,
+    &group_info_ae_path_us_stat_cfg,
+    &group_info_ae_path_us_stat_cfg,
+    &group_info_ae_path_us_stat_cfg,
+    &group_info_ae_path_us_stat_cfg,
+    &group_info_ae_path_us_stat_cfg,
+    &group_info_ae_path_us_stat_cfg,
+    &group_info_ae_path_us_stat_cfg,
+    &group_info_ae_path_us_stat_cfg,
+    &group_info_ae_path_us_stat_cfg,
+    &group_info_ae_path_us_stat_cfg,
+    &group_info_ae_path_us_stat_alarm_cleared,
+    &group_info_ae_path_us_stat_alarm_raised,
+    &group_info_ae_path_us_auto_cfg,
+    &group_info_channel_key,
+    &group_info_channel_cfg,
+    &group_info_debug_key,
+    &group_info_debug_cfg,
+    &group_info_debug_cli_output,
+    &group_info_debug_file_almost_full,
+    &group_info_debug_auto_cfg,
+    &group_info_debug_cli_input,
+    &group_info_debug_reset_api_capture,
+    &group_info_debug_start_api_capture,
+    &group_info_debug_stop_api_capture,
+    &group_info_device_key,
+    &group_info_device_cfg,
+    &group_info_device_connection_complete,
+    &group_info_device_connection_established,
+    &group_info_device_connection_failure,
+    &group_info_device_ddr_test_complete,
+    &group_info_device_device_keep_alive,
+    &group_info_device_device_ready,
+    &group_info_device_disconnection_complete,
+    &group_info_device_image_transfer_complete,
+    &group_info_device_indications_dropped,
+    &group_info_device_sw_error,
+    &group_info_device_sw_exception,
+    &group_info_device_auto_cfg,
+    &group_info_device_connect,
+    &group_info_device_disconnect,
+    &group_info_device_host_keep_alive,
+    &group_info_device_image_transfer_data,
+    &group_info_device_image_transfer_start,
+    &group_info_device_reset,
+    &group_info_device_run_ddr_test,
+    &group_info_device_sw_upgrade_activate,
+    &group_info_epon_denied_link_key,
+    &group_info_epon_denied_link_cfg,
+    &group_info_epon_denied_link_laser_on_off_violation,
+    &group_info_epon_denied_link_llid_pool_empty_violation,
+    &group_info_epon_denied_link_max_link_violation,
+    &group_info_epon_denied_link_overhead_profile_violation,
+    &group_info_epon_denied_link_range_violation,
+    &group_info_epon_denied_link_rogue_violation,
+    &group_info_epon_denied_link_system_resource_violation,
+    &group_info_epon_denied_link_tdm_channels_exhausted,
+    &group_info_epon_denied_link_unknown_link_violation,
+    &group_info_epon_denied_link_upstream_bandwidth_violation,
+    &group_info_epon_denied_link_auto_cfg,
+    &group_info_epon_link_key,
+    &group_info_epon_link_cfg,
+    &group_info_epon_link_stat,
+    &group_info_epon_link_stat_cfg,
+    &group_info_epon_link_stat_cfg,
+    &group_info_epon_link_stat_cfg,
+    &group_info_epon_link_stat_cfg,
+    &group_info_epon_link_stat_cfg,
+    &group_info_epon_link_stat_cfg,
+    &group_info_epon_link_stat_cfg,
+    &group_info_epon_link_stat_cfg,
+    &group_info_epon_link_stat_cfg,
+    &group_info_epon_link_stat_cfg,
+    &group_info_epon_link_stat_cfg,
+    &group_info_epon_link_stat_cfg,
+    &group_info_epon_link_stat_cfg,
+    &group_info_epon_link_stat_cfg,
+    &group_info_epon_link_stat_cfg,
+    &group_info_epon_link_stat_cfg,
+    &group_info_epon_link_stat_cfg,
+    &group_info_epon_link_stat_cfg,
+    &group_info_epon_link_stat_cfg,
+    &group_info_epon_link_stat_cfg,
+    &group_info_epon_link_stat_cfg,
+    &group_info_epon_link_stat_cfg,
+    &group_info_epon_link_stat_cfg,
+    &group_info_epon_link_stat_cfg,
+    &group_info_epon_link_stat_cfg,
+    &group_info_epon_link_stat_cfg,
+    &group_info_epon_link_stat_cfg,
+    &group_info_epon_link_stat_cfg,
+    &group_info_epon_link_stat_cfg,
+    &group_info_epon_link_stat_cfg,
+    &group_info_epon_link_stat_cfg,
+    &group_info_epon_link_stat_cfg,
+    &group_info_epon_link_stat_cfg,
+    &group_info_epon_link_stat_cfg,
+    &group_info_epon_link_stat_cfg,
+    &group_info_epon_link_stat_cfg,
+    &group_info_epon_link_stat_cfg,
+    &group_info_epon_link_stat_cfg,
+    &group_info_epon_link_stat_cfg,
+    &group_info_epon_link_stat_cfg,
+    &group_info_epon_link_stat_cfg,
+    &group_info_epon_link_stat_cfg,
+    &group_info_epon_link_stat_cfg,
+    &group_info_epon_link_duplicate_mpcp_registration_request,
+    &group_info_epon_link_encryption_enabled,
+    &group_info_epon_link_key_exchange_failure,
+    &group_info_epon_link_key_exchange_started,
+    &group_info_epon_link_key_exchange_stopped,
+    &group_info_epon_link_link_deleted,
+    &group_info_epon_link_link_speed_mismatch,
+    &group_info_epon_link_mpcp_deregistered,
+    &group_info_epon_link_mpcp_discovered,
+    &group_info_epon_link_mpcp_reg_ack_timeout,
+    &group_info_epon_link_mpcp_report_timeout,
+    &group_info_epon_link_oam_keepalive_timeout,
+    &group_info_epon_link_oam_keepalive_timer_started,
+    &group_info_epon_link_oam_keepalive_timer_stopped,
+    &group_info_epon_link_preprovisioned_link_created,
+    &group_info_epon_link_protection_switch_occurred,
+    &group_info_epon_link_range_value_changed,
+    &group_info_epon_link_rerange_failure,
+    &group_info_epon_link_stat_alarm_cleared,
+    &group_info_epon_link_stat_alarm_raised,
+    &group_info_epon_link_static_registration_done,
+    &group_info_epon_link_auto_cfg,
+    &group_info_epon_link_delete_link,
+    &group_info_epon_link_force_rediscovery,
+    &group_info_epon_link_key_exchange_start,
+    &group_info_epon_link_key_exchange_stop,
+    &group_info_epon_link_oam_keepalive_timer_start,
+    &group_info_epon_link_oam_keepalive_timer_stop,
+    &group_info_epon_link_static_registration,
+    &group_info_epon_link_inject_frame,
+    &group_info_epon_link_frame_captured,
+    &group_info_epon_ni_key,
+    &group_info_epon_ni_cfg,
+    &group_info_epon_ni_auto_rogue_scan_10g_failure,
+    &group_info_epon_ni_auto_rogue_scan_1g_failure,
+    &group_info_epon_ni_llid_quarantined,
+    &group_info_epon_ni_mpcp_timestamp_changed,
+    &group_info_epon_ni_no_reports,
+    &group_info_epon_ni_onu_upgrade_complete,
+    &group_info_epon_ni_rerange_failure,
+    &group_info_epon_ni_rogue_scan_complete,
+    &group_info_epon_ni_rssi_measurement_completed,
+    &group_info_epon_ni_state_change_completed,
+    &group_info_epon_ni_auto_cfg,
+    &group_info_epon_ni_add_link,
+    &group_info_epon_ni_add_multicast_link,
+    &group_info_epon_ni_add_protected_standby_link,
+    &group_info_epon_ni_issue_rssi_grant,
+    &group_info_epon_ni_protection_switching_apply_rerange_delta,
+    &group_info_epon_ni_rogue_llid_scan,
+    &group_info_epon_ni_set_epon_ni_en_state,
+    &group_info_epon_ni_start_onu_upgrade,
+    &group_info_epon_onu_10g_us_key,
+    &group_info_epon_onu_10g_us_cfg,
+    &group_info_epon_onu_10g_us_stat,
+    &group_info_epon_onu_10g_us_stat_cfg,
+    &group_info_epon_onu_10g_us_stat_cfg,
+    &group_info_epon_onu_10g_us_stat_cfg,
+    &group_info_epon_onu_10g_us_stat_cfg,
+    &group_info_epon_onu_10g_us_stat_alarm_cleared,
+    &group_info_epon_onu_10g_us_stat_alarm_raised,
+    &group_info_epon_onu_10g_us_auto_cfg,
+    &group_info_epon_onu_1g_us_key,
+    &group_info_epon_onu_1g_us_cfg,
+    &group_info_epon_onu_1g_us_stat,
+    &group_info_epon_onu_1g_us_stat_cfg,
+    &group_info_epon_onu_1g_us_stat_cfg,
+    &group_info_epon_onu_1g_us_stat_cfg,
+    &group_info_epon_onu_1g_us_stat_cfg,
+    &group_info_epon_onu_1g_us_stat_cfg,
+    &group_info_epon_onu_1g_us_stat_cfg,
+    &group_info_epon_onu_1g_us_stat_cfg,
+    &group_info_epon_onu_1g_us_stat_cfg,
+    &group_info_epon_onu_1g_us_stat_cfg,
+    &group_info_epon_onu_1g_us_stat_cfg,
+    &group_info_epon_onu_1g_us_stat_cfg,
+    &group_info_epon_onu_1g_us_stat_cfg,
+    &group_info_epon_onu_1g_us_stat_cfg,
+    &group_info_epon_onu_1g_us_stat_cfg,
+    &group_info_epon_onu_1g_us_stat_cfg,
+    &group_info_epon_onu_1g_us_stat_cfg,
+    &group_info_epon_onu_1g_us_stat_alarm_cleared,
+    &group_info_epon_onu_1g_us_stat_alarm_raised,
+    &group_info_epon_onu_1g_us_auto_cfg,
+    &group_info_epon_path_10g_ds_key,
+    &group_info_epon_path_10g_ds_cfg,
+    &group_info_epon_path_10g_ds_stat,
+    &group_info_epon_path_10g_ds_stat_cfg,
+    &group_info_epon_path_10g_ds_stat_cfg,
+    &group_info_epon_path_10g_ds_stat_cfg,
+    &group_info_epon_path_10g_ds_stat_cfg,
+    &group_info_epon_path_10g_ds_stat_cfg,
+    &group_info_epon_path_10g_ds_stat_cfg,
+    &group_info_epon_path_10g_ds_stat_cfg,
+    &group_info_epon_path_10g_ds_stat_cfg,
+    &group_info_epon_path_10g_ds_stat_cfg,
+    &group_info_epon_path_10g_ds_stat_cfg,
+    &group_info_epon_path_10g_ds_stat_cfg,
+    &group_info_epon_path_10g_ds_stat_cfg,
+    &group_info_epon_path_10g_ds_stat_cfg,
+    &group_info_epon_path_10g_ds_stat_cfg,
+    &group_info_epon_path_10g_ds_stat_cfg,
+    &group_info_epon_path_10g_ds_stat_cfg,
+    &group_info_epon_path_10g_ds_stat_cfg,
+    &group_info_epon_path_10g_ds_stat_cfg,
+    &group_info_epon_path_10g_ds_stat_cfg,
+    &group_info_epon_path_10g_ds_stat_cfg,
+    &group_info_epon_path_10g_ds_stat_cfg,
+    &group_info_epon_path_10g_ds_stat_alarm_cleared,
+    &group_info_epon_path_10g_ds_stat_alarm_raised,
+    &group_info_epon_path_10g_ds_auto_cfg,
+    &group_info_epon_path_10g_us_key,
+    &group_info_epon_path_10g_us_cfg,
+    &group_info_epon_path_10g_us_stat,
+    &group_info_epon_path_10g_us_stat_cfg,
+    &group_info_epon_path_10g_us_stat_cfg,
+    &group_info_epon_path_10g_us_stat_cfg,
+    &group_info_epon_path_10g_us_stat_cfg,
+    &group_info_epon_path_10g_us_stat_cfg,
+    &group_info_epon_path_10g_us_stat_cfg,
+    &group_info_epon_path_10g_us_stat_cfg,
+    &group_info_epon_path_10g_us_stat_cfg,
+    &group_info_epon_path_10g_us_stat_cfg,
+    &group_info_epon_path_10g_us_stat_cfg,
+    &group_info_epon_path_10g_us_stat_cfg,
+    &group_info_epon_path_10g_us_stat_cfg,
+    &group_info_epon_path_10g_us_stat_cfg,
+    &group_info_epon_path_10g_us_stat_cfg,
+    &group_info_epon_path_10g_us_stat_cfg,
+    &group_info_epon_path_10g_us_stat_cfg,
+    &group_info_epon_path_10g_us_stat_cfg,
+    &group_info_epon_path_10g_us_stat_cfg,
+    &group_info_epon_path_10g_us_stat_cfg,
+    &group_info_epon_path_10g_us_stat_cfg,
+    &group_info_epon_path_10g_us_stat_cfg,
+    &group_info_epon_path_10g_us_stat_cfg,
+    &group_info_epon_path_10g_us_stat_cfg,
+    &group_info_epon_path_10g_us_stat_cfg,
+    &group_info_epon_path_10g_us_stat_cfg,
+    &group_info_epon_path_10g_us_stat_cfg,
+    &group_info_epon_path_10g_us_stat_alarm_cleared,
+    &group_info_epon_path_10g_us_stat_alarm_raised,
+    &group_info_epon_path_10g_us_auto_cfg,
+    &group_info_epon_path_1g_ds_key,
+    &group_info_epon_path_1g_ds_cfg,
+    &group_info_epon_path_1g_ds_stat,
+    &group_info_epon_path_1g_ds_stat_cfg,
+    &group_info_epon_path_1g_ds_stat_cfg,
+    &group_info_epon_path_1g_ds_stat_cfg,
+    &group_info_epon_path_1g_ds_stat_cfg,
+    &group_info_epon_path_1g_ds_stat_cfg,
+    &group_info_epon_path_1g_ds_stat_cfg,
+    &group_info_epon_path_1g_ds_stat_cfg,
+    &group_info_epon_path_1g_ds_stat_cfg,
+    &group_info_epon_path_1g_ds_stat_cfg,
+    &group_info_epon_path_1g_ds_stat_cfg,
+    &group_info_epon_path_1g_ds_stat_cfg,
+    &group_info_epon_path_1g_ds_stat_cfg,
+    &group_info_epon_path_1g_ds_stat_cfg,
+    &group_info_epon_path_1g_ds_stat_cfg,
+    &group_info_epon_path_1g_ds_stat_cfg,
+    &group_info_epon_path_1g_ds_stat_cfg,
+    &group_info_epon_path_1g_ds_stat_cfg,
+    &group_info_epon_path_1g_ds_stat_cfg,
+    &group_info_epon_path_1g_ds_stat_cfg,
+    &group_info_epon_path_1g_ds_stat_cfg,
+    &group_info_epon_path_1g_ds_stat_cfg,
+    &group_info_epon_path_1g_ds_stat_alarm_cleared,
+    &group_info_epon_path_1g_ds_stat_alarm_raised,
+    &group_info_epon_path_1g_ds_auto_cfg,
+    &group_info_epon_path_1g_us_key,
+    &group_info_epon_path_1g_us_cfg,
+    &group_info_epon_path_1g_us_stat,
+    &group_info_epon_path_1g_us_stat_cfg,
+    &group_info_epon_path_1g_us_stat_cfg,
+    &group_info_epon_path_1g_us_stat_cfg,
+    &group_info_epon_path_1g_us_stat_cfg,
+    &group_info_epon_path_1g_us_stat_cfg,
+    &group_info_epon_path_1g_us_stat_cfg,
+    &group_info_epon_path_1g_us_stat_cfg,
+    &group_info_epon_path_1g_us_stat_cfg,
+    &group_info_epon_path_1g_us_stat_cfg,
+    &group_info_epon_path_1g_us_stat_cfg,
+    &group_info_epon_path_1g_us_stat_cfg,
+    &group_info_epon_path_1g_us_stat_cfg,
+    &group_info_epon_path_1g_us_stat_cfg,
+    &group_info_epon_path_1g_us_stat_cfg,
+    &group_info_epon_path_1g_us_stat_cfg,
+    &group_info_epon_path_1g_us_stat_cfg,
+    &group_info_epon_path_1g_us_stat_cfg,
+    &group_info_epon_path_1g_us_stat_cfg,
+    &group_info_epon_path_1g_us_stat_cfg,
+    &group_info_epon_path_1g_us_stat_cfg,
+    &group_info_epon_path_1g_us_stat_cfg,
+    &group_info_epon_path_1g_us_stat_cfg,
+    &group_info_epon_path_1g_us_stat_cfg,
+    &group_info_epon_path_1g_us_stat_cfg,
+    &group_info_epon_path_1g_us_stat_cfg,
+    &group_info_epon_path_1g_us_stat_cfg,
+    &group_info_epon_path_1g_us_stat_alarm_cleared,
+    &group_info_epon_path_1g_us_stat_alarm_raised,
+    &group_info_epon_path_1g_us_auto_cfg,
+    &group_info_epon_rp_key,
+    &group_info_epon_rp_cfg,
+    &group_info_gpio_key,
+    &group_info_gpio_cfg,
+    &group_info_gpon_alloc_key,
+    &group_info_gpon_alloc_cfg,
+    &group_info_gpon_alloc_stat,
+    &group_info_gpon_alloc_stat_cfg,
+    &group_info_gpon_alloc_configuration_completed,
+    &group_info_gpon_alloc_get_alloc_stats_completed,
+    &group_info_gpon_alloc_stat_alarm_cleared,
+    &group_info_gpon_alloc_stat_alarm_raised,
+    &group_info_gpon_alloc_auto_cfg,
+    &group_info_gpon_alloc_get_stats,
+    &group_info_gpon_alloc_set_state,
+    &group_info_gpon_gem_port_key,
+    &group_info_gpon_gem_port_cfg,
+    &group_info_gpon_gem_port_stat,
+    &group_info_gpon_gem_port_stat_cfg,
+    &group_info_gpon_gem_port_stat_cfg,
+    &group_info_gpon_gem_port_stat_cfg,
+    &group_info_gpon_gem_port_stat_cfg,
+    &group_info_gpon_gem_port_configuration_completed,
+    &group_info_gpon_gem_port_stat_alarm_cleared,
+    &group_info_gpon_gem_port_stat_alarm_raised,
+    &group_info_gpon_gem_port_auto_cfg,
+    &group_info_gpon_gem_port_set_state,
+    &group_info_gpon_iwf_key,
+    &group_info_gpon_iwf_cfg,
+    &group_info_gpon_iwf_stat,
+    &group_info_gpon_iwf_stat_cfg,
+    &group_info_gpon_iwf_stat_cfg,
+    &group_info_gpon_iwf_stat_cfg,
+    &group_info_gpon_iwf_stat_cfg,
+    &group_info_gpon_iwf_stat_cfg,
+    &group_info_gpon_iwf_stat_cfg,
+    &group_info_gpon_iwf_stat_cfg,
+    &group_info_gpon_iwf_stat_cfg,
+    &group_info_gpon_iwf_flush_mac_table_completed,
+    &group_info_gpon_iwf_scan_mac_table_completed,
+    &group_info_gpon_iwf_stat_alarm_cleared,
+    &group_info_gpon_iwf_stat_alarm_raised,
+    &group_info_gpon_iwf_auto_cfg,
+    &group_info_gpon_iwf_flush_mac_table,
+    &group_info_gpon_iwf_scan_mac_table,
+    &group_info_gpon_iwf_ds_egress_flow_key,
+    &group_info_gpon_iwf_ds_egress_flow_cfg,
+    &group_info_gpon_iwf_ds_ingress_flow_key,
+    &group_info_gpon_iwf_ds_ingress_flow_cfg,
+    &group_info_gpon_iwf_mac_table_key,
+    &group_info_gpon_iwf_mac_table_cfg,
+    &group_info_gpon_iwf_mac_table_mac_aged,
+    &group_info_gpon_iwf_mac_table_mac_dropped,
+    &group_info_gpon_iwf_mac_table_mac_move,
+    &group_info_gpon_iwf_mac_table_new_mac,
+    &group_info_gpon_iwf_mac_table_auto_cfg,
+    &group_info_gpon_iwf_us_flow_key,
+    &group_info_gpon_iwf_us_flow_cfg,
+    &group_info_gpon_ni_key,
+    &group_info_gpon_ni_cfg,
+    &group_info_gpon_ni_stat,
+    &group_info_gpon_ni_stat_cfg,
+    &group_info_gpon_ni_stat_cfg,
+    &group_info_gpon_ni_stat_cfg,
+    &group_info_gpon_ni_stat_cfg,
+    &group_info_gpon_ni_stat_cfg,
+    &group_info_gpon_ni_stat_cfg,
+    &group_info_gpon_ni_stat_cfg,
+    &group_info_gpon_ni_stat_cfg,
+    &group_info_gpon_ni_stat_cfg,
+    &group_info_gpon_ni_stat_cfg,
+    &group_info_gpon_ni_stat_cfg,
+    &group_info_gpon_ni_stat_cfg,
+    &group_info_gpon_ni_stat_cfg,
+    &group_info_gpon_ni_stat_cfg,
+    &group_info_gpon_ni_stat_cfg,
+    &group_info_gpon_ni_stat_cfg,
+    &group_info_gpon_ni_stat_cfg,
+    &group_info_gpon_ni_stat_cfg,
+    &group_info_gpon_ni_stat_cfg,
+    &group_info_gpon_ni_stat_cfg,
+    &group_info_gpon_ni_stat_cfg,
+    &group_info_gpon_ni_stat_cfg,
+    &group_info_gpon_ni_stat_cfg,
+    &group_info_gpon_ni_stat_cfg,
+    &group_info_gpon_ni_stat_cfg,
+    &group_info_gpon_ni_stat_cfg,
+    &group_info_gpon_ni_stat_cfg,
+    &group_info_gpon_ni_stat_cfg,
+    &group_info_gpon_ni_stat_cfg,
+    &group_info_gpon_ni_stat_cfg,
+    &group_info_gpon_ni_stat_cfg,
+    &group_info_gpon_ni_stat_cfg,
+    &group_info_gpon_ni_stat_cfg,
+    &group_info_gpon_ni_stat_cfg,
+    &group_info_gpon_ni_activate_all_onus_completed,
+    &group_info_gpon_ni_cpu_packets_failure,
+    &group_info_gpon_ni_deactivate_all_onus_completed,
+    &group_info_gpon_ni_disable_all_onus_completed,
+    &group_info_gpon_ni_enable_all_onus_completed,
+    &group_info_gpon_ni_los,
+    &group_info_gpon_ni_onu_discovered,
+    &group_info_gpon_ni_onu_upgrade_complete,
+    &group_info_gpon_ni_protection_switching_onus_ranged,
+    &group_info_gpon_ni_protection_switching_switchover_completed,
+    &group_info_gpon_ni_protection_switching_traffic_resume,
+    &group_info_gpon_ni_rogue_detection_completed,
+    &group_info_gpon_ni_rogue_onu_special_map_cycle_start,
+    &group_info_gpon_ni_serial_number_acquisition_cycle_start,
+    &group_info_gpon_ni_standby_pon_monitoring_cycle_completed,
+    &group_info_gpon_ni_stat_alarm_cleared,
+    &group_info_gpon_ni_stat_alarm_raised,
+    &group_info_gpon_ni_state_change_completed,
+    &group_info_gpon_ni_tod_request_completed,
+    &group_info_gpon_ni_auto_cfg,
+    &group_info_gpon_ni_disable_serial_number,
+    &group_info_gpon_ni_protection_switching_type_c_set_multiple_onu_state,
+    &group_info_gpon_ni_reset,
+    &group_info_gpon_ni_rogue_detection_window,
+    &group_info_gpon_ni_set_onu_state,
+    &group_info_gpon_ni_set_pon_state,
+    &group_info_gpon_ni_single_request_standby_pon_monitoring,
+    &group_info_gpon_ni_start_onu_upgrade,
+    &group_info_gpon_ni_tod_request,
+    &group_info_gpon_ni_broadcast_ploam_packet,
+    &group_info_gpon_ni_cpu_packets,
+    &group_info_gpon_onu_key,
+    &group_info_gpon_onu_cfg,
+    &group_info_gpon_onu_stat,
+    &group_info_gpon_onu_stat_cfg,
+    &group_info_gpon_onu_stat_cfg,
+    &group_info_gpon_onu_stat_cfg,
+    &group_info_gpon_onu_stat_cfg,
+    &group_info_gpon_onu_stat_cfg,
+    &group_info_gpon_onu_stat_cfg,
+    &group_info_gpon_onu_stat_cfg,
+    &group_info_gpon_onu_stat_cfg,
+    &group_info_gpon_onu_stat_cfg,
+    &group_info_gpon_onu_stat_cfg,
+    &group_info_gpon_onu_stat_cfg,
+    &group_info_gpon_onu_stat_cfg,
+    &group_info_gpon_onu_stat_cfg,
+    &group_info_gpon_onu_stat_cfg,
+    &group_info_gpon_onu_stat_cfg,
+    &group_info_gpon_onu_stat_cfg,
+    &group_info_gpon_onu_stat_cfg,
+    &group_info_gpon_onu_stat_cfg,
+    &group_info_gpon_onu_stat_cfg,
+    &group_info_gpon_onu_stat_cfg,
+    &group_info_gpon_onu_ber_interval_configuration_completed,
+    &group_info_gpon_onu_dfi,
+    &group_info_gpon_onu_dgi,
+    &group_info_gpon_onu_dowi,
+    &group_info_gpon_onu_err,
+    &group_info_gpon_onu_invalid_dbru_report,
+    &group_info_gpon_onu_key_exchange_completed,
+    &group_info_gpon_onu_key_exchange_cycle_skipped,
+    &group_info_gpon_onu_key_exchange_decrypt_required,
+    &group_info_gpon_onu_key_exchange_key_mismatch,
+    &group_info_gpon_onu_key_exchange_key_request_timeout,
+    &group_info_gpon_onu_key_exchange_unconsecutive_index,
+    &group_info_gpon_onu_loai,
+    &group_info_gpon_onu_loki,
+    &group_info_gpon_onu_memi,
+    &group_info_gpon_onu_omci_port_id_configuration_completed,
+    &group_info_gpon_onu_onu_activation_completed,
+    &group_info_gpon_onu_onu_activation_standby_completed,
+    &group_info_gpon_onu_onu_alarm,
+    &group_info_gpon_onu_onu_deactivation_completed,
+    &group_info_gpon_onu_onu_disable_completed,
+    &group_info_gpon_onu_onu_enable_completed,
+    &group_info_gpon_onu_optical_reflection,
+    &group_info_gpon_onu_password_authentication_completed,
+    &group_info_gpon_onu_pee,
+    &group_info_gpon_onu_possible_drift,
+    &group_info_gpon_onu_power_management_state_change,
+    &group_info_gpon_onu_pst,
+    &group_info_gpon_onu_ranging_completed,
+    &group_info_gpon_onu_rei,
+    &group_info_gpon_onu_rssi_measurement_completed,
+    &group_info_gpon_onu_sdi,
+    &group_info_gpon_onu_sfi,
+    &group_info_gpon_onu_stat_alarm_cleared,
+    &group_info_gpon_onu_stat_alarm_raised,
+    &group_info_gpon_onu_sufi,
+    &group_info_gpon_onu_tiwi,
+    &group_info_gpon_onu_auto_cfg,
+    &group_info_gpon_onu_change_power_level,
+    &group_info_gpon_onu_rssi_measurement,
+    &group_info_gpon_onu_set_onu_state,
+    &group_info_gpon_onu_cpu_packets,
+    &group_info_gpon_onu_ploam_packet,
+    &group_info_gpon_onu_cpu_packet,
+    &group_info_gpon_onu_omci_packet,
+    &group_info_gpon_trx_key,
+    &group_info_gpon_trx_cfg,
+    &group_info_log_entry_key,
+    &group_info_log_entry_cfg,
+    &group_info_log_entry_stat,
+    &group_info_log_entry_stat_cfg,
+    &group_info_log_entry_stat_cfg,
+    &group_info_log_entry_stat_alarm_cleared,
+    &group_info_log_entry_stat_alarm_raised,
+    &group_info_log_entry_auto_cfg,
+    &group_info_logger_key,
+    &group_info_logger_cfg,
+    &group_info_logger_stat,
+    &group_info_logger_stat_cfg,
+    &group_info_logger_stat_alarm_cleared,
+    &group_info_logger_stat_alarm_raised,
+    &group_info_logger_auto_cfg,
+    &group_info_logger_clear_log,
+    &group_info_nni_key,
+    &group_info_nni_cfg,
+    &group_info_nni_stat,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_cfg,
+    &group_info_nni_stat_alarm_cleared,
+    &group_info_nni_stat_alarm_raised,
+    &group_info_nni_status_changed,
+    &group_info_nni_auto_cfg,
+    &group_info_nni_serdes_key,
+    &group_info_nni_serdes_cfg,
+    &group_info_software_error_key,
+    &group_info_software_error_cfg,
+    &group_info_trx_calibration_key,
+    &group_info_trx_calibration_capture_window_and_statistic_completed,
+    &group_info_trx_calibration_auto_cfg,
+    &group_info_trx_calibration_start_capture_window,
+    &group_info_trx_calibration_stop_capture_window,
+    &group_info_xgpon_alloc_key,
+    &group_info_xgpon_alloc_cfg,
+    &group_info_xgpon_alloc_stat,
+    &group_info_xgpon_alloc_stat_cfg,
+    &group_info_xgpon_alloc_configuration_completed,
+    &group_info_xgpon_alloc_get_alloc_stats_completed,
+    &group_info_xgpon_alloc_stat_alarm_cleared,
+    &group_info_xgpon_alloc_stat_alarm_raised,
+    &group_info_xgpon_alloc_auto_cfg,
+    &group_info_xgpon_alloc_get_stats,
+    &group_info_xgpon_alloc_set_state,
+    &group_info_xgpon_gem_port_key,
+    &group_info_xgpon_gem_port_cfg,
+    &group_info_xgpon_gem_port_stat,
+    &group_info_xgpon_gem_port_stat_cfg,
+    &group_info_xgpon_gem_port_stat_cfg,
+    &group_info_xgpon_gem_port_stat_cfg,
+    &group_info_xgpon_gem_port_stat_cfg,
+    &group_info_xgpon_gem_port_stat_alarm_cleared,
+    &group_info_xgpon_gem_port_stat_alarm_raised,
+    &group_info_xgpon_gem_port_auto_cfg,
+    &group_info_xgpon_iwf_key,
+    &group_info_xgpon_iwf_cfg,
+    &group_info_xgpon_ni_key,
+    &group_info_xgpon_ni_cfg,
+    &group_info_xgpon_ni_stat,
+    &group_info_xgpon_ni_stat_cfg,
+    &group_info_xgpon_ni_stat_cfg,
+    &group_info_xgpon_ni_stat_cfg,
+    &group_info_xgpon_ni_stat_cfg,
+    &group_info_xgpon_ni_stat_cfg,
+    &group_info_xgpon_ni_stat_cfg,
+    &group_info_xgpon_ni_stat_cfg,
+    &group_info_xgpon_ni_stat_cfg,
+    &group_info_xgpon_ni_stat_cfg,
+    &group_info_xgpon_ni_stat_cfg,
+    &group_info_xgpon_ni_stat_cfg,
+    &group_info_xgpon_ni_stat_cfg,
+    &group_info_xgpon_ni_stat_cfg,
+    &group_info_xgpon_ni_stat_cfg,
+    &group_info_xgpon_ni_stat_cfg,
+    &group_info_xgpon_ni_stat_cfg,
+    &group_info_xgpon_ni_stat_cfg,
+    &group_info_xgpon_ni_stat_cfg,
+    &group_info_xgpon_ni_stat_cfg,
+    &group_info_xgpon_ni_stat_cfg,
+    &group_info_xgpon_ni_stat_cfg,
+    &group_info_xgpon_ni_stat_cfg,
+    &group_info_xgpon_ni_stat_cfg,
+    &group_info_xgpon_ni_stat_cfg,
+    &group_info_xgpon_ni_stat_cfg,
+    &group_info_xgpon_ni_stat_cfg,
+    &group_info_xgpon_ni_stat_cfg,
+    &group_info_xgpon_ni_stat_cfg,
+    &group_info_xgpon_ni_stat_cfg,
+    &group_info_xgpon_ni_stat_cfg,
+    &group_info_xgpon_ni_stat_cfg,
+    &group_info_xgpon_ni_stat_cfg,
+    &group_info_xgpon_ni_stat_cfg,
+    &group_info_xgpon_ni_stat_cfg,
+    &group_info_xgpon_ni_stat_cfg,
+    &group_info_xgpon_ni_activate_all_onus_completed,
+    &group_info_xgpon_ni_cpu_packets_failure,
+    &group_info_xgpon_ni_deactivate_all_onus_completed,
+    &group_info_xgpon_ni_disable_all_onus_completed,
+    &group_info_xgpon_ni_enable_all_onus_completed,
+    &group_info_xgpon_ni_los,
+    &group_info_xgpon_ni_onu_discovered,
+    &group_info_xgpon_ni_onu_upgrade_complete,
+    &group_info_xgpon_ni_protection_switching_onus_ranged,
+    &group_info_xgpon_ni_protection_switching_switchover_completed,
+    &group_info_xgpon_ni_protection_switching_traffic_resume,
+    &group_info_xgpon_ni_rogue_detection_completed,
+    &group_info_xgpon_ni_rogue_onu_special_map_cycle_start,
+    &group_info_xgpon_ni_serial_number_acquisition_cycle_start,
+    &group_info_xgpon_ni_standby_pon_monitoring_cycle_completed,
+    &group_info_xgpon_ni_stat_alarm_cleared,
+    &group_info_xgpon_ni_stat_alarm_raised,
+    &group_info_xgpon_ni_state_change_completed,
+    &group_info_xgpon_ni_tod_request_completed,
+    &group_info_xgpon_ni_auto_cfg,
+    &group_info_xgpon_ni_adjust_tx_wavelength,
+    &group_info_xgpon_ni_disable_serial_number,
+    &group_info_xgpon_ni_reset,
+    &group_info_xgpon_ni_rogue_detection_window,
+    &group_info_xgpon_ni_run_special_bw_map,
+    &group_info_xgpon_ni_set_onu_state,
+    &group_info_xgpon_ni_set_pon_state,
+    &group_info_xgpon_ni_single_request_standby_pon_monitoring,
+    &group_info_xgpon_ni_start_onu_upgrade,
+    &group_info_xgpon_ni_tod_request,
+    &group_info_xgpon_ni_broadcast_ploam_packet,
+    &group_info_xgpon_ni_cpu_packets,
+    &group_info_xgpon_onu_key,
+    &group_info_xgpon_onu_cfg,
+    &group_info_xgpon_onu_stat,
+    &group_info_xgpon_onu_stat_cfg,
+    &group_info_xgpon_onu_stat_cfg,
+    &group_info_xgpon_onu_stat_cfg,
+    &group_info_xgpon_onu_stat_cfg,
+    &group_info_xgpon_onu_stat_cfg,
+    &group_info_xgpon_onu_stat_cfg,
+    &group_info_xgpon_onu_stat_cfg,
+    &group_info_xgpon_onu_stat_cfg,
+    &group_info_xgpon_onu_stat_cfg,
+    &group_info_xgpon_onu_stat_cfg,
+    &group_info_xgpon_onu_stat_cfg,
+    &group_info_xgpon_onu_stat_cfg,
+    &group_info_xgpon_onu_stat_cfg,
+    &group_info_xgpon_onu_stat_cfg,
+    &group_info_xgpon_onu_stat_cfg,
+    &group_info_xgpon_onu_stat_cfg,
+    &group_info_xgpon_onu_stat_cfg,
+    &group_info_xgpon_onu_stat_cfg,
+    &group_info_xgpon_onu_stat_cfg,
+    &group_info_xgpon_onu_stat_cfg,
+    &group_info_xgpon_onu_dfi,
+    &group_info_xgpon_onu_dgi,
+    &group_info_xgpon_onu_dowi,
+    &group_info_xgpon_onu_invalid_dbru_report,
+    &group_info_xgpon_onu_key_exchange_completed,
+    &group_info_xgpon_onu_key_exchange_cycle_skipped,
+    &group_info_xgpon_onu_key_exchange_key_mismatch,
+    &group_info_xgpon_onu_key_exchange_key_request_timeout,
+    &group_info_xgpon_onu_looci,
+    &group_info_xgpon_onu_onu_activation_completed,
+    &group_info_xgpon_onu_onu_alarm,
+    &group_info_xgpon_onu_onu_deactivation_completed,
+    &group_info_xgpon_onu_onu_disable_completed,
+    &group_info_xgpon_onu_onu_enable_completed,
+    &group_info_xgpon_onu_onu_tuning_in_completed,
+    &group_info_xgpon_onu_onu_tuning_out_completed,
+    &group_info_xgpon_onu_optical_reflection,
+    &group_info_xgpon_onu_possible_drift,
+    &group_info_xgpon_onu_power_consumption_report,
+    &group_info_xgpon_onu_power_level_report,
+    &group_info_xgpon_onu_power_management_state_change,
+    &group_info_xgpon_onu_pqsi,
+    &group_info_xgpon_onu_ranging_completed,
+    &group_info_xgpon_onu_registration_id,
+    &group_info_xgpon_onu_rssi_measurement_completed,
+    &group_info_xgpon_onu_sdi,
+    &group_info_xgpon_onu_secure_mutual_authentication_failure,
+    &group_info_xgpon_onu_sfi,
+    &group_info_xgpon_onu_stat_alarm_cleared,
+    &group_info_xgpon_onu_stat_alarm_raised,
+    &group_info_xgpon_onu_sufi,
+    &group_info_xgpon_onu_tiwi,
+    &group_info_xgpon_onu_tuning_response,
+    &group_info_xgpon_onu_auto_cfg,
+    &group_info_xgpon_onu_adjust_tx_wavelength,
+    &group_info_xgpon_onu_change_power_levelling,
+    &group_info_xgpon_onu_get_power_consumption,
+    &group_info_xgpon_onu_get_power_level,
+    &group_info_xgpon_onu_onu_tuning_in,
+    &group_info_xgpon_onu_onu_tuning_out,
+    &group_info_xgpon_onu_request_registration,
+    &group_info_xgpon_onu_rssi_measurement,
+    &group_info_xgpon_onu_secure_mutual_authentication,
+    &group_info_xgpon_onu_set_onu_state,
+    &group_info_xgpon_onu_cpu_packets,
+    &group_info_xgpon_onu_ploam_packet,
+    &group_info_xgpon_onu_cpu_packet,
+    &group_info_xgpon_onu_omci_packet,
+    &group_info_xgpon_trx_key,
+    &group_info_xgpon_trx_cfg,
+    &group_info_xpon_serdes_key,
+    &group_info_xpon_serdes_cfg
+};
+static bcmolt_group_id group_ids_ae_ni_key[] = { BCMOLT_GROUP_ID_AE_NI_KEY };
+static bcmolt_group_id group_ids_ae_ni_cfg[] = { BCMOLT_GROUP_ID_AE_NI_CFG };
+static bcmolt_group_id group_ids_ae_ni_oper[] = { BCMOLT_GROUP_ID_AE_NI_SET_AE_NI_EN_STATE };
+static bcmolt_group_id group_ids_ae_path_ds_key[] = { BCMOLT_GROUP_ID_AE_PATH_DS_KEY };
+static bcmolt_group_id group_ids_ae_path_ds_stat[] = { BCMOLT_GROUP_ID_AE_PATH_DS_STAT };
+static bcmolt_group_id group_ids_ae_path_ds_stat_cfg[] = { BCMOLT_GROUP_ID_AE_PATH_DS_STAT_CFG_BYTES, BCMOLT_GROUP_ID_AE_PATH_DS_STAT_CFG_FRAMES, BCMOLT_GROUP_ID_AE_PATH_DS_STAT_CFG_FRAMES_64, BCMOLT_GROUP_ID_AE_PATH_DS_STAT_CFG_FRAMES_65_127, BCMOLT_GROUP_ID_AE_PATH_DS_STAT_CFG_FRAMES_128_255, BCMOLT_GROUP_ID_AE_PATH_DS_STAT_CFG_FRAMES_256_511, BCMOLT_GROUP_ID_AE_PATH_DS_STAT_CFG_FRAMES_512_1023, BCMOLT_GROUP_ID_AE_PATH_DS_STAT_CFG_FRAMES_1024_1518, BCMOLT_GROUP_ID_AE_PATH_DS_STAT_CFG_FRAMES_1519_2047, BCMOLT_GROUP_ID_AE_PATH_DS_STAT_CFG_FRAMES_2048_4095, BCMOLT_GROUP_ID_AE_PATH_DS_STAT_CFG_FRAMES_4096_9216, BCMOLT_GROUP_ID_AE_PATH_DS_STAT_CFG_FRAMES_9217_16383, BCMOLT_GROUP_ID_AE_PATH_DS_STAT_CFG_BROADCAST_FRAMES, BCMOLT_GROUP_ID_AE_PATH_DS_STAT_CFG_DATA_BYTES, BCMOLT_GROUP_ID_AE_PATH_DS_STAT_CFG_MULTICAST_FRAMES, BCMOLT_GROUP_ID_AE_PATH_DS_STAT_CFG_UNICAST_FRAMES, BCMOLT_GROUP_ID_AE_PATH_DS_STAT_CFG_ABORT_FRAMES };
+static bcmolt_group_id group_ids_ae_path_ds_auto[] = { BCMOLT_GROUP_ID_AE_PATH_DS_STAT_ALARM_CLEARED, BCMOLT_GROUP_ID_AE_PATH_DS_STAT_ALARM_RAISED };
+static bcmolt_group_id group_ids_ae_path_ds_auto_cfg[] = { BCMOLT_GROUP_ID_AE_PATH_DS_AUTO_CFG };
+static bcmolt_group_id group_ids_ae_path_us_key[] = { BCMOLT_GROUP_ID_AE_PATH_US_KEY };
+static bcmolt_group_id group_ids_ae_path_us_stat[] = { BCMOLT_GROUP_ID_AE_PATH_US_STAT };
+static bcmolt_group_id group_ids_ae_path_us_stat_cfg[] = { BCMOLT_GROUP_ID_AE_PATH_US_STAT_CFG_BYTES, BCMOLT_GROUP_ID_AE_PATH_US_STAT_CFG_FRAMES, BCMOLT_GROUP_ID_AE_PATH_US_STAT_CFG_FRAMES_64, BCMOLT_GROUP_ID_AE_PATH_US_STAT_CFG_FRAMES_65_127, BCMOLT_GROUP_ID_AE_PATH_US_STAT_CFG_FRAMES_128_255, BCMOLT_GROUP_ID_AE_PATH_US_STAT_CFG_FRAMES_256_511, BCMOLT_GROUP_ID_AE_PATH_US_STAT_CFG_FRAMES_512_1023, BCMOLT_GROUP_ID_AE_PATH_US_STAT_CFG_FRAMES_1024_1518, BCMOLT_GROUP_ID_AE_PATH_US_STAT_CFG_FRAMES_1519_2047, BCMOLT_GROUP_ID_AE_PATH_US_STAT_CFG_FRAMES_2048_4095, BCMOLT_GROUP_ID_AE_PATH_US_STAT_CFG_FRAMES_4096_9216, BCMOLT_GROUP_ID_AE_PATH_US_STAT_CFG_FRAMES_9217_16383, BCMOLT_GROUP_ID_AE_PATH_US_STAT_CFG_BROADCAST_FRAMES, BCMOLT_GROUP_ID_AE_PATH_US_STAT_CFG_DATA_BYTES, BCMOLT_GROUP_ID_AE_PATH_US_STAT_CFG_MULTICAST_FRAMES, BCMOLT_GROUP_ID_AE_PATH_US_STAT_CFG_UNICAST_FRAMES, BCMOLT_GROUP_ID_AE_PATH_US_STAT_CFG_ABORT_FRAMES, BCMOLT_GROUP_ID_AE_PATH_US_STAT_CFG_FCS_ERROR, BCMOLT_GROUP_ID_AE_PATH_US_STAT_CFG_OVERSIZE_ERROR, BCMOLT_GROUP_ID_AE_PATH_US_STAT_CFG_RUNT_ERROR };
+static bcmolt_group_id group_ids_ae_path_us_auto[] = { BCMOLT_GROUP_ID_AE_PATH_US_STAT_ALARM_CLEARED, BCMOLT_GROUP_ID_AE_PATH_US_STAT_ALARM_RAISED };
+static bcmolt_group_id group_ids_ae_path_us_auto_cfg[] = { BCMOLT_GROUP_ID_AE_PATH_US_AUTO_CFG };
+static bcmolt_group_id group_ids_channel_key[] = { BCMOLT_GROUP_ID_CHANNEL_KEY };
+static bcmolt_group_id group_ids_channel_cfg[] = { BCMOLT_GROUP_ID_CHANNEL_CFG };
+static bcmolt_group_id group_ids_debug_key[] = { BCMOLT_GROUP_ID_DEBUG_KEY };
+static bcmolt_group_id group_ids_debug_cfg[] = { BCMOLT_GROUP_ID_DEBUG_CFG };
+static bcmolt_group_id group_ids_debug_auto[] = { BCMOLT_GROUP_ID_DEBUG_CLI_OUTPUT, BCMOLT_GROUP_ID_DEBUG_FILE_ALMOST_FULL };
+static bcmolt_group_id group_ids_debug_auto_cfg[] = { BCMOLT_GROUP_ID_DEBUG_AUTO_CFG };
+static bcmolt_group_id group_ids_debug_oper[] = { BCMOLT_GROUP_ID_DEBUG_CLI_INPUT, BCMOLT_GROUP_ID_DEBUG_RESET_API_CAPTURE, BCMOLT_GROUP_ID_DEBUG_START_API_CAPTURE, BCMOLT_GROUP_ID_DEBUG_STOP_API_CAPTURE };
+static bcmolt_group_id group_ids_device_key[] = { BCMOLT_GROUP_ID_DEVICE_KEY };
+static bcmolt_group_id group_ids_device_cfg[] = { BCMOLT_GROUP_ID_DEVICE_CFG };
+static bcmolt_group_id group_ids_device_auto[] = { BCMOLT_GROUP_ID_DEVICE_CONNECTION_COMPLETE, BCMOLT_GROUP_ID_DEVICE_CONNECTION_ESTABLISHED, BCMOLT_GROUP_ID_DEVICE_CONNECTION_FAILURE, BCMOLT_GROUP_ID_DEVICE_DDR_TEST_COMPLETE, BCMOLT_GROUP_ID_DEVICE_DEVICE_KEEP_ALIVE, BCMOLT_GROUP_ID_DEVICE_DEVICE_READY, BCMOLT_GROUP_ID_DEVICE_DISCONNECTION_COMPLETE, BCMOLT_GROUP_ID_DEVICE_IMAGE_TRANSFER_COMPLETE, BCMOLT_GROUP_ID_DEVICE_INDICATIONS_DROPPED, BCMOLT_GROUP_ID_DEVICE_SW_ERROR, BCMOLT_GROUP_ID_DEVICE_SW_EXCEPTION };
+static bcmolt_group_id group_ids_device_auto_cfg[] = { BCMOLT_GROUP_ID_DEVICE_AUTO_CFG };
+static bcmolt_group_id group_ids_device_oper[] = { BCMOLT_GROUP_ID_DEVICE_CONNECT, BCMOLT_GROUP_ID_DEVICE_DISCONNECT, BCMOLT_GROUP_ID_DEVICE_HOST_KEEP_ALIVE, BCMOLT_GROUP_ID_DEVICE_IMAGE_TRANSFER_DATA, BCMOLT_GROUP_ID_DEVICE_IMAGE_TRANSFER_START, BCMOLT_GROUP_ID_DEVICE_RESET, BCMOLT_GROUP_ID_DEVICE_RUN_DDR_TEST, BCMOLT_GROUP_ID_DEVICE_SW_UPGRADE_ACTIVATE };
+static bcmolt_group_id group_ids_epon_denied_link_key[] = { BCMOLT_GROUP_ID_EPON_DENIED_LINK_KEY };
+static bcmolt_group_id group_ids_epon_denied_link_cfg[] = { BCMOLT_GROUP_ID_EPON_DENIED_LINK_CFG };
+static bcmolt_group_id group_ids_epon_denied_link_auto[] = { BCMOLT_GROUP_ID_EPON_DENIED_LINK_LASER_ON_OFF_VIOLATION, BCMOLT_GROUP_ID_EPON_DENIED_LINK_LLID_POOL_EMPTY_VIOLATION, BCMOLT_GROUP_ID_EPON_DENIED_LINK_MAX_LINK_VIOLATION, BCMOLT_GROUP_ID_EPON_DENIED_LINK_OVERHEAD_PROFILE_VIOLATION, BCMOLT_GROUP_ID_EPON_DENIED_LINK_RANGE_VIOLATION, BCMOLT_GROUP_ID_EPON_DENIED_LINK_ROGUE_VIOLATION, BCMOLT_GROUP_ID_EPON_DENIED_LINK_SYSTEM_RESOURCE_VIOLATION, BCMOLT_GROUP_ID_EPON_DENIED_LINK_TDM_CHANNELS_EXHAUSTED, BCMOLT_GROUP_ID_EPON_DENIED_LINK_UNKNOWN_LINK_VIOLATION, BCMOLT_GROUP_ID_EPON_DENIED_LINK_UPSTREAM_BANDWIDTH_VIOLATION };
+static bcmolt_group_id group_ids_epon_denied_link_auto_cfg[] = { BCMOLT_GROUP_ID_EPON_DENIED_LINK_AUTO_CFG };
+static bcmolt_group_id group_ids_epon_link_key[] = { BCMOLT_GROUP_ID_EPON_LINK_KEY };
+static bcmolt_group_id group_ids_epon_link_cfg[] = { BCMOLT_GROUP_ID_EPON_LINK_CFG };
+static bcmolt_group_id group_ids_epon_link_stat[] = { BCMOLT_GROUP_ID_EPON_LINK_STAT };
+static bcmolt_group_id group_ids_epon_link_stat_cfg[] = { BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_DATA_BYTES, BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_DATA_FRAMES, BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_FRAMES_64, BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_FRAMES_65_127, BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_FRAMES_128_255, BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_FRAMES_256_511, BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_FRAMES_512_1023, BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_FRAMES_1024_1518, BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_FRAMES_1519_2047, BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_FRAMES_2048_4095, BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_FRAMES_4096_9216, BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_FRAMES_9217_16383, BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_OAM_BYTES, BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_OAM_FRAMES, BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_MPCP_FRAMES, BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_BROADCAST_FRAMES, BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_UNICAST_FRAMES, BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_MULTICAST_FRAMES, BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_REPORT_FRAMES, BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_FCS_ERROR, BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_OVERSIZE_ERROR, BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_RUNT_ERROR, BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_LINE_CODE_ERROR, BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_RX_LINE_CODE_ERROR_MAX, BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_TX_DATA_BYTES, BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_TX_DATA_FRAMES, BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_TX_FRAMES_64, BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_TX_FRAMES_65_127, BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_TX_FRAMES_128_255, BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_TX_FRAMES_256_511, BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_TX_FRAMES_512_1023, BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_TX_FRAMES_1024_1518, BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_TX_FRAMES_1519_2047, BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_TX_FRAMES_2048_4095, BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_TX_FRAMES_4096_9216, BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_TX_FRAMES_9217_16383, BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_TX_OAM_BYTES, BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_TX_OAM_FRAMES, BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_TX_MPCP_FRAMES, BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_TX_BROADCAST_FRAMES, BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_TX_UNICAST_FRAMES, BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_TX_MULTICAST_FRAMES, BCMOLT_GROUP_ID_EPON_LINK_STAT_CFG_TX_GATES };
+static bcmolt_group_id group_ids_epon_link_auto[] = { BCMOLT_GROUP_ID_EPON_LINK_DUPLICATE_MPCP_REGISTRATION_REQUEST, BCMOLT_GROUP_ID_EPON_LINK_ENCRYPTION_ENABLED, BCMOLT_GROUP_ID_EPON_LINK_KEY_EXCHANGE_FAILURE, BCMOLT_GROUP_ID_EPON_LINK_KEY_EXCHANGE_STARTED, BCMOLT_GROUP_ID_EPON_LINK_KEY_EXCHANGE_STOPPED, BCMOLT_GROUP_ID_EPON_LINK_LINK_DELETED, BCMOLT_GROUP_ID_EPON_LINK_LINK_SPEED_MISMATCH, BCMOLT_GROUP_ID_EPON_LINK_MPCP_DEREGISTERED, BCMOLT_GROUP_ID_EPON_LINK_MPCP_DISCOVERED, BCMOLT_GROUP_ID_EPON_LINK_MPCP_REG_ACK_TIMEOUT, BCMOLT_GROUP_ID_EPON_LINK_MPCP_REPORT_TIMEOUT, BCMOLT_GROUP_ID_EPON_LINK_OAM_KEEPALIVE_TIMEOUT, BCMOLT_GROUP_ID_EPON_LINK_OAM_KEEPALIVE_TIMER_STARTED, BCMOLT_GROUP_ID_EPON_LINK_OAM_KEEPALIVE_TIMER_STOPPED, BCMOLT_GROUP_ID_EPON_LINK_PREPROVISIONED_LINK_CREATED, BCMOLT_GROUP_ID_EPON_LINK_PROTECTION_SWITCH_OCCURRED, BCMOLT_GROUP_ID_EPON_LINK_RANGE_VALUE_CHANGED, BCMOLT_GROUP_ID_EPON_LINK_RERANGE_FAILURE, BCMOLT_GROUP_ID_EPON_LINK_STAT_ALARM_CLEARED, BCMOLT_GROUP_ID_EPON_LINK_STAT_ALARM_RAISED, BCMOLT_GROUP_ID_EPON_LINK_STATIC_REGISTRATION_DONE };
+static bcmolt_group_id group_ids_epon_link_auto_cfg[] = { BCMOLT_GROUP_ID_EPON_LINK_AUTO_CFG };
+static bcmolt_group_id group_ids_epon_link_oper[] = { BCMOLT_GROUP_ID_EPON_LINK_DELETE_LINK, BCMOLT_GROUP_ID_EPON_LINK_FORCE_REDISCOVERY, BCMOLT_GROUP_ID_EPON_LINK_KEY_EXCHANGE_START, BCMOLT_GROUP_ID_EPON_LINK_KEY_EXCHANGE_STOP, BCMOLT_GROUP_ID_EPON_LINK_OAM_KEEPALIVE_TIMER_START, BCMOLT_GROUP_ID_EPON_LINK_OAM_KEEPALIVE_TIMER_STOP, BCMOLT_GROUP_ID_EPON_LINK_STATIC_REGISTRATION };
+static bcmolt_group_id group_ids_epon_link_proxy[] = { BCMOLT_GROUP_ID_EPON_LINK_INJECT_FRAME };
+static bcmolt_group_id group_ids_epon_link_proxy_rx[] = { BCMOLT_GROUP_ID_EPON_LINK_FRAME_CAPTURED };
+static bcmolt_group_id group_ids_epon_ni_key[] = { BCMOLT_GROUP_ID_EPON_NI_KEY };
+static bcmolt_group_id group_ids_epon_ni_cfg[] = { BCMOLT_GROUP_ID_EPON_NI_CFG };
+static bcmolt_group_id group_ids_epon_ni_auto[] = { BCMOLT_GROUP_ID_EPON_NI_AUTO_ROGUE_SCAN_10G_FAILURE, BCMOLT_GROUP_ID_EPON_NI_AUTO_ROGUE_SCAN_1G_FAILURE, BCMOLT_GROUP_ID_EPON_NI_LLID_QUARANTINED, BCMOLT_GROUP_ID_EPON_NI_MPCP_TIMESTAMP_CHANGED, BCMOLT_GROUP_ID_EPON_NI_NO_REPORTS, BCMOLT_GROUP_ID_EPON_NI_ONU_UPGRADE_COMPLETE, BCMOLT_GROUP_ID_EPON_NI_RERANGE_FAILURE, BCMOLT_GROUP_ID_EPON_NI_ROGUE_SCAN_COMPLETE, BCMOLT_GROUP_ID_EPON_NI_RSSI_MEASUREMENT_COMPLETED, BCMOLT_GROUP_ID_EPON_NI_STATE_CHANGE_COMPLETED };
+static bcmolt_group_id group_ids_epon_ni_auto_cfg[] = { BCMOLT_GROUP_ID_EPON_NI_AUTO_CFG };
+static bcmolt_group_id group_ids_epon_ni_oper[] = { BCMOLT_GROUP_ID_EPON_NI_ADD_LINK, BCMOLT_GROUP_ID_EPON_NI_ADD_MULTICAST_LINK, BCMOLT_GROUP_ID_EPON_NI_ADD_PROTECTED_STANDBY_LINK, BCMOLT_GROUP_ID_EPON_NI_ISSUE_RSSI_GRANT, BCMOLT_GROUP_ID_EPON_NI_PROTECTION_SWITCHING_APPLY_RERANGE_DELTA, BCMOLT_GROUP_ID_EPON_NI_ROGUE_LLID_SCAN, BCMOLT_GROUP_ID_EPON_NI_SET_EPON_NI_EN_STATE, BCMOLT_GROUP_ID_EPON_NI_START_ONU_UPGRADE };
+static bcmolt_group_id group_ids_epon_onu_10g_us_key[] = { BCMOLT_GROUP_ID_EPON_ONU_10G_US_KEY };
+static bcmolt_group_id group_ids_epon_onu_10g_us_cfg[] = { BCMOLT_GROUP_ID_EPON_ONU_10G_US_CFG };
+static bcmolt_group_id group_ids_epon_onu_10g_us_stat[] = { BCMOLT_GROUP_ID_EPON_ONU_10G_US_STAT };
+static bcmolt_group_id group_ids_epon_onu_10g_us_stat_cfg[] = { BCMOLT_GROUP_ID_EPON_ONU_10G_US_STAT_CFG_FEC_CODE_WORDS_TOTAL, BCMOLT_GROUP_ID_EPON_ONU_10G_US_STAT_CFG_FEC_CODE_WORDS_DECODE_FAILS, BCMOLT_GROUP_ID_EPON_ONU_10G_US_STAT_CFG_FEC_ZEROES_CORRECTED, BCMOLT_GROUP_ID_EPON_ONU_10G_US_STAT_CFG_FEC_ONES_CORRECTED };
+static bcmolt_group_id group_ids_epon_onu_10g_us_auto[] = { BCMOLT_GROUP_ID_EPON_ONU_10G_US_STAT_ALARM_CLEARED, BCMOLT_GROUP_ID_EPON_ONU_10G_US_STAT_ALARM_RAISED };
+static bcmolt_group_id group_ids_epon_onu_10g_us_auto_cfg[] = { BCMOLT_GROUP_ID_EPON_ONU_10G_US_AUTO_CFG };
+static bcmolt_group_id group_ids_epon_onu_1g_us_key[] = { BCMOLT_GROUP_ID_EPON_ONU_1G_US_KEY };
+static bcmolt_group_id group_ids_epon_onu_1g_us_cfg[] = { BCMOLT_GROUP_ID_EPON_ONU_1G_US_CFG };
+static bcmolt_group_id group_ids_epon_onu_1g_us_stat[] = { BCMOLT_GROUP_ID_EPON_ONU_1G_US_STAT };
+static bcmolt_group_id group_ids_epon_onu_1g_us_stat_cfg[] = { BCMOLT_GROUP_ID_EPON_ONU_1G_US_STAT_CFG_GOOD_FRAMES, BCMOLT_GROUP_ID_EPON_ONU_1G_US_STAT_CFG_GOOD_BYTES, BCMOLT_GROUP_ID_EPON_ONU_1G_US_STAT_CFG_OVERSZ_FRAMES, BCMOLT_GROUP_ID_EPON_ONU_1G_US_STAT_CFG_NON_FEC_GOOD_FRAMES, BCMOLT_GROUP_ID_EPON_ONU_1G_US_STAT_CFG_NON_FEC_GOOD_BYTES, BCMOLT_GROUP_ID_EPON_ONU_1G_US_STAT_CFG_FEC_GOOD_FRAMES, BCMOLT_GROUP_ID_EPON_ONU_1G_US_STAT_CFG_FEC_GOOD_BYTES, BCMOLT_GROUP_ID_EPON_ONU_1G_US_STAT_CFG_FEC_FRAMES_EXC_ERRS, BCMOLT_GROUP_ID_EPON_ONU_1G_US_STAT_CFG_FEC_BLKS_NO_ERRS, BCMOLT_GROUP_ID_EPON_ONU_1G_US_STAT_CFG_FEC_BLKS_CORR_ERRS, BCMOLT_GROUP_ID_EPON_ONU_1G_US_STAT_CFG_FEC_BLKS_UNCORR_ERRS, BCMOLT_GROUP_ID_EPON_ONU_1G_US_STAT_CFG_FEC_CORR_BYTES, BCMOLT_GROUP_ID_EPON_ONU_1G_US_STAT_CFG_FEC_CORR_ZEROES, BCMOLT_GROUP_ID_EPON_ONU_1G_US_STAT_CFG_FEC_CORR_ONES, BCMOLT_GROUP_ID_EPON_ONU_1G_US_STAT_CFG_UNDERSZ_FRAMES, BCMOLT_GROUP_ID_EPON_ONU_1G_US_STAT_CFG_ERRORSZ_FRAMES };
+static bcmolt_group_id group_ids_epon_onu_1g_us_auto[] = { BCMOLT_GROUP_ID_EPON_ONU_1G_US_STAT_ALARM_CLEARED, BCMOLT_GROUP_ID_EPON_ONU_1G_US_STAT_ALARM_RAISED };
+static bcmolt_group_id group_ids_epon_onu_1g_us_auto_cfg[] = { BCMOLT_GROUP_ID_EPON_ONU_1G_US_AUTO_CFG };
+static bcmolt_group_id group_ids_epon_path_10g_ds_key[] = { BCMOLT_GROUP_ID_EPON_PATH_10G_DS_KEY };
+static bcmolt_group_id group_ids_epon_path_10g_ds_cfg[] = { BCMOLT_GROUP_ID_EPON_PATH_10G_DS_CFG };
+static bcmolt_group_id group_ids_epon_path_10g_ds_stat[] = { BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT };
+static bcmolt_group_id group_ids_epon_path_10g_ds_stat_cfg[] = { BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_CFG_BYTES, BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_CFG_FRAMES, BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_CFG_FRAMES_64, BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_CFG_FRAMES_65_127, BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_CFG_FRAMES_128_255, BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_CFG_FRAMES_256_511, BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_CFG_FRAMES_512_1023, BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_CFG_FRAMES_1024_1518, BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_CFG_FRAMES_1519_2047, BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_CFG_FRAMES_2048_4095, BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_CFG_FRAMES_4096_9216, BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_CFG_FRAMES_9217_16383, BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_CFG_BROADCAST_FRAMES, BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_CFG_DATA_BYTES, BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_CFG_MULTICAST_FRAMES, BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_CFG_UNICAST_FRAMES, BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_CFG_OAM_BYTES, BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_CFG_OAM_FRAMES, BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_CFG_GATE_FRAMES, BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_CFG_MPCP_FRAMES, BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_CFG_ABORT_FRAMES };
+static bcmolt_group_id group_ids_epon_path_10g_ds_auto[] = { BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_ALARM_CLEARED, BCMOLT_GROUP_ID_EPON_PATH_10G_DS_STAT_ALARM_RAISED };
+static bcmolt_group_id group_ids_epon_path_10g_ds_auto_cfg[] = { BCMOLT_GROUP_ID_EPON_PATH_10G_DS_AUTO_CFG };
+static bcmolt_group_id group_ids_epon_path_10g_us_key[] = { BCMOLT_GROUP_ID_EPON_PATH_10G_US_KEY };
+static bcmolt_group_id group_ids_epon_path_10g_us_cfg[] = { BCMOLT_GROUP_ID_EPON_PATH_10G_US_CFG };
+static bcmolt_group_id group_ids_epon_path_10g_us_stat[] = { BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT };
+static bcmolt_group_id group_ids_epon_path_10g_us_stat_cfg[] = { BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_BYTES, BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_FRAMES, BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_FRAMES_64, BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_FRAMES_65_127, BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_FRAMES_128_255, BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_FRAMES_256_511, BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_FRAMES_512_1023, BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_FRAMES_1024_1518, BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_FRAMES_1519_2047, BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_FRAMES_2048_4095, BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_FRAMES_4096_9216, BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_FRAMES_9217_16383, BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_BROADCAST_FRAMES, BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_DATA_BYTES, BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_MULTICAST_FRAMES, BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_UNICAST_FRAMES, BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_MPCP_FRAMES, BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_OAM_BYTES, BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_OAM_FRAMES, BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_REPORT_FRAMES, BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_ABORT_FRAMES, BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_FCS_ERROR, BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_CRC_8_ERROR, BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_OUT_OF_SLOT, BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_OVERSIZE_ERROR, BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_CFG_RUNT_ERROR };
+static bcmolt_group_id group_ids_epon_path_10g_us_auto[] = { BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_ALARM_CLEARED, BCMOLT_GROUP_ID_EPON_PATH_10G_US_STAT_ALARM_RAISED };
+static bcmolt_group_id group_ids_epon_path_10g_us_auto_cfg[] = { BCMOLT_GROUP_ID_EPON_PATH_10G_US_AUTO_CFG };
+static bcmolt_group_id group_ids_epon_path_1g_ds_key[] = { BCMOLT_GROUP_ID_EPON_PATH_1G_DS_KEY };
+static bcmolt_group_id group_ids_epon_path_1g_ds_cfg[] = { BCMOLT_GROUP_ID_EPON_PATH_1G_DS_CFG };
+static bcmolt_group_id group_ids_epon_path_1g_ds_stat[] = { BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT };
+static bcmolt_group_id group_ids_epon_path_1g_ds_stat_cfg[] = { BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_CFG_BYTES, BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_CFG_FRAMES, BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_CFG_FRAMES_64, BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_CFG_FRAMES_65_127, BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_CFG_FRAMES_128_255, BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_CFG_FRAMES_256_511, BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_CFG_FRAMES_512_1023, BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_CFG_FRAMES_1024_1518, BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_CFG_FRAMES_1519_2047, BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_CFG_FRAMES_2048_4095, BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_CFG_FRAMES_4096_9216, BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_CFG_FRAMES_9217_16383, BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_CFG_BROADCAST_FRAMES, BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_CFG_DATA_BYTES, BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_CFG_MULTICAST_FRAMES, BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_CFG_UNICAST_FRAMES, BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_CFG_OAM_BYTES, BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_CFG_OAM_FRAMES, BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_CFG_GATE_FRAMES, BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_CFG_MPCP_FRAMES, BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_CFG_ABORT_FRAMES };
+static bcmolt_group_id group_ids_epon_path_1g_ds_auto[] = { BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_ALARM_CLEARED, BCMOLT_GROUP_ID_EPON_PATH_1G_DS_STAT_ALARM_RAISED };
+static bcmolt_group_id group_ids_epon_path_1g_ds_auto_cfg[] = { BCMOLT_GROUP_ID_EPON_PATH_1G_DS_AUTO_CFG };
+static bcmolt_group_id group_ids_epon_path_1g_us_key[] = { BCMOLT_GROUP_ID_EPON_PATH_1G_US_KEY };
+static bcmolt_group_id group_ids_epon_path_1g_us_cfg[] = { BCMOLT_GROUP_ID_EPON_PATH_1G_US_CFG };
+static bcmolt_group_id group_ids_epon_path_1g_us_stat[] = { BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT };
+static bcmolt_group_id group_ids_epon_path_1g_us_stat_cfg[] = { BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_BYTES, BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_FRAMES, BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_FRAMES_64, BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_FRAMES_65_127, BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_FRAMES_128_255, BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_FRAMES_256_511, BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_FRAMES_512_1023, BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_FRAMES_1024_1518, BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_FRAMES_1519_2047, BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_FRAMES_2048_4095, BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_FRAMES_4096_9216, BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_FRAMES_9217_16383, BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_BROADCAST_FRAMES, BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_DATA_BYTES, BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_MULTICAST_FRAMES, BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_UNICAST_FRAMES, BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_MPCP_FRAMES, BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_OAM_BYTES, BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_OAM_FRAMES, BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_REPORT_FRAMES, BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_ABORT_FRAMES, BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_FCS_ERROR, BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_CRC_8_ERROR, BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_OUT_OF_SLOT, BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_OVERSIZE_ERROR, BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_CFG_RUNT_ERROR };
+static bcmolt_group_id group_ids_epon_path_1g_us_auto[] = { BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_ALARM_CLEARED, BCMOLT_GROUP_ID_EPON_PATH_1G_US_STAT_ALARM_RAISED };
+static bcmolt_group_id group_ids_epon_path_1g_us_auto_cfg[] = { BCMOLT_GROUP_ID_EPON_PATH_1G_US_AUTO_CFG };
+static bcmolt_group_id group_ids_epon_rp_key[] = { BCMOLT_GROUP_ID_EPON_RP_KEY };
+static bcmolt_group_id group_ids_epon_rp_cfg[] = { BCMOLT_GROUP_ID_EPON_RP_CFG };
+static bcmolt_group_id group_ids_gpio_key[] = { BCMOLT_GROUP_ID_GPIO_KEY };
+static bcmolt_group_id group_ids_gpio_cfg[] = { BCMOLT_GROUP_ID_GPIO_CFG };
+static bcmolt_group_id group_ids_gpon_alloc_key[] = { BCMOLT_GROUP_ID_GPON_ALLOC_KEY };
+static bcmolt_group_id group_ids_gpon_alloc_cfg[] = { BCMOLT_GROUP_ID_GPON_ALLOC_CFG };
+static bcmolt_group_id group_ids_gpon_alloc_stat[] = { BCMOLT_GROUP_ID_GPON_ALLOC_STAT };
+static bcmolt_group_id group_ids_gpon_alloc_stat_cfg[] = { BCMOLT_GROUP_ID_GPON_ALLOC_STAT_CFG_RX_BYTES };
+static bcmolt_group_id group_ids_gpon_alloc_auto[] = { BCMOLT_GROUP_ID_GPON_ALLOC_CONFIGURATION_COMPLETED, BCMOLT_GROUP_ID_GPON_ALLOC_GET_ALLOC_STATS_COMPLETED, BCMOLT_GROUP_ID_GPON_ALLOC_STAT_ALARM_CLEARED, BCMOLT_GROUP_ID_GPON_ALLOC_STAT_ALARM_RAISED };
+static bcmolt_group_id group_ids_gpon_alloc_auto_cfg[] = { BCMOLT_GROUP_ID_GPON_ALLOC_AUTO_CFG };
+static bcmolt_group_id group_ids_gpon_alloc_oper[] = { BCMOLT_GROUP_ID_GPON_ALLOC_GET_STATS, BCMOLT_GROUP_ID_GPON_ALLOC_SET_STATE };
+static bcmolt_group_id group_ids_gpon_gem_port_key[] = { BCMOLT_GROUP_ID_GPON_GEM_PORT_KEY };
+static bcmolt_group_id group_ids_gpon_gem_port_cfg[] = { BCMOLT_GROUP_ID_GPON_GEM_PORT_CFG };
+static bcmolt_group_id group_ids_gpon_gem_port_stat[] = { BCMOLT_GROUP_ID_GPON_GEM_PORT_STAT };
+static bcmolt_group_id group_ids_gpon_gem_port_stat_cfg[] = { BCMOLT_GROUP_ID_GPON_GEM_PORT_STAT_CFG_RX_PACKETS, BCMOLT_GROUP_ID_GPON_GEM_PORT_STAT_CFG_RX_BYTES, BCMOLT_GROUP_ID_GPON_GEM_PORT_STAT_CFG_TX_PACKETS, BCMOLT_GROUP_ID_GPON_GEM_PORT_STAT_CFG_TX_BYTES };
+static bcmolt_group_id group_ids_gpon_gem_port_auto[] = { BCMOLT_GROUP_ID_GPON_GEM_PORT_CONFIGURATION_COMPLETED, BCMOLT_GROUP_ID_GPON_GEM_PORT_STAT_ALARM_CLEARED, BCMOLT_GROUP_ID_GPON_GEM_PORT_STAT_ALARM_RAISED };
+static bcmolt_group_id group_ids_gpon_gem_port_auto_cfg[] = { BCMOLT_GROUP_ID_GPON_GEM_PORT_AUTO_CFG };
+static bcmolt_group_id group_ids_gpon_gem_port_oper[] = { BCMOLT_GROUP_ID_GPON_GEM_PORT_SET_STATE };
+static bcmolt_group_id group_ids_gpon_iwf_key[] = { BCMOLT_GROUP_ID_GPON_IWF_KEY };
+static bcmolt_group_id group_ids_gpon_iwf_cfg[] = { BCMOLT_GROUP_ID_GPON_IWF_CFG };
+static bcmolt_group_id group_ids_gpon_iwf_stat[] = { BCMOLT_GROUP_ID_GPON_IWF_STAT };
+static bcmolt_group_id group_ids_gpon_iwf_stat_cfg[] = { BCMOLT_GROUP_ID_GPON_IWF_STAT_CFG_DS_HIT_EVENT, BCMOLT_GROUP_ID_GPON_IWF_STAT_CFG_DS_MISS_EVENT, BCMOLT_GROUP_ID_GPON_IWF_STAT_CFG_DS_DROP_DUE_TO_MISS_EVENT, BCMOLT_GROUP_ID_GPON_IWF_STAT_CFG_DS_DROP_DUE_TO_HIT_EVENT, BCMOLT_GROUP_ID_GPON_IWF_STAT_CFG_DS_DROP_TO_DISABLED_GEM, BCMOLT_GROUP_ID_GPON_IWF_STAT_CFG_NEW_MAC_DISCOVERED, BCMOLT_GROUP_ID_GPON_IWF_STAT_CFG_MOVE_EVENT, BCMOLT_GROUP_ID_GPON_IWF_STAT_CFG_NEW_MAC_DROP_DUE_TO_FIFO_FULL };
+static bcmolt_group_id group_ids_gpon_iwf_auto[] = { BCMOLT_GROUP_ID_GPON_IWF_FLUSH_MAC_TABLE_COMPLETED, BCMOLT_GROUP_ID_GPON_IWF_SCAN_MAC_TABLE_COMPLETED, BCMOLT_GROUP_ID_GPON_IWF_STAT_ALARM_CLEARED, BCMOLT_GROUP_ID_GPON_IWF_STAT_ALARM_RAISED };
+static bcmolt_group_id group_ids_gpon_iwf_auto_cfg[] = { BCMOLT_GROUP_ID_GPON_IWF_AUTO_CFG };
+static bcmolt_group_id group_ids_gpon_iwf_oper[] = { BCMOLT_GROUP_ID_GPON_IWF_FLUSH_MAC_TABLE, BCMOLT_GROUP_ID_GPON_IWF_SCAN_MAC_TABLE };
+static bcmolt_group_id group_ids_gpon_iwf_ds_egress_flow_key[] = { BCMOLT_GROUP_ID_GPON_IWF_DS_EGRESS_FLOW_KEY };
+static bcmolt_group_id group_ids_gpon_iwf_ds_egress_flow_cfg[] = { BCMOLT_GROUP_ID_GPON_IWF_DS_EGRESS_FLOW_CFG };
+static bcmolt_group_id group_ids_gpon_iwf_ds_ingress_flow_key[] = { BCMOLT_GROUP_ID_GPON_IWF_DS_INGRESS_FLOW_KEY };
+static bcmolt_group_id group_ids_gpon_iwf_ds_ingress_flow_cfg[] = { BCMOLT_GROUP_ID_GPON_IWF_DS_INGRESS_FLOW_CFG };
+static bcmolt_group_id group_ids_gpon_iwf_mac_table_key[] = { BCMOLT_GROUP_ID_GPON_IWF_MAC_TABLE_KEY };
+static bcmolt_group_id group_ids_gpon_iwf_mac_table_cfg[] = { BCMOLT_GROUP_ID_GPON_IWF_MAC_TABLE_CFG };
+static bcmolt_group_id group_ids_gpon_iwf_mac_table_auto[] = { BCMOLT_GROUP_ID_GPON_IWF_MAC_TABLE_MAC_AGED, BCMOLT_GROUP_ID_GPON_IWF_MAC_TABLE_MAC_DROPPED, BCMOLT_GROUP_ID_GPON_IWF_MAC_TABLE_MAC_MOVE, BCMOLT_GROUP_ID_GPON_IWF_MAC_TABLE_NEW_MAC };
+static bcmolt_group_id group_ids_gpon_iwf_mac_table_auto_cfg[] = { BCMOLT_GROUP_ID_GPON_IWF_MAC_TABLE_AUTO_CFG };
+static bcmolt_group_id group_ids_gpon_iwf_us_flow_key[] = { BCMOLT_GROUP_ID_GPON_IWF_US_FLOW_KEY };
+static bcmolt_group_id group_ids_gpon_iwf_us_flow_cfg[] = { BCMOLT_GROUP_ID_GPON_IWF_US_FLOW_CFG };
+static bcmolt_group_id group_ids_gpon_ni_key[] = { BCMOLT_GROUP_ID_GPON_NI_KEY };
+static bcmolt_group_id group_ids_gpon_ni_cfg[] = { BCMOLT_GROUP_ID_GPON_NI_CFG };
+static bcmolt_group_id group_ids_gpon_ni_stat[] = { BCMOLT_GROUP_ID_GPON_NI_STAT };
+static bcmolt_group_id group_ids_gpon_ni_stat_cfg[] = { BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_FEC_CODEWORDS, BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_FEC_CODEWORDS_UNCORRECTED, BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_BIP8_BYTES, BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_BIP8_ERRORS, BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_RX_GEM_PACKETS, BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_RX_GEM_DROPPED, BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_RX_GEM_IDLE, BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_RX_GEM_CORRECTED, BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_RX_GEM_ILLEGAL, BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_RX_ALLOCATIONS_VALID, BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_RX_ALLOCATIONS_INVALID, BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_RX_ALLOCATIONS_DISABLED, BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_RX_PLOAMS, BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_RX_PLOAMS_NON_IDLE, BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_RX_PLOAMS_ERROR, BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_RX_PLOAMS_DROPPED, BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_RX_CPU, BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_RX_OMCI, BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_RX_OMCI_PACKETS_CRC_ERROR, BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_RX_DROPPED_TOO_SHORT, BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_RX_DROPPED_TOO_LONG, BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_RX_CRC_ERRORS, BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_RX_KEY_ERRORS, BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_RX_FRAGMENTS_ERRORS, BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_RX_PACKETS_DROPPED, BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_TX_GEM, BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_TX_PLOAMS, BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_TX_GEM_FRAGMENTS, BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_TX_CPU, BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_TX_OMCI, BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_TX_CPU_OMCI_PACKETS_DROPPED, BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_TX_DROPPED_ILLEGAL_LENGTH, BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_TX_DROPPED_TPID_MISS, BCMOLT_GROUP_ID_GPON_NI_STAT_CFG_TX_DROPPED_VID_MISS };
+static bcmolt_group_id group_ids_gpon_ni_auto[] = { BCMOLT_GROUP_ID_GPON_NI_ACTIVATE_ALL_ONUS_COMPLETED, BCMOLT_GROUP_ID_GPON_NI_CPU_PACKETS_FAILURE, BCMOLT_GROUP_ID_GPON_NI_DEACTIVATE_ALL_ONUS_COMPLETED, BCMOLT_GROUP_ID_GPON_NI_DISABLE_ALL_ONUS_COMPLETED, BCMOLT_GROUP_ID_GPON_NI_ENABLE_ALL_ONUS_COMPLETED, BCMOLT_GROUP_ID_GPON_NI_LOS, BCMOLT_GROUP_ID_GPON_NI_ONU_DISCOVERED, BCMOLT_GROUP_ID_GPON_NI_ONU_UPGRADE_COMPLETE, BCMOLT_GROUP_ID_GPON_NI_PROTECTION_SWITCHING_ONUS_RANGED, BCMOLT_GROUP_ID_GPON_NI_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED, BCMOLT_GROUP_ID_GPON_NI_PROTECTION_SWITCHING_TRAFFIC_RESUME, BCMOLT_GROUP_ID_GPON_NI_ROGUE_DETECTION_COMPLETED, BCMOLT_GROUP_ID_GPON_NI_ROGUE_ONU_SPECIAL_MAP_CYCLE_START, BCMOLT_GROUP_ID_GPON_NI_SERIAL_NUMBER_ACQUISITION_CYCLE_START, BCMOLT_GROUP_ID_GPON_NI_STANDBY_PON_MONITORING_CYCLE_COMPLETED, BCMOLT_GROUP_ID_GPON_NI_STAT_ALARM_CLEARED, BCMOLT_GROUP_ID_GPON_NI_STAT_ALARM_RAISED, BCMOLT_GROUP_ID_GPON_NI_STATE_CHANGE_COMPLETED, BCMOLT_GROUP_ID_GPON_NI_TOD_REQUEST_COMPLETED };
+static bcmolt_group_id group_ids_gpon_ni_auto_cfg[] = { BCMOLT_GROUP_ID_GPON_NI_AUTO_CFG };
+static bcmolt_group_id group_ids_gpon_ni_oper[] = { BCMOLT_GROUP_ID_GPON_NI_DISABLE_SERIAL_NUMBER, BCMOLT_GROUP_ID_GPON_NI_PROTECTION_SWITCHING_TYPE_C_SET_MULTIPLE_ONU_STATE, BCMOLT_GROUP_ID_GPON_NI_RESET, BCMOLT_GROUP_ID_GPON_NI_ROGUE_DETECTION_WINDOW, BCMOLT_GROUP_ID_GPON_NI_SET_ONU_STATE, BCMOLT_GROUP_ID_GPON_NI_SET_PON_STATE, BCMOLT_GROUP_ID_GPON_NI_SINGLE_REQUEST_STANDBY_PON_MONITORING, BCMOLT_GROUP_ID_GPON_NI_START_ONU_UPGRADE, BCMOLT_GROUP_ID_GPON_NI_TOD_REQUEST };
+static bcmolt_group_id group_ids_gpon_ni_proxy[] = { BCMOLT_GROUP_ID_GPON_NI_BROADCAST_PLOAM_PACKET, BCMOLT_GROUP_ID_GPON_NI_CPU_PACKETS };
+static bcmolt_group_id group_ids_gpon_onu_key[] = { BCMOLT_GROUP_ID_GPON_ONU_KEY };
+static bcmolt_group_id group_ids_gpon_onu_cfg[] = { BCMOLT_GROUP_ID_GPON_ONU_CFG };
+static bcmolt_group_id group_ids_gpon_onu_stat[] = { BCMOLT_GROUP_ID_GPON_ONU_STAT };
+static bcmolt_group_id group_ids_gpon_onu_stat_cfg[] = { BCMOLT_GROUP_ID_GPON_ONU_STAT_CFG_FEC_CODEWORDS, BCMOLT_GROUP_ID_GPON_ONU_STAT_CFG_FEC_BYTES_CORRECTED, BCMOLT_GROUP_ID_GPON_ONU_STAT_CFG_FEC_CODEWORDS_CORRECTED, BCMOLT_GROUP_ID_GPON_ONU_STAT_CFG_FEC_CODEWORDS_UNCORRECTED, BCMOLT_GROUP_ID_GPON_ONU_STAT_CFG_BIP8_BYTES, BCMOLT_GROUP_ID_GPON_ONU_STAT_CFG_BIP8_ERRORS, BCMOLT_GROUP_ID_GPON_ONU_STAT_CFG_RX_PLOAMS_CRC_ERROR, BCMOLT_GROUP_ID_GPON_ONU_STAT_CFG_RX_PLOAMS_NON_IDLE, BCMOLT_GROUP_ID_GPON_ONU_STAT_CFG_POSITIVE_DRIFT, BCMOLT_GROUP_ID_GPON_ONU_STAT_CFG_NEGATIVE_DRIFT, BCMOLT_GROUP_ID_GPON_ONU_STAT_CFG_RX_OMCI, BCMOLT_GROUP_ID_GPON_ONU_STAT_CFG_RX_OMCI_PACKETS_CRC_ERROR, BCMOLT_GROUP_ID_GPON_ONU_STAT_CFG_BER_REPORTED, BCMOLT_GROUP_ID_GPON_ONU_STAT_CFG_UNRECEIVED_BURST, BCMOLT_GROUP_ID_GPON_ONU_STAT_CFG_LCDG_ERRORS, BCMOLT_GROUP_ID_GPON_ONU_STAT_CFG_RDI_ERRORS, BCMOLT_GROUP_ID_GPON_ONU_STAT_CFG_RX_BYTES, BCMOLT_GROUP_ID_GPON_ONU_STAT_CFG_RX_PACKETS, BCMOLT_GROUP_ID_GPON_ONU_STAT_CFG_TX_BYTES, BCMOLT_GROUP_ID_GPON_ONU_STAT_CFG_TX_PACKETS };
+static bcmolt_group_id group_ids_gpon_onu_auto[] = { BCMOLT_GROUP_ID_GPON_ONU_BER_INTERVAL_CONFIGURATION_COMPLETED, BCMOLT_GROUP_ID_GPON_ONU_DFI, BCMOLT_GROUP_ID_GPON_ONU_DGI, BCMOLT_GROUP_ID_GPON_ONU_DOWI, BCMOLT_GROUP_ID_GPON_ONU_ERR, BCMOLT_GROUP_ID_GPON_ONU_INVALID_DBRU_REPORT, BCMOLT_GROUP_ID_GPON_ONU_KEY_EXCHANGE_COMPLETED, BCMOLT_GROUP_ID_GPON_ONU_KEY_EXCHANGE_CYCLE_SKIPPED, BCMOLT_GROUP_ID_GPON_ONU_KEY_EXCHANGE_DECRYPT_REQUIRED, BCMOLT_GROUP_ID_GPON_ONU_KEY_EXCHANGE_KEY_MISMATCH, BCMOLT_GROUP_ID_GPON_ONU_KEY_EXCHANGE_KEY_REQUEST_TIMEOUT, BCMOLT_GROUP_ID_GPON_ONU_KEY_EXCHANGE_UNCONSECUTIVE_INDEX, BCMOLT_GROUP_ID_GPON_ONU_LOAI, BCMOLT_GROUP_ID_GPON_ONU_LOKI, BCMOLT_GROUP_ID_GPON_ONU_MEMI, BCMOLT_GROUP_ID_GPON_ONU_OMCI_PORT_ID_CONFIGURATION_COMPLETED, BCMOLT_GROUP_ID_GPON_ONU_ONU_ACTIVATION_COMPLETED, BCMOLT_GROUP_ID_GPON_ONU_ONU_ACTIVATION_STANDBY_COMPLETED, BCMOLT_GROUP_ID_GPON_ONU_ONU_ALARM, BCMOLT_GROUP_ID_GPON_ONU_ONU_DEACTIVATION_COMPLETED, BCMOLT_GROUP_ID_GPON_ONU_ONU_DISABLE_COMPLETED, BCMOLT_GROUP_ID_GPON_ONU_ONU_ENABLE_COMPLETED, BCMOLT_GROUP_ID_GPON_ONU_OPTICAL_REFLECTION, BCMOLT_GROUP_ID_GPON_ONU_PASSWORD_AUTHENTICATION_COMPLETED, BCMOLT_GROUP_ID_GPON_ONU_PEE, BCMOLT_GROUP_ID_GPON_ONU_POSSIBLE_DRIFT, BCMOLT_GROUP_ID_GPON_ONU_POWER_MANAGEMENT_STATE_CHANGE, BCMOLT_GROUP_ID_GPON_ONU_PST, BCMOLT_GROUP_ID_GPON_ONU_RANGING_COMPLETED, BCMOLT_GROUP_ID_GPON_ONU_REI, BCMOLT_GROUP_ID_GPON_ONU_RSSI_MEASUREMENT_COMPLETED, BCMOLT_GROUP_ID_GPON_ONU_SDI, BCMOLT_GROUP_ID_GPON_ONU_SFI, BCMOLT_GROUP_ID_GPON_ONU_STAT_ALARM_CLEARED, BCMOLT_GROUP_ID_GPON_ONU_STAT_ALARM_RAISED, BCMOLT_GROUP_ID_GPON_ONU_SUFI, BCMOLT_GROUP_ID_GPON_ONU_TIWI };
+static bcmolt_group_id group_ids_gpon_onu_auto_cfg[] = { BCMOLT_GROUP_ID_GPON_ONU_AUTO_CFG };
+static bcmolt_group_id group_ids_gpon_onu_oper[] = { BCMOLT_GROUP_ID_GPON_ONU_CHANGE_POWER_LEVEL, BCMOLT_GROUP_ID_GPON_ONU_RSSI_MEASUREMENT, BCMOLT_GROUP_ID_GPON_ONU_SET_ONU_STATE };
+static bcmolt_group_id group_ids_gpon_onu_proxy[] = { BCMOLT_GROUP_ID_GPON_ONU_CPU_PACKETS, BCMOLT_GROUP_ID_GPON_ONU_PLOAM_PACKET };
+static bcmolt_group_id group_ids_gpon_onu_proxy_rx[] = { BCMOLT_GROUP_ID_GPON_ONU_CPU_PACKET, BCMOLT_GROUP_ID_GPON_ONU_OMCI_PACKET };
+static bcmolt_group_id group_ids_gpon_trx_key[] = { BCMOLT_GROUP_ID_GPON_TRX_KEY };
+static bcmolt_group_id group_ids_gpon_trx_cfg[] = { BCMOLT_GROUP_ID_GPON_TRX_CFG };
+static bcmolt_group_id group_ids_log_entry_key[] = { BCMOLT_GROUP_ID_LOG_ENTRY_KEY };
+static bcmolt_group_id group_ids_log_entry_cfg[] = { BCMOLT_GROUP_ID_LOG_ENTRY_CFG };
+static bcmolt_group_id group_ids_log_entry_stat[] = { BCMOLT_GROUP_ID_LOG_ENTRY_STAT };
+static bcmolt_group_id group_ids_log_entry_stat_cfg[] = { BCMOLT_GROUP_ID_LOG_ENTRY_STAT_CFG_MSG_COUNT, BCMOLT_GROUP_ID_LOG_ENTRY_STAT_CFG_LOST_MSG_COUNT };
+static bcmolt_group_id group_ids_log_entry_auto[] = { BCMOLT_GROUP_ID_LOG_ENTRY_STAT_ALARM_CLEARED, BCMOLT_GROUP_ID_LOG_ENTRY_STAT_ALARM_RAISED };
+static bcmolt_group_id group_ids_log_entry_auto_cfg[] = { BCMOLT_GROUP_ID_LOG_ENTRY_AUTO_CFG };
+static bcmolt_group_id group_ids_logger_key[] = { BCMOLT_GROUP_ID_LOGGER_KEY };
+static bcmolt_group_id group_ids_logger_cfg[] = { BCMOLT_GROUP_ID_LOGGER_CFG };
+static bcmolt_group_id group_ids_logger_stat[] = { BCMOLT_GROUP_ID_LOGGER_STAT };
+static bcmolt_group_id group_ids_logger_stat_cfg[] = { BCMOLT_GROUP_ID_LOGGER_STAT_CFG_LINES_IN_LOG };
+static bcmolt_group_id group_ids_logger_auto[] = { BCMOLT_GROUP_ID_LOGGER_STAT_ALARM_CLEARED, BCMOLT_GROUP_ID_LOGGER_STAT_ALARM_RAISED };
+static bcmolt_group_id group_ids_logger_auto_cfg[] = { BCMOLT_GROUP_ID_LOGGER_AUTO_CFG };
+static bcmolt_group_id group_ids_logger_oper[] = { BCMOLT_GROUP_ID_LOGGER_CLEAR_LOG };
+static bcmolt_group_id group_ids_nni_key[] = { BCMOLT_GROUP_ID_NNI_KEY };
+static bcmolt_group_id group_ids_nni_cfg[] = { BCMOLT_GROUP_ID_NNI_CFG };
+static bcmolt_group_id group_ids_nni_stat[] = { BCMOLT_GROUP_ID_NNI_STAT };
+static bcmolt_group_id group_ids_nni_stat_cfg[] = { BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_FRAMES_64, BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_FRAMES_65_127, BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_FRAMES_128_255, BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_FRAMES_256_511, BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_FRAMES_512_1023, BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_FRAMES_1024_1518, BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_FRAMES_1519_2047, BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_FRAMES_2048_4095, BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_FRAMES_4096_9216, BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_FRAMES_9217_16383, BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_FRAMES, BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_BYTES, BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_GOOD_FRAMES, BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_UNICAST_FRAMES, BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_MULTICAST_FRAMES, BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_BROADCAST_FRAMES, BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_FCS_ERRORS, BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_CONTROL_FRAMES, BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_PAUSE_FRAMES, BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_PFC_FRAMES, BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_UNSUPPORTED_OPCODE, BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_UNSUPPORTED_DA, BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_ALIGNMENT_ERRORS, BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_LENGTH_OUT_OF_RANGE, BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_CODE_ERRORS, BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_OVERSIZED_FRAMES, BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_JABBER_FRAMES, BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_MTU_CHECK_ERRORS, BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_PROMISCUOUS_FRAMES, BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_VLAN_FRAMES, BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_DOUBLE_VLAN_FRAMES, BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_TRUNCATED_FRAMES, BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_UNDERSIZE_FRAMES, BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_FRAGMENTED_FRAMES, BCMOLT_GROUP_ID_NNI_STAT_CFG_RX_RUNT_FRAMES, BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_FRAMES_64, BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_FRAMES_65_127, BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_FRAMES_128_255, BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_FRAMES_256_511, BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_FRAMES_512_1023, BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_FRAMES_1024_1518, BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_FRAMES_1519_2047, BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_FRAMES_2048_4095, BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_FRAMES_4096_9216, BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_FRAMES_9217_16383, BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_FRAMES, BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_BYTES, BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_GOOD_FRAMES, BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_UNICAST_FRAMES, BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_MULTICAST_FRAMES, BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_BROADCAST_FRAMES, BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_PAUSE_FRAMES, BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_PFC_FRAMES, BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_JABBER_FRAMES, BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_FCS_ERRORS, BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_CONTROL_FRAMES, BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_OVERSIZE_FRAMES, BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_FRAGMENTED_FRAMES, BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_ERROR_FRAMES, BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_VLAN_FRAMES, BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_DOUBLE_VLAN_FRAMES, BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_RUNT_FRAMES, BCMOLT_GROUP_ID_NNI_STAT_CFG_TX_UNDERRUN_FRAMES };
+static bcmolt_group_id group_ids_nni_auto[] = { BCMOLT_GROUP_ID_NNI_STAT_ALARM_CLEARED, BCMOLT_GROUP_ID_NNI_STAT_ALARM_RAISED, BCMOLT_GROUP_ID_NNI_STATUS_CHANGED };
+static bcmolt_group_id group_ids_nni_auto_cfg[] = { BCMOLT_GROUP_ID_NNI_AUTO_CFG };
+static bcmolt_group_id group_ids_nni_serdes_key[] = { BCMOLT_GROUP_ID_NNI_SERDES_KEY };
+static bcmolt_group_id group_ids_nni_serdes_cfg[] = { BCMOLT_GROUP_ID_NNI_SERDES_CFG };
+static bcmolt_group_id group_ids_software_error_key[] = { BCMOLT_GROUP_ID_SOFTWARE_ERROR_KEY };
+static bcmolt_group_id group_ids_software_error_cfg[] = { BCMOLT_GROUP_ID_SOFTWARE_ERROR_CFG };
+static bcmolt_group_id group_ids_trx_calibration_key[] = { BCMOLT_GROUP_ID_TRX_CALIBRATION_KEY };
+static bcmolt_group_id group_ids_trx_calibration_auto[] = { BCMOLT_GROUP_ID_TRX_CALIBRATION_CAPTURE_WINDOW_AND_STATISTIC_COMPLETED };
+static bcmolt_group_id group_ids_trx_calibration_auto_cfg[] = { BCMOLT_GROUP_ID_TRX_CALIBRATION_AUTO_CFG };
+static bcmolt_group_id group_ids_trx_calibration_oper[] = { BCMOLT_GROUP_ID_TRX_CALIBRATION_START_CAPTURE_WINDOW, BCMOLT_GROUP_ID_TRX_CALIBRATION_STOP_CAPTURE_WINDOW };
+static bcmolt_group_id group_ids_xgpon_alloc_key[] = { BCMOLT_GROUP_ID_XGPON_ALLOC_KEY };
+static bcmolt_group_id group_ids_xgpon_alloc_cfg[] = { BCMOLT_GROUP_ID_XGPON_ALLOC_CFG };
+static bcmolt_group_id group_ids_xgpon_alloc_stat[] = { BCMOLT_GROUP_ID_XGPON_ALLOC_STAT };
+static bcmolt_group_id group_ids_xgpon_alloc_stat_cfg[] = { BCMOLT_GROUP_ID_XGPON_ALLOC_STAT_CFG_RX_BYTES };
+static bcmolt_group_id group_ids_xgpon_alloc_auto[] = { BCMOLT_GROUP_ID_XGPON_ALLOC_CONFIGURATION_COMPLETED, BCMOLT_GROUP_ID_XGPON_ALLOC_GET_ALLOC_STATS_COMPLETED, BCMOLT_GROUP_ID_XGPON_ALLOC_STAT_ALARM_CLEARED, BCMOLT_GROUP_ID_XGPON_ALLOC_STAT_ALARM_RAISED };
+static bcmolt_group_id group_ids_xgpon_alloc_auto_cfg[] = { BCMOLT_GROUP_ID_XGPON_ALLOC_AUTO_CFG };
+static bcmolt_group_id group_ids_xgpon_alloc_oper[] = { BCMOLT_GROUP_ID_XGPON_ALLOC_GET_STATS, BCMOLT_GROUP_ID_XGPON_ALLOC_SET_STATE };
+static bcmolt_group_id group_ids_xgpon_gem_port_key[] = { BCMOLT_GROUP_ID_XGPON_GEM_PORT_KEY };
+static bcmolt_group_id group_ids_xgpon_gem_port_cfg[] = { BCMOLT_GROUP_ID_XGPON_GEM_PORT_CFG };
+static bcmolt_group_id group_ids_xgpon_gem_port_stat[] = { BCMOLT_GROUP_ID_XGPON_GEM_PORT_STAT };
+static bcmolt_group_id group_ids_xgpon_gem_port_stat_cfg[] = { BCMOLT_GROUP_ID_XGPON_GEM_PORT_STAT_CFG_TX_BYTES, BCMOLT_GROUP_ID_XGPON_GEM_PORT_STAT_CFG_TX_PACKETS, BCMOLT_GROUP_ID_XGPON_GEM_PORT_STAT_CFG_RX_PACKETS, BCMOLT_GROUP_ID_XGPON_GEM_PORT_STAT_CFG_RX_BYTES };
+static bcmolt_group_id group_ids_xgpon_gem_port_auto[] = { BCMOLT_GROUP_ID_XGPON_GEM_PORT_STAT_ALARM_CLEARED, BCMOLT_GROUP_ID_XGPON_GEM_PORT_STAT_ALARM_RAISED };
+static bcmolt_group_id group_ids_xgpon_gem_port_auto_cfg[] = { BCMOLT_GROUP_ID_XGPON_GEM_PORT_AUTO_CFG };
+static bcmolt_group_id group_ids_xgpon_iwf_key[] = { BCMOLT_GROUP_ID_XGPON_IWF_KEY };
+static bcmolt_group_id group_ids_xgpon_iwf_cfg[] = { BCMOLT_GROUP_ID_XGPON_IWF_CFG };
+static bcmolt_group_id group_ids_xgpon_ni_key[] = { BCMOLT_GROUP_ID_XGPON_NI_KEY };
+static bcmolt_group_id group_ids_xgpon_ni_cfg[] = { BCMOLT_GROUP_ID_XGPON_NI_CFG };
+static bcmolt_group_id group_ids_xgpon_ni_stat[] = { BCMOLT_GROUP_ID_XGPON_NI_STAT };
+static bcmolt_group_id group_ids_xgpon_ni_stat_cfg[] = { BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_FEC_CODEWORDS, BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_BIP32_BYTES, BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_BIP32_ERRORS, BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_XGTC_HEADERS, BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_XGTC_CORRECTED, BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_XGTC_UNCORRECTED, BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_XGEM, BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_XGEM_DROPPED, BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_XGEM_IDLE, BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_XGEM_CORRECTED, BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_CRC_ERROR, BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_FRAGMENT_ERROR, BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_PACKETS_DROPPED, BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_DROPPED_TOO_SHORT, BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_DROPPED_TOO_LONG, BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_KEY_ERROR, BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_TX_PLOAMS, BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_PLOAMS_DROPPED, BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_ALLOCATIONS_VALID, BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_ALLOCATIONS_INVALID, BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_ALLOCATIONS_DISABLED, BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_PLOAMS, BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_PLOAMS_NON_IDLE, BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_PLOAMS_ERROR, BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_CPU, BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_OMCI, BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_RX_OMCI_PACKETS_CRC_ERROR, BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_TX_PACKETS, BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_TX_XGEM, BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_TX_CPU, BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_TX_OMCI, BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_TX_CPU_OMCI_PACKETS_DROPPED, BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_TX_DROPPED_ILLEGAL_LENGTH, BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_TX_DROPPED_TPID_MISS, BCMOLT_GROUP_ID_XGPON_NI_STAT_CFG_TX_DROPPED_VID_MISS };
+static bcmolt_group_id group_ids_xgpon_ni_auto[] = { BCMOLT_GROUP_ID_XGPON_NI_ACTIVATE_ALL_ONUS_COMPLETED, BCMOLT_GROUP_ID_XGPON_NI_CPU_PACKETS_FAILURE, BCMOLT_GROUP_ID_XGPON_NI_DEACTIVATE_ALL_ONUS_COMPLETED, BCMOLT_GROUP_ID_XGPON_NI_DISABLE_ALL_ONUS_COMPLETED, BCMOLT_GROUP_ID_XGPON_NI_ENABLE_ALL_ONUS_COMPLETED, BCMOLT_GROUP_ID_XGPON_NI_LOS, BCMOLT_GROUP_ID_XGPON_NI_ONU_DISCOVERED, BCMOLT_GROUP_ID_XGPON_NI_ONU_UPGRADE_COMPLETE, BCMOLT_GROUP_ID_XGPON_NI_PROTECTION_SWITCHING_ONUS_RANGED, BCMOLT_GROUP_ID_XGPON_NI_PROTECTION_SWITCHING_SWITCHOVER_COMPLETED, BCMOLT_GROUP_ID_XGPON_NI_PROTECTION_SWITCHING_TRAFFIC_RESUME, BCMOLT_GROUP_ID_XGPON_NI_ROGUE_DETECTION_COMPLETED, BCMOLT_GROUP_ID_XGPON_NI_ROGUE_ONU_SPECIAL_MAP_CYCLE_START, BCMOLT_GROUP_ID_XGPON_NI_SERIAL_NUMBER_ACQUISITION_CYCLE_START, BCMOLT_GROUP_ID_XGPON_NI_STANDBY_PON_MONITORING_CYCLE_COMPLETED, BCMOLT_GROUP_ID_XGPON_NI_STAT_ALARM_CLEARED, BCMOLT_GROUP_ID_XGPON_NI_STAT_ALARM_RAISED, BCMOLT_GROUP_ID_XGPON_NI_STATE_CHANGE_COMPLETED, BCMOLT_GROUP_ID_XGPON_NI_TOD_REQUEST_COMPLETED };
+static bcmolt_group_id group_ids_xgpon_ni_auto_cfg[] = { BCMOLT_GROUP_ID_XGPON_NI_AUTO_CFG };
+static bcmolt_group_id group_ids_xgpon_ni_oper[] = { BCMOLT_GROUP_ID_XGPON_NI_ADJUST_TX_WAVELENGTH, BCMOLT_GROUP_ID_XGPON_NI_DISABLE_SERIAL_NUMBER, BCMOLT_GROUP_ID_XGPON_NI_RESET, BCMOLT_GROUP_ID_XGPON_NI_ROGUE_DETECTION_WINDOW, BCMOLT_GROUP_ID_XGPON_NI_RUN_SPECIAL_BW_MAP, BCMOLT_GROUP_ID_XGPON_NI_SET_ONU_STATE, BCMOLT_GROUP_ID_XGPON_NI_SET_PON_STATE, BCMOLT_GROUP_ID_XGPON_NI_SINGLE_REQUEST_STANDBY_PON_MONITORING, BCMOLT_GROUP_ID_XGPON_NI_START_ONU_UPGRADE, BCMOLT_GROUP_ID_XGPON_NI_TOD_REQUEST };
+static bcmolt_group_id group_ids_xgpon_ni_proxy[] = { BCMOLT_GROUP_ID_XGPON_NI_BROADCAST_PLOAM_PACKET, BCMOLT_GROUP_ID_XGPON_NI_CPU_PACKETS };
+static bcmolt_group_id group_ids_xgpon_onu_key[] = { BCMOLT_GROUP_ID_XGPON_ONU_KEY };
+static bcmolt_group_id group_ids_xgpon_onu_cfg[] = { BCMOLT_GROUP_ID_XGPON_ONU_CFG };
+static bcmolt_group_id group_ids_xgpon_onu_stat[] = { BCMOLT_GROUP_ID_XGPON_ONU_STAT };
+static bcmolt_group_id group_ids_xgpon_onu_stat_cfg[] = { BCMOLT_GROUP_ID_XGPON_ONU_STAT_CFG_POSITIVE_DRIFT, BCMOLT_GROUP_ID_XGPON_ONU_STAT_CFG_NEGATIVE_DRIFT, BCMOLT_GROUP_ID_XGPON_ONU_STAT_CFG_DELIMITER_MISS_DETECTION, BCMOLT_GROUP_ID_XGPON_ONU_STAT_CFG_BIP32_ERRORS, BCMOLT_GROUP_ID_XGPON_ONU_STAT_CFG_RX_WORDS, BCMOLT_GROUP_ID_XGPON_ONU_STAT_CFG_FEC_CORRECTED_SYMBOLS, BCMOLT_GROUP_ID_XGPON_ONU_STAT_CFG_FEC_CORRECTED_CODEWORDS, BCMOLT_GROUP_ID_XGPON_ONU_STAT_CFG_FEC_UNCORRECTABLE_CODEWORDS, BCMOLT_GROUP_ID_XGPON_ONU_STAT_CFG_FEC_CODEWORDS, BCMOLT_GROUP_ID_XGPON_ONU_STAT_CFG_FEC_CORRECTED_BITS, BCMOLT_GROUP_ID_XGPON_ONU_STAT_CFG_XGEM_KEY_ERRORS, BCMOLT_GROUP_ID_XGPON_ONU_STAT_CFG_XGEM_LOSS, BCMOLT_GROUP_ID_XGPON_ONU_STAT_CFG_RX_PLOAMS_MIC_ERROR, BCMOLT_GROUP_ID_XGPON_ONU_STAT_CFG_RX_PLOAMS_NON_IDLE, BCMOLT_GROUP_ID_XGPON_ONU_STAT_CFG_RX_OMCI, BCMOLT_GROUP_ID_XGPON_ONU_STAT_CFG_RX_OMCI_PACKETS_CRC_ERROR, BCMOLT_GROUP_ID_XGPON_ONU_STAT_CFG_RX_BYTES, BCMOLT_GROUP_ID_XGPON_ONU_STAT_CFG_RX_PACKETS, BCMOLT_GROUP_ID_XGPON_ONU_STAT_CFG_TX_BYTES, BCMOLT_GROUP_ID_XGPON_ONU_STAT_CFG_TX_PACKETS };
+static bcmolt_group_id group_ids_xgpon_onu_auto[] = { BCMOLT_GROUP_ID_XGPON_ONU_DFI, BCMOLT_GROUP_ID_XGPON_ONU_DGI, BCMOLT_GROUP_ID_XGPON_ONU_DOWI, BCMOLT_GROUP_ID_XGPON_ONU_INVALID_DBRU_REPORT, BCMOLT_GROUP_ID_XGPON_ONU_KEY_EXCHANGE_COMPLETED, BCMOLT_GROUP_ID_XGPON_ONU_KEY_EXCHANGE_CYCLE_SKIPPED, BCMOLT_GROUP_ID_XGPON_ONU_KEY_EXCHANGE_KEY_MISMATCH, BCMOLT_GROUP_ID_XGPON_ONU_KEY_EXCHANGE_KEY_REQUEST_TIMEOUT, BCMOLT_GROUP_ID_XGPON_ONU_LOOCI, BCMOLT_GROUP_ID_XGPON_ONU_ONU_ACTIVATION_COMPLETED, BCMOLT_GROUP_ID_XGPON_ONU_ONU_ALARM, BCMOLT_GROUP_ID_XGPON_ONU_ONU_DEACTIVATION_COMPLETED, BCMOLT_GROUP_ID_XGPON_ONU_ONU_DISABLE_COMPLETED, BCMOLT_GROUP_ID_XGPON_ONU_ONU_ENABLE_COMPLETED, BCMOLT_GROUP_ID_XGPON_ONU_ONU_TUNING_IN_COMPLETED, BCMOLT_GROUP_ID_XGPON_ONU_ONU_TUNING_OUT_COMPLETED, BCMOLT_GROUP_ID_XGPON_ONU_OPTICAL_REFLECTION, BCMOLT_GROUP_ID_XGPON_ONU_POSSIBLE_DRIFT, BCMOLT_GROUP_ID_XGPON_ONU_POWER_CONSUMPTION_REPORT, BCMOLT_GROUP_ID_XGPON_ONU_POWER_LEVEL_REPORT, BCMOLT_GROUP_ID_XGPON_ONU_POWER_MANAGEMENT_STATE_CHANGE, BCMOLT_GROUP_ID_XGPON_ONU_PQSI, BCMOLT_GROUP_ID_XGPON_ONU_RANGING_COMPLETED, BCMOLT_GROUP_ID_XGPON_ONU_REGISTRATION_ID, BCMOLT_GROUP_ID_XGPON_ONU_RSSI_MEASUREMENT_COMPLETED, BCMOLT_GROUP_ID_XGPON_ONU_SDI, BCMOLT_GROUP_ID_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION_FAILURE, BCMOLT_GROUP_ID_XGPON_ONU_SFI, BCMOLT_GROUP_ID_XGPON_ONU_STAT_ALARM_CLEARED, BCMOLT_GROUP_ID_XGPON_ONU_STAT_ALARM_RAISED, BCMOLT_GROUP_ID_XGPON_ONU_SUFI, BCMOLT_GROUP_ID_XGPON_ONU_TIWI, BCMOLT_GROUP_ID_XGPON_ONU_TUNING_RESPONSE };
+static bcmolt_group_id group_ids_xgpon_onu_auto_cfg[] = { BCMOLT_GROUP_ID_XGPON_ONU_AUTO_CFG };
+static bcmolt_group_id group_ids_xgpon_onu_oper[] = { BCMOLT_GROUP_ID_XGPON_ONU_ADJUST_TX_WAVELENGTH, BCMOLT_GROUP_ID_XGPON_ONU_CHANGE_POWER_LEVELLING, BCMOLT_GROUP_ID_XGPON_ONU_GET_POWER_CONSUMPTION, BCMOLT_GROUP_ID_XGPON_ONU_GET_POWER_LEVEL, BCMOLT_GROUP_ID_XGPON_ONU_ONU_TUNING_IN, BCMOLT_GROUP_ID_XGPON_ONU_ONU_TUNING_OUT, BCMOLT_GROUP_ID_XGPON_ONU_REQUEST_REGISTRATION, BCMOLT_GROUP_ID_XGPON_ONU_RSSI_MEASUREMENT, BCMOLT_GROUP_ID_XGPON_ONU_SECURE_MUTUAL_AUTHENTICATION, BCMOLT_GROUP_ID_XGPON_ONU_SET_ONU_STATE };
+static bcmolt_group_id group_ids_xgpon_onu_proxy[] = { BCMOLT_GROUP_ID_XGPON_ONU_CPU_PACKETS, BCMOLT_GROUP_ID_XGPON_ONU_PLOAM_PACKET };
+static bcmolt_group_id group_ids_xgpon_onu_proxy_rx[] = { BCMOLT_GROUP_ID_XGPON_ONU_CPU_PACKET, BCMOLT_GROUP_ID_XGPON_ONU_OMCI_PACKET };
+static bcmolt_group_id group_ids_xgpon_trx_key[] = { BCMOLT_GROUP_ID_XGPON_TRX_KEY };
+static bcmolt_group_id group_ids_xgpon_trx_cfg[] = { BCMOLT_GROUP_ID_XGPON_TRX_CFG };
+static bcmolt_group_id group_ids_xpon_serdes_key[] = { BCMOLT_GROUP_ID_XPON_SERDES_KEY };
+static bcmolt_group_id group_ids_xpon_serdes_cfg[] = { BCMOLT_GROUP_ID_XPON_SERDES_CFG };
+static bcmolt_group_ids group_ids_obj_ae_ni[] = { { 1, group_ids_ae_ni_key }, { 1, group_ids_ae_ni_cfg }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 1, group_ids_ae_ni_oper }, { 0, NULL }, { 0, NULL } };
+static bcmolt_group_ids group_ids_obj_ae_path_ds[] = { { 1, group_ids_ae_path_ds_key }, { 0, NULL }, { 1, group_ids_ae_path_ds_stat }, { 17, group_ids_ae_path_ds_stat_cfg }, { 2, group_ids_ae_path_ds_auto }, { 1, group_ids_ae_path_ds_auto_cfg }, { 0, NULL }, { 0, NULL }, { 0, NULL } };
+static bcmolt_group_ids group_ids_obj_ae_path_us[] = { { 1, group_ids_ae_path_us_key }, { 0, NULL }, { 1, group_ids_ae_path_us_stat }, { 20, group_ids_ae_path_us_stat_cfg }, { 2, group_ids_ae_path_us_auto }, { 1, group_ids_ae_path_us_auto_cfg }, { 0, NULL }, { 0, NULL }, { 0, NULL } };
+static bcmolt_group_ids group_ids_obj_channel[] = { { 1, group_ids_channel_key }, { 1, group_ids_channel_cfg }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL } };
+static bcmolt_group_ids group_ids_obj_debug[] = { { 1, group_ids_debug_key }, { 1, group_ids_debug_cfg }, { 0, NULL }, { 0, NULL }, { 2, group_ids_debug_auto }, { 1, group_ids_debug_auto_cfg }, { 4, group_ids_debug_oper }, { 0, NULL }, { 0, NULL } };
+static bcmolt_group_ids group_ids_obj_device[] = { { 1, group_ids_device_key }, { 1, group_ids_device_cfg }, { 0, NULL }, { 0, NULL }, { 11, group_ids_device_auto }, { 1, group_ids_device_auto_cfg }, { 8, group_ids_device_oper }, { 0, NULL }, { 0, NULL } };
+static bcmolt_group_ids group_ids_obj_epon_denied_link[] = { { 1, group_ids_epon_denied_link_key }, { 1, group_ids_epon_denied_link_cfg }, { 0, NULL }, { 0, NULL }, { 10, group_ids_epon_denied_link_auto }, { 1, group_ids_epon_denied_link_auto_cfg }, { 0, NULL }, { 0, NULL }, { 0, NULL } };
+static bcmolt_group_ids group_ids_obj_epon_link[] = { { 1, group_ids_epon_link_key }, { 1, group_ids_epon_link_cfg }, { 1, group_ids_epon_link_stat }, { 43, group_ids_epon_link_stat_cfg }, { 21, group_ids_epon_link_auto }, { 1, group_ids_epon_link_auto_cfg }, { 7, group_ids_epon_link_oper }, { 1, group_ids_epon_link_proxy }, { 1, group_ids_epon_link_proxy_rx } };
+static bcmolt_group_ids group_ids_obj_epon_ni[] = { { 1, group_ids_epon_ni_key }, { 1, group_ids_epon_ni_cfg }, { 0, NULL }, { 0, NULL }, { 10, group_ids_epon_ni_auto }, { 1, group_ids_epon_ni_auto_cfg }, { 8, group_ids_epon_ni_oper }, { 0, NULL }, { 0, NULL } };
+static bcmolt_group_ids group_ids_obj_epon_onu_10g_us[] = { { 1, group_ids_epon_onu_10g_us_key }, { 1, group_ids_epon_onu_10g_us_cfg }, { 1, group_ids_epon_onu_10g_us_stat }, { 4, group_ids_epon_onu_10g_us_stat_cfg }, { 2, group_ids_epon_onu_10g_us_auto }, { 1, group_ids_epon_onu_10g_us_auto_cfg }, { 0, NULL }, { 0, NULL }, { 0, NULL } };
+static bcmolt_group_ids group_ids_obj_epon_onu_1g_us[] = { { 1, group_ids_epon_onu_1g_us_key }, { 1, group_ids_epon_onu_1g_us_cfg }, { 1, group_ids_epon_onu_1g_us_stat }, { 16, group_ids_epon_onu_1g_us_stat_cfg }, { 2, group_ids_epon_onu_1g_us_auto }, { 1, group_ids_epon_onu_1g_us_auto_cfg }, { 0, NULL }, { 0, NULL }, { 0, NULL } };
+static bcmolt_group_ids group_ids_obj_epon_path_10g_ds[] = { { 1, group_ids_epon_path_10g_ds_key }, { 1, group_ids_epon_path_10g_ds_cfg }, { 1, group_ids_epon_path_10g_ds_stat }, { 21, group_ids_epon_path_10g_ds_stat_cfg }, { 2, group_ids_epon_path_10g_ds_auto }, { 1, group_ids_epon_path_10g_ds_auto_cfg }, { 0, NULL }, { 0, NULL }, { 0, NULL } };
+static bcmolt_group_ids group_ids_obj_epon_path_10g_us[] = { { 1, group_ids_epon_path_10g_us_key }, { 1, group_ids_epon_path_10g_us_cfg }, { 1, group_ids_epon_path_10g_us_stat }, { 26, group_ids_epon_path_10g_us_stat_cfg }, { 2, group_ids_epon_path_10g_us_auto }, { 1, group_ids_epon_path_10g_us_auto_cfg }, { 0, NULL }, { 0, NULL }, { 0, NULL } };
+static bcmolt_group_ids group_ids_obj_epon_path_1g_ds[] = { { 1, group_ids_epon_path_1g_ds_key }, { 1, group_ids_epon_path_1g_ds_cfg }, { 1, group_ids_epon_path_1g_ds_stat }, { 21, group_ids_epon_path_1g_ds_stat_cfg }, { 2, group_ids_epon_path_1g_ds_auto }, { 1, group_ids_epon_path_1g_ds_auto_cfg }, { 0, NULL }, { 0, NULL }, { 0, NULL } };
+static bcmolt_group_ids group_ids_obj_epon_path_1g_us[] = { { 1, group_ids_epon_path_1g_us_key }, { 1, group_ids_epon_path_1g_us_cfg }, { 1, group_ids_epon_path_1g_us_stat }, { 26, group_ids_epon_path_1g_us_stat_cfg }, { 2, group_ids_epon_path_1g_us_auto }, { 1, group_ids_epon_path_1g_us_auto_cfg }, { 0, NULL }, { 0, NULL }, { 0, NULL } };
+static bcmolt_group_ids group_ids_obj_epon_rp[] = { { 1, group_ids_epon_rp_key }, { 1, group_ids_epon_rp_cfg }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL } };
+static bcmolt_group_ids group_ids_obj_gpio[] = { { 1, group_ids_gpio_key }, { 1, group_ids_gpio_cfg }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL } };
+static bcmolt_group_ids group_ids_obj_gpon_alloc[] = { { 1, group_ids_gpon_alloc_key }, { 1, group_ids_gpon_alloc_cfg }, { 1, group_ids_gpon_alloc_stat }, { 1, group_ids_gpon_alloc_stat_cfg }, { 4, group_ids_gpon_alloc_auto }, { 1, group_ids_gpon_alloc_auto_cfg }, { 2, group_ids_gpon_alloc_oper }, { 0, NULL }, { 0, NULL } };
+static bcmolt_group_ids group_ids_obj_gpon_gem_port[] = { { 1, group_ids_gpon_gem_port_key }, { 1, group_ids_gpon_gem_port_cfg }, { 1, group_ids_gpon_gem_port_stat }, { 4, group_ids_gpon_gem_port_stat_cfg }, { 3, group_ids_gpon_gem_port_auto }, { 1, group_ids_gpon_gem_port_auto_cfg }, { 1, group_ids_gpon_gem_port_oper }, { 0, NULL }, { 0, NULL } };
+static bcmolt_group_ids group_ids_obj_gpon_iwf[] = { { 1, group_ids_gpon_iwf_key }, { 1, group_ids_gpon_iwf_cfg }, { 1, group_ids_gpon_iwf_stat }, { 8, group_ids_gpon_iwf_stat_cfg }, { 4, group_ids_gpon_iwf_auto }, { 1, group_ids_gpon_iwf_auto_cfg }, { 2, group_ids_gpon_iwf_oper }, { 0, NULL }, { 0, NULL } };
+static bcmolt_group_ids group_ids_obj_gpon_iwf_ds_egress_flow[] = { { 1, group_ids_gpon_iwf_ds_egress_flow_key }, { 1, group_ids_gpon_iwf_ds_egress_flow_cfg }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL } };
+static bcmolt_group_ids group_ids_obj_gpon_iwf_ds_ingress_flow[] = { { 1, group_ids_gpon_iwf_ds_ingress_flow_key }, { 1, group_ids_gpon_iwf_ds_ingress_flow_cfg }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL } };
+static bcmolt_group_ids group_ids_obj_gpon_iwf_mac_table[] = { { 1, group_ids_gpon_iwf_mac_table_key }, { 1, group_ids_gpon_iwf_mac_table_cfg }, { 0, NULL }, { 0, NULL }, { 4, group_ids_gpon_iwf_mac_table_auto }, { 1, group_ids_gpon_iwf_mac_table_auto_cfg }, { 0, NULL }, { 0, NULL }, { 0, NULL } };
+static bcmolt_group_ids group_ids_obj_gpon_iwf_us_flow[] = { { 1, group_ids_gpon_iwf_us_flow_key }, { 1, group_ids_gpon_iwf_us_flow_cfg }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL } };
+static bcmolt_group_ids group_ids_obj_gpon_ni[] = { { 1, group_ids_gpon_ni_key }, { 1, group_ids_gpon_ni_cfg }, { 1, group_ids_gpon_ni_stat }, { 34, group_ids_gpon_ni_stat_cfg }, { 19, group_ids_gpon_ni_auto }, { 1, group_ids_gpon_ni_auto_cfg }, { 9, group_ids_gpon_ni_oper }, { 2, group_ids_gpon_ni_proxy }, { 0, NULL } };
+static bcmolt_group_ids group_ids_obj_gpon_onu[] = { { 1, group_ids_gpon_onu_key }, { 1, group_ids_gpon_onu_cfg }, { 1, group_ids_gpon_onu_stat }, { 20, group_ids_gpon_onu_stat_cfg }, { 37, group_ids_gpon_onu_auto }, { 1, group_ids_gpon_onu_auto_cfg }, { 3, group_ids_gpon_onu_oper }, { 2, group_ids_gpon_onu_proxy }, { 2, group_ids_gpon_onu_proxy_rx } };
+static bcmolt_group_ids group_ids_obj_gpon_trx[] = { { 1, group_ids_gpon_trx_key }, { 1, group_ids_gpon_trx_cfg }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL } };
+static bcmolt_group_ids group_ids_obj_log_entry[] = { { 1, group_ids_log_entry_key }, { 1, group_ids_log_entry_cfg }, { 1, group_ids_log_entry_stat }, { 2, group_ids_log_entry_stat_cfg }, { 2, group_ids_log_entry_auto }, { 1, group_ids_log_entry_auto_cfg }, { 0, NULL }, { 0, NULL }, { 0, NULL } };
+static bcmolt_group_ids group_ids_obj_logger[] = { { 1, group_ids_logger_key }, { 1, group_ids_logger_cfg }, { 1, group_ids_logger_stat }, { 1, group_ids_logger_stat_cfg }, { 2, group_ids_logger_auto }, { 1, group_ids_logger_auto_cfg }, { 1, group_ids_logger_oper }, { 0, NULL }, { 0, NULL } };
+static bcmolt_group_ids group_ids_obj_nni[] = { { 1, group_ids_nni_key }, { 1, group_ids_nni_cfg }, { 1, group_ids_nni_stat }, { 63, group_ids_nni_stat_cfg }, { 3, group_ids_nni_auto }, { 1, group_ids_nni_auto_cfg }, { 0, NULL }, { 0, NULL }, { 0, NULL } };
+static bcmolt_group_ids group_ids_obj_nni_serdes[] = { { 1, group_ids_nni_serdes_key }, { 1, group_ids_nni_serdes_cfg }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL } };
+static bcmolt_group_ids group_ids_obj_software_error[] = { { 1, group_ids_software_error_key }, { 1, group_ids_software_error_cfg }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL } };
+static bcmolt_group_ids group_ids_obj_trx_calibration[] = { { 1, group_ids_trx_calibration_key }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 1, group_ids_trx_calibration_auto }, { 1, group_ids_trx_calibration_auto_cfg }, { 2, group_ids_trx_calibration_oper }, { 0, NULL }, { 0, NULL } };
+static bcmolt_group_ids group_ids_obj_xgpon_alloc[] = { { 1, group_ids_xgpon_alloc_key }, { 1, group_ids_xgpon_alloc_cfg }, { 1, group_ids_xgpon_alloc_stat }, { 1, group_ids_xgpon_alloc_stat_cfg }, { 4, group_ids_xgpon_alloc_auto }, { 1, group_ids_xgpon_alloc_auto_cfg }, { 2, group_ids_xgpon_alloc_oper }, { 0, NULL }, { 0, NULL } };
+static bcmolt_group_ids group_ids_obj_xgpon_gem_port[] = { { 1, group_ids_xgpon_gem_port_key }, { 1, group_ids_xgpon_gem_port_cfg }, { 1, group_ids_xgpon_gem_port_stat }, { 4, group_ids_xgpon_gem_port_stat_cfg }, { 2, group_ids_xgpon_gem_port_auto }, { 1, group_ids_xgpon_gem_port_auto_cfg }, { 0, NULL }, { 0, NULL }, { 0, NULL } };
+static bcmolt_group_ids group_ids_obj_xgpon_iwf[] = { { 1, group_ids_xgpon_iwf_key }, { 1, group_ids_xgpon_iwf_cfg }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL } };
+static bcmolt_group_ids group_ids_obj_xgpon_ni[] = { { 1, group_ids_xgpon_ni_key }, { 1, group_ids_xgpon_ni_cfg }, { 1, group_ids_xgpon_ni_stat }, { 35, group_ids_xgpon_ni_stat_cfg }, { 19, group_ids_xgpon_ni_auto }, { 1, group_ids_xgpon_ni_auto_cfg }, { 10, group_ids_xgpon_ni_oper }, { 2, group_ids_xgpon_ni_proxy }, { 0, NULL } };
+static bcmolt_group_ids group_ids_obj_xgpon_onu[] = { { 1, group_ids_xgpon_onu_key }, { 1, group_ids_xgpon_onu_cfg }, { 1, group_ids_xgpon_onu_stat }, { 20, group_ids_xgpon_onu_stat_cfg }, { 33, group_ids_xgpon_onu_auto }, { 1, group_ids_xgpon_onu_auto_cfg }, { 10, group_ids_xgpon_onu_oper }, { 2, group_ids_xgpon_onu_proxy }, { 2, group_ids_xgpon_onu_proxy_rx } };
+static bcmolt_group_ids group_ids_obj_xgpon_trx[] = { { 1, group_ids_xgpon_trx_key }, { 1, group_ids_xgpon_trx_cfg }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL } };
+static bcmolt_group_ids group_ids_obj_xpon_serdes[] = { { 1, group_ids_xpon_serdes_key }, { 1, group_ids_xpon_serdes_cfg }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL }, { 0, NULL } };
+static bcmolt_group_ids *group_ids[] = { group_ids_obj_ae_ni, group_ids_obj_ae_path_ds, group_ids_obj_ae_path_us, group_ids_obj_channel, group_ids_obj_debug, group_ids_obj_device, group_ids_obj_epon_denied_link, group_ids_obj_epon_link, group_ids_obj_epon_ni, group_ids_obj_epon_onu_10g_us, group_ids_obj_epon_onu_1g_us, group_ids_obj_epon_path_10g_ds, group_ids_obj_epon_path_10g_us, group_ids_obj_epon_path_1g_ds, group_ids_obj_epon_path_1g_us, group_ids_obj_epon_rp, group_ids_obj_gpio, group_ids_obj_gpon_alloc, group_ids_obj_gpon_gem_port, group_ids_obj_gpon_iwf, group_ids_obj_gpon_iwf_ds_egress_flow, group_ids_obj_gpon_iwf_ds_ingress_flow, group_ids_obj_gpon_iwf_mac_table, group_ids_obj_gpon_iwf_us_flow, group_ids_obj_gpon_ni, group_ids_obj_gpon_onu, group_ids_obj_gpon_trx, group_ids_obj_log_entry, group_ids_obj_logger, group_ids_obj_nni, group_ids_obj_nni_serdes, group_ids_obj_software_error, group_ids_obj_trx_calibration, group_ids_obj_xgpon_alloc, group_ids_obj_xgpon_gem_port, group_ids_obj_xgpon_iwf, group_ids_obj_xgpon_ni, group_ids_obj_xgpon_onu, group_ids_obj_xgpon_trx, group_ids_obj_xpon_serdes };
+static bcmolt_presence_mask readonly_prop_mask[] = { (1ULL << BCMOLT_AE_NI_CFG_ID_AE_NI_EN) | (1ULL << BCMOLT_AE_NI_CFG_ID_PRBS_STATUS), 0, 0, 0, (((1ULL << BCMOLT_DEBUG_CFG_ID_INDICATIONS_DROPPED) | (1ULL << BCMOLT_DEBUG_CFG_ID_FILE_USED_PERCENT)) | (1ULL << BCMOLT_DEBUG_CFG_ID_API_CAPTURE_STATS)) | (1ULL << BCMOLT_DEBUG_CFG_ID_API_CAPTURE_BUFFER), ((((((1ULL << BCMOLT_DEVICE_CFG_ID_FIRMWARE_SW_VERSION) | (1ULL << BCMOLT_DEVICE_CFG_ID_HOST_SW_VERSION)) | (1ULL << BCMOLT_DEVICE_CFG_ID_CHIP_REVISION)) | (1ULL << BCMOLT_DEVICE_CFG_ID_STATE)) | (1ULL << BCMOLT_DEVICE_CFG_ID_CHIP_TEMPERATURE)) | (1ULL << BCMOLT_DEVICE_CFG_ID_EMBEDDED_IMAGE_LIST)) | (1ULL << BCMOLT_DEVICE_CFG_ID_CHIP_VOLTAGE), 1ULL << BCMOLT_EPON_DENIED_LINK_CFG_ID_ALARM_STATE, ((((((((((1ULL << BCMOLT_EPON_LINK_CFG_ID_LINK_RATE) | (1ULL << BCMOLT_EPON_LINK_CFG_ID_STATE_FLAGS)) | (1ULL << BCMOLT_EPON_LINK_CFG_ID_LLID)) | (1ULL << BCMOLT_EPON_LINK_CFG_ID_LASER_ON_TIME_TQ)) | (1ULL << BCMOLT_EPON_LINK_CFG_ID_LASER_OFF_TIME_TQ)) | (1ULL << BCMOLT_EPON_LINK_CFG_ID_RANGE_VALUE_TQ)) | (1ULL << BCMOLT_EPON_LINK_CFG_ID_DISTANCE)) | (1ULL << BCMOLT_EPON_LINK_CFG_ID_ALARM_STATE)) | (1ULL << BCMOLT_EPON_LINK_CFG_ID_UBD_INFO)) | (1ULL << BCMOLT_EPON_LINK_CFG_ID_PENDING_GRANTS)) | (1ULL << BCMOLT_EPON_LINK_CFG_ID_LINK_TYPE), (((((1ULL << BCMOLT_EPON_NI_CFG_ID_EPON_NI_EN) | (1ULL << BCMOLT_EPON_NI_CFG_ID_ALARM_STATE)) | (1ULL << BCMOLT_EPON_NI_CFG_ID_ALL_LINKS)) | (1ULL << BCMOLT_EPON_NI_CFG_ID_APPROXIMATE_SOLICITED_USAGE)) | (1ULL << BCMOLT_EPON_NI_CFG_ID_APPROXIMATE_TDM_USAGE)) | (1ULL << BCMOLT_EPON_NI_CFG_ID_ESTIMATED_PON_LATENCY_TQ), 1ULL << BCMOLT_EPON_ONU_10G_US_CFG_ID_ALL_LINKS, 1ULL << BCMOLT_EPON_ONU_1G_US_CFG_ID_ALL_LINKS, 0, 1ULL << BCMOLT_EPON_PATH_10G_US_CFG_ID_PRBS_STATUS, 0, 1ULL << BCMOLT_EPON_PATH_1G_US_CFG_ID_PRBS_STATUS, 0, 0, 1ULL << BCMOLT_GPON_ALLOC_CFG_ID_STATE, 1ULL << BCMOLT_GPON_GEM_PORT_CFG_ID_GEM_PORT_STATE, 1ULL << BCMOLT_GPON_IWF_CFG_ID_MAC_TABLE_COUNT, 0, 0, (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_CFG_ID_GEM_PORT_ID) | (1ULL << BCMOLT_GPON_IWF_MAC_TABLE_CFG_ID_ONU_ID), 0, (((((((1ULL << BCMOLT_GPON_NI_CFG_ID_PON_STATUS) | (1ULL << BCMOLT_GPON_NI_CFG_ID_AVAILABLE_BANDWIDTH)) | (1ULL << BCMOLT_GPON_NI_CFG_ID_NUMBER_OF_ACTIVE_ONUS)) | (1ULL << BCMOLT_GPON_NI_CFG_ID_NUMBER_OF_ACTIVE_STANDBY_ONUS)) | (1ULL << BCMOLT_GPON_NI_CFG_ID_PRBS_STATUS)) | (1ULL << BCMOLT_GPON_NI_CFG_ID_RANGING_WINDOW_SIZE)) | (1ULL << BCMOLT_GPON_NI_CFG_ID_ALL_ONUS)) | (1ULL << BCMOLT_GPON_NI_CFG_ID_ALL_MCAST_GEM_PORTS), ((((1ULL << BCMOLT_GPON_ONU_CFG_ID_ONU_STATE) | (1ULL << BCMOLT_GPON_ONU_CFG_ID_DISABLED_AFTER_DISCOVERY)) | (1ULL << BCMOLT_GPON_ONU_CFG_ID_DEACTIVATION_REASON)) | (1ULL << BCMOLT_GPON_ONU_CFG_ID_ALL_GEM_PORTS)) | (1ULL << BCMOLT_GPON_ONU_CFG_ID_ALL_ALLOCS), (1ULL << BCMOLT_GPON_TRX_CFG_ID_PLO_RANGING) | (1ULL << BCMOLT_GPON_TRX_CFG_ID_PLO_DATA), ((1ULL << BCMOLT_LOG_ENTRY_CFG_ID_DEFAULT_LOG_LEVEL) | (1ULL << BCMOLT_LOG_ENTRY_CFG_ID_DEFAULT_LOG_TYPE)) | (1ULL << BCMOLT_LOG_ENTRY_CFG_ID_LOG_NAME), (1ULL << BCMOLT_LOGGER_CFG_ID_BUFFER) | (1ULL << BCMOLT_LOGGER_CFG_ID_LOG_NAMES), (1ULL << BCMOLT_NNI_CFG_ID_NNI_STATUS) | (1ULL << BCMOLT_NNI_CFG_ID_NNI_BACKUP_STATUS), 0, 1ULL << BCMOLT_SOFTWARE_ERROR_CFG_ID_ENTRY, 0, 1ULL << BCMOLT_XGPON_ALLOC_CFG_ID_STATE, 1ULL << BCMOLT_XGPON_GEM_PORT_CFG_ID_GEM_PORT_STATE, 0, ((((((1ULL << BCMOLT_XGPON_NI_CFG_ID_AVAILABLE_BANDWIDTH) | (1ULL << BCMOLT_XGPON_NI_CFG_ID_NUMBER_OF_ACTIVE_ONUS)) | (1ULL << BCMOLT_XGPON_NI_CFG_ID_PON_STATUS)) | (1ULL << BCMOLT_XGPON_NI_CFG_ID_RANGING_WINDOW_SIZE)) | (1ULL << BCMOLT_XGPON_NI_CFG_ID_PRBS_STATUS)) | (1ULL << BCMOLT_XGPON_NI_CFG_ID_ALL_ONUS)) | (1ULL << BCMOLT_XGPON_NI_CFG_ID_ALL_MCAST_GEM_PORTS), (((((1ULL << BCMOLT_XGPON_ONU_CFG_ID_ONU_OLD_STATE) | (1ULL << BCMOLT_XGPON_ONU_CFG_ID_DISABLED_AFTER_DISCOVERY)) | (1ULL << BCMOLT_XGPON_ONU_CFG_ID_DEACTIVATION_REASON)) | (1ULL << BCMOLT_XGPON_ONU_CFG_ID_ALL_GEM_PORTS)) | (1ULL << BCMOLT_XGPON_ONU_CFG_ID_ALL_ALLOCS)) | (1ULL << BCMOLT_XGPON_ONU_CFG_ID_REQUEST_REGISTRATION_STATUS), 0, 0 };
+static bcmolt_instance_info instance_info[] = { { offsetof(bcmolt_ae_ni_key, ae_ni), sizeof(bcmolt_ae_ni) }, { offsetof(bcmolt_ae_path_ds_key, ae_ni), sizeof(bcmolt_ae_ni) }, { offsetof(bcmolt_ae_path_us_key, ae_ni), sizeof(bcmolt_ae_ni) }, { offsetof(bcmolt_channel_key, pon_ni), sizeof(bcmolt_pon_ni) }, { offsetof(bcmolt_debug_key, reserved), sizeof(uint32_t) }, { offsetof(bcmolt_device_key, reserved), sizeof(uint32_t) }, { offsetof(bcmolt_epon_denied_link_key, epon_ni), sizeof(bcmolt_epon_ni) }, { offsetof(bcmolt_epon_link_key, epon_ni), sizeof(bcmolt_epon_ni) }, { offsetof(bcmolt_epon_ni_key, epon_ni), sizeof(bcmolt_epon_ni) }, { offsetof(bcmolt_epon_onu_10g_us_key, epon_ni), sizeof(bcmolt_epon_ni) }, { offsetof(bcmolt_epon_onu_1g_us_key, epon_ni), sizeof(bcmolt_epon_ni) }, { offsetof(bcmolt_epon_path_10g_ds_key, epon_ni), sizeof(bcmolt_epon_ni) }, { offsetof(bcmolt_epon_path_10g_us_key, epon_ni), sizeof(bcmolt_epon_ni) }, { offsetof(bcmolt_epon_path_1g_ds_key, epon_ni), sizeof(bcmolt_epon_ni) }, { offsetof(bcmolt_epon_path_1g_us_key, epon_ni), sizeof(bcmolt_epon_ni) }, { offsetof(bcmolt_epon_rp_key, epon_ni), sizeof(bcmolt_epon_ni) }, { offsetof(bcmolt_gpio_key, reserved), sizeof(uint32_t) }, { offsetof(bcmolt_gpon_alloc_key, pon_ni), sizeof(bcmolt_gpon_ni) }, { offsetof(bcmolt_gpon_gem_port_key, pon_ni), sizeof(bcmolt_gpon_ni) }, { offsetof(bcmolt_gpon_iwf_key, pon_ni), sizeof(bcmolt_gpon_ni) }, { offsetof(bcmolt_gpon_iwf_ds_egress_flow_key, pon_ni), sizeof(bcmolt_gpon_ni) }, { offsetof(bcmolt_gpon_iwf_ds_ingress_flow_key, pon_ni), sizeof(bcmolt_gpon_ni) }, { offsetof(bcmolt_gpon_iwf_mac_table_key, pon_ni), sizeof(bcmolt_gpon_ni) }, { offsetof(bcmolt_gpon_iwf_us_flow_key, pon_ni), sizeof(bcmolt_gpon_ni) }, { offsetof(bcmolt_gpon_ni_key, pon_ni), sizeof(bcmolt_gpon_ni) }, { offsetof(bcmolt_gpon_onu_key, pon_ni), sizeof(bcmolt_gpon_ni) }, { offsetof(bcmolt_gpon_trx_key, pon_ni), sizeof(bcmolt_gpon_ni) }, { offsetof(bcmolt_log_entry_key, reserved), sizeof(uint8_t) }, { offsetof(bcmolt_logger_key, reserved), sizeof(uint32_t) }, { offsetof(bcmolt_nni_key, pon_ni), sizeof(bcmolt_pon_ni) }, { offsetof(bcmolt_nni_serdes_key, pon_ni), sizeof(bcmolt_pon_ni) }, { offsetof(bcmolt_software_error_key, reserved), sizeof(uint32_t) }, { offsetof(bcmolt_trx_calibration_key, reserved), sizeof(uint32_t) }, { offsetof(bcmolt_xgpon_alloc_key, pon_ni), sizeof(bcmolt_xgpon_ni) }, { offsetof(bcmolt_xgpon_gem_port_key, pon_ni), sizeof(bcmolt_xgpon_ni) }, { offsetof(bcmolt_xgpon_iwf_key, pon_ni), sizeof(bcmolt_xgpon_ni) }, { offsetof(bcmolt_xgpon_ni_key, pon_ni), sizeof(bcmolt_xgpon_ni) }, { offsetof(bcmolt_xgpon_onu_key, pon_ni), sizeof(bcmolt_xgpon_ni) }, { offsetof(bcmolt_xgpon_trx_key, pon_ni), sizeof(bcmolt_xgpon_ni) }, { offsetof(bcmolt_xpon_serdes_key, pon_ni), sizeof(bcmolt_pon_ni) } };
+
+/******************************************************************************/
+static bcmos_bool bcmolt_get_group_info(const bcmolt_msg *msg, bcmolt_group_info **group, bcmolt_group_info **key)
+{
+    bcmolt_group_id group_id;
+    bcmolt_group_id key_id;
+    bcmos_errno err;
+
+    err = bcmolt_group_id_combine(msg->obj_type, msg->group, msg->subgroup, &group_id);
+    if (err != BCM_ERR_OK)
+    {
+        return BCMOS_FALSE;
+    }
+
+    err = bcmolt_group_id_combine(msg->obj_type, BCMOLT_MGT_GROUP_KEY, 0, &key_id);
+    if (err != BCM_ERR_OK)
+    {
+        return BCMOS_FALSE;
+    }
+
+    *group = group_info[group_id];
+    *key = group_info[key_id];
+    return BCMOS_TRUE;
+}
+
+/******************************************************************************/
+int32_t bcmolt_msg_get_packed_length(bcmolt_msg *msg)
+{
+    uint8_t *key_ptr;
+    bcmolt_group_info *group;
+    bcmolt_group_info *key;
+
+    int32_t ret = bcmolt_msg_hdr_get_packed_length(msg);
+    if (ret < 0)
+    {
+        return ret;
+    }
+
+    if (!bcmolt_get_group_info(msg, &group, &key))
+    {
+        return (int32_t) BCM_ERR_MSG_ERROR;
+    }
+
+    key_ptr = (uint8_t *) (msg + 1);
+    ret += key->get_packed_length(key_ptr, BCMOLT_PRESENCE_MASK_ALL);
+
+    if (bcmolt_msg_should_pack_data(msg) && (group->get_packed_length != NULL))
+    {
+        uint8_t *data_ptr = (uint8_t *) ((long)msg + group->data_offset);
+        ret += group->get_packed_length(data_ptr, msg->presence_mask);
+    }
+
+    if (msg->type & BCMOLT_MSG_TYPE_MULTI)
+    {
+        if (msg->msg_set == NULL)
+        {
+            return (int32_t) BCM_ERR_NULL;
+        }
+
+        if (msg->dir == BCMOLT_MSG_DIR_REQUEST)
+        {
+            ret += 19;  /* group: 1, max_instances: 2, presence_mask: 8, filter_flags: 8 */
+        }
+        else
+        {
+            int i;
+            int32_t sub_msg_ret;
+
+            ret += 3;   /* group: num_instances: 2, more: 1 */
+            ret += key->get_packed_length(key_ptr, BCMOLT_PRESENCE_MASK_ALL);   /* next key */
+            for (i = 0; i < msg->msg_set->num_instances; i++)
+            {
+                if (msg->msg_set->msg[i] == NULL)
+                {
+                    return (int32_t) BCM_ERR_INTERNAL;
+                }
+
+                sub_msg_ret = bcmolt_msg_get_packed_length(msg->msg_set->msg[i]);
+                if (sub_msg_ret < 0)
+                {
+                    return sub_msg_ret;
+                }
+
+                ret += sub_msg_ret;
+            }
+        }
+    }
+
+    return ret;
+}
+
+/* Create message set */
+bcmos_errno bcmolt_msg_set_alloc(bcmolt_obj_id obj, bcmolt_mgt_group group, uint32_t max_instances, bcmolt_msg_set **msg_set)
+{
+    bcmolt_msg hdr = { };
+    uint32_t size;
+    bcmolt_group_info *grp;
+    bcmolt_group_info *key;
+
+    if (msg_set == NULL)
+    {
+        BCMOS_TRACE_RETURN(BCM_ERR_PARM, "msg_set parameter must be set\n");
+    }
+
+    if (group != BCMOLT_MGT_GROUP_CFG && group != BCMOLT_MGT_GROUP_STAT)
+    {
+        BCMOS_TRACE_RETURN(BCM_ERR_NOT_SUPPORTED, "group must be BCMOLT_MGT_GROUP_CFG or BCMOLT_MGT_GROUP_STAT\n");
+    }
+
+    /* Calculate message set size */
+    hdr.obj_type = obj;
+    hdr.group = group;
+    hdr.dir = BCMOLT_MSG_DIR_REQUEST;
+    if (!bcmolt_get_group_info(&hdr, &grp, &key))
+    {
+        BCMOS_TRACE_RETURN(BCM_ERR_NOT_SUPPORTED, "Not supported for the object\n");
+    }
+
+    size = sizeof(bcmolt_msg_set) + key->size + max_instances * sizeof(bcmolt_msg *);
+    *msg_set = bcmos_calloc(size);
+    if (*msg_set == NULL)
+    {
+        BCMOS_TRACE_RETURN(BCM_ERR_NOMEM, "Can't allocate message set\n");
+    }
+    (*msg_set)->group = group;
+    (*msg_set)->max_instances = max_instances;
+    (*msg_set)->next_key = (void *)(&((*msg_set)->msg[max_instances]));
+
+    return BCM_ERR_OK;
+}
+
+/* Release message set
+ * \param[in]   msg_set
+ */
+void bcmolt_msg_set_free(bcmolt_msg_set *msg_set)
+{
+    uint32_t i;
+
+    for (i = 0; i < msg_set->max_instances && msg_set->msg[i] != NULL; i++)
+    {
+        bcmolt_msg_free(msg_set->msg[i]);
+    }
+
+    bcmos_free(msg_set);
+}
+
+/* Pack message set, excluding the filter-header which is already packed */
+static bcmos_errno bcmolt_msg_set_pack(const bcmolt_msg *msg, bcmolt_buf *buf, const bcmolt_group_info *key_info)
+{
+    bcmolt_msg_set *msg_set = msg->msg_set;
+    int i;
+    bcmos_bool ret;
+    bcmos_errno err = BCM_ERR_OK;
+
+    if (!msg_set)
+    {
+        BCMOS_TRACE_RETURN(BCM_ERR_INTERNAL, "msh->msg_set == NULL\n");
+    }
+
+    /* REQUEST:
+     * - filter (already packed at this point, contains first key to check)
+     * - group (FFU)
+     * - max_instances
+     * - presence_mask
+     * - filter_flags
+     *
+     * RESPONSE:
+     * - filter (already packed at this point)
+     * - num_instances
+     * - more
+     * - next_key
+     * - num_instances * msg
+     */
+    if (msg->dir == BCMOLT_MSG_DIR_REQUEST)
+    {
+        ret = bcmolt_buf_write_u8(buf, (uint8_t) msg_set->group);
+        ret = ret && bcmolt_buf_write_u16(buf, msg_set->max_instances);
+        ret = ret && bcmolt_buf_write_u64(buf, msg_set->presence_mask);
+        ret = ret && bcmolt_buf_write_u64(buf, msg_set->filter_flags);
+        if (!ret) err = BCM_ERR_OVERFLOW;
+    }
+    else
+    {
+        ret = bcmolt_buf_write_u16(buf, msg_set->num_instances);
+        ret = ret && bcmolt_buf_write_u8(buf, (uint8_t) msg_set->more);
+        ret = ret && key_info->pack(msg_set->next_key, buf, BCMOLT_PRESENCE_MASK_ALL);
+        if (!ret) return BCM_ERR_OVERFLOW;
+
+        for (i = 0; i < msg_set->num_instances && err == BCM_ERR_OK; i++)
+        {
+            if (msg_set->msg[i] == NULL)
+            {
+                err = BCM_ERR_INTERNAL;
+                break;
+            }
+
+            err = bcmolt_msg_pack(msg_set->msg[i], buf);
+        }
+    }
+
+    return err;
+}
+
+/******************************************************************************/
+bcmos_errno bcmolt_msg_pack(bcmolt_msg *msg, bcmolt_buf *buf)
+{
+    uint8_t *key_ptr;
+    bcmos_errno err;
+    bcmolt_group_info *group;
+    bcmolt_group_info *key;
+
+    if (!bcmolt_get_group_info(msg, &group, &key))
+    {
+        return BCM_ERR_MSG_ERROR;
+    }
+
+    err = bcmolt_msg_hdr_pack(msg, buf);
+    if (err != BCM_ERR_OK)
+    {
+        return err;
+    }
+
+    key_ptr = (uint8_t *) (msg + 1);
+    if (!key->pack(key_ptr, buf, BCMOLT_PRESENCE_MASK_ALL))
+    {
+        return BCM_ERR_OVERFLOW;
+    }
+
+    if (bcmolt_msg_should_pack_data(msg) && (group->pack != NULL))
+    {
+        uint8_t *data_ptr = (uint8_t *) ((long)msg + group->data_offset);
+        if (!group->pack(data_ptr, buf, msg->presence_mask))
+        {
+            return BCM_ERR_OVERFLOW;
+        }
+    }
+
+    /* If it is a multi-message pack what follows the rest of the set */
+    if (msg->type & BCMOLT_MSG_TYPE_MULTI)
+    {
+        err = bcmolt_msg_set_pack(msg, buf, key);
+    }
+
+    return err;
+}
+
+/* scan the input buffer to determine how much memory will be required to unpack variable-sized lists */
+static bcmos_errno bcmolt_msg_list_mem_scan(bcmolt_buf *buf, const bcmolt_msg *hdr, const bcmolt_group_info *group, const bcmolt_group_info *key, uint32_t *size)
+{
+    uint32_t pos_before_scan = bcmolt_buf_get_used(buf);
+
+    if (!key->mem_scan(buf, size, BCMOLT_PRESENCE_MASK_ALL))
+    {
+        return BCM_ERR_OVERFLOW;
+    }
+
+    if (bcmolt_msg_should_pack_data(hdr) && (group->mem_scan != NULL) && !group->mem_scan(buf, size, hdr->presence_mask))
+    {
+        return BCM_ERR_OVERFLOW;
+    }
+
+    if (!bcmolt_buf_rewind(buf, bcmolt_buf_get_used(buf) - pos_before_scan))
+    {
+        return BCM_ERR_OVERFLOW;
+    }
+
+    return BCM_ERR_OK;
+}
+
+/* Pack message set, excluding the filter-header which is already packed */
+static bcmos_errno bcmolt_msg_set_unpack(bcmolt_msg *msg, bcmolt_buf *buf, const bcmolt_group_info *key_info)
+{
+    bcmolt_msg_set *msg_set;
+    int i;
+    bcmos_bool ret;
+    bcmos_errno err = BCM_ERR_OK;
+
+    /*
+     * See encoding in bcmolt_msg_set_pack()
+     */
+    if (msg->dir == BCMOLT_MSG_DIR_REQUEST)
+    {
+        uint8_t group;
+        uint16_t max_instances;
+        uint64_t filter_flags;
+
+        ret = bcmolt_buf_read_u8(buf, &group);
+        ret = ret && bcmolt_buf_read_u16(buf, &max_instances);
+        if (!ret)
+        {
+            return BCM_ERR_OVERFLOW;
+        }
+
+        err = bcmolt_msg_set_alloc(msg->obj_type, group, max_instances, &msg_set);
+        if (err) return err;
+
+        ret = ret && bcmolt_buf_read_u64(buf, &msg_set->presence_mask);
+        ret = ret && bcmolt_buf_read_u64(buf, &filter_flags);
+        if (!ret)
+        {
+            bcmolt_msg_set_free(msg_set);
+            return BCM_ERR_OVERFLOW;
+        }
+
+        msg_set->filter_flags = filter_flags;
+        msg->msg_set = msg_set;
+    }
+    else
+    {
+        uint8_t is_more;
+        uint16_t num_instances;
+
+        ret = bcmolt_buf_read_u16(buf, &num_instances);
+        if (!ret)
+        {
+            return BCM_ERR_OVERFLOW;
+        }
+
+        if (msg->msg_set == NULL)
+        {
+            err = bcmolt_msg_set_alloc(msg->obj_type, msg->group, num_instances, &msg->msg_set);
+            if (BCM_ERR_OK != err)
+            {
+                return err;
+            }
+        }
+
+        msg_set = msg->msg_set;
+        msg_set->num_instances = num_instances;
+        ret = ret && bcmolt_buf_read_u8(buf, &is_more);
+        ret = ret && key_info->unpack(msg_set->next_key, buf, NULL, BCMOLT_PRESENCE_MASK_ALL);
+        if (!ret)
+        {
+            return BCM_ERR_OVERFLOW;
+        }
+
+        msg_set->more = (bcmos_bool) is_more;
+        if (msg_set->num_instances > msg_set->max_instances)
+        {
+            BCMOS_TRACE_RETURN(BCM_ERR_INTERNAL, "msg_set unpack: num_instances %u > max_instances %u\n", msg_set->num_instances, msg_set->max_instances);
+        }
+
+        for (i = 0; i < msg_set->num_instances && err == BCM_ERR_OK; i++)
+        {
+            err = bcmolt_msg_unpack(buf, &msg_set->msg[i]);
+        }
+    }
+
+    return err;
+}
+
+/******************************************************************************/
+bcmos_errno bcmolt_msg_unpack(bcmolt_buf *buf, bcmolt_msg **unpacked)
+{
+    bcmolt_msg hdr = { };
+    bcmos_errno err;
+    bcmolt_group_info *group;
+    bcmolt_group_info *key;
+    bcmos_bool did_malloc = BCMOS_FALSE;
+    uint8_t *key_ptr;
+    void *list_mem = NULL;
+    void **list_mem_ptr = NULL;
+
+    err = bcmolt_msg_hdr_unpack(&hdr, buf);
+    if (err != BCM_ERR_OK)
+    {
+        return err;
+    }
+
+    if (!bcmolt_get_group_info(&hdr, &group, &key))
+    {
+        return BCM_ERR_MSG_ERROR;
+    }
+
+    if (*unpacked == NULL)
+    {
+        uint32_t size = group->container_size == 0 ? sizeof(bcmolt_msg) + key->size : group->container_size;
+        err = bcmolt_msg_list_mem_scan(buf, &hdr, group, key, &size);
+        if (err != BCM_ERR_OK)
+        {
+            return err;
+        }
+
+        *unpacked = bcmos_calloc(size);
+        if (*unpacked == NULL)
+        {
+            return BCM_ERR_NOMEM;
+        }
+
+        list_mem = (uint8_t *) (*unpacked) + group->container_size;
+        list_mem_ptr = &list_mem;
+        did_malloc = BCMOS_TRUE;
+    }
+    else
+    {
+        if ((*unpacked)->list_buf != NULL)
+        {
+            uint32_t size = 0;
+            err = bcmolt_msg_list_mem_scan(buf, &hdr, group, key, &size);
+            if (err != BCM_ERR_OK)
+            {
+                return err;
+            }
+
+            if (size > (*unpacked)->list_buf_size)
+            {
+                return BCM_ERR_INSUFFICIENT_LIST_MEM;
+            }
+
+            list_mem = (*unpacked)->list_buf;
+            list_mem_ptr = &list_mem;
+        }
+    }
+
+    hdr.msg_set = (*unpacked)->msg_set;
+    **unpacked = hdr;
+
+    key_ptr = (uint8_t *) (*unpacked + 1);
+    if (!key->unpack(key_ptr, buf, list_mem_ptr, BCMOLT_PRESENCE_MASK_ALL))
+    {
+        if (did_malloc)
+        {
+            bcmos_free(*unpacked);
+        }
+
+        return BCM_ERR_OVERFLOW;
+    }
+
+    if (bcmolt_msg_should_pack_data(&hdr))
+    {
+        uint8_t *data_ptr = (uint8_t *) (*unpacked) + group->data_offset;
+        if ((group->unpack != NULL) && !group->unpack(data_ptr, buf, list_mem_ptr, hdr.presence_mask))
+        {
+            if (did_malloc)
+            {
+                bcmos_free(*unpacked);
+            }
+
+            return BCM_ERR_OVERFLOW;
+        }
+    }
+
+    /* If it is a multi-message pack what follows the rest of the set */
+    if (hdr.type & BCMOLT_MSG_TYPE_MULTI)
+    {
+        err = bcmolt_msg_set_unpack(*unpacked, buf, key);
+        if (err != BCM_ERR_OK)
+        {
+            if (did_malloc)
+            {
+                bcmos_free(*unpacked);
+            }
+
+            return err;
+        }
+    }
+
+    return BCM_ERR_OK;
+}
+
+/******************************************************************************/
+bcmos_errno bcmolt_group_id_split(bcmolt_group_id group_id, bcmolt_obj_id *obj, bcmolt_mgt_group *group, uint16_t *subgroup)
+{
+    if ((group_id >= BCMOLT_GROUP_ID__NUM_OF) || (group_info[group_id] == NULL))
+    {
+        return BCM_ERR_RANGE;
+    }
+
+    *obj = group_info[group_id]->obj_type;
+    *group = group_info[group_id]->group;
+    *subgroup = group_info[group_id]->subgroup;
+    return BCM_ERR_OK;
+}
+
+/******************************************************************************/
+bcmos_errno bcmolt_group_id_combine(bcmolt_obj_id obj, bcmolt_mgt_group group, uint16_t subgroup, bcmolt_group_id *group_id)
+{
+    if ((obj >= BCMOLT_OBJ_ID__NUM_OF) || (group >= BCMOLT_MGT_GROUP__NUM_OF) || (group_ids[obj] == NULL) || (subgroup >= group_ids[obj][group].subgroup_count))
+    {
+        return BCM_ERR_RANGE;
+    }
+
+    *group_id = group_ids[obj][group].subgroup_ids[subgroup];
+    return BCM_ERR_OK;
+}
+
+/******************************************************************************/
+uint8_t bcmolt_msg_instance(const bcmolt_msg *msg)
+{
+    const void *val_ptr;
+
+    if (msg->obj_type >= BCMOLT_OBJ_ID__NUM_OF)
+    {
+        return 0;
+    }
+
+    if (instance_info[msg->obj_type].offset < 0)
+    {
+        return 0;
+    }
+
+    val_ptr = ((const uint8_t *)(msg + 1)) + instance_info[msg->obj_type].offset;
+
+    /** This is probably not the smartest way to do this... TODO: revisit */
+    switch (instance_info[msg->obj_type].size)
+    {
+        case 1:
+            return *((const uint8_t *)val_ptr);
+        case 2:
+            return (uint8_t) (*((const uint16_t *)val_ptr));
+        case 4:
+            return (uint8_t) (*((const uint32_t *)val_ptr));
+        case 8:
+            return (uint8_t) (*((const uint64_t *)val_ptr));
+        default:
+            return 0;
+    }
+}
+
+/******************************************************************************/
+bcmos_errno bcmolt_msg_clone(bcmolt_msg **dest, bcmolt_msg *src)
+{
+    bcmos_errno err;
+    int32_t packed_len;
+    uint8_t *mem;
+    bcmolt_buf buf;
+
+    packed_len = bcmolt_msg_get_packed_length(src);
+    if (packed_len < 0)
+    {
+        return (bcmos_errno) packed_len;
+    }
+
+    mem = bcmos_calloc((uint32_t) packed_len);
+    if (mem == NULL)
+    {
+        return BCM_ERR_NOMEM;
+    }
+
+    bcmolt_buf_init(&buf, (uint32_t) packed_len, mem, BCMOLT_BUF_ENDIAN_FIXED);
+    err = bcmolt_msg_pack(src, &buf);
+    if (err != BCM_ERR_OK)
+    {
+        bcmos_free(mem);
+        return err;
+    }
+
+    buf.curr = buf.start;
+    err = bcmolt_msg_unpack(&buf, dest);
+    bcmos_free(mem);
+    return err;
+}
+
+/******************************************************************************/
+bcmos_errno bcmolt_get_prop_readonly_mask(bcmolt_obj_id obj, bcmolt_presence_mask *mask)
+{
+    if (obj >= BCMOLT_OBJ_ID__NUM_OF)
+    {
+        return BCM_ERR_RANGE;
+    }
+
+    *mask = readonly_prop_mask[obj];
+    return BCM_ERR_OK;
+}
+
+#ifdef __KERNEL__
+EXPORT_SYMBOL(bcmolt_msg_get_packed_length);
+EXPORT_SYMBOL(bcmolt_msg_pack);
+EXPORT_SYMBOL(bcmolt_msg_unpack);
+EXPORT_SYMBOL(bcmolt_group_id_split);
+EXPORT_SYMBOL(bcmolt_group_id_combine);
+EXPORT_SYMBOL(bcmolt_msg_instance);
+EXPORT_SYMBOL(bcmolt_get_prop_readonly_mask);
+EXPORT_SYMBOL(bcmolt_msg_set_alloc);
+EXPORT_SYMBOL(bcmolt_msg_set_free);
+
+MODULE_LICENSE("Dual BSD/GPL");
+#endif
diff --git a/bcm68620_release/release/host_driver/model/bcmolt_msg_pack.h b/bcm68620_release/release/host_driver/model/bcmolt_msg_pack.h
new file mode 100644
index 0000000..bc01bff
--- /dev/null
+++ b/bcm68620_release/release/host_driver/model/bcmolt_msg_pack.h
@@ -0,0 +1,143 @@
+/*
+<:copyright-BRCM:2016:proprietary:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+This program is the proprietary software of Broadcom Corporation and/or its
+licensors, and may only be used, duplicated, modified or distributed pursuant
+to the terms and conditions of a separate, written license agreement executed
+between you and Broadcom (an "Authorized License").  Except as set forth in
+an Authorized License, Broadcom grants no license (express or implied), right
+to use, or waiver of any kind with respect to the Software, and Broadcom
+expressly reserves all rights in and to the Software and all intellectual
+property rights therein.  IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE
+NO RIGHT TO USE THIS SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY
+BROADCOM AND DISCONTINUE ALL USE OF THE SOFTWARE.
+
+Except as expressly set forth in the Authorized License,
+
+1. This program, including its structure, sequence and organization,
+    constitutes the valuable trade secrets of Broadcom, and you shall use
+    all reasonable efforts to protect the confidentiality thereof, and to
+    use this information only in connection with your use of Broadcom
+    integrated circuit products.
+
+2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
+    AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, REPRESENTATIONS OR
+    WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH
+    RESPECT TO THE SOFTWARE.  BROADCOM SPECIFICALLY DISCLAIMS ANY AND
+    ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, NONINFRINGEMENT,
+    FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, ACCURACY OR
+    COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR CORRESPONDENCE
+    TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT OF USE OR
+    PERFORMANCE OF THE SOFTWARE.
+
+3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR
+    ITS LICENSORS BE LIABLE FOR (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL,
+    INDIRECT, OR EXEMPLARY DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY
+    WAY RELATING TO YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN
+    IF BROADCOM HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES;
+    OR (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE
+    SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE LIMITATIONS
+    SHALL APPLY NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF ANY
+    LIMITED REMEDY.
+:>
+*/
+
+#ifndef BCMOLT_MSG_PACK_H_
+#define BCMOLT_MSG_PACK_H_
+
+#include "bcmos_system.h"
+#include "bcmos_common.h"
+#include "bcmos_errno.h"
+#include "bcmolt_buf.h"
+#include "bcmolt_msg.h"
+#include "bcmolt_model_types.h"
+
+/** Gets the number of bytes a message would occupy when packed.
+ *
+ * \param this The message to scan.
+ * \return The size in bytes if > 0, or an error as defined in bcmos_errno.
+ */
+int32_t bcmolt_msg_get_packed_length(bcmolt_msg *this);
+
+/** Packs a message to a byte stream.
+ *
+ * \param this The message to pack.
+ * \param buf The stream to pack into.
+ * \return An error code or BCM_ERR_OK for success.
+ */
+bcmos_errno bcmolt_msg_pack(bcmolt_msg *this, bcmolt_buf *buf);
+
+/** Unpacks a message from a byte stream.
+ *
+ * This unpacks the message from the packed form into the struct following the "unpacked" pointer.  There are several
+ * special cases:
+ *
+ * if *unpacked == NULL:
+ *   *unpacked will be allocated dynamically via bcmos_calloc, in a contiguous block of memory with the struct
+ *   itself followed by the memory required for all variable-sized lists.
+ *
+ * if (*unpacked)->list_buf != NULL:
+ *   When a variable-length list is encountered in the input stream, and the array field we're unpacking into is NULL,
+ *   memory will be allocated starting from (*unpacked)->list_buf.  If multiple such lists exist, they will share this
+ *   buffer.  If the (*unpacked)->list_buf_size is not large enough, this will return BCM_ERR_INSUFFICIENT_LIST_MEM.
+ *
+ * \param buf           The stream to unpack from.
+ * \param unpacked      A pointer to the message to unpack.
+ * \return An error as defined in bcmos_errno.
+ */
+bcmos_errno bcmolt_msg_unpack(bcmolt_buf *buf, bcmolt_msg **unpacked);
+
+/** Converts a generic group ID into a specific object type, group and subgroup.
+ *
+ * \param group_id The generic group ID.
+ * \param obj The object type that corresponds to the group ID.
+ * \param group The group type that corresponds to the group ID.
+ * \param subgroup The subgroup index that corresponds to the group ID.
+ * \return An error code or BCM_ERR_OK for success.
+ */
+bcmos_errno bcmolt_group_id_split(bcmolt_group_id group_id,
+                                  bcmolt_obj_id *obj,
+                                  bcmolt_mgt_group *group,
+                                  uint16_t *subgroup);
+
+/** Converts a specific object type, group and subgroup into a generic group ID.
+ *
+ * \param obj The object type that corresponds to the group ID.
+ * \param group The group type that corresponds to the group ID.
+ * \param subgroup The subgroup index that corresponds to the group ID.
+ * \param group_id The generic group ID.
+ * \return An error code or BCM_ERR_OK for success.
+ */
+bcmos_errno bcmolt_group_id_combine(bcmolt_obj_id obj,
+                                    bcmolt_mgt_group group,
+                                    uint16_t subgroup,
+                                    bcmolt_group_id *group_id);
+
+/** Returns the instance number of a given message, as determined by the object key.
+ *
+ * \param msg The message to check.
+ * \return The instance number of the message.
+ */
+uint8_t bcmolt_msg_instance(const bcmolt_msg *msg);
+
+/** Gets a mask of all readonly properties for an object's cfg group.
+ *
+ * \param obj The objecct to check.
+ * \param mask A mask of bits set to 1 per read-only property.
+ * \return An error code or BCM_ERR_OK for success.
+ */
+bcmos_errno bcmolt_get_prop_readonly_mask(bcmolt_obj_id obj, bcmolt_presence_mask *mask);
+
+/** Clones a message by packing it to a buffer then unpacking it into the destination message.
+ * This uses bcmolt_msg_unpack, so if *dest is NULL, memory will by allocated dynamically using bcmos_calloc.
+ *
+ * \param dest A pointer to the location in memory that will hold the cloned message.
+ * \param src The message that should be copied.
+ * \return An error code or BCM_ERR_OK for success.
+ */
+bcmos_errno bcmolt_msg_clone(bcmolt_msg **dest, bcmolt_msg *src);
+
+#endif /* BCMOLT_MSG_PACK_H_ */
diff --git a/bcm68620_release/release/host_driver/pcie/Makefile b/bcm68620_release/release/host_driver/pcie/Makefile
new file mode 100644
index 0000000..c8cc18b
--- /dev/null
+++ b/bcm68620_release/release/host_driver/pcie/Makefile
@@ -0,0 +1,35 @@
+# PCIe driver
+# - low-level PCIe driver (send/rx functions)
+#
+MOD_NAME = pcie
+
+ifeq ("$(OS_KERNEL)", "linux")
+MOD_TYPE = linux_lib
+else
+MOD_TYPE = lib
+endif
+
+MOD_DEFS = -DCHECK_PARAM
+#MOD_DEFS += -DHARDWARE_TEST1
+
+ifeq ("$(SUBSYSTEM)", "embedded")
+    MOD_INC_DIRS = $(SRC_DIR) embedded/sys/drv
+else
+    ifneq ("$(RELEASE_BUILD)", "y")
+        MOD_INC_DIRS = $(SRC_DIR) host/driver/$(PLATFORM)/pcie
+    endif
+endif
+
+# If called by linux kernel builder - add include paths manually.
+# It is not elegant, but we'll not have many linux modules
+ifneq ("$(KBUILD_SRC)", "")
+	-include $(OUT_DIR_BASE)/Makefile.config.$(MOD_NAME)
+endif
+
+ifneq ("$(RAW_TRANSPORT_VIA_UDP)", "y")
+    srcs = bcmtr_pcie.c
+endif
+
+USE_LINT = yes
+
+
diff --git a/bcm68620_release/release/host_driver/pcie/bcmolt_tr_pcie_specific.c b/bcm68620_release/release/host_driver/pcie/bcmolt_tr_pcie_specific.c
new file mode 100755
index 0000000..94102bc
--- /dev/null
+++ b/bcm68620_release/release/host_driver/pcie/bcmolt_tr_pcie_specific.c
@@ -0,0 +1,106 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#include "bcmos_system.h"
+#include "bcmtr_pcie.h"
+#include "bcmolt_tr_pcie_specific.h"
+
+extern f_bcmtr_int bcmtr_pcie_rx_irq_handler;
+extern f_bcmtr_int bcmtr_pcie_tx_irq_handler;
+static bcmos_fastlock isr_lock;
+
+/***************************************************************/
+/* need to pass thru all the devices - check if irq is SHARED */
+/***************************************************************/
+static int bcmtr_rx_isr(int irq, void *isr_info)
+{
+    uint32_t isr_reg;
+    uint32_t mask_reg;
+    long flags;
+    int handled = 0;
+    bcm_pcied_isr_data *isr_data = (bcm_pcied_isr_data *)isr_info;
+
+    flags = bcmos_fastlock_lock(&isr_lock);
+
+    isr_reg = bcm_pci_read32((uint32_t*)(isr_data->pcie_reg_base + DMA_INTR_STATUS));
+    mask_reg = ~bcm_pci_read32((uint32_t*)(isr_data->pcie_reg_base + DMA_INTR_MASK_STATUS));
+
+    if ((isr_reg & mask_reg)& DMA_TX_DONE_MASK)
+    {
+        /* handle TX DONE interrupt */
+        isr_data->tx_done_num++;
+
+        if (bcmtr_pcie_tx_irq_handler)
+            bcmtr_pcie_tx_irq_handler(isr_data->device);
+
+        handled = 1;
+    }
+
+    if ((isr_reg & mask_reg ) & DMA_RX_DONE_MASK)
+    {
+        /* handle RX DONE interrupt */
+        isr_data->rx_done_num++;
+
+        if (bcmtr_pcie_rx_irq_handler)
+            bcmtr_pcie_rx_irq_handler(isr_data->device);
+
+        handled = 1;
+    }
+
+    if (isr_reg & (DMA_RX_ERROR_MASK | DMA_TX_ERROR_MASK))
+    {
+        if (isr_reg & DMA_RX_ERROR_MASK)
+            isr_data->rx_err_num++;
+        if (isr_reg & DMA_TX_ERROR_MASK)
+            isr_data->tx_err_num++;
+        /* clear interrupt error interrupt */
+        bcm_pci_write32((uint32_t*)(isr_data->pcie_reg_base + DMA_INTR_CLEAR), DMA_RX_ERROR_MASK | DMA_TX_ERROR_MASK);
+        handled = 1;
+    }
+
+    bcmos_fastlock_unlock(&isr_lock, flags);
+
+    return handled;
+}
+
+void bcmtr_connect_isr(void *isr_info)
+{
+    uint32_t    flags = 0;
+
+    bcm_pcied_isr_data *isr_data = (bcm_pcied_isr_data *)isr_info;
+    bcmos_fastlock_init(&isr_lock, flags);
+    /* connect interrupt to system cpu - 0 */
+    bcmos_int_connect((int)isr_data->rx_irq, 0, BCMOS_IRQ_SHARED, bcmtr_rx_isr, "dmaisr", isr_data);
+}
+
+#ifdef __KERNEL__
+EXPORT_SYMBOL(bcmtr_connect_isr);
+#endif
+
+
diff --git a/bcm68620_release/release/host_driver/pcie/bcmolt_tr_pcie_specific.h b/bcm68620_release/release/host_driver/pcie/bcmolt_tr_pcie_specific.h
new file mode 100644
index 0000000..c8c8ac1
--- /dev/null
+++ b/bcm68620_release/release/host_driver/pcie/bcmolt_tr_pcie_specific.h
@@ -0,0 +1,113 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#ifndef BCMOLT_TR_PCIE_SPECIFIC_H_
+#define BCMOLT_TR_PCIE_SPECIFIC_H_
+
+#include "bcmos_system.h"
+#include "bcmtr_pcie.h"
+
+#define DESCRIPTOR_CONTROL      0x00064410 /* Tx Software Descriptor List Control and Status */
+#define WAKEUP_DMA              0x00064414 /* Tx Wake Control */
+#define ERROR_STATUS            0x00064418 /* Tx Engine Error Status */
+
+#define INTR2_PCI_STATUS        0x00064318 /* PCI interrupt Status Register */
+
+#define DMA_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_RUN_STOP_MASK   0x00000001
+#define DMA_TX_WAKE_CTRL_WAKE_MASK                          0x00000001
+
+#define DMA_INTR_STATUS	        0x00064318 /* PCI interrupt Status Register */
+#define DMA_INTR_CLEAR          0x00064320 /* PCI interrupt Clear Register */
+#define DMA_INTR_MASK_SET       0x00064328 /* PCI interrupt Mask Set Register */
+#define DMA_INTR_MASK_CLEAR     0x0006432c /* PCI interrupt Mask Clear Register */
+#define DMA_INTR_MASK_STATUS    0x00064324 /* PCI interrupt Mask & Status Register */
+
+#define DMA_RX_ERROR_MASK       0x00000008
+#define DMA_RX_DONE_MASK        0x00000004
+#define DMA_TX_DONE_MASK        0x00000001
+#define DMA_TX_ERROR_MASK       0x00000002
+
+#define PCIE_L2_INTR_MASK       0x00000020 /* L2 interrupt bit in L1 interrupt status */
+
+#define DMA_INTR1_STATUS        0x00069300 /* Interrupt Status Register */
+#define DMA_INTR1_MASK_CLEAR    0x0006930c /* Interrupt Mask Clear Register */
+#define DMA_INTR1_MASK_SET      0x00069308 /* Interrupt Mask Set Register */
+#define DMA_INTA_MASK           0x00000002
+#define DMA_INTA_SHIFT          1
+#define PCIE_STATUS_OFFSET      0x00064068 /* PCIE_PCIE_PCIE_0_PCIE_PCIE_0_MISC_PCIE_STATUS */
+
+void bcmtr_connect_isr(void *isr_info);
+
+/* first parameter is the dest PD, the second parameter is the source field */
+static inline void bcmtr_set_dest_buffer_address(uint32_t *pd, void *value)
+{
+    uint64_t tmp = bcmos_virt_to_phys(value);
+
+    bcm_pci_write32(&pd[PCI_PACKET_LOW_INDEX],  (uint32_t)( tmp & 0xffffffffUL));
+    bcm_pci_write32(&pd[PCI_PACKET_HIGH_INDEX], (uint32_t)((tmp >> 32) & 0xffffffffUL));
+}
+
+/* first parameter is the dest PD, the second parameter is the source field */
+static inline void bcmtr_set_source_buffer_address(uint32_t *pd, void *value)
+{
+    uint64_t tmp = bcmos_virt_to_phys(value);
+
+    bcm_pci_write32(&pd[PCI_PACKET_LOW_INDEX],  (uint32_t)( tmp & 0xffffffffUL));
+    bcm_pci_write32(&pd[PCI_PACKET_HIGH_INDEX], (uint32_t)((tmp >> 32) & 0xffffffffUL));
+}
+
+static inline bcmos_errno bcmtr_create_tu_rings(uint32_t txlength, uint32_t rxlength,
+                                          void **txptr, void **rxptr,
+                                          void **txptr_orig, void **rxptr_orig,
+                                          unsigned long pcie_reg_base)
+{
+    *txptr      = NULL;
+    *rxptr_orig = NULL;
+    *txptr      = NULL;
+    *rxptr_orig = NULL;
+
+    return BCM_ERR_OK;
+}
+static inline void bcmtr_pcie_specific_init(unsigned long pcie_reg_base) {}
+static inline void bcmtr_pcie_free_rings(uint32_t device, uint32_t *tx_ptr, uint32_t * rx_ptr){}
+static inline void bcmtr_pcie_free_irq(uint32_t irq, void *priv)
+{
+#ifndef SIMULATION_BUILD
+    bcmos_int_disconnect((int)irq, priv);
+#endif
+}
+
+#define TX_LOCKDEF         bcmos_mutex  tx_lock;
+#define CREATE_TXLOCK(i)   bcmos_mutex_create(&bcmtr_pcie_data[i].tx_lock, 0, NULL)
+#define DESTROY_TXLOCK(i)  bcmos_mutex_destroy(&bcmtr_pcie_data[i].tx_lock)
+#define LOCK_TX()          bcmos_mutex_lock(&current_device->tx_lock)
+#define UNLOCK_TX()        bcmos_mutex_unlock(&current_device->tx_lock)
+
+#endif
+
diff --git a/bcm68620_release/release/host_driver/pcie/bcmtr_pcie.c b/bcm68620_release/release/host_driver/pcie/bcmtr_pcie.c
new file mode 100644
index 0000000..b7b572f
--- /dev/null
+++ b/bcm68620_release/release/host_driver/pcie/bcmtr_pcie.c
@@ -0,0 +1,1256 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+#include "bcmtr_pcie.h"
+#include "bcmolt_tr_pcie_specific.h"
+
+
+/*
+    Synchronization flow of DMA data base between Host and Maple
+    The process takes place after Maple is loaded and run from DDR.
+    ========================================================
+    Host                                              Maple
+    ========================================================
+
+    write to SRAM its TX and RX queue size
+    write to SRAM DDR_FINISH indication
+    wait for PRM_BIT from Maple                      run from DDR
+                                                     get from SRAM host tx and rx queue size
+                                                     calls pre_connect
+                                                     write to SRAM opaque data
+                                                     write to SRAM PRM_BIT
+    read from SRAM opaque data                       calls connect
+    clear PRM_BIT from Maple                         wait for PRM_BIT from Host
+    calls pre_connect
+    calls connect
+    write to SRAM PRM_BIT
+    register rx interrupt handler                    register rx interrupt handler
+    ========================================================
+          Both ready to send/receive packets thru DMA:
+    ========================================================
+*/
+/* misc local_bd info structure
+ _____________________________________________________
+|___31 - 25_____|   24  |____23 -16_____|____15-0_____|
+|__reserved_____|__OWN__|___chanal ID___|____length___|
+
+*/
+#define BCM_PCIED_BD_OWNERSHIP_SHIFT        24
+#define BCM_PCIED_BD_OWNERSHIP_MASK         (0x1UL << BCM_PCIED_BD_OWNERSHIP_SHIFT)
+
+#define BCM_PCIED_BD_CHANNEL_ID_SHIFT       16
+#define BCM_PCIED_BD_CHANNEL_ID_MASK        (0xffUL << BCM_PCIED_BD_CHANNEL_ID_SHIFT)
+
+#define BCM_PCIED_BD_PKT_LENGTH_MASK        0xffff
+
+/* length_and_isrenable */
+#define BCM_PCIED_INTR_ENABLE_SHIFT         31
+#define BCM_PCIED_INTR_ENABLE_MASK          (0x1UL << BCM_PCIED_INTR_ENABLE_SHIFT)
+
+#define BCM_PCIED_TRANSFER_SIZE_MASK        0x01ffffffUL
+#define BCM_PCIED_TRANSFER_SIZE_SHIFT       0
+
+/* last_next_indicator */
+#define BCM_PCIED_LAST_RECORD_SHIFT         31
+#define BCM_PCIED_LAST_RECORD_MASK          (0x1UL << BCM_PCIED_LAST_RECORD_SHIFT)
+
+
+#define BCM_PCIED_NEXT_CONTINOUS_SHIFT      2
+#define BCM_PCIED_NEXT_CONTINOUS_MASK       (0x1UL << BCM_PCIED_NEXT_CONTINOUS_SHIFT)
+
+#define BCM_PCIE_ALL_DMA_INTERRUPTS_MASK    (DMA_RX_DONE_MASK | DMA_RX_ERROR_MASK | DMA_TX_DONE_MASK | DMA_TX_ERROR_MASK)
+
+/* packet descriptor - used by HW DMA mechanism , defined by HW do not change it */
+typedef struct
+{
+    uint32_t    ddr_buff_address_low;   /* Maple address - word[0]*/
+    uint32_t    pcie_pkt_address_low;   /* Host address  - word[1]*/
+    uint32_t    pcie_pkt_address_high;  /*               - word[2]*/
+    uint32_t    length_and_isrenable;   /* bit 31 - interrupt enable; bits 24:2 - transfer length */
+    uint32_t    last_next_indicator;    /* bit 31 - last indicator; bit 30 - direction; bit 2 - next descriptor, if 1 -> continuous */
+    uint32_t    next_pd_address_low;
+    uint32_t    next_pd_address_high;
+    uint32_t    ddr_buff_address_high;  /*               - word[7]*/
+} bcm_pcied_pd;
+
+/* transfer unit for TX/RX */
+typedef struct
+{
+    bcm_pcied_pd    data_pd;            /* PD used to transfer data packet */
+    bcm_pcied_pd    remote_to_local_pd; /* PD used to transfer shadow_rbd field from local CPU
+                                            to local_bd field on peer CPU   */
+} bcm_pcied_tu;
+
+/* opaque data, in current implementation will be sent from the Maple to Host only.
+   Provide offsets from the start of Maple DDR window for tx and rx TU rings (where tx and rx rings in term of Host)
+*/
+struct bcmtr_pcie_opaque_data
+{
+    uint32_t    tx_tu_ring_offset;
+    uint32_t    rx_tu_ring_offset;
+};
+
+/* main structure of the driver */
+typedef struct
+{
+    bcm_pcied_tu        *tx_tu_ring;        /* TX DMA ring */
+    bcm_pcied_tu        *rx_tu_ring;        /* RX DMA ring */
+
+    uint32_t            *local_bd;          /* used for receive, updated by peer in tx */
+    uint32_t            *shadow_rbd;         /* used by local in tx as just buffer for update remote local_bd */
+
+    uint32_t            *tx_owner;          /* used for local in tx for lookup that tu mine, updated by local and peer */
+    uint32_t            *peer_tx_owner;     /* used in rx for update tx_owner of the remote*/
+
+    bcmos_buf           **tx_nbuff_save;    /* array of network buffers pointers, used by TX, to store sent buffers */
+    bcmos_buf           **rx_nbuff_save;    /* array of network buffers pointers, used by RX, to store allocated for rx buffers */
+
+    uint32_t            current_tx;         /* index of current tx tu */
+    uint32_t            conf_tx;            /* index of the last reclaimed tx tu */
+    uint32_t            current_rx;         /* index of current rx tu */
+    int32_t             prev_tx;
+
+    uint32_t            max_tx_index;
+    uint32_t            max_rx_index;
+
+    uint32_t            max_mtu;
+
+    unsigned long       ddr_win_base;
+    bcm_pcied_isr_data  isrdata;            /* includes pcie register base, id and irq number */
+
+    TX_LOCKDEF
+
+    /* counters  */
+    uint32_t            rx_counter;
+    uint32_t            tx_counter;
+    uint32_t            rx_pcie_empty_counter;
+    uint32_t            tx_pcie_full_counter;
+
+    /* saved meta-data */
+    uint32_t            txq_length;
+    uint32_t            rxq_length;
+    uint32_t            *tx_tu_ring_orig;   /* TX DMA ring */
+    uint32_t            *rx_tu_ring_orig;   /* RX DMA ring */
+
+} bcm_pcied_comm_data;
+
+f_bcmtr_int bcmtr_pcie_rx_irq_handler;
+f_bcmtr_int bcmtr_pcie_tx_irq_handler;
+
+static void default_tx_done_callback(uint8_t device, bcmos_buf *buf);
+
+static f_bcmtr_done tx_done_handler = default_tx_done_callback;
+
+/* used for error messages */
+#if defined(__KERNEL__)
+#define pcie_print(fmt, args...) printk("%s: %d: " fmt, __FUNCTION__ , __LINE__, ##args)
+#else
+#define pcie_print bcmos_printf
+#endif
+
+#define LOCAL_OWNER           0
+#define REMOTE_OWNER          1
+
+#define INCREMENT_RECEIVED(device)      bcmtr_pcie_data[device].rx_counter++
+#define INCREMENT_TRANSMITED(device)    bcmtr_pcie_data[device].tx_counter++
+
+/* set next index into a DMA ring */
+#define NEXT_INDEX(maxindex, index) \
+do{                                 \
+    index++;                        \
+    if (index > maxindex)           \
+        index = 0;                  \
+} while(0)
+
+/* calculate register address according to registers'base and offset */
+#define PCI_REG_ADDRESS(reg)               (uint32_t *)(bcmtr_pcie_data[device].isrdata.pcie_reg_base + reg)
+
+/* Just for avoid of using this "BCM_ERR_OK"  stupid  define , i can not understand how "error" can be "ok" (D.B.) */
+#define BCMTR_SUCCESS  BCM_ERR_OK
+
+#define BCMTR_PARANOID_CHECK()                 \
+    do {                                       \
+        if (!bcmtr_pcie_data)                  \
+            return BCM_ERR_NORES;              \
+        if (device >= bcmtr_max_devices_number)\
+            return BCM_ERR_RANGE;              \
+    } while(0)
+
+#define BCMTR_PARANOID_CHECK_TYPE(t)           \
+    do {                                       \
+        if (!bcmtr_pcie_data)                  \
+            return (t)BCM_ERR_NORES;           \
+        if (device >= bcmtr_max_devices_number)\
+            return (t)BCM_ERR_RANGE;           \
+    } while(0)
+
+#define BCMTR_PARANOID_CHECK_EXT()             \
+    do {                                       \
+        if (!bcmtr_pcie_data)                  \
+            return BCM_ERR_NORES;              \
+        if (device >= bcmtr_max_devices_number)\
+            return BCM_ERR_RANGE;              \
+        if (!bcmtr_pcie_data[device].isrdata.pcie_reg_base)\
+            return BCM_ERR_NORES;              \
+    } while(0)
+
+    /* device data array */
+static bcm_pcied_comm_data *bcmtr_pcie_data;
+
+static uint32_t bcmtr_max_devices_number;
+
+/* stop one dma engine */
+static inline void stop_dma(uint8_t device)
+{
+    volatile uint32_t value;
+
+    value = bcm_pci_read32(PCI_REG_ADDRESS((uint32_t)DESCRIPTOR_CONTROL));
+    value &= ~DMA_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_RUN_STOP_MASK;
+    bcm_pci_write32(PCI_REG_ADDRESS(DESCRIPTOR_CONTROL), value);
+}
+
+/* Default tx-done callback */
+static void default_tx_done_callback(uint8_t device, bcmos_buf *buf)
+{
+    bcmos_free(buf);
+}
+
+/* free all allocated buffers */
+static bcmos_errno free_buffers(uint8_t device, const char *error_string)
+{
+    uint32_t i;
+    bcm_pcied_comm_data *current_device = &bcmtr_pcie_data[device];
+
+    pcie_print("%s", error_string);
+
+    if (current_device->rx_nbuff_save)
+    {
+        for (i = 0; i < current_device->rxq_length; i++)
+        {
+            if (current_device->rx_nbuff_save[i])
+                bcmos_buf_free(current_device->rx_nbuff_save[i]);
+        }
+        bcmos_free(current_device->rx_nbuff_save);
+    }
+
+    if (current_device->tx_nbuff_save)
+    {
+        for (i = 0; i < current_device->txq_length; i++)
+        {
+            if (current_device->tx_nbuff_save[i])
+                bcmos_buf_free(current_device->tx_nbuff_save[i]);
+        }
+        bcmos_free(current_device->tx_nbuff_save);
+    }
+
+    if (current_device->local_bd)
+        bcmos_dma_free(device, current_device->local_bd);
+
+    if (current_device->shadow_rbd)
+        bcmos_dma_free(device, current_device->shadow_rbd);
+
+    DESTROY_TXLOCK(device);
+
+    bcmtr_pcie_free_rings(device, current_device->tx_tu_ring_orig, current_device->rx_tu_ring_orig);
+
+    memset(&bcmtr_pcie_data[device], 0, sizeof(bcm_pcied_comm_data));
+
+    return BCM_ERR_NOMEM;
+}
+
+bcmos_errno bcmtr_pcie_init(uint8_t max_devices)
+{
+    bcmtr_max_devices_number = max_devices;
+
+    bcmtr_pcie_data = (bcm_pcied_comm_data *)bcmos_calloc(bcmtr_max_devices_number * sizeof(bcm_pcied_comm_data));
+    if (!bcmtr_pcie_data)
+    {
+        pcie_print("Driver cannot be initialized\n");
+        return BCM_ERR_NOMEM;
+    }
+
+    return BCMTR_SUCCESS;
+}
+
+bcmos_errno bcmtr_pcie_pre_connect(uint8_t device, const bcmtr_pcie_pre_connect_cfg *cfg, bcmtr_pcie_opaque_data *opaque_data)
+{
+    bcm_pcied_comm_data *current_device;
+    bcmos_errno         ret_code;
+    uint32_t            i;
+
+    BCMTR_PARANOID_CHECK();
+
+    if (!cfg)
+    {
+        pcie_print("Second parameter(config) is NULL pointer\n");
+        return BCM_ERR_NULL;
+    }
+
+    if (!opaque_data)
+    {
+        pcie_print("Return area pointer(Third parameter) is NULL\n");
+        return BCM_ERR_NULL;
+    }
+
+    current_device = &bcmtr_pcie_data[device];
+
+    CREATE_TXLOCK(device);
+
+    /* copy user's data to internal data base */
+    current_device->txq_length              = cfg->txq_size;
+    current_device->rxq_length              = cfg->rxq_size;
+    current_device->max_tx_index            = cfg->txq_size - 1;
+    current_device->max_rx_index            = cfg->rxq_size - 1;
+    current_device->max_mtu                 = cfg->max_mtu;
+    current_device->isrdata.device          = device;
+    current_device->isrdata.rx_irq          = cfg->rx_irq;
+    current_device->isrdata.pcie_reg_base   = cfg->pcie_reg_base;
+    current_device->ddr_win_base            = cfg->ddr_win_base;
+    current_device->prev_tx                 = -1;
+
+    /**********************/
+    /* allocate data base */
+    /**********************/
+
+    bcmtr_pcie_specific_init(current_device->isrdata.pcie_reg_base);
+
+    ret_code =  bcmtr_create_tu_rings(current_device->txq_length, current_device->rxq_length,
+                                     (void **)&current_device->tx_tu_ring, (void **)&current_device->rx_tu_ring,
+                                     (void **)&current_device->tx_tu_ring_orig, (void **)&current_device->rx_tu_ring_orig,
+                                     current_device->isrdata.pcie_reg_base);
+    if (ret_code != BCMTR_SUCCESS)
+    {
+        pcie_print("Failed to create transfer unit rings : (error=%d)\n",ret_code);
+        return ret_code;
+    }
+
+    /* allocate array of local_bd for RX chain */
+    current_device->local_bd = (uint32_t *)bcmos_dma_alloc(device, sizeof(*current_device->local_bd) * current_device->rxq_length);
+    if (!current_device->local_bd)
+        return free_buffers(device, "Failed to allocate local_bd for RX ring\n");
+
+     /* set remote side as owner for all local_bd */
+    for (i = 0; i < current_device->rxq_length; i++)
+        *(uint32_t*)(&current_device->local_bd[i])=
+            BCMOS_ENDIAN_CPU_TO_LITTLE_U32((uint32_t)(REMOTE_OWNER << BCM_PCIED_BD_OWNERSHIP_SHIFT));
+
+    /* allocate array of local_bd for TX chain */
+    current_device->shadow_rbd = (uint32_t *)bcmos_dma_alloc(device, sizeof(*current_device->shadow_rbd) * current_device->txq_length);
+    if (!current_device->shadow_rbd )
+       return  free_buffers(device, "Failed to allocate shadow_rbd for TX ring\n");
+    /* clear all shadow_rbd , actualy no need but suatble for debugging */
+    memset(current_device->shadow_rbd, 0, sizeof(*current_device->shadow_rbd) * current_device->txq_length);
+
+    /* allocate netowrk buffer pointers arraies */
+    current_device->tx_nbuff_save = (bcmos_buf**)bcmos_calloc(sizeof(bcmos_buf*) * current_device->txq_length);
+    if (!current_device->tx_nbuff_save)
+        return free_buffers(device,"Failed to allocate array for TX buffers pointers\n");
+
+    current_device->rx_nbuff_save = (bcmos_buf**)bcmos_calloc(sizeof(bcmos_buf*) * current_device->rxq_length);
+    if (!current_device->rx_nbuff_save)
+        return free_buffers(device, "Failed to allocate array for RX buffers pointers\n");
+
+    /* update return value, cross tx and rx for peer
+        If we do not allocate the corresponded area just send zero to peer for indicate it
+    */
+    if (current_device->tx_tu_ring)
+        opaque_data->rx_tu_ring_offset = (unsigned long)current_device->tx_tu_ring - current_device->ddr_win_base;
+
+    if (current_device->rx_tu_ring)
+        opaque_data->tx_tu_ring_offset = (unsigned long)current_device->rx_tu_ring - current_device->ddr_win_base;
+
+    return BCMTR_SUCCESS;
+}
+
+bcmos_errno bcmtr_pcie_connect(uint8_t device, const bcmtr_pcie_opaque_data *opaque_data)
+{
+    uint32_t            i;
+    bcm_pcied_comm_data *current_device;
+    bcm_pcied_tu        *tu_ptr = NULL;
+    uint8_t             *pkt_ptr;
+
+    BCMTR_PARANOID_CHECK();
+
+    current_device = &bcmtr_pcie_data[device];
+
+    /* update local tu_rings pointers , no need cross since we already do in pre-connect
+        update only not zero pointers */
+    if (!current_device->rx_tu_ring)
+        current_device->rx_tu_ring = (bcm_pcied_tu*)(opaque_data->rx_tu_ring_offset + current_device->ddr_win_base);
+    else
+    {
+        /* set next to point to the beginning of the ring */
+        tu_ptr = &current_device->rx_tu_ring[current_device->max_rx_index];
+        bcm_pci_write32(&(tu_ptr->remote_to_local_pd.next_pd_address_low), (uint32_t)bcmos_virt_to_phys(current_device->rx_tu_ring));
+    }
+
+    if (!current_device->tx_tu_ring)
+        current_device->tx_tu_ring = (bcm_pcied_tu*)(opaque_data->tx_tu_ring_offset + current_device->ddr_win_base);
+    else
+    {
+        /* set next to point to the beginning of the ring */
+        tu_ptr = &current_device->tx_tu_ring[current_device->max_tx_index];
+        bcm_pci_write32(&(tu_ptr->remote_to_local_pd.next_pd_address_low), (uint32_t)bcmos_virt_to_phys(current_device->tx_tu_ring));
+    }
+
+    /* now all tu_rings allocated and synchronize  , time to set the tx_owner and peer_tx_owner */
+    current_device->tx_owner      = (uint32_t*)((unsigned long)current_device->tx_tu_ring + sizeof(bcm_pcied_tu) * current_device->txq_length);
+    current_device->peer_tx_owner = (uint32_t*)((unsigned long)current_device->rx_tu_ring + sizeof(bcm_pcied_tu) * current_device->rxq_length);
+
+    /* preallocate rx net buffers */
+    for (i = 0; i < current_device->rxq_length; i++)
+    {
+        current_device->rx_nbuff_save[i] = bcmos_buf_alloc(current_device->max_mtu);
+        if (!current_device->rx_nbuff_save[i])
+            return free_buffers(device, "Failed to allocate buffer for RX\n");
+    }
+    /**********************************************
+    OK , now we are ready to initialize tu_rings
+    NOTE: all stuff related to create rings (last_next_indicator,next_pd_address_lowr/high already
+    done by bcmtr_create_tu_rings
+    ***********************************************/
+
+    /*Fill TX ring, fill only fields which I "know",
+     all peer related pointers will be updated by peer */
+    for (i = 0, tu_ptr = current_device->tx_tu_ring; i < current_device->txq_length; i++, tu_ptr++)
+    {
+        /* fill the remote_to_local_pd - only last indicator */
+        if (i == current_device->max_tx_index)
+            bcm_pci_write32(&(tu_ptr->remote_to_local_pd.last_next_indicator), BCM_PCIED_LAST_RECORD_MASK);
+        else
+            bcm_pci_write32(&(tu_ptr->remote_to_local_pd.last_next_indicator), (BCM_PCIED_LAST_RECORD_MASK | BCM_PCIED_NEXT_CONTINOUS_MASK));
+
+        /************************
+         fill data_pd
+         - leave length_and_isrenable in zero , will be set during tx
+         - leave source data buffer  pointers in zero, will be set in during tx
+         - dest. data buffer will be set by peer
+        *************************/
+
+        /************************
+         fill remote_to_local_pd
+             dest. data buffer will be set by peer
+        *************************/
+        bcmtr_set_source_buffer_address((uint32_t *)&tu_ptr->remote_to_local_pd, &current_device->shadow_rbd[i]);
+
+        /* set last indicator for the current tu */
+        bcm_pci_write32(&tu_ptr->data_pd.last_next_indicator, BCM_PCIED_NEXT_CONTINOUS_MASK);
+        bcm_pci_write32(&(tu_ptr->remote_to_local_pd.last_next_indicator), BCM_PCIED_NEXT_CONTINOUS_MASK);
+
+        /* set the length and interrupt indicator  */
+        bcm_pci_write32(&tu_ptr->remote_to_local_pd.length_and_isrenable, (BCM_PCIED_INTR_ENABLE_MASK | (sizeof(uint32_t) << BCM_PCIED_TRANSFER_SIZE_SHIFT)));
+    }
+
+    /*Fill RX ring, fill only fields which I "know",
+     all peer related pointers will be updated by peer */
+    for (i = 0, tu_ptr = current_device->rx_tu_ring; i < current_device->rxq_length; i++, tu_ptr++)
+    {
+        /* fill the remote_to_local_pd - only last indicator */
+        if (i == current_device->max_rx_index)
+            bcm_pci_write32(&(tu_ptr->remote_to_local_pd.last_next_indicator), BCM_PCIED_LAST_RECORD_MASK);
+        else
+            bcm_pci_write32(&(tu_ptr->remote_to_local_pd.last_next_indicator), (BCM_PCIED_LAST_RECORD_MASK | BCM_PCIED_NEXT_CONTINOUS_MASK));
+
+        /************************
+        fill data_pd
+        - leave length_and_isrenable in zero , will be set  by peer during tx
+        - leave source data buffer  pointers in zero, will be set by peer during tx
+        *************************/
+
+        /* take data pointer  from nbuf saved in rx_nbuff_save*/
+        pkt_ptr = bcmos_buf_data(current_device->rx_nbuff_save[i]);
+
+        /* invalidate cache for the data buffers */
+        bcmos_prepare_for_dma_read(pkt_ptr, current_device->max_mtu);
+
+        /* set destination data buffer */
+        bcmtr_set_dest_buffer_address((uint32_t *)&tu_ptr->data_pd, pkt_ptr);
+
+        /************************
+            fill remote_to_local_pd
+            - remote_to_local_pd.length_and_isrenable already set by peer
+            - last_next_indicator will be set by peer during tx
+        ************************/
+
+        /* set destination for the BD */
+        bcmtr_set_dest_buffer_address((uint32_t *)&tu_ptr->remote_to_local_pd, &current_device->local_bd[i]);
+
+        /* set next PD next pd indicator for both parts of the transfer unit */
+        bcm_pci_write32(&tu_ptr->data_pd.last_next_indicator,            BCM_PCIED_NEXT_CONTINOUS_MASK);
+        bcm_pci_write32(&tu_ptr->remote_to_local_pd.last_next_indicator, BCM_PCIED_NEXT_CONTINOUS_MASK);
+
+        /* set the length and interrupt indicator  */
+        bcm_pci_write32(&tu_ptr->remote_to_local_pd.length_and_isrenable, (BCM_PCIED_INTR_ENABLE_MASK | (sizeof(uint32_t) << BCM_PCIED_TRANSFER_SIZE_SHIFT)));
+
+    }
+#ifndef SIMULATION_BUILD
+    bcmtr_connect_isr(&current_device->isrdata);
+#endif
+
+    /* Clear and disable all interrupts at L2 */
+    bcm_pci_write32(PCI_REG_ADDRESS(DMA_INTR_MASK_SET), BCM_PCIE_ALL_DMA_INTERRUPTS_MASK);
+    bcm_pci_write32(PCI_REG_ADDRESS(DMA_INTR_CLEAR), BCM_PCIE_ALL_DMA_INTERRUPTS_MASK);
+
+    /* Enable L2 interrupts at L1 */
+    bcm_pci_write32(PCI_REG_ADDRESS(DMA_INTR1_MASK_CLEAR), PCIE_L2_INTR_MASK);
+
+    return BCMTR_SUCCESS;
+}
+
+bcmos_errno bcmtr_pcie_send(uint8_t device, uint8_t channel, bcmos_buf *net_buff)
+{
+    bcm_pcied_comm_data *current_device;
+    bcm_pcied_tu        *current_tu;
+    uint32_t            current_tx;
+    uint32_t            next_tx;
+    uint32_t            length;
+    uint8_t             *pkt_ptr;
+#ifdef CHECK_PARAM
+    BCMTR_PARANOID_CHECK();
+
+    if(!net_buff)
+    {
+        pcie_print("Network buffer is null\n");
+        return BCM_ERR_NULL;
+    }
+#endif
+
+    current_device = &bcmtr_pcie_data[device];
+
+    length = bcmos_buf_length(net_buff);
+    if((length > current_device->max_mtu) || (length == 0))
+    {
+        pcie_print("Packet length %d error (MTU=%d)\n", length, current_device->max_mtu);
+        return BCM_ERR_RANGE;
+    }
+
+    LOCK_TX();
+
+    current_tx = current_device->current_tx;
+
+    /* check owner in tx_owner list*/
+    if(bcm_pci_read32(&current_device->tx_owner[current_tx]) != LOCAL_OWNER)
+    {
+        UNLOCK_TX();
+        bcmtr_pcie_data[device].tx_pcie_full_counter++;
+        return BCM_ERR_QUEUE_FULL;
+    }
+
+    /* Do not forget change owner */
+    bcm_pci_write32(&current_device->tx_owner[current_tx], REMOTE_OWNER);
+
+    /* Prepare shadow_rbd */
+    *(uint32_t*)(&current_device->shadow_rbd[current_tx])=
+        BCMOS_ENDIAN_CPU_TO_LITTLE_U32((uint32_t)(length | channel << BCM_PCIED_BD_CHANNEL_ID_SHIFT | LOCAL_OWNER << BCM_PCIED_BD_OWNERSHIP_SHIFT));
+
+    current_tu = &current_device->tx_tu_ring[current_tx];
+
+    /* take data buffer from nbuffer */
+    pkt_ptr = bcmos_buf_data(net_buff);
+
+    /* set data_pd destination data buffer*/
+    bcmtr_set_source_buffer_address((uint32_t *)&current_tu->data_pd, pkt_ptr);
+
+#ifndef HARDWARE_TEST1
+    /* flush the cashe for the data buffer */
+    bcmos_prepare_for_dma_write(pkt_ptr, length);
+#endif
+
+    /* set data_pd length_and_isrenable (no need enable interrupt for data_pd */
+    bcm_pci_write32(&current_tu->data_pd.length_and_isrenable, length << BCM_PCIED_TRANSFER_SIZE_SHIFT);
+
+    /* set 'last_indicator' bit into current TU, takes care of wrapping */
+    if(current_tx == current_device->max_tx_index)
+        bcm_pci_write32(&current_tu->remote_to_local_pd.last_next_indicator, BCM_PCIED_LAST_RECORD_MASK);
+    else
+        bcm_pci_write32(&current_tu->remote_to_local_pd.last_next_indicator, BCM_PCIED_LAST_RECORD_MASK | BCM_PCIED_NEXT_CONTINOUS_MASK);
+
+    bcmos_barrier();
+
+    /* clear 'last_indicator' bit into previous_TU, takes care of wrapping */
+    if (current_device->prev_tx != current_device->max_tx_index)
+        bcm_pci_write32(&(current_device->tx_tu_ring[current_device->prev_tx].remote_to_local_pd.last_next_indicator), BCM_PCIED_NEXT_CONTINOUS_MASK);
+    else
+        bcm_pci_write32(&(current_device->tx_tu_ring[current_device->prev_tx].remote_to_local_pd.last_next_indicator), 0);
+
+    bcmos_barrier();
+
+    /* set WAKE bit in DMA registers */
+    bcm_pci_write32(PCI_REG_ADDRESS(WAKEUP_DMA), DMA_TX_WAKE_CTRL_WAKE_MASK);
+
+    INCREMENT_TRANSMITED(device);
+
+    next_tx = current_tx + 1;
+    if (next_tx > current_device->max_tx_index)
+        next_tx = 0;
+
+#ifndef HARDWARE_TEST1
+    /* release previous network buffer */
+    if (current_device->tx_nbuff_save[current_tx])
+    {
+        tx_done_handler(device, current_device->tx_nbuff_save[current_tx]);
+        current_device->conf_tx = next_tx;
+    }
+
+    /* store network buffer pointer */
+    current_device->tx_nbuff_save[current_device->current_tx] = net_buff;
+#endif
+    /* move current_tx index */
+    current_device->prev_tx = (int32_t)current_device->current_tx;
+    current_device->current_tx = next_tx;
+
+    UNLOCK_TX();
+    return BCMTR_SUCCESS;
+}
+
+/** Reclaim buffers that have already been transmitted
+ * \param[in]   device    Maple device index
+ * \returns: number of reclaimed TX buffers >= 0 or bcmos_errno error code <0
+ */
+int bcmtr_pcie_tx_collect(uint8_t device)
+{
+    bcm_pcied_comm_data *current_device;
+    uint32_t            conf_tx;
+    int n = 0;
+
+#ifdef CHECK_PARAM
+    BCMTR_PARANOID_CHECK_TYPE(int);
+#endif
+
+    current_device = &bcmtr_pcie_data[device];
+
+    LOCK_TX();
+
+    conf_tx = current_device->conf_tx;
+    while (bcm_pci_read32(&current_device->tx_owner[conf_tx]) == LOCAL_OWNER &&
+           current_device->tx_nbuff_save[conf_tx])
+    {
+        ++n;
+
+        /* release previous network buffer */
+        tx_done_handler(device, current_device->tx_nbuff_save[conf_tx]);
+        current_device->tx_nbuff_save[conf_tx] = NULL;
+
+        conf_tx++;
+        if (conf_tx > current_device->max_tx_index)
+            conf_tx = 0;
+    }
+    current_device->conf_tx = conf_tx;
+
+    UNLOCK_TX();
+
+    return n;
+}
+
+/*
+    Receive a data packet
+    returns channel and pointer to network buffer containing the data
+*/
+bcmos_errno bcmtr_pcie_receive(uint8_t device, uint8_t *channel, bcmos_buf **buf)
+{
+    bcm_pcied_comm_data *current_device;
+    bcm_pcied_tu        *current_tu;
+    uint32_t            bd_info;
+    uint32_t            length;
+    uint32_t            current_rx;
+
+#ifndef HARDWARE_TEST1
+    bcmos_buf           *net_ptr = NULL;
+    uint8_t             *pkt_ptr = NULL;
+#endif
+
+#ifdef CHECK_PARAM
+    BCMTR_PARANOID_CHECK_EXT();
+    if (!channel || !buf)
+        return BCM_ERR_NULL;
+#endif
+    *buf = NULL;
+
+    current_device = &bcmtr_pcie_data[device];
+
+    current_rx = current_device->current_rx;
+    current_tu = &current_device->rx_tu_ring[current_rx];
+
+    /* Read local_bd to local variable */
+    bd_info = BCMOS_ENDIAN_LITTLE_TO_CPU_U32(*(uint32_t*)(&current_device->local_bd[current_rx]));
+
+    /* check owner in local_bd, it is updated by the peer */
+    if ((bd_info & BCM_PCIED_BD_OWNERSHIP_MASK) >> BCM_PCIED_BD_OWNERSHIP_SHIFT != LOCAL_OWNER)
+    {
+        bcmtr_pcie_data[device].rx_pcie_empty_counter++;
+        return BCM_ERR_QUEUE_EMPTY;
+    }
+
+    /* change the owner in local_bd to the remote side */
+    *(uint32_t*)(&current_device->local_bd[current_rx])=
+        BCMOS_ENDIAN_CPU_TO_LITTLE_U32((uint32_t)((REMOTE_OWNER << BCM_PCIED_BD_OWNERSHIP_SHIFT) | bd_info));
+
+    /* take the  packet length from local_bd */
+    length = bd_info & BCM_PCIED_BD_PKT_LENGTH_MASK;
+
+    if ((length == 0) || (length > current_device->max_mtu))
+    {
+        pcie_print("Packet length error : %d\n", length);
+
+        /* update remote side */
+        bcm_pci_write32(&current_device->peer_tx_owner[current_rx], LOCAL_OWNER);
+
+        /* move current rx */
+        NEXT_INDEX(current_device->max_rx_index, current_device->current_rx);
+
+        return BCM_ERR_MSG_ERROR;
+    }
+
+    /* update packet channel id */
+    *channel = (bd_info & BCM_PCIED_BD_CHANNEL_ID_MASK) >> BCM_PCIED_BD_CHANNEL_ID_SHIFT;
+
+#ifndef HARDWARE_TEST1
+    /* allocate new buffer to receive packet */
+    net_ptr = bcmos_buf_alloc(current_device->max_mtu);
+
+    /* If not successes do clean-up */
+    if (!net_ptr)
+    {
+        /* update remote side */
+        bcm_pci_write32(&current_device->peer_tx_owner[current_rx], LOCAL_OWNER);
+
+        /* move current rx */
+        NEXT_INDEX(current_device->max_rx_index, current_device->current_rx);
+
+        return BCM_ERR_NOMEM;
+    }
+#endif
+    /* take the data pointer */
+    *buf = current_device->rx_nbuff_save[current_rx];
+
+    /* invalidate received network buffer for cache */
+    bcmos_prepare_for_dma_read(bcmos_buf_data(*buf), length);
+
+    /* fill network buffer */
+    bcmos_buf_length_set(*buf, length);
+
+    /* update statistics */
+    INCREMENT_RECEIVED(device);
+
+#ifndef HARDWARE_TEST1
+    pkt_ptr = bcmos_buf_data(net_ptr);
+
+    /* invalidate network buffer for cache */
+    bcmos_prepare_for_dma_read(pkt_ptr, current_device->max_mtu);
+
+    /* update rx network buffer with the new packet */
+    current_device->rx_nbuff_save[current_rx] = net_ptr;
+
+    /* set data_pd destination data buffer*/
+    bcmtr_set_dest_buffer_address((uint32_t *)&current_tu->data_pd, pkt_ptr);
+#endif
+    /* update remote side */
+    bcm_pci_write32(&current_device->peer_tx_owner[current_rx], LOCAL_OWNER);
+
+    /* move current rx */
+    NEXT_INDEX(current_device->max_rx_index, current_device->current_rx);
+
+    return BCMTR_SUCCESS;
+}
+
+/* enable level 2 RX interrupts */
+bcmos_errno bcmtr_pcie_rxint_enable(uint8_t device)
+{
+#ifdef CHECK_PARAM
+    BCMTR_PARANOID_CHECK_EXT();
+#endif
+    bcm_pci_write32(PCI_REG_ADDRESS(DMA_INTR_MASK_CLEAR), DMA_RX_ERROR_MASK | DMA_RX_DONE_MASK);
+
+    return BCMTR_SUCCESS;
+}
+
+/* disable level 2 RX interrupts */
+bcmos_errno bcmtr_pcie_rxint_disable(uint8_t device)
+{
+#ifdef CHECK_PARAM
+    BCMTR_PARANOID_CHECK_EXT();
+#endif
+    bcm_pci_write32(PCI_REG_ADDRESS(DMA_INTR_MASK_SET), DMA_RX_ERROR_MASK | DMA_RX_DONE_MASK);
+
+    return BCMTR_SUCCESS;
+}
+
+bcmos_errno bcmtr_pcie_rxint_clear(uint8_t device)
+{
+#ifdef CHECK_PARAM
+    BCMTR_PARANOID_CHECK_EXT();
+#endif
+    bcm_pci_write32(PCI_REG_ADDRESS(DMA_INTR_CLEAR), DMA_RX_ERROR_MASK | DMA_RX_DONE_MASK);
+
+    return BCMTR_SUCCESS;
+}
+
+/* Enable Level 2 "TX handled" interrupt */
+bcmos_errno bcmtr_pcie_txint_enable(uint8_t device)
+{
+#ifdef CHECK_PARAM
+    BCMTR_PARANOID_CHECK_EXT();
+#endif
+    bcm_pci_write32(PCI_REG_ADDRESS(DMA_INTR_MASK_CLEAR), DMA_TX_ERROR_MASK | DMA_TX_DONE_MASK);
+
+    return BCMTR_SUCCESS;
+}
+
+/* Disable level 2 "TX handled" interrupt */
+bcmos_errno bcmtr_pcie_txint_disable(uint8_t device)
+{
+#ifdef CHECK_PARAM
+    BCMTR_PARANOID_CHECK_EXT();
+#endif
+    bcm_pci_write32(PCI_REG_ADDRESS(DMA_INTR_MASK_SET), DMA_TX_ERROR_MASK | DMA_TX_DONE_MASK);
+
+    return BCMTR_SUCCESS;
+}
+
+/* Clear level 2 "TX handled" interrupt */
+bcmos_errno bcmtr_pcie_txint_clear(uint8_t device)
+{
+#ifdef CHECK_PARAM
+    BCMTR_PARANOID_CHECK_EXT();
+#endif
+    bcm_pci_write32(PCI_REG_ADDRESS(DMA_INTR_CLEAR), DMA_TX_ERROR_MASK | DMA_TX_DONE_MASK);
+
+    return BCMTR_SUCCESS;
+}
+
+bcmos_errno bcmtr_pcie_disconnect(uint8_t device)
+{
+    BCMTR_PARANOID_CHECK_EXT();
+
+    stop_dma(device);
+
+    /* disable interrupts */
+    bcmtr_pcie_rxint_disable(device);
+    bcmtr_pcie_txint_disable(device);
+
+    /* clear DMA interrupts */
+    bcmtr_pcie_rxint_clear(device);
+    bcmtr_pcie_txint_clear(device);
+
+    /* Disable in L1 controller */
+    bcm_pci_write32(PCI_REG_ADDRESS(DMA_INTR1_MASK_SET), PCIE_L2_INTR_MASK);
+
+    /* free irq - on host (if it is shared) must not free it */
+    bcmtr_pcie_free_irq(bcmtr_pcie_data[device].isrdata.rx_irq, &bcmtr_pcie_data[device].isrdata);
+
+    free_buffers(device, "PCIE disconnected\n");
+
+    return BCMTR_SUCCESS;
+}
+
+bcmos_errno bcmtr_pcie_rx_irq_cblk_register(f_bcmtr_int rx_isr_clbk)
+{
+    bcmtr_pcie_rx_irq_handler = rx_isr_clbk;
+
+    return BCMTR_SUCCESS;
+}
+
+bcmos_errno bcmtr_pcie_rx_irq_cblk_unregister(void)
+{
+    bcmtr_pcie_rx_irq_handler = NULL;
+
+    return BCMTR_SUCCESS;
+}
+
+bcmos_errno bcmtr_pcie_tx_irq_cblk_register(f_bcmtr_int rx_isr_clbk)
+{
+    bcmtr_pcie_tx_irq_handler = rx_isr_clbk;
+
+    return BCMTR_SUCCESS;
+}
+
+bcmos_errno bcmtr_pcie_tx_irq_cblk_unregister(void)
+{
+    bcmtr_pcie_tx_irq_handler = NULL;
+
+    return BCMTR_SUCCESS;
+}
+
+bcmos_errno bcmtr_pcie_tx_done_cblk_register(f_bcmtr_done tx_done_cb)
+{
+    tx_done_handler = tx_done_cb;
+
+    return BCMTR_SUCCESS;
+}
+
+bcmos_errno bcmtr_pcie_tx_done_cblk_unregister(void)
+{
+    tx_done_handler = default_tx_done_callback;
+
+    return BCMTR_SUCCESS;
+}
+
+void bcmtr_pcie_exit(void)
+{
+    uint32_t i;
+
+    if (bcmtr_pcie_data)
+    {
+        for (i = 0; i < bcmtr_max_devices_number; i ++)
+        {
+            bcmtr_pcie_disconnect(i);
+        }
+        bcmos_free(bcmtr_pcie_data);
+    }
+    bcmtr_pcie_data = NULL;
+}
+
+bcmos_errno bcmtr_pcie_get_statistics(uint8_t device, uint32_t clear, bcm_pcied_stat *stat)
+{
+    bcm_pcied_comm_data *current_device = &bcmtr_pcie_data[device];
+
+    BCMTR_PARANOID_CHECK();
+
+   if (!stat)
+       return BCM_ERR_NULL;
+
+    stat->rx_counter    = current_device->rx_counter;
+    stat->tx_counter    = current_device->tx_counter;
+    stat->rx_done_isr_counter   = current_device->isrdata.rx_done_num;
+    stat->rx_err_isr_counter   = current_device->isrdata.rx_err_num;
+    stat->tx_done_isr_counter   = current_device->isrdata.tx_done_num;
+    stat->tx_err_isr_counter   = current_device->isrdata.tx_err_num;
+    stat->rx_pcie_empty_counter  = current_device->rx_pcie_empty_counter;
+    stat->tx_pcie_full_counter  = current_device->tx_pcie_full_counter;
+    if (clear)
+    {
+        current_device->rx_counter       = 0;
+        current_device->tx_counter       = 0;
+        current_device->isrdata.rx_done_num = 0;
+        current_device->isrdata.rx_err_num  = 0;
+        current_device->isrdata.tx_done_num = 0;
+        current_device->isrdata.tx_err_num  = 0;
+        current_device->rx_pcie_empty_counter = 0;
+        current_device->tx_pcie_full_counter = 0;
+    }
+
+    return BCMTR_SUCCESS;
+}
+
+/*=============================================*/
+
+/* used by dump procedures - may write to std output or user buffer */
+#define pcie_bprint(buffer, fmt, args...)  \
+    {\
+      if (!buffer)\
+        pcie_print(fmt, ##args);\
+      else\
+        sprintf(buffer, fmt, ##args);\
+    }
+
+static inline void dump_bd(char *output, char *title, uint32_t bd)
+{
+    uint32_t owner, chn, length;
+
+    owner = (bd & BCM_PCIED_BD_OWNERSHIP_MASK) >> BCM_PCIED_BD_OWNERSHIP_SHIFT;
+    chn = (bd & BCM_PCIED_BD_CHANNEL_ID_MASK) >> BCM_PCIED_BD_CHANNEL_ID_SHIFT;
+    length = bd & BCM_PCIED_BD_PKT_LENGTH_MASK;
+
+    pcie_bprint(output, "\t%s: (0x%08x) owner = %s channel = 0x%x(%d) length = 0x%x(%d)\n",
+        title, (unsigned int)bd, owner == 0 ? "local" : "peer", (unsigned int)chn, chn, (unsigned int)length, length);
+}
+
+static inline void dump_owner(char *output, char *title, uint32_t *current_entry)
+{
+    uint32_t owner, entry;
+
+    entry = bcm_pci_read32(current_entry);
+    owner = (entry & BCM_PCIED_BD_OWNERSHIP_MASK) >> BCM_PCIED_BD_OWNERSHIP_SHIFT;
+    pcie_bprint(output, "\t%s: owner = %s\n", title, owner == 0 ? "local" : "peer");
+}
+
+static inline void dump_pd(char *output, bcm_pcied_pd *current_pd)
+{
+    uint32_t ddrl,ddrh,pktl,pkth,len,last,nextl,nexth;
+
+    ddrl  = bcm_pci_read32((uint32_t *)&current_pd->ddr_buff_address_low);
+    pktl  = bcm_pci_read32((uint32_t *)&current_pd->pcie_pkt_address_low);
+    pkth  = bcm_pci_read32((uint32_t *)&current_pd->pcie_pkt_address_high);
+    len   = bcm_pci_read32((uint32_t *)&current_pd->length_and_isrenable);
+    last  = bcm_pci_read32((uint32_t *)&current_pd->last_next_indicator);
+    nextl = bcm_pci_read32((uint32_t *)&current_pd->next_pd_address_low);
+    nexth = bcm_pci_read32((uint32_t *)&current_pd->next_pd_address_high);
+    ddrh  = bcm_pci_read32((uint32_t *)&current_pd->ddr_buff_address_high);
+
+    pcie_bprint(output,
+                "\t\t%-20s = 0x%08x\n"
+                "\t\t%-20s = 0x%08x\n"
+                "\t\t%-20s = 0x%08x\n"
+                "\t\t%-20s = 0x%08x\n"
+                "\t\t%-20s = 0x%08x\n"
+                "\t\t%-20s = 0x%08x\n"
+                "\t\t%-20s = 0x%08x\n"
+                "\t\t%-20s = 0x%08x\n",
+                "ddr_low", ddrl,
+                "pkt_low", pktl,
+                "pkt_high", pkth,
+                "length_and_isrenable", len,
+                "last_next_indicator", last,
+                "next_low", nextl,
+                "next_high", nexth,
+                "ddr_high", ddrh);
+}
+
+
+static int32_t dump_one_tx(char *output, uint8_t device, uint32_t current_index)
+{
+    bcm_pcied_tu        *current_tu;
+    bcm_pcied_comm_data *current_device;
+    char                *buffer = output;
+
+    current_device = &bcmtr_pcie_data[device];
+    current_tu = &current_device->tx_tu_ring[current_index];
+    dump_bd(buffer, "SBD", BCMOS_ENDIAN_LITTLE_TO_CPU_U32(*(uint32_t*)&current_device->shadow_rbd[current_index]));
+    if (buffer)
+        buffer += strlen(buffer);
+
+    dump_owner(buffer, "tx_owner", &current_device->tx_owner[current_index]);
+    if (buffer)
+        buffer += strlen(buffer);
+
+    pcie_bprint(buffer, "\tPD data = 0x%lx\n", (unsigned long)&current_tu->data_pd);
+    if (buffer)
+        buffer += strlen(buffer);
+
+    dump_pd(buffer, &current_tu->data_pd);
+    if (buffer)
+        buffer += strlen(buffer);
+
+    pcie_bprint(buffer, "\tPD shadow_rbd = 0x%lx\n", (unsigned long)&current_tu->remote_to_local_pd);
+    if (buffer)
+        buffer += strlen(buffer);
+
+    dump_pd(buffer, &current_tu->remote_to_local_pd);
+    if (buffer)
+        buffer += strlen(buffer);
+
+    pcie_bprint(buffer, "\tTX netbuff = 0x%lx\n",(unsigned long)current_device->tx_nbuff_save[current_index]);
+
+    if (output)
+        return strlen(output);
+
+    return 0;
+}
+
+static int32_t dump_one_rx(char *output, uint8_t device, uint32_t current_index)
+{
+    bcm_pcied_tu        *current_tu;
+    bcm_pcied_comm_data *current_device;
+    char                *buffer = output;
+
+    current_device = &bcmtr_pcie_data[device];
+    current_tu = &current_device->rx_tu_ring[current_index];
+
+    dump_bd(buffer, "BD", BCMOS_ENDIAN_LITTLE_TO_CPU_U32(*(uint32_t*)&current_device->local_bd[current_index]));
+    if (buffer)
+        buffer += strlen(buffer);
+
+    dump_owner(buffer, "peer_tx_owner", &current_device->peer_tx_owner[current_index]);
+    if (buffer)
+        buffer += strlen(buffer);
+
+    pcie_bprint(buffer, "\tPD data = 0x%lx\n", (unsigned long)&current_tu->data_pd);
+    if (buffer)
+        buffer += strlen(buffer);
+
+    dump_pd(buffer, &current_tu->data_pd);
+    if (buffer)
+        buffer += strlen(buffer);
+
+    pcie_bprint(buffer, "\tPD shadow_rbd = 0x%lx\n", (unsigned long)&current_tu->remote_to_local_pd);
+    if (buffer)
+        buffer += strlen(buffer);
+
+    dump_pd(buffer, &current_tu->remote_to_local_pd);
+    if (buffer)
+        buffer += strlen(buffer);
+
+    pcie_bprint(buffer, "\tRX netbuff = 0x%lx\n",(unsigned long)current_device->rx_nbuff_save[current_index]);
+
+    if (output)
+        return strlen(output);
+    return 0;
+}
+
+bcmos_errno bcmtr_pcie_tx_dump(char *output, uint8_t device, int32_t start, int32_t number_of_entries)
+{
+    int32_t i;
+    int32_t len = 0;
+    char *buffer = output;
+    int32_t from = start;
+    int32_t to;
+
+    pcie_bprint(buffer, "Dump Tx ring\n");
+    if (!bcmtr_pcie_data)
+    {
+        pcie_print("Driver is not initialized\n");
+        return BCM_ERR_NORES;
+    }
+
+    if (device >= bcmtr_max_devices_number)
+    {
+        pcie_print("Device parameter is greater than maximum devices(%d)\n", bcmtr_max_devices_number);
+        return BCM_ERR_RANGE;
+    }
+
+    if (device != bcmtr_pcie_data[device].isrdata.device)
+    {
+        pcie_print("*** Data Corrupted ***\n");
+        return BCM_ERR_RANGE;
+    }
+
+    if (start == -1) /* from current, number of entries */
+        from = bcmtr_pcie_data[device].current_tx;
+
+    to = from + number_of_entries;
+
+    if (to == from)
+        to++;
+
+    if (to > bcmtr_pcie_data[device].txq_length)
+        to = bcmtr_pcie_data[device].txq_length;
+
+    if (buffer)
+        len = strlen(buffer);
+
+    for (i = from; i < to; i++)
+    {
+        if (buffer)
+            buffer = output + len; /* move buffer to the next space */
+
+        if (i == bcmtr_pcie_data[device].current_tx)
+        {
+            pcie_bprint(buffer, "Current = %d\n", i);
+        }
+        else
+        {
+            pcie_bprint(buffer, "Index = %d\n", i);
+        }
+
+        if (buffer)
+        {
+            /* add to len the next line - buffer contains only the last line */
+            len += strlen(buffer);
+            buffer = output + len;
+        }
+        /* returns the length of the last lines */
+        len += dump_one_tx(buffer, device, i);
+    }
+
+    return BCM_ERR_OK;
+}
+
+bcmos_errno bcmtr_pcie_rx_dump(char *output, uint8_t device, int32_t start, int32_t number_of_entries)
+{
+    int32_t i;
+    int32_t len = 0;
+    char *buffer = output;
+    int32_t from = start;
+    int32_t to;
+
+    pcie_bprint(buffer, "Dump Rx ring\n");
+    if (!bcmtr_pcie_data)
+    {
+        pcie_print("Driver is not initialized\n");
+        return BCM_ERR_NORES;
+    }
+
+    if (device >= bcmtr_max_devices_number)
+    {
+        pcie_print("Device parameter is greater than maximum devices(%d)\n", bcmtr_max_devices_number);
+        return BCM_ERR_RANGE;
+    }
+
+    if (device != bcmtr_pcie_data[device].isrdata.device)
+    {
+        pcie_print("*** Data Corrupted ***\n");
+        return BCM_ERR_RANGE;
+    }
+
+    if (start == -1) /* from current number of entries */
+        from = bcmtr_pcie_data[device].current_rx;
+    to = from + number_of_entries;
+    if (to == from)
+        to++;
+    if (to > bcmtr_pcie_data[device].rxq_length)
+        to = bcmtr_pcie_data[device].rxq_length;
+
+    if (buffer)
+        len = strlen(buffer);
+    for (i = from; i < to; i++)
+    {
+        if (buffer)
+            buffer = output + len;
+        if (i == bcmtr_pcie_data[device].current_rx)
+        {
+            pcie_bprint(buffer, "Current = %d\n", i);
+        }
+        else
+        {
+            pcie_bprint(buffer, "Index = %d\n", i);
+        }
+        if (buffer)
+        {
+            /* add to len the next line - buffer contains only the last line */
+            len += strlen(buffer);
+            buffer = output + len;
+        }
+        /* returns the length of the last lines */
+        len += dump_one_rx(buffer, device, i);
+    }
+
+    return BCM_ERR_OK;
+}
+
+#ifdef __KERNEL__
+EXPORT_SYMBOL(bcmtr_pcie_receive);
+EXPORT_SYMBOL(bcmtr_pcie_init);
+EXPORT_SYMBOL(bcmtr_pcie_exit);
+EXPORT_SYMBOL(bcmtr_pcie_pre_connect);
+EXPORT_SYMBOL(bcmtr_pcie_connect);
+EXPORT_SYMBOL(bcmtr_pcie_disconnect);
+EXPORT_SYMBOL(bcmtr_pcie_rx_irq_cblk_register);
+EXPORT_SYMBOL(bcmtr_pcie_rx_irq_cblk_unregister);
+EXPORT_SYMBOL(bcmtr_pcie_tx_irq_cblk_register);
+EXPORT_SYMBOL(bcmtr_pcie_tx_irq_cblk_unregister);
+EXPORT_SYMBOL(bcmtr_pcie_send);
+EXPORT_SYMBOL(bcmtr_pcie_tx_dump);
+EXPORT_SYMBOL(bcmtr_pcie_rx_dump);
+EXPORT_SYMBOL(bcmtr_pcie_rxint_enable);
+EXPORT_SYMBOL(bcmtr_pcie_rxint_disable);
+EXPORT_SYMBOL(bcmtr_pcie_rxint_clear);
+EXPORT_SYMBOL(bcmtr_pcie_rx_irq_handler);
+EXPORT_SYMBOL(bcmtr_pcie_tx_irq_handler);
+EXPORT_SYMBOL(bcmtr_pcie_get_statistics);
+#endif
+
diff --git a/bcm68620_release/release/host_driver/pcie/bcmtr_pcie.h b/bcm68620_release/release/host_driver/pcie/bcmtr_pcie.h
new file mode 100644
index 0000000..11e27b8
--- /dev/null
+++ b/bcm68620_release/release/host_driver/pcie/bcmtr_pcie.h
@@ -0,0 +1,249 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#ifndef BCMTR_PCIE_H_
+#define BCMTR_PCIE_H_
+
+#include "bcmos_system.h"
+
+#define DDR_PACKET_LOW_INDEX        0
+#define DDR_PACKET_HIGH_INDEX       7
+#define PCI_PACKET_LOW_INDEX        1
+#define PCI_PACKET_HIGH_INDEX       2
+
+typedef struct
+{
+    uint32_t    rx_counter;
+    uint32_t    tx_counter;
+    uint32_t    rx_done_isr_counter;
+    uint32_t    rx_err_isr_counter;
+    uint32_t    tx_done_isr_counter;
+    uint32_t    tx_err_isr_counter;
+    uint32_t    rx_pcie_empty_counter;
+    uint32_t    tx_pcie_full_counter;
+} bcm_pcied_stat;
+
+typedef struct
+{
+    unsigned long       pcie_reg_base;
+    uint32_t            rx_irq;
+    uint32_t            device;
+    uint32_t            rx_done_num;
+    uint32_t            rx_err_num;
+    uint32_t            tx_done_num;
+    uint32_t            tx_err_num;
+} bcm_pcied_isr_data;
+
+/** Initialize PCIe low level transport module
+ * \returns: 0 in case of success or error code < 0
+ */
+#ifdef IN_BAND 
+    bcmos_errno bcmtr_pcie_init(uint8_t device, bcmos_ipv4_address ip_address, uint16_t udp_port);
+#else
+    bcmos_errno bcmtr_pcie_init(uint8_t max_devices);
+#endif
+
+/** Cleanup PCIe low level transport module
+ * \returns: 0 in case of success or error code < 0
+ */
+void bcmtr_pcie_exit(void);
+
+/** PCIe pre-connect configuration parameters */
+typedef struct
+{
+    uint32_t txq_size;  /**< Transmit queue size */
+    uint32_t rxq_size;  /**< Receive queue size */
+    uint32_t max_mtu;   /**< Max MTU size */
+    uint32_t rx_irq;    /**< Rx interrupt number */
+    unsigned long pcie_reg_base;   /**< Maple PCIe register block address in host addrss space */
+    unsigned long ddr_win_base;   /**< Maple DDR address in host addrss space */
+} bcmtr_pcie_pre_connect_cfg;
+
+/** PCIe pre-connect data - information returned by bcmtr_pcie_pre_connect().
+ * Device control driver should store data from this structure
+ * in the boot record in Maple SRAM
+ */
+typedef struct bcmtr_pcie_opaque_data bcmtr_pcie_opaque_data;
+
+/** Prepare to connect
+ *      On Maple returns into opaque_data pointers of the
+ *  	transmit and receive PacketDescriptors
+ *  	On Host opaque_data is NULL
+ * \param[in]      device            Maple device index
+ * \param[in]      cfg               Connection configuration
+ * \param[out]     opaque_data       Pointer to memory block
+ *  	 where pcie driver put opaque data to be conveyed to the
+ *  	 other side
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtr_pcie_pre_connect(uint8_t device, const bcmtr_pcie_pre_connect_cfg *cfg,
+    bcmtr_pcie_opaque_data *data);
+
+/** Connect
+ *  	On Maple opaque_data is NULL
+ *  	On Host opaque_data contains the pointers to PDs in
+ *  	Maple
+ * \param[in]  device       Maple device index
+ * \param[in] opaque_data  Pointer to opaque data block
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtr_pcie_connect(uint8_t device, const bcmtr_pcie_opaque_data *data);
+
+/** Disconnect. All buffers are released
+ * \param[in]   device       Maple device index
+ * \param[in]   opaque_data  Pointer to opaque data block
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtr_pcie_disconnect(uint8_t device);
+
+/*
+ * Receive callback registration.
+ * Attention PCIe driver implementer!!
+ * Received packets must stay in the queue until receive callback is registered.
+ */
+
+/** PCIe interface interrupt receive callback */
+typedef void (*f_bcmtr_int)(uint8_t device);
+
+/** Register receive callback
+ * \param[in]   rx_isr    Interrupt Receive callback
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtr_pcie_rx_irq_cblk_register(f_bcmtr_int user_rx_isr_clbk);
+
+/** Unregister receive callback.
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtr_pcie_rx_irq_cblk_unregister(void);
+
+/** Register transmit completion interrupt callback
+ * \param[in]   tx_isr    Transfer completed interrupt callback
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtr_pcie_tx_irq_cblk_register(f_bcmtr_int user_tx_isr_clbk);
+
+/** Unregister transmit completed interrupt callback.
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtr_pcie_tx_irq_cblk_unregister(void);
+
+/** Tx done callback */
+typedef void (*f_bcmtr_done)(uint8_t device, bcmos_buf *buf);
+
+/** Register buffer transmit completion callback
+ * \param[in]   tx_done   Transfer completed callback
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtr_pcie_tx_done_cblk_register(f_bcmtr_done tx_done_cb);
+
+/** Unregister buffer transmit completion callback
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtr_pcie_tx_done_cblk_unregister(void);
+
+/** Send buffer to the peer
+ * \param[in]   device    Maple device index
+ * \param[in]   channel   Channel id (opaque to the bcmtr_pcie driver)
+ * \param[in]   buf       Buffer to be transferred
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtr_pcie_send(uint8_t device, uint8_t channel, bcmos_buf *buf);
+
+/** Reclaim buffers that have already been transmitted
+ * \param[in]   device    Maple device index
+ * \returns: number of reclaimed TX buffers >= 0 or bcmos_errno error code <0
+ */
+int bcmtr_pcie_tx_collect(uint8_t device);
+
+/** Fetch received buffer from h/w queue
+ * \param[in]   device          Maple device index
+ * \param[out]  channel         message channel from the BD
+ * \param[out]  buf             pointer to network buffer containing the received packet
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtr_pcie_receive(uint8_t device, uint8_t *channel, bcmos_buf **buf);
+
+/** Enable DMA_RX interrupt
+ * \param[in]   device  Maple device index
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtr_pcie_rxint_enable(uint8_t device);
+
+/** Disable DMA_RX interrupt
+ * \param[in]   device  Maple device index
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtr_pcie_rxint_disable(uint8_t device);
+
+/** Clear DMA_RX interrupt
+ * \param[in]   device  Maple device index
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtr_pcie_rxint_clear(uint8_t device);
+
+/** Enable "TX handled" interrupt
+ * \param[in]   device  Maple device index
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtr_pcie_txint_enable(uint8_t device);
+
+/** Disable "TX handled" interrupt
+ * \param[in]   device  Maple device index
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtr_pcie_txint_disable(uint8_t device);
+
+/** Clear "TX handled" interrupt
+ * \param[in]   device  Maple device index
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtr_pcie_txint_clear(uint8_t device);
+
+/** Returns statistics
+ * \param[in]   device  Maple device index
+ * \param[in]   clear   if set, clear statistics, otherwise
+ *       accumulate
+ */
+bcmos_errno bcmtr_pcie_get_statistics(uint8_t device, uint32_t clear, bcm_pcied_stat *stat);
+
+/** Dump data base
+ * \param[in]   output  NULL(will print to stdout) or pointer to
+ *       buffer
+ * \param[in]   device  Maple device index
+ * \param[in]   start   index of the start entry in ring, -1
+ *       means current
+ * \param[in]   number_of_entries  how many entries from the
+ *       start
+ * \returns: 0 if output is NULL or buffer length
+ */
+bcmos_errno bcmtr_pcie_tx_dump(char *output, uint8_t device, int32_t start, int32_t number_of_entries);
+bcmos_errno bcmtr_pcie_rx_dump(char *output, uint8_t device, int32_t start, int32_t number_of_entries);
+
+
+#endif /* BCMTR_PCIE_H_ */
diff --git a/bcm68620_release/release/host_driver/sw_error/bcmolt_sw_error.h b/bcm68620_release/release/host_driver/sw_error/bcmolt_sw_error.h
new file mode 100644
index 0000000..f5e5ebf
--- /dev/null
+++ b/bcm68620_release/release/host_driver/sw_error/bcmolt_sw_error.h
@@ -0,0 +1,57 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#ifndef _BCMOLT_SW_ERROR_H_
+#define _BCMOLT_SW_ERROR_H_
+
+#define BCMOLT_SW_ERROR_MAX_FILE_NAME_LEN 64
+#define BCMOLT_SW_ERROR_MAX_TASK_NAME_LEN 64
+
+typedef struct __PACKED_ATTR_START__
+{
+    uint64_t first_error_time;
+    uint64_t last_error_time;
+    uint32_t line_number;
+    uint32_t error_counter;
+    uint32_t instance;
+    char file_name[BCMOLT_SW_ERROR_MAX_FILE_NAME_LEN];
+    char task_name[BCMOLT_SW_ERROR_MAX_TASK_NAME_LEN];
+} __PACKED_ATTR_END__ bcmos_sw_error;
+
+typedef struct __PACKED_ATTR_START__
+{
+    uint32_t count;
+#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /**< Check whether C99 is supported */
+    bcmos_sw_error error[];
+#else
+    bcmos_sw_error error[1];
+#endif
+} __PACKED_ATTR_END__ bcmos_sw_error_table;
+
+#endif /* _BCMOLT_SW_ERROR_H_ */
diff --git a/bcm68620_release/release/host_driver/sw_version/bcmolt_host_sw_version.h b/bcm68620_release/release/host_driver/sw_version/bcmolt_host_sw_version.h
new file mode 100644
index 0000000..90752ff
--- /dev/null
+++ b/bcm68620_release/release/host_driver/sw_version/bcmolt_host_sw_version.h
@@ -0,0 +1,38 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#ifndef BCMOLT_HOST_SW_VERSION_H_
+#define BCMOLT_HOST_SW_VERSION_H_
+
+#define BCMOLT_HOST_MAJOR_VER    2
+#define BCMOLT_HOST_MINOR_VER    2
+#define BCMOLT_HOST_REVISION_VER 2
+
+
+#endif /* BCMOLT_HOST_SW_VERSION_H_ */
diff --git a/bcm68620_release/release/host_driver/transport/Makefile b/bcm68620_release/release/host_driver/transport/Makefile
new file mode 100644
index 0000000..3fd7dda
--- /dev/null
+++ b/bcm68620_release/release/host_driver/transport/Makefile
@@ -0,0 +1,47 @@
+# Transport
+#
+MOD_NAME = transport
+MOD_TYPE = lib
+MOD_DEPS = utils cli model common_api tr_plugin dev_log
+
+ifeq ("$(RELEASE_BUILD)", "y")
+    MOD_DEPS += api_cli
+    TR_PERF_TEST = n
+else
+    MOD_DEPS += api_cli_helpers
+endif
+
+ifeq ("$(SUBSYSTEM)", "host")
+    MOD_DEPS += device_selector
+endif
+
+ifeq ("$(OS_KERNEL)", "linux")
+   MOD_DEPS += dev_log_linux
+endif
+
+srcs = bcmtr_transport.c bcmtr_config.c bcmtr_debug.c
+
+ifeq ("$(ENABLE_CLI)", "y")
+	srcs += bcmtr_transport_cli.c bcmtr_debug_cli.c
+else
+    TR_PERF_TEST = n
+endif
+
+CONFIG_TRANSPORT_RAW ?= n
+CONFIG_TRANSPORT_UDP ?= y
+
+# Extra configuration
+ifeq ("$(CONFIG_TRANSPORT_RAW)", "y")
+	MOD_DEPS += tr_plugin_mux
+	CONFIG_TRANSPORT_UDP = n
+endif
+ifeq ("$(CONFIG_TRANSPORT_UDP)", "y")
+	MOD_DEPS += tr_plugin_udp
+endif
+
+TR_PERF_TEST ?= y
+ifeq ("$(TR_PERF_TEST)", "y")
+    EXTRA_DEFINES += -DBCMTR_PERFTEST
+    EXTRA_INCLUDES += -I$(SRC_DIR)/test
+    srcs += test/bcmtr_perftest.c
+endif
diff --git a/bcm68620_release/release/host_driver/transport/bcmtr_config.c b/bcm68620_release/release/host_driver/transport/bcmtr_config.c
new file mode 100644
index 0000000..4fc4749
--- /dev/null
+++ b/bcm68620_release/release/host_driver/transport/bcmtr_config.c
@@ -0,0 +1,82 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#include "bcmtr_internal.h"
+#include "bcmtr_interface.h"
+#include "bcmtr_plugin.h"
+
+
+#ifdef BCMTR_UDP_SUPPORT
+
+uint32_t bcmtr_host_ip = BCMTR_TR_UDP_HOST_IP;
+uint16_t bcmtr_host_udp_port = BCMTR_TR_UDP_HOST_PORT;
+uint32_t bcmtr_olt_ip[BCMTR_MAX_OLTS];
+uint16_t bcmtr_olt_udp_port[BCMTR_MAX_OLTS];
+
+#endif
+
+/* Fetch configuration
+ * set-up transport driver plugin
+ * Eventually this function can read from config file or device control driver.
+ * For now - hardcode
+ */
+bcmos_errno bcmtr_cfg_get(bcmolt_devid device, bcmtr_cfg *cfg, bcmtr_driver *driver)
+{
+    bcmos_errno rc = BCM_ERR_NOT_SUPPORTED;
+
+    cfg->max_retries = BCMTR_MAX_RETRIES;
+    cfg->msg_timeout = BCMTR_MSG_TIMEOUT;
+    cfg->max_fragments = BCMTR_MAX_FRAGMENTS;
+    cfg->max_requests = BCMTR_MAX_REQUESTS;
+    cfg->max_autos = BCMTR_MAX_AUTOS;
+    cfg->max_mtu = BCMTR_MAX_MTU_SIZE;
+    cfg->msg_wait_timeout = BCMTR_MSG_WAIT_MS;
+    cfg->msg_ready_timeout = BCMTR_MSG_READY_MS;
+    cfg->plugin_cfg.type = BCMTR_TR_TYPE;
+    cfg->rx_thread_priority = TASK_PRIORITY_TRANSPORT_RX;
+
+#ifdef BCMTR_UDP_SUPPORT
+#ifdef BCM_SUBSYSTEM_HOST
+    cfg->plugin_cfg.x.udp.my_ip = bcmtr_host_ip;
+    cfg->plugin_cfg.x.udp.remote_ip = bcmtr_olt_ip[device];
+    cfg->plugin_cfg.x.udp.my_port = bcmtr_host_udp_port + device;
+    cfg->plugin_cfg.x.udp.remote_port = bcmtr_olt_udp_port[device];
+#else
+    cfg->plugin_cfg.x.udp.my_ip = bcmtr_olt_ip[device];
+    cfg->plugin_cfg.x.udp.remote_ip = bcmtr_host_ip;
+    cfg->plugin_cfg.x.udp.my_port = bcmtr_olt_udp_port[device];
+    cfg->plugin_cfg.x.udp.remote_port = bcmtr_host_udp_port + device;
+#endif
+#endif
+
+    rc = bcmtr_plugin_init(&cfg->plugin_cfg, driver);
+
+    return rc;
+}
+
diff --git a/bcm68620_release/release/host_driver/transport/bcmtr_debug.c b/bcm68620_release/release/host_driver/transport/bcmtr_debug.c
new file mode 100644
index 0000000..889630c
--- /dev/null
+++ b/bcm68620_release/release/host_driver/transport/bcmtr_debug.c
@@ -0,0 +1,876 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#include <bcmos_system.h>
+#include <bcmtr_debug.h>
+#include <bcmcli_session.h>
+#include <bcm_api_cli_helpers.h>
+#include <bcmolt_math.h>
+
+#ifdef ENABLE_LOG
+#include <bcm_dev_log.h>
+#endif
+
+#ifdef ENABLE_CLI
+#include <bcmtr_debug_cli.h>
+#endif
+
+/* Messages are recorded in the following format:
+ * uint32_t - event type
+ * uint32_t - timestamp
+ * uint32_t - message data size
+ * <message data> - padded to the nearest 4 bytes
+ * uint32_t - total size - total capture entry size, including control info
+ */
+
+/* Overhead size: entry header + uint32_t suffix */
+#define BCMTR_CAPTURE_OVERHEAD_SIZE  (sizeof(bcmtr_capture_entry) + sizeof(uint32_t))
+
+#define BCMTR_CAPTURE_ENTRY_FIELDS  (sizeof(bcmtr_capture_entry) / sizeof(uint32_t))
+
+/* Maximum total number of characters for a message dump */
+#define BCMTR_MAX_MSG_DUMP_STR_SIZE 4096
+
+/* Capture control block */
+typedef struct
+{
+    bcmtr_capture_parm parm;            /* Capture configuration */
+    bcmos_bool active;
+
+    uint8_t *start;
+    uint8_t *end;
+    uint8_t *cur;
+    uint32_t size;                      /* Buffer size */
+    uint32_t used;                      /* Bytes used */
+    uint32_t wa;                        /* Number of times buffer wrapped around */
+    uint32_t events;                    /* Number of capture events */
+} bcmtr_capture_buf;
+
+static bcmtr_capture_buf capture_buf[BCMTR_MAX_OLTS];
+
+/* CLI session where to dump */
+static bcmcli_session *bcmtr_cld_session;
+
+#ifdef ENABLE_LOG
+/* Logger used for BCMTR_CLD_LOG */
+static dev_log_id bcmtr_cld_log_id;
+#endif
+
+/* Global variable: per msg_id CLD level */
+bcmtr_cld_type bcmtr_cld_active_level[BCMTR_MAX_OLTS][BCMOLT_GROUP_ID__NUM_OF];
+
+/* Create a dummy CLI session so we can print to a buffer internally before printing to the real CLI.
+ * This way, the output can't be interrupted by another print. */
+static char bcmtr_cld_scratch_buf[BCMTR_MAX_MSG_DUMP_STR_SIZE];
+static uint32_t bcmtr_cld_scratch_pos = 0;
+static bcmcli_session *bcmtr_cld_scratch_session;
+
+/*
+ * Internal functions
+ */
+
+/* CLI session print callback for the scratch buffer */
+static int bcmtr_log_cli_print(bcmcli_session *session, const char *buf, uint32_t size)
+{
+    size = MIN(size, BCMTR_MAX_MSG_DUMP_STR_SIZE - bcmtr_cld_scratch_pos);
+    if (size > 0)
+    {
+        memcpy(&bcmtr_cld_scratch_buf[bcmtr_cld_scratch_pos], buf, size);
+    }
+    bcmtr_cld_scratch_pos += size;
+    return size;
+}
+
+/* Get message event name */
+static inline const char *bcmtr_cld_event_name(bcmtr_cld_event_type ev)
+{
+    static const char *ev_name[] = {
+        [BCMTR_CLD_EV_SEND]     = "tx",
+        [BCMTR_CLD_EV_RESEND]   = "re-tx",
+        [BCMTR_CLD_EV_RECV]     = "rx",
+        [BCMTR_CLD_EV_RECV_DISCARD] = "rx-discard",
+        [BCMTR_CLD_EV_TIMEOUT] = "timeout"
+    };
+    return ev_name[ev];
+}
+
+/* Store data in capture buffer */
+static inline void _bcmtr_capture_store(bcmtr_capture_buf *tb, const void *data, uint32_t size)
+{
+    int32_t left = (int32_t)(tb->end - tb->cur);
+    if (left >= (int32_t)size)
+    {
+        memcpy(tb->cur, data, size);
+        tb->cur += size;
+    }
+    else
+    {
+        memcpy(tb->cur, data, left);
+        memcpy(tb->start, (const uint8_t *)data + left, size - left);
+        tb->cur = tb->start + size - left;
+        ++tb->wa;
+    }
+    tb->used += size;
+    if (tb->used > tb->size)
+        tb->used = tb->size;
+}
+
+
+/* Get capture entry size and start pointer given pointer right after the entry */
+static void _bcmtr_capture_get_prev(bcmtr_capture_buf *tb, uint8_t *ptr, uint32_t *prev_size, uint8_t **prev_ptr)
+{
+    uint32_t size;
+    uint8_t *prev;
+
+    if (ptr == tb->start)
+        ptr = tb->end;
+    size = *(((uint32_t *)(long)ptr) - 1);
+    BUG_ON(!size || size > 0xffff || (size & 0x3));
+    prev = ptr - size;
+    if (prev < tb->start)
+        prev = tb->end - (size - (ptr - tb->start));
+    *prev_size = size;
+    *prev_ptr = prev;
+}
+
+/* Get number of complete messages stored in capture buffer */
+static uint32_t _bcmtr_capture_nmsgs(bcmtr_capture_buf *tb)
+{
+    uint32_t n = 0;
+    uint32_t prev_length;
+    uint8_t *prev_start = tb->cur;
+
+    if (!tb->used)
+        return 0;
+
+    /* Unwind capture buffer backward */
+    while (n < tb->events)
+    {
+        uint8_t *prev = prev_start;
+        _bcmtr_capture_get_prev(tb, prev, &prev_length, &prev_start);
+        if (prev_start >= prev)
+            break;
+        ++n;
+    }
+
+    /* If buffer has wrapped around - continue unwinding */
+    if (tb->wa)
+    {
+        while (prev_start >= tb->cur)
+        {
+            _bcmtr_capture_get_prev(tb, prev_start, &prev_length, &prev_start);
+            ++n;
+        }
+    }
+
+    return n;
+}
+
+static inline void _bcmtr_capture_wrap(uint8_t **cur, bcmtr_capture_buf *tb)
+{
+    if (*cur > tb->end)
+    {
+        *cur = tb->start + (*cur - tb->end);
+    }
+}
+static void _bcmtr_capture_unwind(bcmtr_capture_buf *tb, uint8_t **start, uint32_t *count)
+{
+    uint32_t prev_length;
+    uint8_t *prev_start;
+    uint32_t n = 0;
+    uint8_t *cur_hdr = NULL;
+
+    prev_start = tb->cur;
+    while (n < tb->events)
+    {
+        uint8_t *prev = prev_start;
+        _bcmtr_capture_get_prev(tb, prev, &prev_length, &prev_start);
+        if (prev_start >= prev)
+            break;
+        ++n;
+        cur_hdr = prev_start;
+    }
+
+    /* If buffer has wrapped around - continue unwinding */
+    if (tb->wa)
+    {
+        while (prev_start >= tb->cur)
+        {
+            cur_hdr = prev_start;
+            _bcmtr_capture_get_prev(tb, prev_start, &prev_length, &prev_start);
+            ++n;
+        }
+    }
+
+    *start = cur_hdr;
+    *count = n;
+}
+
+static inline uint32_t _bcmtr_capture_msg_size_get(uint8_t *buf)
+{
+    /* WARNING: do NOT access any members of bcmtr_capture_entry other than msg_size (the first member) as they may
+       have been wrapped to the beginning of the buffer. */
+    return ((bcmtr_capture_entry *)(long)buf)->msg_size;
+}
+
+static void _bcmtr_capture_copy(
+    bcmtr_capture_buf *tb,
+    uint8_t **dst,
+    uint8_t *src,
+    uint32_t to_copy,
+    uint32_t *remaining)
+{
+    uint32_t left;
+
+    left = tb->end - src;
+    if (left < to_copy)
+    {
+        memcpy(*dst, src, left);
+        memcpy((*dst) + left, tb->start, to_copy - left);
+    }
+    else
+    {
+        memcpy(*dst, src, to_copy);
+    }
+    (*dst) += to_copy;
+    (*remaining) -= to_copy;
+}
+
+static void _bcmtr_capture_copy_bounded(
+    bcmtr_capture_buf *tb,
+    uint8_t **dst,
+    uint8_t *src,
+    uint32_t to_copy,
+    uint32_t *remaining,
+    uint32_t bound)
+{
+    if (bound < to_copy)
+    {
+        src += to_copy - bound;
+        to_copy = bound;
+    }
+    if ((*remaining) < to_copy)
+    {
+        to_copy = *remaining;
+    }
+    _bcmtr_capture_copy(tb, dst, src, to_copy, remaining);
+}
+
+/* Set capture, log, debug for selected messages */
+bcmos_errno bcmtr_cld_level_set(bcmolt_devid device, const bcmtr_cld_filter *filter, bcmtr_cld_type cld_level)
+{
+    bcmolt_group_id msg_id;
+    bcmos_errno rc;
+
+    if ((unsigned)device >= BCMTR_MAX_OLTS || !filter)
+    {
+        return BCM_ERR_PARM;
+    }
+
+    /* Handle wildcard object */
+    if (filter->object == BCMOLT_OBJECT_ANY)
+    {
+        bcmtr_cld_filter f = *filter;
+
+        for (f.object = 0; f.object <= BCMOLT_OBJ_ID__NUM_OF; f.object++)
+        {
+            bcmtr_cld_level_set(device, &f, cld_level);
+        }
+        return BCM_ERR_OK;
+    }
+
+    /* Handle wildcard group */
+    if (filter->group == BCMOLT_MGT_GROUP_ANY)
+    {
+        bcmtr_cld_filter f = *filter;
+
+        f.subgroup = BCMOLT_SUBGROUP_ANY;
+        for (f.group = BCMOLT_MGT_GROUP_CFG; f.group <= BCMOLT_MGT_GROUP__NUM_OF; f.group++)
+        {
+            bcmtr_cld_level_set(device, &f, cld_level);
+        }
+        return BCM_ERR_OK;
+    }
+
+    /* Handle wildcard subgroup */
+    if (filter->group == BCMOLT_MGT_GROUP_ANY || filter->subgroup == BCMOLT_SUBGROUP_ANY)
+    {
+        bcmtr_cld_filter f = *filter;
+
+        f.subgroup = 0;
+        for (f.subgroup = 0;
+            bcmolt_group_id_combine(f.object, f.group, f.subgroup, &msg_id) == BCM_ERR_OK;
+            f.subgroup++)
+        {
+            bcmtr_cld_level_set(device, &f, cld_level);
+        }
+        return BCM_ERR_OK;
+    }
+
+    /* If we are here - it is not a wildcard */
+    rc = bcmolt_group_id_combine(filter->object, filter->group, filter->subgroup, &msg_id);
+    if (rc)
+        return rc;
+
+    BUG_ON((unsigned)msg_id >= BCMOLT_GROUP_ID__NUM_OF);
+    bcmtr_cld_active_level[device][msg_id] = cld_level;
+    return BCM_ERR_OK;
+}
+
+/* Get capture, log, debug for selected message */
+bcmos_errno bcmtr_cld_level_get(bcmolt_devid device, const bcmtr_cld_filter *filter, bcmtr_cld_type *cld_level)
+{
+    bcmolt_group_id msg_id;
+    bcmos_errno rc;
+    if ((unsigned)device >= BCMTR_MAX_OLTS || !filter)
+    {
+        return BCM_ERR_PARM;
+    }
+    rc = bcmolt_group_id_combine(filter->object, filter->group, filter->subgroup, &msg_id);
+    if (rc)
+        return rc;
+    BUG_ON((unsigned)msg_id >= BCMOLT_GROUP_ID__NUM_OF);
+    *cld_level = bcmtr_cld_active_level[device][msg_id];
+    return BCM_ERR_OK;
+}
+
+/** Initialize capture */
+bcmos_errno bcmtr_capture_init(bcmolt_devid olt, const bcmtr_capture_parm *parm)
+{
+    bcmtr_capture_buf *tb;
+
+    if (olt >= BCMTR_MAX_OLTS || !parm)
+        return BCM_ERR_PARM;
+    if (capture_buf[olt].start)
+    {
+        bcmcli_session_print(bcmtr_cld_session, "TRACE/%d: already initialized\n", olt);
+        return BCM_ERR_PARM;
+    }
+
+    if (parm->size < BCMTR_CAPTURE_MIN_BUF_SIZE)
+    {
+        bcmcli_session_print(bcmtr_cld_session, "TRACE/%d: capture buffer is too small (%u < %d)\n",
+            olt, parm->size, BCMTR_CAPTURE_MIN_BUF_SIZE);
+        return BCM_ERR_PARM;
+    }
+
+    tb = &capture_buf[olt];
+    tb->size = parm->size & ~0x3;
+    /* User-supplied or dynamically allocated buffer ? */
+    if (parm->ptr)
+        tb->start = parm->ptr;
+    else
+    {
+        tb->start = bcmos_alloc(parm->size);
+        if (!tb->start)
+        {
+            bcmcli_session_print(bcmtr_cld_session, "TRACE/%d: can't allocate capture buffer\n", olt);
+            tb->size = 0;
+            return BCM_ERR_NOMEM;
+        }
+    }
+    tb->end = (void *)((long)tb->start + parm->size);
+    tb->cur = tb->start;
+    tb->used = tb->wa = 0;
+    tb->active = parm->activate;
+    tb->parm = *parm;
+
+    return BCM_ERR_OK;
+}
+
+/** Destroy capture buffer */
+void bcmtr_capture_destroy(bcmolt_devid olt)
+{
+    bcmtr_capture_buf *tb;
+
+    if (olt >= BCMTR_MAX_OLTS)
+        return;
+    tb = &capture_buf[olt];
+    tb->active = BCMOS_FALSE;
+    if (tb->start && !tb->parm.ptr)
+        bcmos_free(tb->start);
+    memset(tb, 0, sizeof(*tb));
+}
+
+/** Get capture recording info */
+bcmos_errno bcmtr_capture_info_get(bcmolt_devid olt, bcmtr_capture_info *info)
+{
+    bcmtr_capture_buf *tb;
+
+    if (olt >= BCMTR_MAX_OLTS || !info)
+        return BCM_ERR_PARM;
+    tb = &capture_buf[olt];
+    if (tb->active)
+    {
+        bcmcli_session_print(bcmtr_cld_session, "TRACE/%d: must stop first\n", olt);
+        return BCM_ERR_PARM;
+    }
+    info->size = tb->size;
+    info->used = tb->used;
+    info->wa   = tb->wa;
+    info->msgs = _bcmtr_capture_nmsgs(tb);
+    info->lost = tb->events - info->msgs;
+    return BCM_ERR_OK;
+}
+
+bcmos_errno bcmtr_capture_size_get(bcmolt_devid olt, uint32_t *size)
+{
+    bcmtr_capture_buf *tb;
+    uint32_t n = 0;
+    uint8_t *cur_hdr = NULL;
+    uint32_t i;
+
+    *size = 0;
+    if (olt >= BCMTR_MAX_OLTS)
+    {
+        return BCM_ERR_PARM;
+    }
+    tb = &capture_buf[olt];
+    if (!tb->start)
+    {
+        bcmcli_session_print(bcmtr_cld_session, "TRACE/%d: not initialized\n", olt);
+        return BCM_ERR_PARM;
+    }
+    if (tb->active)
+    {
+        bcmcli_session_print(bcmtr_cld_session, "TRACE/%d: must stop first\n", olt);
+        return BCM_ERR_PARM;
+    }
+
+    if (!tb->used)
+    {
+        return BCM_ERR_OK;
+    }
+
+    /* Unwind capture buffer backward to get to the 1st recorded message */
+    _bcmtr_capture_unwind(tb, &cur_hdr, &n);
+
+    /* "first" points to the 1st recorded entry and "n" contains number of messages.
+     * Now go forward and copy to the user buffer
+     */
+    BUG_ON(!cur_hdr);
+    for (i = 0; i < n; i++)
+    {
+        uint32_t msg_size = _bcmtr_capture_msg_size_get(cur_hdr) + sizeof(bcmtr_capture_entry);
+        uint32_t rounded_size = BCMOS_ROUND_UP(msg_size, sizeof(uint32_t));
+
+        (*size) += msg_size;
+
+        /* Move to the next entry in capture buffer */
+        cur_hdr += rounded_size + sizeof(uint32_t);
+        _bcmtr_capture_wrap(&cur_hdr, tb);
+    }
+
+    return BCM_ERR_OK;
+}
+
+bcmos_errno bcmtr_capture_read(bcmolt_devid olt, uint8_t *buf, uint32_t offset, uint32_t *length)
+{
+    bcmtr_capture_buf *tb;
+    uint32_t n = 0;
+    uint8_t *cur_hdr = NULL;
+    uint32_t cur_offset = 0;
+    uint32_t i;
+
+    if (olt >= BCMTR_MAX_OLTS || !buf)
+    {
+        return BCM_ERR_PARM;
+    }
+    tb = &capture_buf[olt];
+    if (!tb->start)
+    {
+        bcmcli_session_print(bcmtr_cld_session, "TRACE/%d: not initialized\n", olt);
+        return BCM_ERR_PARM;
+    }
+    if (tb->active)
+    {
+        bcmcli_session_print(bcmtr_cld_session, "TRACE/%d: must stop first\n", olt);
+        return BCM_ERR_PARM;
+    }
+
+    if (!tb->used)
+    {
+        return BCM_ERR_OK;
+    }
+
+    /* Unwind capture buffer backward to get to the 1st recorded message */
+    _bcmtr_capture_unwind(tb, &cur_hdr, &n);
+
+    /* "first" points to the 1st recorded entry and "n" contains number of messages.
+     * Now go forward and copy to the user buffer
+     */
+    BUG_ON(!cur_hdr);
+    for (i = 0; (i < n) && ((*length) > 0); i++)
+    {
+        uint32_t msg_size = _bcmtr_capture_msg_size_get(cur_hdr);
+        uint32_t rounded_size = BCMOS_ROUND_UP(msg_size, sizeof(uint32_t));
+
+        cur_offset += sizeof(bcmtr_capture_entry);
+        if (cur_offset > offset)
+        {
+            uint32_t temp[BCMTR_CAPTURE_ENTRY_FIELDS];
+            uint8_t j;
+
+            for (j = 0; j < BCMTR_CAPTURE_ENTRY_FIELDS; j++)
+            {
+                temp[j] = BCMOLT_BUF_ENDIAN_CPU_TO_BUF(U32, *((uint32_t*)(long)cur_hdr));
+                cur_hdr += sizeof(uint32_t);
+                _bcmtr_capture_wrap(&cur_hdr, tb);
+            }
+
+            _bcmtr_capture_copy_bounded(
+                tb,
+                &buf,
+                (uint8_t*)temp,
+                sizeof(bcmtr_capture_entry),
+                length,
+                cur_offset - offset);
+        }
+        else
+        {
+            cur_hdr += sizeof(bcmtr_capture_entry);
+        }
+
+        cur_offset += msg_size;
+        if (cur_offset > offset)
+        {
+            _bcmtr_capture_copy_bounded(
+                tb,
+                &buf,
+                cur_hdr,
+                msg_size,
+                length,
+                cur_offset - offset);
+        }
+
+        /* Move to the next entry in capture buffer */
+        cur_hdr += rounded_size + sizeof(uint32_t);
+        _bcmtr_capture_wrap(&cur_hdr, tb);
+    }
+
+    return BCM_ERR_OK;
+}
+
+bcmos_bool bcmtr_capture_entry_get_next(bcmolt_buf *buf, bcmtr_capture_entry *hdr, uint8_t **msg)
+{
+    bcmos_bool valid;
+
+    BUG_ON(buf == NULL);
+    BUG_ON(hdr == NULL);
+
+    valid = bcmtr_capture_entry_unpack(buf, hdr);
+    if (msg != NULL)
+    {
+        *msg = bcmolt_buf_snap_get(buf);
+    }
+    return valid && bcmolt_buf_skip(buf, hdr->msg_size);
+}
+
+/** Decode and dump capture recording */
+bcmos_errno bcmtr_capture_dump(bcmcli_session *session, bcmolt_devid olt, uint32_t *nmsgs)
+{
+    bcmtr_capture_entry hdr;
+    uint8_t *msg_start;
+    bcmolt_buf buf;
+    uint8_t *data;
+    uint32_t length;
+    uint32_t remaining;
+    bcmos_errno rc;
+
+    rc = bcmtr_capture_size_get(olt, &length);
+    BCMOS_CHECK_RETURN_ERROR(BCM_ERR_OK != rc, rc);
+
+    /* Allocate temp buffer and read data into it */
+    data = bcmos_calloc(length);
+    if (data == NULL)
+    {
+        bcmcli_session_print(session, "TRACE/%d: no memory\n", olt);
+        return BCM_ERR_NOMEM;
+    }
+
+    remaining = length;
+    rc = bcmtr_capture_read(olt, data, 0, &remaining);
+    if (BCM_ERR_OK != rc)
+    {
+        bcmos_free(data);
+        return rc;
+    }
+
+    /* Dump */
+    bcmolt_buf_init(&buf, length - remaining, data, BCMOLT_BUF_ENDIAN_FIXED);
+    while (bcmtr_capture_entry_get_next(&buf, &hdr, &msg_start))
+    {
+        bcmolt_buf msg_buf;
+        bcmolt_msg *msg = NULL;
+        bcmos_errno err;
+
+        bcmcli_session_print(session, "\n%08x %s:\n", hdr.timestamp, bcmtr_cld_event_name(hdr.event));
+        bcmolt_buf_init(&msg_buf, hdr.msg_size, msg_start, BCMOLT_BUF_ENDIAN_FIXED);
+        err = bcmolt_msg_unpack(&msg_buf, &msg);
+        if (BCM_ERR_OK == err)
+        {
+            (void)apicli_msg_dump(session, msg);
+            bcmolt_msg_free(msg);
+        }
+        else
+        {
+            bcmcli_session_hexdump(session, msg_start, 0, hdr.msg_size, NULL);
+        }
+    }
+
+    bcmos_free(data);
+
+    *nmsgs = _bcmtr_capture_nmsgs(&capture_buf[olt]);
+
+    return BCM_ERR_OK;
+}
+
+/** (Re)start / Suspend capture recording */
+bcmos_errno bcmtr_capture_start_stop(bcmolt_devid olt, bcmos_bool start)
+{
+    if (olt >= BCMTR_MAX_OLTS)
+        return BCM_ERR_PARM;
+    if (!capture_buf[olt].start && start)
+    {
+        bcmcli_session_print(bcmtr_cld_session,
+            "TRACE/%d: Can't start recording - must initialize first\n", olt);
+        return BCM_ERR_PARM;
+    }
+    capture_buf[olt].active = start;
+    return BCM_ERR_OK;
+}
+
+bcmos_bool bcmtr_capture_is_active(bcmolt_devid olt)
+{
+    return capture_buf[olt].active;
+}
+
+bcmos_bool bcmtr_capture_entry_unpack(bcmolt_buf *buf, bcmtr_capture_entry *entry)
+{
+    return
+        bcmolt_buf_read_u32(buf, &entry->msg_size) &&
+        bcmolt_buf_read_u32(buf, &entry->event) &&
+        bcmolt_buf_read_u32(buf, &entry->timestamp);
+}
+
+/* Notify message to capture module - called from the transport layer */
+static void bcmtr_capture_notify(bcmolt_devid device, const bcmtr_hdr *trhdr,
+    bcmtr_cld_event_type ev, uint32_t ts,
+    const void *packed, uint32_t packed_length, bcmolt_msg *msg)
+{
+    bcmtr_capture_buf *tb;
+    bcmtr_capture_entry hdr;
+    uint32_t rounded_size;
+
+    tb = &capture_buf[device];
+
+    /* Sanity */
+    if (!packed)
+        return;
+    hdr.msg_size = packed_length;
+    /* Enable & overflow checks */
+    if (!tb->active)
+        return;
+    if (tb->parm.stop_on_full && (tb->used + hdr.msg_size + BCMTR_CAPTURE_OVERHEAD_SIZE > tb->size))
+        return;
+    hdr.timestamp = ts;
+    hdr.event = ev;
+    rounded_size = BCMOS_ROUND_UP(hdr.msg_size, sizeof(uint32_t));
+    _bcmtr_capture_store(tb, &hdr, sizeof(hdr));
+    _bcmtr_capture_store(tb, packed, rounded_size); /* overflow by up to 3 bytes; is this safe? */
+    rounded_size += sizeof(bcmtr_capture_entry) + sizeof(uint32_t);
+    _bcmtr_capture_store(tb, &rounded_size, sizeof(rounded_size));
+    ++tb->events;
+}
+
+/* Notify message to logger */
+static void bcmtr_log_notify(bcmolt_devid device, const bcmtr_hdr *hdr,
+    bcmtr_cld_event_type ev, uint32_t ts,
+    const void *packed, uint32_t packed_length, bcmolt_msg *msg)
+{
+#ifdef ENABLE_LOG
+    bcmos_errno err;
+    bcmolt_obj_id obj;
+    bcmolt_mgt_group group;
+    uint16_t subgroup;
+    const char *obj_name;
+    const char *subgroup_name;
+    const char *dummy_str;
+
+    err = bcmolt_group_id_split(hdr->msg_id, &obj, &group, &subgroup);
+    BCMOS_CHECK_RETURN(err != BCM_ERR_OK, err,);
+
+    err = api_cli_object_name(obj, &obj_name, &dummy_str);
+    BCMOS_CHECK_RETURN(err != BCM_ERR_OK, err,);
+
+    err = api_cli_object_subgroup_name(obj, group, subgroup, &subgroup_name, &dummy_str);
+    BCMOS_CHECK_RETURN(err != BCM_ERR_OK, err,);
+
+    /* log with the header but without file/line number (file/line number isn't helpful here). */
+    bcm_dev_log_log(
+        bcmtr_cld_log_id,
+        DEV_LOG_LEVEL_INFO,
+        BCM_LOG_FLAG_NONE,
+        "%s %s: corr_tag=%u instance=%d obj=%s group=%s subgrp=%s org_ts=%u err=%s\n",
+        bcmtr_cld_event_name(ev),
+        hdr->dir == BCMOLT_MSG_DIR_RESPONSE ? "response" : "request",
+        hdr->corr_tag,
+        hdr->instance,
+        obj_name,
+        apicli_mgt_group_to_str(group),
+        subgroup_name,
+        ts,
+        msg ? bcmos_strerror(msg->err) : "N/A");
+#endif
+}
+
+/* Dump message header and/or body */
+static void bcmtr_dump_notify(
+    bcmolt_devid device,
+    const bcmtr_hdr *hdr,
+    bcmtr_cld_event_type ev,
+    uint32_t ts,
+    const void *packed,
+    uint32_t packed_length,
+    bcmolt_msg *msg)
+{
+    bcmos_errno err;
+    bcmtr_cld_type val = bcmtr_cld_active_level[device][hdr->msg_id];
+    bcmolt_obj_id obj;
+    bcmolt_mgt_group group;
+    uint16_t subgroup;
+    const char *obj_name;
+    const char *subgroup_name;
+    const char *dummy_str;
+
+    err = bcmolt_group_id_split(hdr->msg_id, &obj, &group, &subgroup);
+    BCMOS_CHECK_RETURN(err != BCM_ERR_OK, err,);
+
+    err = api_cli_object_name(obj, &obj_name, &dummy_str);
+    BCMOS_CHECK_RETURN(err != BCM_ERR_OK, err,);
+
+    err = api_cli_object_subgroup_name(obj, group, subgroup, &subgroup_name, &dummy_str);
+    BCMOS_CHECK_RETURN(err != BCM_ERR_OK, err,);
+
+    /* always dump the message header to the scratch CLI session */
+    bcmcli_session_print(
+        bcmtr_cld_scratch_session,
+        "[-- CLD: %s %s: corr_tag=%u instance=%d msg_id=%d obj=%s(%d) group=%s(%d) subgrp=%s(%d)",
+        bcmtr_cld_event_name(ev),
+        hdr->dir == BCMOLT_MSG_DIR_RESPONSE ? "response" : "request",
+        hdr->corr_tag,
+        hdr->instance,
+        hdr->msg_id,
+        obj_name, obj,
+        apicli_mgt_group_to_str(group), group,
+        subgroup_name, subgroup);
+
+    if (hdr->more_fragments || (hdr->frag_number != 0))
+    {
+        bcmcli_session_print(
+            bcmtr_cld_scratch_session,
+            " more_fragments=%d fragment_number=%u",
+            hdr->more_fragments,
+            hdr->frag_number);
+    }
+
+    bcmcli_session_print(bcmtr_cld_scratch_session, " --]\n");
+
+    /* if configured for a full message dump, write the message data to the scratch session */
+    if ((val & BCMTR_CLD_DUMP) == BCMTR_CLD_DUMP)
+    {
+        if (msg != NULL)
+        {
+            bcmcli_session_print(bcmtr_cld_scratch_session, "[-- CLD Message Dump Start --]\n");
+            apicli_msg_dump(bcmtr_cld_scratch_session, msg);
+        }
+        else
+        {
+            bcmcli_session_print(bcmtr_cld_scratch_session, "[-- CLD Message Hex Dump Start --]\n");
+            bcmcli_session_hexdump(bcmtr_cld_scratch_session, packed, 0, packed_length, NULL);
+        }
+        bcmcli_session_print(bcmtr_cld_scratch_session, "[-- CLD Message Dump End --]\n");
+    }
+
+    /* Write the scratch session's buffer to the real CLI and reset it */
+    bcmcli_session_write(bcmtr_cld_session, bcmtr_cld_scratch_buf, bcmtr_cld_scratch_pos);
+    bcmtr_cld_scratch_pos = 0;
+}
+
+/* Notify capture, log, debug */
+void bcmtr_cld_notify(bcmolt_devid device, const bcmtr_hdr *hdr,
+    bcmtr_cld_event_type ev, uint32_t ts, const uint8_t *packed, uint32_t packed_length,
+    bcmolt_msg *msg)
+{
+    bcmtr_cld_type val = bcmtr_cld_active_level[device][hdr->msg_id];
+
+    if ((val & BCMTR_CLD_CAPTURE))
+        bcmtr_capture_notify(device, hdr, ev, ts, packed, packed_length, msg);
+    if ((val & BCMTR_CLD_LOG))
+        bcmtr_log_notify(device, hdr, ev, ts, packed, packed_length, msg);
+    if ((val & BCMTR_CLD_DUMP))
+        bcmtr_dump_notify(device, hdr, ev, ts, packed, packed_length, msg);
+}
+
+
+bcmos_errno bcmtr_cld_init(bcmcli_session *session)
+{
+    bcmos_errno err;
+    bcmcli_session_parm scratch_session_parm = { .write = bcmtr_log_cli_print };
+
+    err = bcmcli_session_open_user(&scratch_session_parm, &bcmtr_cld_scratch_session);
+    BCMOS_CHECK_RETURN_ERROR(err != BCM_ERR_OK, err);
+
+    bcmtr_cld_session = session;
+
+#ifdef ENABLE_LOG
+    bcmtr_cld_log_id = bcm_dev_log_id_register("cld", DEV_LOG_LEVEL_INFO, DEV_LOG_ID_TYPE_BOTH);
+#endif
+
+#ifdef ENABLE_CLI
+    err = bcmtr_cld_cli_init();
+    BCMOS_CHECK_RETURN_ERROR(err != BCM_ERR_OK, err);
+#endif
+
+    return BCM_ERR_OK;
+}
+
+/** Clean up transport capture, log, debug service
+ */
+void bcmtr_cld_exit(void)
+{
+#ifdef ENABLE_CLI
+    bcmtr_cld_cli_exit();
+#endif
+    if (bcmtr_cld_scratch_session)
+    {
+        bcmcli_session_close(bcmtr_cld_scratch_session);
+        bcmtr_cld_scratch_session = NULL;
+    }
+}
diff --git a/bcm68620_release/release/host_driver/transport/bcmtr_debug.h b/bcm68620_release/release/host_driver/transport/bcmtr_debug.h
new file mode 100644
index 0000000..4690748
--- /dev/null
+++ b/bcm68620_release/release/host_driver/transport/bcmtr_debug.h
@@ -0,0 +1,257 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#ifndef BCMTR_DEBUG_H_
+#define BCMTR_DEBUG_H_
+
+#include <bcm_config.h>
+#include <bcmolt_msg_pack.h>
+#include <bcmtr_header.h>
+#include <bcmolt_msg.h>
+#include <bcmcli.h>
+
+/* CLD stands for capture,log,debug */
+
+/** Capture, log, debug type */
+typedef enum
+{
+    BCMTR_CLD_NONE      = 0,            /**< Off */
+    BCMTR_CLD_CAPTURE   = 0x01,         /**< Message capture */
+    BCMTR_CLD_LOG       = 0x02,         /**< Message logging */
+    BCMTR_CLD_DUMP_HDR  = 0x04,         /**< Message header dump */
+    BCMTR_CLD_DUMP      = 0x0C,         /**< Message header and body dump */
+} bcmtr_cld_type;
+
+/** Event type */
+typedef enum
+{
+    BCMTR_CLD_EV_SEND,                  /**< Send message */
+    BCMTR_CLD_EV_RESEND,                /**< Retransmit message */
+    BCMTR_CLD_EV_RECV,                  /**< Receive message */
+    BCMTR_CLD_EV_RECV_DISCARD,          /**< Receive message discarded */
+    BCMTR_CLD_EV_TIMEOUT,               /**< Request timed out waiting for response */
+} bcmtr_cld_event_type;
+
+/** Capture, log, debug filter */
+typedef struct
+{
+    bcmolt_mgt_group group;     /**< Message group. Can be BCMOLT_MGT_GROUP_ANY */
+    bcmolt_obj_id object;       /**< Object. Can be BCMOLT_OBJECT_ANY */
+    uint16_t subgroup;          /**< Message subgroup. Can be BCMOLT_SUBGROUP_ANY */
+} bcmtr_cld_filter;
+
+/** Initialize transport capture,log, debug service
+ * \param[in]   parent  Parent CLI directory. Can be NULL
+ * \returns BCM_ERR_OK or error code
+ */
+bcmos_errno bcmtr_cld_init(bcmcli_session *session);
+
+/** Clean up transport capture, log, debug service
+ */
+void bcmtr_cld_exit(void);
+
+/** Set capture, log, debug for selected messages
+ * \param[in]   device          Device id
+ * \param[in]   filter          Message filter
+ * \param[in]   cld_level       Capture, log, debug level. Can be a combination of BCMTR_CLD_.. constants
+ * \returns BCM_ERR_OK or error code
+ */
+bcmos_errno bcmtr_cld_level_set(bcmolt_devid device, const bcmtr_cld_filter *filter, bcmtr_cld_type cld_level);
+
+/** Get capture, log, debug for selected message
+ * \param[in]   device          Device id
+ * \param[in]   filter          Message filter. Wildcards are not allowed.
+ * \param[out]  cld_level       Capture, log, debug level
+ * \returns BCM_ERR_OK or error code
+ */
+bcmos_errno bcmtr_cld_level_get(bcmolt_devid device, const bcmtr_cld_filter *filter, bcmtr_cld_type *cld_level);
+
+/*
+ * Message capture functions
+ */
+
+/**
+ * Message capture facility allows capturing messages between the host
+ * and OLT at real time. The recorded trace can be dumped in
+ * human readable format or "played back" in order to reproduce
+ * the configuration under test.
+ * @{
+ */
+
+/** Minimal trace buffer size (bytes) */
+#define BCMTR_CAPTURE_MIN_BUF_SIZE          (16*1024)
+
+/** Capture buffer configuration parameters */
+typedef struct bcmtr_capture_parm
+{
+    uint32_t size;              /**< Capture buffer size. Must be at least \ref BCMTR_CAPTURE_MIN_BUF_SIZE bytes */
+    void *ptr;                  /**< Optional capture buffer pointer. Allocated automatically if NULL */
+    bcmos_bool stop_on_full;    /**< TRUE-stop recording when buffer is full. FALSE=circular buffer */
+    bcmos_bool activate;        /**< Auto-activate capture immediately after init */
+} bcmtr_capture_parm;
+
+/** Capture info record */
+typedef struct bcmtr_capture_info
+{
+    uint32_t size;              /**< Capture buffer size */
+    uint32_t used;              /**< Used bytes */
+    uint32_t wa;                /**< Number of times capture buffer wrapped around */
+    uint32_t msgs;              /**< Number of complete messages stored in the capture buffer */
+    uint32_t lost;              /**< Number of messages lost due to buffer overflow */
+} bcmtr_capture_info;
+
+/* Capture entry header
+ *
+ * Followed by msg_size bytes of message data
+ */
+typedef struct
+{
+    uint32_t msg_size;          /**< Message size (bytes); MUST be the first member */
+    uint32_t event;             /**< bcmtr_cld_event_type event */
+    uint32_t timestamp;         /**< Message timestamp (us) */
+    /* Followed by message data padded to the nearest 4 bytes */
+} bcmtr_capture_entry;
+
+/** Initialize capture buffer
+ *
+ * This function must be called first.
+ * \param[in]   olt     Olt index
+ * \param[in]   cfg     Capture configuration parameters
+ * \return 0=success or error code
+ */
+bcmos_errno bcmtr_capture_init(bcmolt_devid olt, const bcmtr_capture_parm *parm);
+
+/** Destroy capture buffer
+ *
+ * Destroy buffer initialized by bcmtr_capture_Init().
+ * \param[in]   olt     Olt index
+ * Following this call all recording is lost.
+ */
+void bcmtr_capture_destroy(bcmolt_devid olt);
+
+/** Get capture recording info
+ *
+ * \param[in]   olt     Olt index
+ * \param[out]  info    Capture information
+ * \return 0=success or error code
+ */
+bcmos_errno bcmtr_capture_info_get(bcmolt_devid olt, bcmtr_capture_info *info);
+
+/** Get the number of readable bytes in the capture buffer
+ *
+ * \param[in]   olt             OLT index
+ * \param[out]  size            Number of readable bytes
+ */
+bcmos_errno bcmtr_capture_size_get(bcmolt_devid olt, uint32_t *size);
+
+/** Read portion of capture
+ *
+ * This function reads recorded data into a user buffer starting at the specified offset from the beginning of the
+ * capture up to the specified length. Applications can use this function in order to save capture into file or dump it.
+ *
+ * \param[in]   olt             OLT index
+ * \param[out]  buf             User buffer
+ * \param[in]   offset          Buffer offset to start read (bytes)
+ * \param[in/out]  length       in: Maximum number of bytes to read into the user buffer
+ *                              out: Remaining unused bytes in user buffer
+ * \return 0=success or error code
+ */
+bcmos_errno bcmtr_capture_read(bcmolt_devid olt, uint8_t *buf, uint32_t offset, uint32_t *length);
+
+/** Advance buffer to next capture entry
+ *
+ * Helper function used to scan buffer read by bcmtr_capture_read()
+ *
+ * \param[in/out]   buf         Capture buffer
+ * \param[out]      hdr         Capture entry header
+ * \param[out]      msg         Pointer to packed message
+ */
+bcmos_bool bcmtr_capture_entry_get_next(bcmolt_buf *buf, bcmtr_capture_entry *hdr, uint8_t **msg);
+
+/** Decode and dump capture recording
+ *
+ * This function interprets and dumps capture recording.
+ *
+ * \param[in]   session CLI session
+ * \param[in]   olt     OLT index
+ * \param[out]  nmsgs   Number of messages dumped
+ * \return 0=success or error code
+ */
+bcmos_errno bcmtr_capture_dump(bcmcli_session *session, bcmolt_devid olt, uint32_t *nmsgs);
+
+/** (Re)start / Suspend capture recording
+ *
+ * \param[in]   olt     OLT index
+ * \param[in]   start   TRUE=start, FALSE=suspend
+ * \return 0=success or error code
+ */
+bcmos_errno bcmtr_capture_start_stop(bcmolt_devid olt, bcmos_bool start);
+
+/** Are we actively capturing?
+ *
+ * \param[in]   olt     OLT index
+ * \return TRUE=actively capturing, FALSE=NOT capturing
+ */
+bcmos_bool bcmtr_capture_is_active(bcmolt_devid olt);
+
+/** Convert entry to platform specific format
+ *
+ * \param[in/out]   buf     Capture buffer
+ * \param[out]      entry   Capture entry header
+ *
+ * \return TRUE if success, FALSE otherwise
+ */
+bcmos_bool bcmtr_capture_entry_unpack(bcmolt_buf *buf, bcmtr_capture_entry *entry);
+
+/*
+ * Internal functions - called from transport level
+ */
+
+/* Per-OLT, per-command combined trace,log,debug level */
+extern bcmtr_cld_type bcmtr_cld_active_level[BCMTR_MAX_OLTS][BCMOLT_GROUP_ID__NUM_OF];
+
+/* Notify message.
+ * Called by transport layer
+ */
+void bcmtr_cld_notify(bcmolt_devid device, const bcmtr_hdr *hdr,
+    bcmtr_cld_event_type ev, uint32_t ts, const uint8_t *packed, uint32_t packed_length,
+    bcmolt_msg *msg);
+
+/* Check if CLD is enabled for the message and record if yes
+ * Called by transport layer
+ */
+#define BCMTR_CLD_CHECK_NOTIFY(_device, _hdr, _ev, _ts, _packed, _packed_length, _msg) \
+    do {\
+        if (bcmtr_cld_active_level[_device][(_hdr)->msg_id]) \
+        { \
+            bcmtr_cld_notify(_device, _hdr, _ev, _ts, _packed, _packed_length, _msg); \
+        } \
+    } while (0)
+
+#endif /* BCMTR_DEBUG_H_ */
diff --git a/bcm68620_release/release/host_driver/transport/bcmtr_debug_cli.c b/bcm68620_release/release/host_driver/transport/bcmtr_debug_cli.c
new file mode 100644
index 0000000..6db7d82
--- /dev/null
+++ b/bcm68620_release/release/host_driver/transport/bcmtr_debug_cli.c
@@ -0,0 +1,440 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#include <bcmos_system.h>
+#include <bcmtr_debug.h>
+#include <bcmtr_debug_cli.h>
+#include <bcm_api_cli_helpers.h>
+#ifdef BCM_SUBSYSTEM_HOST
+#include <bcmolt_dev_selector.h>
+#endif
+
+#define BCMTR_CLD_CAST_DISCARD_CONST(p, type)       (type)((long)(p))
+
+static bcmcli_entry *cld_cli_dir;
+
+static bcmos_errno _bcmtr_cld_cli_create(void);
+static void _bcmtr_cld_cli_destroy(void);
+
+/*
+ * CLI handlers
+ */
+
+static bcmos_errno _bcmtr_cld_cli_setget_level(bcmcli_session *session, const bcmcli_cmd_parm parm[], uint16_t nparms)
+{
+    bcmcli_number obj = bcmcli_parm_get(session, "object")->value.number;
+    bcmcli_cmd_parm *grp_parm = bcmcli_parm_get(session, "group");
+    bcmcli_number group = grp_parm ? grp_parm->value.number : -1;
+    bcmcli_cmd_parm *subgrp_parm = bcmcli_parm_get(session, "subgroup");
+    bcmcli_number subgroup = subgrp_parm ? subgrp_parm->value.number : -1;
+    bcmtr_cld_type level = bcmcli_parm_get(session, "level")->value.number;
+    bcmtr_cld_filter filter = {};
+    bcmos_errno rc;
+
+    if (obj == -1 || !bcmcli_parm_is_set(session, bcmcli_parm_get(session, "object")))
+    {
+        filter.object = BCMOLT_OBJECT_ANY;
+    }
+    else
+    {
+        filter.object = obj;
+    }
+
+    if (group == -1 || !grp_parm || !bcmcli_parm_is_set(session, grp_parm))
+    {
+        filter.group = BCMOLT_MGT_GROUP_ANY;
+    }
+    else
+    {
+        filter.group = group;
+    }
+
+    if (subgroup == -1 || !subgrp_parm || !bcmcli_parm_is_set(session, subgrp_parm))
+    {
+        filter.subgroup = BCMOLT_SUBGROUP_ANY;
+    }
+    else
+    {
+        filter.subgroup = subgroup;
+    }
+
+    /* Get or set level ? */
+    if (bcmcli_parm_is_set(session, bcmcli_parm_get(session, "level")))
+    {
+        rc = bcmtr_cld_level_set(current_device, &filter, level);
+    }
+    else
+    {
+        rc = bcmtr_cld_level_get(current_device, &filter, &level);
+        if (rc == BCM_ERR_OK)
+        {
+            bcmcli_session_print(session, "capture:%s log:%s dump:%s\n",
+                (level & BCMTR_CLD_CAPTURE) ? "on" : "off",
+                (level & BCMTR_CLD_LOG) ? "on" : "off",
+                ((level & BCMTR_CLD_DUMP) == BCMTR_CLD_DUMP) ? "all" :
+                    (level & BCMTR_CLD_DUMP_HDR) ? "headers" : "off");
+        }
+    }
+
+    return rc;
+}
+
+static bcmos_errno _bcmtr_cld_cli_capture_init(bcmcli_session *session, const bcmcli_cmd_parm parm[], uint16_t nparms)
+{
+    bcmcli_number size = bcmcli_parm_get(session, "size")->value.number;
+    bcmos_bool stop_on_full = bcmcli_parm_get(session, "stop_on_full")->value.number;
+    bcmos_bool autostart = bcmcli_parm_get(session, "autostart")->value.number;
+    bcmtr_capture_parm p = {};
+
+    p.size = size;
+    p.stop_on_full = stop_on_full;
+    p.activate = autostart;
+
+    return bcmtr_capture_init(current_device, &p);
+}
+
+static bcmos_errno _bcmtr_cld_cli_capture_delete(bcmcli_session *session, const bcmcli_cmd_parm parm[], uint16_t nparms)
+{
+    bcmtr_capture_destroy(current_device);
+    return BCM_ERR_OK;
+}
+
+static bcmos_errno _bcmtr_cld_cli_capture_start(bcmcli_session *session, const bcmcli_cmd_parm parm[], uint16_t nparms)
+{
+    return bcmtr_capture_start_stop(current_device, BCMOS_TRUE);
+}
+
+static bcmos_errno _bcmtr_cld_cli_capture_stop(bcmcli_session *session, const bcmcli_cmd_parm parm[], uint16_t nparms)
+{
+    return bcmtr_capture_start_stop(current_device, BCMOS_FALSE);
+}
+
+static bcmos_errno _bcmtr_cld_cli_capture_dump(bcmcli_session *session, const bcmcli_cmd_parm parm[], uint16_t nparms)
+{
+    uint32_t nmsgs;
+    bcmos_errno rc;
+
+    rc = bcmtr_capture_dump(session, current_device, &nmsgs);
+    if (!rc)
+    {
+        bcmcli_session_print(session, "Dumped %u messages\n", nmsgs);
+    }
+
+    return BCM_ERR_OK;
+}
+
+static bcmos_errno _bcmtr_cld_cli_capture_info(bcmcli_session *session, const bcmcli_cmd_parm parm[], uint16_t nparms)
+{
+    bcmtr_capture_info info;
+    bcmos_errno rc;
+
+    rc = bcmtr_capture_info_get(current_device, &info);
+    if (!rc)
+    {
+        bcmcli_session_print(session, "Buffer: size=%u used=%u. Events: recorded=%u lost=%d. Wraps around:%u\n",
+            info.size, info.used, info.msgs, info.lost, info.wa);
+    }
+
+    return BCM_ERR_OK;
+}
+
+
+#ifdef BCM_SUBSYSTEM_HOST
+/* Current device change indication */
+static void _bcmtr_cld_device_change_ind(bcmcli_session *session, bcmolt_devid dev)
+{
+    bcmcli_entry *cur_dir = bcmcli_dir_get(session);
+    bcmos_bool is_cld_cur_dir = (cur_dir && cur_dir == cld_cli_dir);
+    bcmos_errno rc;
+
+    /* Destroy and re-create CLD CLI directory */
+    _bcmtr_cld_cli_destroy();
+    rc = _bcmtr_cld_cli_create();
+
+    /* Restore current CLI directory to CLD */
+    if (!rc && is_cld_cur_dir)
+        bcmcli_dir_set(session, cld_cli_dir);
+}
+#endif
+
+/* allocate memory for name and description and copy to to parm */
+static bcmos_errno _bcmtr_cld_copy_parm_name(bcmcli_cmd_parm *parm, const char *name, const char *descr)
+{
+    parm->name = bcmos_alloc(strlen(name) + 1);
+    parm->description = bcmos_alloc(strlen(descr) + 1);
+    if ((parm->name == NULL) || (parm->description == NULL))
+    {
+        /* Successful allocation if any will be released by common cleanup
+         * along with the rest of dynamic parameter fields */
+        return BCM_ERR_NOMEM;
+    }
+    strcpy(BCMTR_CLD_CAST_DISCARD_CONST(parm->name, void *), name);
+    strcpy(BCMTR_CLD_CAST_DISCARD_CONST(parm->description, void *), descr);
+    return BCM_ERR_OK;
+}
+
+/* Free "level" command parameters. both name and description are allocated dynamically */
+static void _bcmtr_cld_free_level_parms(bcmcli_cmd_parm *parms)
+{
+    bcmcli_cmd_parm *p = parms;
+
+    while (p->name)
+    {
+        if (p->type == BCMCLI_PARM_ENUM && p->enum_table)
+        {
+            if ((p->flags & BCMCLI_PARM_FLAG_SELECTOR))
+            {
+                bcmcli_enum_val *e = p->enum_table;
+                while(e->name)
+                {
+                    if (e->parms)
+                    {
+                        _bcmtr_cld_free_level_parms(e->parms);
+                    }
+                    ++e;
+                }
+            }
+            bcmos_free(p->enum_table);
+        }
+        if (p->description)
+            bcmos_free(BCMTR_CLD_CAST_DISCARD_CONST(p->description, void *));
+        if (p->name)
+            bcmos_free(BCMTR_CLD_CAST_DISCARD_CONST(p->name, void *));
+
+        ++p;
+    }
+    bcmos_free(parms);
+}
+
+/* Add "level" command */
+static bcmos_errno _bcmtr_cld_add_level_cmd(bcmcli_entry *dir)
+{
+    /* object:            *all, object list
+     * group:   selector: *all, group list
+     * subgroup:          *all, subgroup list
+     * level:   bitmask
+     */
+    bcmcli_cmd_extra_parm cmd_extras = { .free_parms = _bcmtr_cld_free_level_parms };
+    bcmcli_enum_val *obj_selector;
+    bcmcli_cmd_parm *cmd_parms;
+    static const char *all_name = "*all";
+    bcmolt_system_mode current_system_mode;
+    int n_obj = 0;
+    bcmolt_obj_id o;
+    bcmos_errno rc = BCM_ERR_NOMEM;
+
+    /* Allocate top level parameters: object selector, level, terminator */
+    cmd_parms = bcmos_calloc(sizeof(bcmcli_cmd_parm) * 3);
+    if (!cmd_parms)
+    {
+        return BCM_ERR_NOMEM;
+    }
+
+    /* Allocate object enum table. 2 extra entries for *all and terminator */
+    obj_selector = bcmos_calloc(sizeof(bcmcli_enum_val) * (BCMOLT_OBJ_ID__NUM_OF + 2));
+    if (!obj_selector)
+    {
+        goto cleanup;
+    }
+
+    /* Fill up parameters */
+    rc = _bcmtr_cld_copy_parm_name(&cmd_parms[0], "object", "Object Name");
+    cmd_parms[0].type = BCMCLI_PARM_ENUM;
+    cmd_parms[0].flags = BCMCLI_PARM_FLAG_SELECTOR;
+    cmd_parms[0].enum_table = obj_selector;
+
+    rc = rc ? rc : _bcmtr_cld_copy_parm_name(&cmd_parms[1], "level", "Level bitmask: 1=capture,2=log,4=print hdr,8=print body");
+    cmd_parms[1].type = BCMCLI_PARM_DECIMAL;
+    cmd_parms[1].flags = BCMCLI_PARM_FLAG_OPTIONAL;
+
+    /* obj_selector[0] is reserved for *all */
+    obj_selector[0].name = all_name;
+    obj_selector[0].val = -1;
+
+    /* Go over objects */
+    bcmolt_system_mode_get(current_device, &current_system_mode);
+    for (o = 0; o < BCMOLT_OBJ_ID__NUM_OF; o++)
+    {
+        bcmcli_enum_val *grp_selector;
+        bcmcli_cmd_parm *grp_parm;
+        bcmolt_mgt_group g;
+        int n_grp = 0;
+
+        if (!bcmolt_object_is_supported(current_system_mode, o))
+            continue;
+
+        /* Allocate group parameter and selector */
+        ++n_obj;
+        obj_selector[n_obj].val = o;
+        rc = api_cli_object_name(o, &obj_selector[n_obj].name, NULL);
+        if (rc != BCM_ERR_OK)
+            goto cleanup;
+
+        obj_selector[n_obj].parms = grp_parm = bcmos_calloc(sizeof(bcmcli_cmd_parm)*2);
+        if (!grp_parm)
+            goto cleanup;
+        rc = _bcmtr_cld_copy_parm_name(grp_parm, "group", "Message group");
+        grp_parm->type = BCMCLI_PARM_ENUM;
+        grp_parm->flags = BCMCLI_PARM_FLAG_SELECTOR;
+        grp_parm->enum_table = grp_selector = bcmos_calloc(sizeof(bcmcli_enum_val) * (BCMOLT_MGT_GROUP__NUM_OF + 1));
+        if (!grp_selector)
+            goto cleanup;
+
+        /* Selector 0 is reserved for *all */
+        grp_selector[0].name = all_name;
+        grp_selector[0].val = -1;
+
+        /* Go over groups */
+        for (g = 1; g < BCMOLT_MGT_GROUP__NUM_OF; g++)
+        {
+            uint16_t subgroup_count = api_cli_get_subgroup_count(o, g);
+            bcmcli_enum_val *subgrp_table;
+            bcmcli_cmd_parm *subgrp_parm;
+            uint16_t s;
+            int sg_table_idx;
+
+            if (subgroup_count == 0)
+                continue;
+
+            ++n_grp;
+            grp_selector[n_grp].name = apicli_mgt_group_to_str(g);
+            grp_selector[n_grp].val = g;
+
+            /* Skip subgroup selector for groups that don't support it */
+            if (g != BCMOLT_MGT_GROUP_AUTO      &&
+                g != BCMOLT_MGT_GROUP_OPER      &&
+                g != BCMOLT_MGT_GROUP_PROXY     &&
+                g != BCMOLT_MGT_GROUP_PROXY_RX)
+            {
+                continue;
+            }
+
+            grp_selector[n_grp].parms = subgrp_parm = bcmos_calloc(sizeof(bcmcli_cmd_parm)*2);
+            if (!subgrp_parm)
+                goto cleanup;
+            rc = rc ? rc : _bcmtr_cld_copy_parm_name(subgrp_parm, "subgroup", "Message sub-group");
+            subgrp_parm->type = BCMCLI_PARM_ENUM;
+            subgrp_parm->enum_table = subgrp_table = bcmos_calloc(sizeof(bcmcli_enum_val) * (subgroup_count + 2));
+            if (!subgrp_table)
+                goto cleanup;
+            subgrp_table[0].name = all_name;
+            subgrp_table[0].val = -1;
+
+            sg_table_idx = 1;
+            for (s = 0; s < subgroup_count; s++)
+            {
+                if (api_cli_object_subgroup_name(o, g, s, &subgrp_table[sg_table_idx].name, NULL) == BCM_ERR_OK)
+                {
+                    subgrp_table[sg_table_idx].val = s;
+                    ++sg_table_idx;
+                }
+            }
+        }
+    }
+
+    /* Finally add command */
+    rc = bcmcli_cmd_add(dir, "level", _bcmtr_cld_cli_setget_level, "Set/get cld level", BCMCLI_ACCESS_ADMIN,
+        &cmd_extras, cmd_parms);
+    if (rc)
+        goto cleanup;
+    return BCM_ERR_OK;
+
+cleanup:
+    _bcmtr_cld_free_level_parms(cmd_parms);
+    return rc;
+}
+
+/* Create CLI commands */
+static bcmos_errno _bcmtr_cld_cli_create(void)
+{
+    bcmcli_entry *dir;
+    bcmos_errno err;
+
+    dir = bcmcli_dir_add(NULL, "cld", "Transport Capture, Log, Debug", BCMCLI_ACCESS_ADMIN, NULL);
+    BCMOS_CHECK_RETURN_ERROR(dir == NULL, BCM_ERR_NOMEM);
+
+    err = _bcmtr_cld_add_level_cmd(dir);
+    if (err)
+        return err;
+
+    BCMCLI_MAKE_CMD(dir, "init", "Initialize capture buffer", _bcmtr_cld_cli_capture_init,
+        BCMCLI_MAKE_PARM("size", "Buffer size (bytes)", BCMCLI_PARM_UDECIMAL, 0),
+        BCMCLI_MAKE_PARM_ENUM("stop_on_full", "Stop capture when buffer is full (yes) or wrap-around (no)",
+            bcmcli_enum_bool_table, 0),
+        BCMCLI_MAKE_PARM_ENUM("autostart", "Autostart", bcmcli_enum_bool_table, 0) );
+
+    BCMCLI_MAKE_CMD_NOPARM(dir, "delete", "Destroy buffer", _bcmtr_cld_cli_capture_delete);
+
+    BCMCLI_MAKE_CMD_NOPARM(dir, "start", "Start capture", _bcmtr_cld_cli_capture_start);
+
+    BCMCLI_MAKE_CMD_NOPARM(dir, "stop", "Stop capture", _bcmtr_cld_cli_capture_stop);
+
+    BCMCLI_MAKE_CMD_NOPARM(dir, "dump", "Dump capture buffer", _bcmtr_cld_cli_capture_dump);
+
+    BCMCLI_MAKE_CMD_NOPARM(dir, "info", "Capture info", _bcmtr_cld_cli_capture_info);
+
+    cld_cli_dir = dir;
+
+    return BCM_ERR_OK;
+
+}
+
+/* Destroy CLI commands */
+static void _bcmtr_cld_cli_destroy(void)
+{
+    if (cld_cli_dir)
+    {
+        bcmcli_token_destroy(cld_cli_dir);
+        cld_cli_dir = NULL;
+    }
+}
+
+
+/** Initialize CLD CLI commands
+ * \returns BCM_ERR_OK (0) if successful
+ */
+bcmos_errno bcmtr_cld_cli_init(void)
+{
+    bcmos_errno err = BCM_ERR_OK;
+
+#ifdef BCM_SUBSYSTEM_HOST
+    /* Subscribe for device change indication */
+    err = bcmolt_dev_sel_ind_register(_bcmtr_cld_device_change_ind);
+#endif
+
+    err = err ? err : _bcmtr_cld_cli_create();
+
+    return err;
+}
+
+/** Clean-up CLD CLI commands */
+void bcmtr_cld_cli_exit(void)
+{
+    _bcmtr_cld_cli_destroy();
+}
diff --git a/bcm68620_release/release/host_driver/transport/bcmtr_debug_cli.h b/bcm68620_release/release/host_driver/transport/bcmtr_debug_cli.h
new file mode 100644
index 0000000..46b7e20
--- /dev/null
+++ b/bcm68620_release/release/host_driver/transport/bcmtr_debug_cli.h
@@ -0,0 +1,41 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#ifndef BCMTR_DEBUG_CLI_H_
+#define BCMTR_DEBUG_CLI_H_
+
+/** Initialize CLD CLI commands
+ * \returns BCM_ERR_OK (0) if successful
+ */
+bcmos_errno bcmtr_cld_cli_init(void);
+
+/** Clean-up CLD CLI commands */
+void bcmtr_cld_cli_exit(void);
+
+#endif /* BCMTR_DEBUG_CLI_H_ */
diff --git a/bcm68620_release/release/host_driver/transport/bcmtr_header.h b/bcm68620_release/release/host_driver/transport/bcmtr_header.h
new file mode 100644
index 0000000..a662535
--- /dev/null
+++ b/bcm68620_release/release/host_driver/transport/bcmtr_header.h
@@ -0,0 +1,142 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#ifndef BCMTR_HEADER_H_
+#define BCMTR_HEADER_H_
+
+#include <bcmolt_buf.h>
+#include <bcmolt_msg_pack.h>
+
+/** Endianess of numbers written to the transport buffer.
+ * Currently bcmolt_buf service doesn't support setting
+ * endianness dynamically. Transport buffer direction must be the same
+ * as selected at compile time in bcmolt_buf.h
+ */
+#define BCMTR_BUF_ENDIAN        BCMOLT_BUF_ENDIAN_FIXED
+
+#define BCMTR_ENDIAN_CPU_TO_BUF_U32(n) BCMOLT_BUF_ENDIAN_CPU_TO_BUF(U32, n)
+#define BCMTR_ENDIAN_BUF_TO_CPU_U32(n) BCMOLT_BUF_ENDIAN_BUF_TO_CPU(U32, n)
+
+/** Transport header.
+ * Inserted in each packet transmitted on the line
+ */
+typedef struct bcmtr_hdr
+{
+    bcmolt_msg_dir dir;         /**< Message direction: request/response */
+    bcmos_bool more_fragments;  /**< TRUE=more fragments to follow */
+    bcmos_bool auto_proxy_reg;  /**< TRUE=message is auto / proxy registration */
+    bcmos_bool auto_proxy_unreg;/**< TRUE=message is auto / proxy un-registration */
+    uint8_t instance;           /**< Message instance */
+    bcmolt_group_id msg_id;     /**< Message id: object+group+subgroup */
+    uint16_t corr_tag;          /**< correlation tag */
+    uint16_t frag_number;       /**< fragment number */
+} bcmtr_hdr;
+
+#define BCMTR_HDR_SIZE  8
+
+/* Shifts and widths of transport header fields */
+#define BCMTR_HDR_DIR_S         31
+#define BCMTR_HDR_DIR_W         1
+#define BCMTR_HDR_REG_S         26
+#define BCMTR_HDR_REG_W         1
+#define BCMTR_HDR_UNREG_S       25
+#define BCMTR_HDR_UNREG_W       1
+#define BCMTR_HDR_MORE_FRAGS_S  24
+#define BCMTR_HDR_MORE_FRAGS_W  1
+#define BCMTR_HDR_INSTANCE_S    16
+#define BCMTR_HDR_INSTANCE_W    8
+#define BCMTR_HDR_MSG_ID_S      0
+#define BCMTR_HDR_MSG_ID_W      16
+#define BCMTR_HDR_CORR_TAG_S    16
+#define BCMTR_HDR_CORR_TAG_W    16
+#define BCMTR_HDR_FRAG_S        0
+#define BCMTR_HDR_FRAG_W        16
+
+/* Pack transport header
+ *
+ * \param[in]   hdr             Unpacked transport header
+ * \param[out]  packed_hdr      Packed header
+ */
+static inline void bcmtr_header_pack(const bcmtr_hdr *hdr, uint8_t *packed_hdr)
+{
+    uint32_t w[2];
+
+    w[0] = (hdr->dir << BCMTR_HDR_DIR_S)                |
+        (hdr->more_fragments << BCMTR_HDR_MORE_FRAGS_S) |
+        (hdr->instance << BCMTR_HDR_INSTANCE_S)         |
+        (hdr->auto_proxy_reg << BCMTR_HDR_REG_S)        |
+        (hdr->auto_proxy_unreg << BCMTR_HDR_UNREG_S)    |
+        hdr->msg_id;
+    w[1] = (hdr->corr_tag << BCMTR_HDR_CORR_TAG_S) | hdr->frag_number;
+    w[0] = BCMTR_ENDIAN_CPU_TO_BUF_U32(w[0]);
+    w[1] = BCMTR_ENDIAN_CPU_TO_BUF_U32(w[1]);
+    memcpy(packed_hdr, w, BCMTR_HDR_SIZE);
+}
+
+/* Unpack transport header
+ *
+ * \param[in]   packed_hdr      Packed header
+ * \param[out]  hdr             Unpacked transport header
+ * Buffer current pointer is incremented by the header side.
+ */
+static inline void bcmtr_header_unpack(const uint8_t *packed_hdr, bcmtr_hdr *hdr)
+{
+    uint32_t w[2];
+    memcpy(w, packed_hdr, BCMTR_HDR_SIZE);
+    w[0] = BCMTR_ENDIAN_BUF_TO_CPU_U32(w[0]);
+    w[1] = BCMTR_ENDIAN_BUF_TO_CPU_U32(w[1]);
+    hdr->dir = BCM_FIELD_GET(w[0], BCMTR_HDR_DIR);
+    hdr->more_fragments = BCM_FIELD_GET(w[0], BCMTR_HDR_MORE_FRAGS);
+    hdr->instance = BCM_FIELD_GET(w[0], BCMTR_HDR_INSTANCE);
+    hdr->msg_id = BCM_FIELD_GET(w[0], BCMTR_HDR_MSG_ID);
+    hdr->auto_proxy_reg = BCM_FIELD_GET(w[0], BCMTR_HDR_REG);
+    hdr->auto_proxy_unreg = BCM_FIELD_GET(w[0], BCMTR_HDR_UNREG);
+    hdr->corr_tag = BCM_FIELD_GET(w[1], BCMTR_HDR_CORR_TAG);
+    hdr->frag_number = BCM_FIELD_GET(w[1], BCMTR_HDR_FRAG);
+}
+
+/* Fill transport header
+ */
+static inline bcmos_errno bcmtr_header_fill(const bcmolt_msg *msg, bcmtr_hdr *hdr)
+{
+    bcmos_errno err;
+
+    hdr->dir = msg->dir;
+    hdr->more_fragments = BCMOS_FALSE;
+    err = bcmolt_group_id_combine(msg->obj_type, msg->group, msg->subgroup, &hdr->msg_id);
+    if (err)
+        return err;
+    hdr->instance = bcmolt_msg_instance(msg);
+    hdr->corr_tag = msg->corr_tag;
+    hdr->frag_number = 0;
+    return BCM_ERR_OK;
+}
+
+
+#endif /* BCMTR_HEADER_H_ */
diff --git a/bcm68620_release/release/host_driver/transport/bcmtr_interface.h b/bcm68620_release/release/host_driver/transport/bcmtr_interface.h
new file mode 100644
index 0000000..b66c8cb
--- /dev/null
+++ b/bcm68620_release/release/host_driver/transport/bcmtr_interface.h
@@ -0,0 +1,241 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#ifndef BCMTR_INTERFACE_H_
+#define BCMTR_INTERFACE_H_
+
+#include <bcmos_system.h>
+#include <bcmolt_model_types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** Transport statistics */
+typedef struct bcmtr_stat
+{
+    uint32_t msg_sent;                  /**< Messages sent */
+    uint32_t msg_resp_received;         /**< Valid responses received */
+    uint32_t msg_req_auto_received;     /**< Request or Autonomous message received */
+    uint32_t msg_req_timeout;           /**< Number of requests that timed out */
+    uint32_t msg_reass_timeout;         /**< Number of messages discarded due to reassemble timeout */
+    uint32_t msg_no_req;                /**< Number of responses discarded because there was no matching request */
+    uint32_t msg_no_mem;                /**< Number of memory allocation failures */
+    uint32_t msg_comm_err;              /**< Messages discarded because of communication error */
+    uint32_t msg_ready_timeout;         /**< Responses that have been reported to application but not peaked up */
+    uint32_t msg_too_many_req;          /**< Number of requests discarded because there were too many outstanding requests */
+    uint32_t msg_too_many_auto;         /**< Number of autonomous messages discarded because there were too many being reassembled */
+    uint32_t not_connected;             /**< Number of TX messages discarded because connection was lost */
+    uint32_t frag_received;             /**< Valid fragments received */
+    uint32_t frag_invalid;              /**< Fragments discarded */
+    uint32_t pack_errors;               /**< Message pack errors */
+    uint32_t unpack_errors;             /**< Message unpack errors */
+    uint32_t no_rx_handler;             /**< Message discarded because there was no rx handler */
+} bcmtr_stat;
+
+/** Transport message control block */
+typedef struct bcmtr_msg bcmtr_msg;
+
+/** Channel id */
+typedef uint8_t bcmtr_channel_id;
+
+/** Send flags */
+typedef enum
+{
+    BCMTR_SEND_FLAGS_NONE               = 0,            /**< None */
+    BCMTR_SEND_FLAGS_CALL               = 0x0001,       /**< Request/Response sequence */
+
+    BCMTR_SEND_FLAGS_PRI_NORMAL         = 0,            /**< Normal priority */
+    BCMTR_SEND_FLAGS_PRI_HI             = 0x0010,       /**< High priority */
+
+    BCMTR_SEND_FLAGS_LONG_WAIT          = 0x0100,       /**< Enable long wait until there is room in tx queue */
+    BCMTR_SEND_FLAGS_SHORT_WAIT         = 0x0200,       /**< Enable short wait until there is room in tx queue */
+    BCMTR_SEND_FLAGS_DO_NOT_WAIT        = 0x0400,       /**< Drop packet if TX q is full */
+
+} bcmtr_send_flags;
+
+#define BCMTR_SEND_FLAGS_WAIT_MASK (BCMTR_SEND_FLAGS_LONG_WAIT | BCMTR_SEND_FLAGS_SHORT_WAIT | BCMTR_SEND_FLAGS_DO_NOT_WAIT)
+
+/** Transport handler registration parameters */
+typedef struct bcmtr_handler_parm
+{
+    uint8_t instance;           /**< Instance (i.e, link) */
+    bcmolt_mgt_group group;     /**< Message group */
+    bcmolt_obj_id object;       /**< Object. Can be BCMOLT_OBJECT_ANY */
+    uint16_t subgroup;          /**< Message subgroup. Can be BCMOLT_SUBGROUP_ANY */
+    f_bcmolt_msg_handler app_cb;/**< Message handler */
+    bcmolt_auto_flags flags;    /**< Flags. app_cb is called in context of transport task
+                                     or app module, depending on the flags */
+    bcmos_module_id module;     /**< Target module id. Relevant only if flags == BCMOLT_AUTO_FLAGS_DISPATCH.
+                                     BCMOS_MODULE_ID_NONE is replaced by the module calling registration function */
+} bcmtr_handler_parm;
+
+/** Initialize transport library.
+ * \returns BCM_ERR_OK or error code
+ */
+bcmos_errno bcmtr_init(void);
+
+/** Release resources used by transport library.
+ * \returns BCM_ERR_OK or error code
+ */
+bcmos_errno bcmtr_exit(void);
+
+/** Send message. Do not wait for response
+ *
+ * Set-up connection if necessary, pack message and send it to the remote side.
+ * This function is intended for proxy and autonomous messages.
+ *
+ * \param[in]   device  OLT device index
+ * \param[in]   msg     Application message to be sent
+ * \param[in]   flags   flags (request/auto or reply)
+ *
+ * \returns BCM_ERR_OK or error code
+ */
+bcmos_errno bcmtr_send(bcmolt_devid device, bcmolt_msg *msg, bcmtr_send_flags flags);
+
+/** Send response message
+ *
+ * Set-up connection if necessary, pack message and send it to the remote side.
+ * This function is intended for proxy and autonomous messages.
+ *
+ * \param[in]   device  OLT device index
+ * \param[in]   msg     Application message to be sent
+ * \param[in]   flags   flags (request/auto or reply)
+ *
+ * \returns BCM_ERR_OK or error code
+ */
+static inline bcmos_errno bcmtr_send_response(bcmolt_devid device, bcmolt_msg *msg)
+{
+    msg->dir = BCMOLT_MSG_DIR_RESPONSE;
+    return bcmtr_send(device, msg, BCMTR_SEND_FLAGS_CALL | BCMTR_SEND_FLAGS_SHORT_WAIT);
+}
+
+/** Send request and wait for reply
+ *
+ * Set-up connection if necessary, pack message and send it to the remote side.
+ * Wait for reply or timeout, unpack the reply and return.
+ *
+ * \param[in]        device  OLT device index
+ * \param[in, out]   msg     Application message
+ * \returns BCM_ERR_OK or error code
+ */
+bcmos_errno bcmtr_call(bcmolt_devid device, bcmolt_msg *msg);
+
+/** Register message handler
+ *
+ * \param[in]   device          OLT device index
+ * \param[in]   parm            Registration parameters
+ * \returns BCM_ERR_OK or error code
+ */
+bcmos_errno bcmtr_msg_handler_register(bcmolt_devid device, const bcmtr_handler_parm *parm);
+
+/** Unregister message handler
+ *
+ * \param[in]   device          OLT device index
+ * \param[in]   parm            Registration parameters
+ * \returns BCM_ERR_OK or error code
+ */
+bcmos_errno bcmtr_msg_handler_unregister(bcmolt_devid device, const bcmtr_handler_parm *parm);
+
+/** Get registration info
+ *
+ * \param[in]           device          OLT device index
+ * \param[in,out]       parm            Registration parameters.
+ *                                      instance, group, object, subgroup must be set
+ * \returns BCM_ERR_OK or error code
+ */
+bcmos_errno bcmtr_msg_handler_register_get(bcmolt_devid device, bcmtr_handler_parm *parm);
+
+/** Get transport statistics
+ *
+ * \param[in]   device          OLT device index
+ * \param[out]  stat            Statistics
+ * \returns BCM_ERR_OK or error code
+ */
+bcmos_errno bcmtr_stat_get(bcmolt_devid device, bcmtr_stat *stat);
+
+/* Query whether or not the device is currently connected */
+bcmos_errno bcmtr_is_connected(bcmolt_devid device, bcmos_bool *is_connected);
+
+/* Connect device */
+bcmos_errno bcmtr_connect(bcmolt_devid device);
+
+/* Disconnect device */
+bcmos_errno bcmtr_disconnect(bcmolt_devid device);
+
+/* Low-level disconnect that breaks "physical" connection, but doesn't destroy connection structure and registrations */
+bcmos_errno bcmtr_driver_disconnect(bcmolt_devid device);
+
+/* Repair/reconnect the driver-level connection for an already-connected device */
+bcmos_errno bcmtr_driver_reconnect(bcmolt_devid device);
+
+/* "dropped because of tx_queue overflow" indication */
+typedef void (*F_bcmtr_tx_overflow)(bcmolt_devid device, bcmtr_send_flags send_flags);
+
+/* Register for notification that transmit failed because
+ * tx_queue was full
+ * \param[in]   device          OLT device index
+ * \param[in]   cb              Callback to be called. NULL=unregister
+ * \returns 0=OK or error code < 0
+ */
+bcmos_errno bcmtr_tx_overflow_cb_register(bcmolt_devid device, F_bcmtr_tx_overflow cb);
+
+/*
+ * The following functions are useful for proxy daemon.
+ * They provide direct interface to transport plugin
+ */
+
+/* Connect device in raw mode
+ * Receive task is NOT created
+ * \param[in]   device          OLT device index
+ * \parm[out]   headroom        Headroom that should be reserved in buffer when transmitting
+ * \returns 0=OK or error code < 0
+ */
+bcmos_errno bcmtr_proxy_connect(bcmolt_devid device, uint32_t *headroom);
+
+/* Send data to device
+ * \param[in]   device          OLT device index
+ * \param[in]   txb             Transmit buffer
+ * \returns 0=OK or error code < 0
+ */
+bcmos_errno bcmtr_proxy_send(bcmolt_devid device, bcmolt_buf *tx_buf);
+
+/* Receive data from device
+ * \param[in]   device          OLT device index
+ * \param[in]   rxb             Receive buffer
+ * \returns 0=OK, BCM_ERR_TIMEOUT-timeout and no message, other errors <0
+ */
+bcmos_errno bcmtr_proxy_receive(bcmolt_devid device, bcmolt_buf *rx_buf);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BCMTR_INTERFACE_H_ */
diff --git a/bcm68620_release/release/host_driver/transport/bcmtr_internal.h b/bcm68620_release/release/host_driver/transport/bcmtr_internal.h
new file mode 100644
index 0000000..3b03e29
--- /dev/null
+++ b/bcm68620_release/release/host_driver/transport/bcmtr_internal.h
@@ -0,0 +1,151 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#ifndef BCMTR_INTERNAL_H_
+#define BCMTR_INTERNAL_H_
+
+#include <bcmos_system.h>
+#include <bcmolt_buf.h>
+#include <bcmolt_msg_pack.h>
+#include <bcmtr_interface.h>
+#include <bcmtr_plugin.h>
+#include <bcm_config.h>
+
+#include "bcmtr_header.h"
+
+/** Transport configuration parameters */
+typedef struct
+{
+    bcmtr_plugin_cfg plugin_cfg;        /**< Transport plugin configuration parameters */
+
+    /** Limits and timeouts.
+     * If not set, the appropriate BCM_TR_default defined in bcmConfig.h is used
+     */
+    uint32_t max_retries;       /**< Max number of request retransmissions */
+    uint32_t msg_timeout;       /**< Max time to wait for response or next message part (ms) */
+    uint32_t max_requests;      /**< Max number of outstanding requests */
+    uint32_t max_autos;         /**< Max number of multi-part autonomous messages */
+    uint32_t max_fragments;     /**< Max number of multi-part message fragments */
+    uint32_t msg_wait_timeout;  /**< Message waiting timeout (ms) */
+    uint32_t msg_ready_timeout; /**< Time that transaction is kept after notifying application that it finished (ms) */
+    uint32_t max_mtu;           /**< Max MTU size (bytes) */
+
+    int rx_thread_priority;     /**< Receive thread priority. If set -1, Rx thread is NOT created */
+} bcmtr_cfg;
+
+/** Transport connection control block */
+typedef struct bcmtr_conn bcmtr_conn;
+
+/** Reassemble block */
+typedef struct bcmtr_reass
+{
+    bcmolt_buf *fragments;              /** Array of bcmtr_cfg.max_fragments */
+    uint32_t num_fragments;             /** Number of fragments filled in fragments array */
+    uint32_t max_fragment;              /** Max fragment number. Set when last fragment is received */
+    uint32_t total_size;                /** Total size of received fragments */
+} bcmtr_reass;
+
+/** Transport header list head */
+typedef TAILQ_HEAD(bcmtr_msg_list, bcmtr_msg) bcmtr_msg_list;
+
+/** Transport transaction control block */
+struct bcmtr_msg
+{
+    bcmolt_buf tx_buf;                  /**< Transmit buffer info (request only) */
+    bcmolt_buf rx_buf;                  /**< Receive buffer info (response or autonomous) */
+    uint32_t timestamp;                 /**< Message timestamp. Tx or last Rx */
+    uint16_t tx_count;                  /**< Number of times message was transmitted */
+    bcmtr_hdr hdr;                      /**< Transport header */
+    TAILQ_ENTRY(bcmtr_msg) l;           /**< Transport message list entry */
+    bcmtr_reass *segm;                  /**< Segmentation block */
+    bcmtr_reass *reass;                 /**< Reassemble block */
+    bcmolt_msg *msg;                    /**< Message reference */
+    bcmolt_subchannel subch;            /**< Sub-channel via which message was received */
+    bcmos_errno err;                    /**< Transport status */
+
+    /* Transport header is cleared up to this point when released.
+     * "err" field is the last in the section that gets cleared.
+     * Do not move fields below above "err"!
+     */
+#define BCMTR_HDR_CLEAR_SIZE   (offsetof(bcmtr_msg, err) + sizeof(bcmos_errno))
+    bcmtr_msg_list *free_list;          /**< Free list head reference */
+    bcmtr_conn *conn;                   /**< Connection back reference */
+    bcmos_sem sem;                      /**< "wait for response" semaphore */
+    bcmos_msg ipc_hdr;                  /**< IPC message header */
+};
+
+/** Message handler context */
+typedef struct bcmtr_handler
+{
+    f_bcmolt_msg_handler app_cb;        /**< Application callback function */
+    bcmolt_auto_flags flags;            /**< Registration flag: call in context of transport rx thread or app module */
+    bcmos_module_id module;             /**< Optional module to dispatch received message to */
+} bcmtr_handler;
+
+/** Transport connection control block */
+struct bcmtr_conn
+{
+    char name[16];                      /**< Transport name */
+    bcmolt_devid device;                /**< Device index */
+    bcmtr_channel_id channel;           /**< Channels served by this transport */
+    bcmtr_cfg cfg;                      /**< Transport configuration parameters */
+    bcmtr_driver driver;                /**< Transport driver */
+    bcmtr_plugin_channel drv_priv;      /**< Plugin driver private data */
+    bcmos_task rx_thread;               /**< RX thread handle */
+    bcmos_mutex mutex;                  /**< Mutex protecting the transport structure */
+    uint32_t last_timeout_check;        /**< Last timeout check timestamp */
+    uint32_t timeout_check_period;      /**< Time-out check period */
+    bcmtr_msg_list msg_list;            /**< Message list head */
+    bcmtr_msg_list free_req_list;       /**< Free request block list */
+    bcmtr_msg_list free_auto_list;      /**< Free autonomous block list */
+    bcmtr_msg *tmsg_array;              /**< Pre-allocated array of transport headers */
+    bcmtr_stat stat;                    /**< Statistics */
+    bcmos_bool connected;               /**< Transport state */
+    uint16_t num_requests;              /**< Number of outstanding requests */
+    uint16_t num_auto;                  /**< Number of autonomous messages being reassembled */
+    uint16_t corr_tag;                  /**< Last used correlation tag */
+    bcmos_bool rx_thread_created;       /**< TRUE=RX thread was created */
+    int kill_request;                   /**< Transport thread is commanded to die */
+    int kill_done;                      /**< Transport thread is dead */
+};
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+bcmos_errno bcmtr_cfg_get(bcmolt_devid device, bcmtr_cfg *cfg, bcmtr_driver *driver);
+
+bcmos_errno _bcmtr_conn_get(bcmolt_devid device, bcmtr_conn **conn);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BCMTR_INTERNAL_H_ */
diff --git a/bcm68620_release/release/host_driver/transport/bcmtr_transport.c b/bcm68620_release/release/host_driver/transport/bcmtr_transport.c
new file mode 100644
index 0000000..029158e
--- /dev/null
+++ b/bcm68620_release/release/host_driver/transport/bcmtr_transport.c
@@ -0,0 +1,1713 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#include <bcmos_system.h>
+#include <bcmtr_interface.h>
+#include <bcmtr_debug.h>
+
+#include "bcmtr_header.h"
+#include "bcmtr_internal.h"
+
+typedef struct
+{
+    bcmtr_conn *conn; /**< Connection dynamic info (allocated on connect) */
+    bcmtr_handler msg_handler[BCMOLT_GROUP_ID__NUM_OF][BCMTR_MAX_INSTANCES];
+    F_bcmtr_tx_overflow overflow_cb;    /**< Callback to be called in case of tx drop because of queue overflow */
+} bcmtr_conn_info;
+
+static bcmtr_conn_info conn_info[BCMTR_MAX_OLTS]; /* Store connection info separately per OLT */
+
+static bcmos_errno _bcmtr_connect(bcmolt_devid device, bcmtr_conn **conn, bcmos_bool raw_mode);
+
+static bcmos_mutex conn_lock;
+
+/* Get existing connection. If none - setup new.
+ * If raw_mode is TRUE, the connection is intended for use by raw interface
+ * bcmtr_proxy_xx(). In this case RX task is not created
+ */
+static bcmos_errno _bcmtr_conn_get_any(bcmolt_devid device, bcmtr_conn **conn, bcmos_bool is_raw)
+{
+    bcmos_errno err;
+    if (device >= BCMTR_MAX_OLTS)
+    {
+        return BCM_ERR_RANGE;
+    }
+    *conn = conn_info[device].conn;
+    if (*conn)
+    {
+        return BCM_ERR_OK;
+    }
+    err = _bcmtr_connect(device, &conn_info[device].conn, is_raw);
+    *conn = conn_info[device].conn;
+    return err;
+}
+
+/* Get existing connection. If none - setup new */
+bcmos_errno _bcmtr_conn_get(bcmolt_devid device, bcmtr_conn **conn)
+{
+    return _bcmtr_conn_get_any(device, conn, BCMOS_FALSE);
+}
+
+/* Free reassemble block */
+static void _bcmtr_reass_block_free(bcmtr_reass **prb)
+{
+    bcmtr_reass *reass = *prb;
+    int i;
+
+    for (i=0; i<reass->num_fragments; i++)
+    {
+        bcmolt_buf_free(&reass->fragments[i]);
+    }
+    bcmos_free(reass);
+    *prb = NULL;
+}
+
+/* Free transport header. Called under transport lock */
+static void _bcmtr_tmsg_free(bcmtr_msg *tmsg, bcmtr_msg_list *cur_list)
+{
+    /* Remove from the list it is in, if any */
+    if (cur_list)
+        TAILQ_REMOVE(cur_list, tmsg, l);
+
+    bcmolt_buf_free(&tmsg->tx_buf);
+    bcmolt_buf_free(&tmsg->rx_buf);
+    if (tmsg->reass)
+        _bcmtr_reass_block_free(&tmsg->reass);
+    memset(tmsg, 0, BCMTR_HDR_CLEAR_SIZE);
+
+    /* Request-response or autonomous ? */
+    TAILQ_INSERT_TAIL(tmsg->free_list, tmsg, l);
+}
+
+/* Unpack message. *unpacked is set=NULL in case of error */
+static inline bcmos_errno _bcmtr_msg_unpack(bcmtr_conn *conn, bcmolt_buf *buf, bcmtr_hdr *hdr, uint32_t ts, bcmolt_msg **msg)
+{
+    int16_t err;
+    uint8_t *packed = buf->curr;
+    uint32_t packed_length = bcmolt_buf_get_remaining_size(buf);
+
+    /* Unpack */
+    BUG_ON(!buf->start);
+    err = bcmolt_msg_unpack(buf, msg);
+    if (err < 0)
+    {
+        BCMTR_CLD_CHECK_NOTIFY(conn->device, hdr, BCMTR_CLD_EV_RECV_DISCARD, ts, packed, packed_length, NULL);
+        ++conn->stat.unpack_errors;
+        return err;
+    }
+
+    BCMTR_CLD_CHECK_NOTIFY(conn->device, hdr, BCMTR_CLD_EV_RECV, ts, packed, packed_length, *msg);
+
+    return BCM_ERR_OK;
+}
+
+/* Transport IPC release callback */
+static void _bcmtr_ipc_msg_release(bcmos_msg *m)
+{
+    BCMOS_TRACE_ERR("We shouldn't be here!\n");
+}
+
+/* Transport IPC message handler.
+ * Called in context of the target module as part
+ * of dispatching message to the user task.
+ * It unpacks message, releases transport header and calls user callback
+ */
+static void _bcmtr_ipc_msg_handler(bcmos_module_id module_id, bcmos_msg *m)
+{
+    bcmos_errno err;
+
+    bcmtr_msg *tmsg = m->data;
+    bcmtr_conn *conn = tmsg->conn;
+    bcmolt_msg *msg = NULL;
+
+    /* Unpack */
+    err = _bcmtr_msg_unpack(conn, &tmsg->rx_buf, &tmsg->hdr, tmsg->timestamp, &msg);
+    if (err != BCM_ERR_OK)
+    {
+        BCMOS_TRACE_ERR(
+            "Unpack error for module %d. Error %s (%d)\n",
+            module_id,
+            bcmos_strerror(err),
+            err);
+        msg = NULL;
+    }
+
+    if (msg != NULL)
+    {
+        bcmtr_handler *h = &conn_info[conn->device].msg_handler[tmsg->hdr.msg_id][tmsg->hdr.instance];
+        msg->subch = tmsg->subch;
+        if (h->app_cb)
+        {
+            msg->corr_tag = tmsg->hdr.corr_tag;
+            h->app_cb(conn->device, msg);
+        }
+        else
+        {
+            bcmolt_msg_free(msg);
+            ++conn->stat.no_rx_handler;
+        }
+    }
+
+    /* Release transport header under conn lock */
+    bcmos_mutex_lock(&conn->mutex);
+    _bcmtr_tmsg_free(tmsg, NULL);
+    bcmos_mutex_unlock(&conn->mutex);
+}
+
+/* Init IPC header in transport message */
+static void _bcmtr_tmsg_ipc_init(bcmtr_msg *tmsg)
+{
+    tmsg->ipc_hdr.start = tmsg->ipc_hdr.data = tmsg;
+    tmsg->ipc_hdr.type = BCMOS_MSG_ID_INTERNAL_IPC;
+    tmsg->ipc_hdr.release = _bcmtr_ipc_msg_release;
+    tmsg->ipc_hdr.handler = _bcmtr_ipc_msg_handler;
+}
+
+/* Pre-allocate transport header array, put all blocks on free lists */
+static int _bcmtr_tmsg_list_alloc(bcmtr_conn *conn)
+{
+    int n_hdr, i;
+    bcmtr_msg *tmsg;
+
+    n_hdr = conn->cfg.max_requests + conn->cfg.max_autos;
+    conn->tmsg_array = bcmos_calloc(sizeof(bcmtr_msg) * n_hdr);
+    if (!conn->tmsg_array)
+        return BCM_ERR_NOMEM;
+
+    tmsg = conn->tmsg_array;
+    for (i=0; i<conn->cfg.max_requests; i++, tmsg++)
+    {
+        bcmos_errno rc;
+
+        TAILQ_INSERT_TAIL(&conn->free_req_list, tmsg, l);
+        tmsg->free_list = &conn->free_req_list;
+        rc = bcmos_sem_create(&tmsg->sem, 0, 0, NULL);
+        if (rc != BCM_ERR_OK)
+            return rc;
+        _bcmtr_tmsg_ipc_init(tmsg);
+        tmsg->conn = conn;
+    }
+    for (i=0; i<conn->cfg.max_autos; i++, tmsg++)
+    {
+        TAILQ_INSERT_TAIL(&conn->free_auto_list, tmsg, l);
+        tmsg->free_list = &conn->free_auto_list;
+        _bcmtr_tmsg_ipc_init(tmsg);
+        tmsg->conn = conn;
+    }
+    return BCM_ERR_OK;
+}
+
+/* Cleanup function - free transport headers */
+static void _bcmtr_tmsg_list_free(bcmtr_conn *conn)
+{
+    bcmtr_msg *tmsg, *tmp_tmsg;
+
+    if (!conn->tmsg_array)
+        return;
+
+    TAILQ_FOREACH_SAFE(tmsg, &conn->msg_list, l, tmp_tmsg)
+    {
+        bcmolt_msg *msg = tmsg->msg;
+        /* Release waiting task if request-response */
+        if (msg && tmsg->err == BCM_ERR_IN_PROGRESS)
+        {
+            msg->err = BCM_ERR_COMM_FAIL;
+            bcmos_sem_post(&tmsg->sem);
+        }
+    }
+    TAILQ_FOREACH_SAFE(tmsg, &conn->free_req_list, l, tmp_tmsg)
+    {
+        bcmos_sem_destroy(&tmsg->sem);
+    }
+    bcmos_free(conn->tmsg_array);
+}
+
+/* Allocate transport header from the given free list.
+ * Must be called under lock
+ */
+static inline bcmtr_msg *_bcmtr_msg_get_free(bcmtr_msg_list *free_list)
+{
+    bcmtr_msg *tmsg = TAILQ_FIRST(free_list);
+    if (tmsg)
+        TAILQ_REMOVE(free_list, tmsg, l);
+    return tmsg;
+}
+
+/* Find message by correlation tag
+ * Called under lock
+ */
+static bcmtr_msg *_bcmtr_msg_get_by_corr_tag(const bcmtr_conn *conn, const bcmtr_hdr *hdr)
+{
+    bcmtr_msg *tmsg;
+
+    TAILQ_FOREACH(tmsg, &conn->msg_list, l)
+    {
+        if (tmsg->hdr.corr_tag==hdr->corr_tag && tmsg->hdr.msg_id==hdr->msg_id && tmsg->err == BCM_ERR_IN_PROGRESS)
+            break;
+    }
+    return tmsg;
+}
+
+/* Message reassembler. Returns TRUE if message reassembling is completed */
+static bcmos_bool _bcmtr_reassemble(bcmtr_conn *conn, bcmtr_msg *tmsg, bcmolt_buf *buf)
+{
+    bcmtr_hdr *hdr = &tmsg->hdr;
+    uint16_t frag_num = hdr->frag_number;
+    bcmos_bool done = BCMOS_FALSE;
+    bcmos_bool is_last;
+
+    is_last = !hdr->more_fragments;
+
+    /* Single-buffer message ? */
+    if (is_last && !frag_num)
+    {
+        tmsg->rx_buf = *buf;
+        tmsg->err = BCM_ERR_OK;
+        buf->start = NULL;
+        return BCMOS_TRUE;
+    }
+
+    /*
+     * Multi-part message
+     */
+
+    /* Discard if invalid fragment number or duplicate */
+    if (frag_num >= conn->cfg.max_fragments ||
+        (tmsg->reass && tmsg->reass->fragments[frag_num].start) )
+    {
+        bcmolt_buf_free(buf);
+        /* If last out-of range fragment was received report it.
+         * We want to avoid request retransmission in this case */
+        if (frag_num >= conn->cfg.max_fragments)
+        {
+            tmsg->err = BCM_ERR_TOO_MANY_FRAGS;
+            return is_last;
+        }
+        ++conn->stat.frag_invalid;
+        return BCMOS_FALSE;
+    }
+
+    /* Allocate reassembly buffer if not done yet and store fragment */
+    if (!tmsg->reass)
+    {
+        tmsg->reass = bcmos_calloc(sizeof(bcmtr_reass) + conn->cfg.max_fragments * sizeof(bcmolt_buf));
+        if (!tmsg->reass)
+        {
+            tmsg->err = BCM_ERR_NOMEM;
+            ++conn->stat.msg_no_mem;
+            bcmolt_buf_free(buf);
+            return BCMOS_FALSE;
+        }
+        tmsg->reass->fragments = (bcmolt_buf *)((long)tmsg->reass + sizeof(bcmtr_reass));
+    }
+    tmsg->reass->total_size += bcmolt_buf_get_remaining_size(buf);
+    tmsg->reass->fragments[frag_num] = *buf;
+    buf->start = NULL;
+    tmsg->reass->num_fragments++;
+    if (is_last)
+        tmsg->reass->max_fragment = frag_num;
+    done = (tmsg->reass->max_fragment && (tmsg->reass->num_fragments > tmsg->reass->max_fragment));
+    ++conn->stat.frag_received;
+
+    /* Reassemble if done */
+    if (done)
+    {
+        /* Allocate big flat buffer */
+        if (bcmolt_buf_alloc(&tmsg->rx_buf, tmsg->reass->total_size, BCMTR_BUF_ENDIAN) == BCM_ERR_OK)
+        {
+            int i;
+            uint8_t *body = tmsg->rx_buf.start;
+
+            for (i=0; i<tmsg->reass->num_fragments; i++)
+            {
+                uint32_t frag_size = bcmolt_buf_get_remaining_size(&tmsg->reass->fragments[i]);
+                BUG_ON(!tmsg->reass->fragments[i].curr);
+                memcpy(body, tmsg->reass->fragments[i].curr, frag_size);
+                body += frag_size;
+            }
+            tmsg->err = BCM_ERR_OK;
+        }
+        else
+        {
+            /* Reassembly buffer allocation failed */
+            tmsg->err = BCM_ERR_NOMEM;
+        }
+    }
+    else
+    {
+        /* More fragments expected. Update timestamp to prolong timing out */
+        tmsg->timestamp = bcmos_timestamp();
+    }
+
+    return done;
+}
+
+/* Notify application that message is ready */
+static inline void _bcmtr_notify_ready(bcmtr_conn *conn, bcmtr_msg *tmsg)
+{
+    bcmos_sem_post(&tmsg->sem);
+}
+
+/* Notify rx request/response message
+ * called under connection lock
+ */
+static inline void _bcmtr_notify_rx_response(bcmtr_conn *conn, bcmtr_msg *tmsg)
+{
+    ++conn->stat.msg_resp_received;
+
+    /* Now unlock and notify application. Autonomous handler is only called if message is OK.
+       The lock has been taken in _bcmtr_rx_packet */
+    bcmos_mutex_unlock(&conn->mutex);
+
+    /* Release waiting application. It will take care of unpacking */
+    _bcmtr_notify_ready(conn, tmsg);
+}
+
+/* Notify rx autonomous message
+ * called under connection lock
+ */
+static inline void _bcmtr_notify_rx_req_auto(bcmtr_conn *conn, bcmtr_msg *tmsg)
+{
+    bcmolt_buf rx_buf;
+    bcmolt_msg *msg = NULL;
+    bcmolt_group_id msg_id = tmsg->hdr.msg_id;
+    bcmtr_handler *h;
+    uint16_t corr_tag;
+    bcmtr_hdr hdr = tmsg->hdr;
+    uint32_t ts = tmsg->timestamp;
+    bcmolt_subchannel subch = tmsg->subch;
+    bcmos_errno err;
+
+    if (msg_id >= BCMOLT_GROUP_ID__NUM_OF)
+    {
+        BCMOS_TRACE_ERR("Unexpected msg group id: %u\n", tmsg->hdr.msg_id);
+        _bcmtr_tmsg_free(tmsg, NULL);
+        bcmos_mutex_unlock(&conn->mutex);
+        return;
+    }
+    if (tmsg->hdr.instance >= BCMTR_MAX_INSTANCES)
+    {
+        BCMOS_TRACE_ERR("Unexpected instance id: %u\n", tmsg->hdr.instance);
+        _bcmtr_tmsg_free(tmsg, NULL);
+        bcmos_mutex_unlock(&conn->mutex);
+        return;
+    }
+    h = &conn_info[conn->device].msg_handler[tmsg->hdr.msg_id][tmsg->hdr.instance];
+    BUG_ON(!h->app_cb);
+    ++conn->stat.msg_req_auto_received;
+
+    /* If dispatch is required - do it.
+     * The message will be unpacked in the context of the receiver
+     */
+    if ((h->flags & BCMOLT_AUTO_FLAGS_DISPATCH))
+    {
+        err = bcmos_msg_send_to_module(h->module, &tmsg->ipc_hdr, 0);
+        if (err)
+        {
+            BCMOS_TRACE_ERR("Can't deliver message to module %d. Error %s(%d)\n",
+                h->module, bcmos_strerror(err), err);
+            _bcmtr_tmsg_free(tmsg, NULL);
+        }
+        bcmos_mutex_unlock(&conn->mutex);
+        return;
+    }
+
+    /* No dispatch. Unpacking in the context of rx thread */
+    corr_tag = tmsg->hdr.corr_tag;
+    /* Make sure that rx_buf is not released by the following _bcmtr_msg_free.
+     * It is needed for unpack and will be released separately later. */
+    rx_buf = tmsg->rx_buf;
+    tmsg->rx_buf.start = NULL;
+    _bcmtr_tmsg_free(tmsg, NULL);
+
+    /* Release connection lock taken in _bcmtr_rx_packet */
+    bcmos_mutex_unlock(&conn->mutex);
+
+    /* Unpack and deliver */
+    _bcmtr_msg_unpack(conn, &rx_buf, &hdr, ts, &msg);
+
+    bcmolt_buf_free(&rx_buf);
+
+    if (msg)
+    {
+        msg->corr_tag = corr_tag;
+        msg->subch = subch;
+        h->app_cb(conn->device, msg);
+    }
+}
+
+/* Handle rx data. Returns number of messages that was identified and reassembled. Can be 0 or 1 */
+static int _bcmtr_rx_packet(bcmtr_conn *conn, bcmolt_subchannel subch, bcmolt_buf *buf)
+{
+    bcmtr_hdr hdr;
+    bcmtr_msg *tmsg;
+    bcmos_bool msg_done;
+    bcmos_bool is_response;
+
+    /* Transport lock. This lock is needed to
+     * - allocate/release transport header
+     * - update statistics
+     */
+    bcmos_mutex_lock(&conn->mutex);
+
+    /* If some data was received - handle it */
+    if (buf->len < BCMTR_HDR_SIZE)
+    {
+        /* Message is too short */
+        ++conn->stat.msg_comm_err;
+        goto rx_free_buf_and_error_exit;
+    }
+
+    if (NULL == buf->curr)
+    {
+        BCMOS_TRACE_ERR("Invalid buffer received!\n");
+        goto rx_done;
+    }
+
+    bcmtr_header_unpack(buf->curr, &hdr);
+    bcmolt_buf_skip(buf, BCMTR_HDR_SIZE);
+    is_response = (hdr.dir == BCMOLT_MSG_DIR_RESPONSE);
+
+    /* Find transport header. If not found - allocate new for autonomous message */
+    tmsg = _bcmtr_msg_get_by_corr_tag(conn, &hdr);
+    if (!tmsg)
+    {
+        if (!is_response)
+        {
+            /* Allocate new transport block */
+            tmsg = _bcmtr_msg_get_free(&conn->free_auto_list);
+            if (!tmsg)
+            {
+                ++conn->stat.msg_too_many_auto;
+                goto rx_free_buf_and_error_exit;
+            }
+            tmsg->err = BCM_ERR_IN_PROGRESS;
+            TAILQ_INSERT_TAIL(&conn->msg_list, tmsg, l);
+        }
+        else
+        {
+            /* Response, but no request - discard */
+            ++conn->stat.msg_no_req;
+            BCMTR_CLD_CHECK_NOTIFY(conn->device, &hdr, BCMTR_CLD_EV_RECV_DISCARD,
+                bcmos_timestamp(), buf->curr, bcmolt_buf_get_remaining_size(buf), NULL);
+            goto rx_free_buf_and_error_exit;
+        }
+    }
+
+    /* Reassemble. "buf" should not be used following this call */
+    tmsg->hdr = hdr;
+    tmsg->subch = subch;
+    msg_done = _bcmtr_reassemble(conn, tmsg, buf);
+
+    /* If expects more parts - nothing more to do here */
+    if (!msg_done)
+        goto rx_done;
+
+    if (tmsg->err && !is_response)
+    {
+        _bcmtr_tmsg_free(tmsg, &conn->msg_list);
+        goto rx_done;
+    }
+
+    /* Done with the message. Get it out of pending message queue to avoid race condition
+     * when timeout happens while the message is in flight to the destination task.
+     */
+    TAILQ_REMOVE(&conn->msg_list, tmsg, l);
+
+    /* Notify rx. conn->mutex is still taken. It will be released
+       inside _bcmtr_notify_rx_response(), _bcmtr_notify_rx_req_auto() */
+    tmsg->timestamp = bcmos_timestamp();
+    if (is_response)
+    {
+        _bcmtr_notify_rx_response(conn, tmsg);
+    }
+    else
+    {
+        _bcmtr_notify_rx_req_auto(conn, tmsg);
+    }
+
+    return 1;
+
+    /* Error return */
+rx_free_buf_and_error_exit:
+    bcmos_mutex_unlock(&conn->mutex);
+    bcmolt_buf_free(buf);
+    return 0;
+
+    /* return without a buffer */
+rx_done:
+    bcmos_mutex_unlock(&conn->mutex);
+    return 0;
+}
+
+/*
+ * Low-level fragment and send function.
+ * It allocates a series of buffers up to MAX_MTU size, copies original data into them and sends.
+ * The original buffer stays intact - in case it should be retransmitted
+ */
+static bcmos_errno _bcmtr_fragment_and_send(bcmtr_conn *conn, bcmtr_msg *tmsg, bcmtr_send_flags flags)
+{
+    uint32_t frag_number = 0;
+    bcmos_errno err = BCM_ERR_OK;
+    uint32_t data_offset = conn->cfg.plugin_cfg.headroom + BCMTR_HDR_SIZE;
+    uint32_t data_len = bcmolt_buf_get_used(&tmsg->tx_buf) - data_offset;
+    uint8_t *data = tmsg->tx_buf.start + data_offset;
+
+    do
+    {
+        uint32_t send_len = data_len + BCMTR_HDR_SIZE;
+        bcmolt_buf frag;
+
+        if (send_len > conn->cfg.max_mtu)
+        {
+            send_len = conn->cfg.max_mtu;
+            tmsg->hdr.more_fragments = BCMOS_TRUE;
+        }
+        else
+        {
+            tmsg->hdr.more_fragments = BCMOS_FALSE;
+        }
+
+        err = bcmolt_buf_alloc(&frag, send_len + conn->cfg.plugin_cfg.headroom, BCMTR_BUF_ENDIAN);
+        if (err)
+            break;
+
+        tmsg->hdr.frag_number = frag_number++;
+
+        /* Pack correlation tag, command and length */
+        bcmtr_header_pack(&tmsg->hdr, frag.start + conn->cfg.plugin_cfg.headroom);
+        bcmolt_buf_skip(&frag, data_offset);
+        if (bcmolt_buf_write(&frag, data, send_len - BCMTR_HDR_SIZE))
+        {
+            /* Send using customer-provided driver */
+            err = conn->driver.send(conn->drv_priv, tmsg->msg->subch, &frag, flags);
+        }
+        else
+        {
+            err = BCM_ERR_OVERFLOW;
+        }
+        bcmolt_buf_free(&frag);
+        if (err)
+        {
+            break;
+        }
+
+        data_len -= (send_len - BCMTR_HDR_SIZE);
+        data += (send_len - BCMTR_HDR_SIZE);
+
+    } while (data_len);
+
+    return err;
+}
+
+/* Check for time-outs. returns number of messages timed out */
+static int _bcmtr_check_timeout(bcmtr_conn *conn)
+{
+    bcmtr_msg *tmsg, *tmp;
+    uint32_t now;
+    int nmsg = 0;
+    bcmos_errno err;
+
+    /* Transport lock */
+    bcmos_mutex_lock(&conn->mutex);
+
+    now = bcmos_timestamp();
+    TAILQ_FOREACH_SAFE(tmsg, &conn->msg_list, l, tmp)
+    {
+        bcmolt_msg *msg = tmsg->msg;
+
+        if (now - tmsg->timestamp <= conn->cfg.msg_timeout)
+            continue;
+
+        /* Retransmit ? */
+        if (msg && tmsg->tx_count <= conn->cfg.max_retries)
+        {
+            tmsg->timestamp = bcmos_timestamp();
+            BCMTR_CLD_CHECK_NOTIFY(
+                conn->device,
+                &tmsg->hdr,
+                BCMTR_CLD_EV_RESEND,
+                tmsg->timestamp,
+                tmsg->tx_buf.start + conn->cfg.plugin_cfg.headroom + BCMTR_HDR_SIZE,
+                tmsg->tx_buf.len - (conn->cfg.plugin_cfg.headroom + BCMTR_HDR_SIZE),
+                msg);
+
+            /* Fragment and send or send directly, depending on message length */
+            if (bcmolt_buf_get_used(&tmsg->tx_buf) > conn->cfg.max_mtu)
+            {
+                err = _bcmtr_fragment_and_send(conn, tmsg, BCMTR_SEND_FLAGS_PRI_NORMAL);
+            }
+            else
+            {
+                err = conn->driver.send(conn->drv_priv, msg->subch, &tmsg->tx_buf, BCMTR_SEND_FLAGS_PRI_NORMAL);
+            }
+            if (err)
+            {
+                ++conn->stat.msg_comm_err;
+            }
+            ++tmsg->tx_count;
+            continue;
+        }
+
+        /* Giving up */
+        /* Release waiting task if request-response - unless it has already been done */
+        if (msg)
+        {
+            if (tmsg->err == BCM_ERR_IN_PROGRESS)
+            {
+                tmsg->err = BCM_ERR_TIMEOUT;
+            }
+            BCMTR_CLD_CHECK_NOTIFY(
+                conn->device,
+                &tmsg->hdr,
+                BCMTR_CLD_EV_TIMEOUT,
+                bcmos_timestamp(),
+                tmsg->tx_buf.start + conn->cfg.plugin_cfg.headroom + BCMTR_HDR_SIZE,
+                tmsg->tx_buf.len - (conn->cfg.plugin_cfg.headroom + BCMTR_HDR_SIZE),
+                msg);
+            TAILQ_REMOVE(&conn->msg_list, tmsg, l);
+            _bcmtr_notify_ready(conn, tmsg);
+            ++conn->stat.msg_req_timeout;
+        }
+        else
+        {
+            _bcmtr_tmsg_free(tmsg, &conn->msg_list);
+            ++conn->stat.msg_reass_timeout;
+        }
+        ++nmsg;
+    }
+    conn->last_timeout_check = bcmos_timestamp();
+
+    /* Release transport lock */
+    bcmos_mutex_unlock(&conn->mutex);
+
+    return nmsg;
+}
+
+/* Check for receive and timeouts */
+static int _bcmtr_rx_poll(bcmtr_conn *conn, int *pnmsg)
+{
+    bcmolt_buf buf;
+    int nmsg = 0, nmsg_prev;
+    bcmos_errno rc = BCM_ERR_OK;
+    bcmolt_subchannel subch;
+
+    do
+    {
+        nmsg_prev = nmsg;
+
+        /* Plugin driver's recv - get pending rx packet is any.
+         * The function is not allowed to block for more then BCMTR_MSG_TIMEOUT ms
+         */
+        rc = conn->driver.recv(conn->drv_priv, &subch, &buf);
+        if (rc != BCM_ERR_OK)
+        {
+            if (rc == BCM_ERR_NOMEM)
+            {
+                ++conn->stat.msg_no_mem;
+            }
+        }
+        else
+        {
+            nmsg += _bcmtr_rx_packet(conn, subch, &buf);
+        }
+
+        /* Check for timeouts if any */
+        if (bcmos_timestamp() - conn->last_timeout_check > conn->timeout_check_period)
+        {
+            /* Check requests waiting for acknowledge and multy-part messages for timeout.
+             * Timed-out requests are retransmitted.
+             */
+            nmsg += _bcmtr_check_timeout(conn);
+        }
+    } while(nmsg_prev != nmsg);
+
+    *pnmsg = nmsg;
+
+    return rc;
+}
+
+/* Rx thread handler */
+static int _bcmtr_rx_thread_handler(long arg)
+{
+    bcmtr_conn *conn = (bcmtr_conn *)arg;
+    int nmsgs;
+    int rc;
+
+    while(!conn->kill_request)
+    {
+        rc = _bcmtr_rx_poll(conn, &nmsgs);
+        if (rc == BCM_ERR_COMM_FAIL)
+            bcmos_usleep(1000);
+    }
+    conn->kill_done = 1;
+
+    return 0;
+}
+
+/*
+ * Internal transport interface
+ */
+
+
+/** Default message handler - discard */
+static void _bcmtr_dft_msg_handler(bcmolt_devid olt, bcmolt_msg *msg)
+{
+    bcmtr_conn *conn = conn_info[olt].conn;
+
+    /* ToDo: log */
+
+    if (conn)
+        ++conn->stat.no_rx_handler;
+
+    bcmolt_msg_free(msg);
+}
+
+static bcmos_errno _bcmtr_create_rx_thread(bcmtr_conn *conn, bcmos_bool raw_mode)
+{
+    bcmos_errno err = BCM_ERR_OK;
+
+    if (conn->cfg.rx_thread_priority >= 0 && !raw_mode)
+    {
+        bcmos_task_parm parm = {
+            .priority = conn->cfg.rx_thread_priority,
+            .stack_size = BCMTR_RX_THREAD_STACK,
+            .handler = _bcmtr_rx_thread_handler,
+            .name = conn->name,
+            .data = (long)conn
+        };
+        conn->kill_request = BCMOS_FALSE;
+        conn->kill_done = BCMOS_FALSE;
+        err = bcmos_task_create(&conn->rx_thread, &parm);
+        if (err == BCM_ERR_OK)
+            conn->rx_thread_created = BCMOS_TRUE;
+    }
+
+    return err;
+}
+
+static void _bcmtr_destroy_rx_thread(bcmtr_conn *conn)
+{
+    /* Kill rx thread if any */
+    if (conn->rx_thread_created)
+    {
+        conn->kill_request = 1;
+        while(!conn->kill_done)
+            bcmos_usleep(1000);
+        bcmos_task_destroy(&conn->rx_thread);
+    }
+}
+
+static bcmos_errno _bcmtr_connect(bcmolt_devid device, bcmtr_conn **pconn, bcmos_bool raw_mode)
+{
+    bcmtr_conn *conn;
+    bcmos_errno err = BCM_ERR_OK;
+
+    /* Init OS abstraction - just in case */
+    err = bcmos_init();
+    if (err != BCM_ERR_OK && err != BCM_ERR_ALREADY)
+    {
+        return err;
+    }
+
+    bcmos_mutex_lock(&conn_lock);
+
+    /* Allocate */
+    conn = bcmos_calloc(sizeof(*conn));
+    if (!conn)
+    {
+        bcmos_mutex_unlock(&conn_lock);
+        return BCM_ERR_NOMEM;
+    }
+
+    /* Get configuration */
+    err = bcmtr_cfg_get(device, &conn->cfg, &conn->driver);
+    if (err)
+    {
+        bcmos_mutex_unlock(&conn_lock);
+        bcmos_free(conn);
+        return err;
+    }
+
+    snprintf(conn->name, sizeof(conn->name), "tr_rx%u", device);
+    TAILQ_INIT(&conn->free_req_list);
+    TAILQ_INIT(&conn->free_auto_list);
+    TAILQ_INIT(&conn->msg_list);
+    bcmos_mutex_create(&conn->mutex, 0, NULL);
+
+    /* Convert timeouts to us */
+    conn->cfg.msg_timeout *= 1000;
+    conn->cfg.msg_ready_timeout *= 1000;
+    conn->cfg.msg_wait_timeout *= 1000;
+
+    /* Set defaults */
+    conn->timeout_check_period = conn->cfg.msg_wait_timeout;
+    conn->last_timeout_check = bcmos_timestamp();
+
+    /* Allocate and initialize transport blocks and put onto free request and autonomous lists */
+    err = _bcmtr_tmsg_list_alloc(conn);
+
+    /* Open/connect on driver level */
+    err = err ? err : conn->driver.open(device, &conn->cfg.plugin_cfg, &conn->drv_priv);
+    if (err)
+    {
+        bcmos_mutex_destroy(&conn->mutex);
+        goto cleanup;
+    }
+
+    conn->connected = BCMOS_TRUE;
+
+    /* Create rx thread if necessary */
+    err = _bcmtr_create_rx_thread(conn, raw_mode);
+    if (err)
+    {
+        conn->driver.close(conn->drv_priv);
+        bcmos_mutex_destroy(&conn->mutex);
+        goto cleanup;
+    }
+    conn->device = device;
+
+    *pconn = conn;
+    bcmos_mutex_unlock(&conn_lock);
+
+    return BCM_ERR_OK;
+
+cleanup:
+    _bcmtr_tmsg_list_free(conn);
+    bcmos_free(conn);
+    bcmos_mutex_unlock(&conn_lock);
+    return err;
+}
+
+/** Query whether or not the device is currently connected */
+bcmos_errno bcmtr_is_connected(bcmolt_devid device, bcmos_bool *is_connected)
+{
+    bcmtr_conn *conn;
+    if (device >= BCMTR_MAX_OLTS)
+    {
+        return BCM_ERR_RANGE;
+    }
+    conn = conn_info[device].conn;
+    *is_connected = (conn != NULL && conn->connected);
+    return BCM_ERR_OK;
+}
+
+/** Open transport channel */
+bcmos_errno bcmtr_connect(bcmolt_devid device)
+{
+    bcmtr_conn *conn;
+    return _bcmtr_conn_get(device, &conn);
+}
+
+/** Close transport channel */
+bcmos_errno bcmtr_disconnect(bcmolt_devid device)
+{
+    bcmtr_conn *conn;
+
+    if (device >= BCMTR_MAX_OLTS)
+    {
+        return BCM_ERR_RANGE;
+    }
+    bcmos_mutex_lock(&conn_lock);
+    conn = conn_info[device].conn;
+    if (!conn)
+    {
+        bcmos_mutex_unlock(&conn_lock);
+        return BCM_ERR_NOT_CONNECTED;
+    }
+    conn_info[device].conn = NULL;
+
+    /* Kill rx thread if any */
+    _bcmtr_destroy_rx_thread(conn);
+
+    bcmos_mutex_lock(&conn->mutex);
+    /* Close connection */
+    if (conn->driver.close)
+    {
+        conn->driver.close(conn->drv_priv);
+    }
+
+    /* Release all pending messages */
+    bcmos_usleep(100000);
+    _bcmtr_tmsg_list_free(conn);
+
+    bcmos_mutex_unlock(&conn->mutex);
+    bcmos_mutex_destroy(&conn->mutex);
+    bcmos_free(conn);
+
+    bcmos_mutex_unlock(&conn_lock);
+
+    return BCM_ERR_OK;
+}
+
+/* Low-level disconnect that breaks "physical" connection, but doesn't destroy connection structure and registrations */
+bcmos_errno bcmtr_driver_disconnect(bcmolt_devid device)
+{
+    bcmtr_conn *conn;
+    bcmos_errno err = BCM_ERR_OK;
+
+    if (device >= BCMTR_MAX_OLTS)
+    {
+        return BCM_ERR_RANGE;
+    }
+
+    bcmos_mutex_lock(&conn_lock);
+
+    conn = conn_info[device].conn;
+    if (conn == NULL || !conn->connected)
+    {
+        bcmos_mutex_unlock(&conn_lock);
+        return BCM_ERR_NOT_CONNECTED;
+    }
+
+    _bcmtr_destroy_rx_thread(conn);
+
+    bcmos_mutex_lock(&conn->mutex);
+
+    /* Close driver connection */
+    if (conn->driver.close != NULL)
+    {
+        err = conn->driver.close(conn->drv_priv);
+        if (err != BCM_ERR_OK)
+        {
+            BCMOS_TRACE_ERR("Failed to close transport driver: %s (%d)\n", bcmos_strerror(err), err);
+        }
+    }
+
+    conn->connected = BCMOS_FALSE;
+
+    bcmos_mutex_unlock(&conn->mutex);
+
+    bcmos_mutex_unlock(&conn_lock);
+
+    return err;
+}
+
+/* Repair/reconnect the driver-level connection for an already-connected device */
+bcmos_errno bcmtr_driver_reconnect(bcmolt_devid device)
+{
+    bcmtr_conn *conn;
+    bcmos_errno err;
+
+    if (device >= BCMTR_MAX_OLTS)
+    {
+        return BCM_ERR_RANGE;
+    }
+    bcmos_mutex_lock(&conn_lock);
+    conn = conn_info[device].conn;
+    if (conn == NULL)
+    {
+        bcmos_mutex_unlock(&conn_lock);
+        return BCM_ERR_NOT_CONNECTED;
+    }
+
+    if (conn->connected)
+    {
+        bcmtr_driver_disconnect(device);
+    }
+    bcmos_mutex_lock(&conn->mutex);
+
+    /* Re-open driver connection */
+    err = conn->driver.open(device, &conn->cfg.plugin_cfg, &conn->drv_priv);
+    if (err != BCM_ERR_OK)
+    {
+        BCMOS_TRACE_ERR("Failed to re-open transport driver: %s (%d)\n", bcmos_strerror(err), err);
+    }
+
+    err = _bcmtr_create_rx_thread(conn, BCMOS_FALSE);
+    if (err != BCM_ERR_OK)
+    {
+        BCMOS_TRACE_ERR("Failed to create RX transport task: %s (%d)\n", bcmos_strerror(err), err);
+        conn->driver.close(conn->drv_priv);
+    }
+    conn->connected = BCMOS_TRUE;
+
+    bcmos_mutex_unlock(&conn->mutex);
+
+    bcmos_mutex_unlock(&conn_lock);
+
+    return err;
+}
+
+/* Register for notification that transmit failed because tx_queue was full */
+bcmos_errno bcmtr_tx_overflow_cb_register(bcmolt_devid device, F_bcmtr_tx_overflow cb)
+{
+    if (device >= BCMTR_MAX_OLTS)
+    {
+        return BCM_ERR_RANGE;
+    }
+
+    conn_info[device].overflow_cb = cb;
+    return BCM_ERR_OK;
+}
+
+/* Send message.
+ * Internal function. Called under connection lock
+ */
+static bcmos_errno _bcmtr_send(bcmtr_conn *conn, bcmolt_msg *msg, bcmolt_buf *tx_buf, bcmtr_send_flags flags, bcmtr_msg **ptmsg)
+{
+    bcmtr_msg *tmsg;
+    bcmos_errno err;
+
+    if (!conn->connected)
+    {
+        ++conn->stat.not_connected;
+        return BCM_ERR_NOT_CONNECTED;
+    }
+
+    /* Allocate message transport header */
+    tmsg = _bcmtr_msg_get_free(&conn->free_req_list);
+    if (!tmsg)
+    {
+        ++conn->stat.msg_no_mem;
+        return BCM_ERR_TOO_MANY_REQS;
+    }
+    tmsg->msg = msg;
+
+    /* Fill transport header */
+    err = bcmtr_header_fill(tmsg->msg, &tmsg->hdr);
+    if (err)
+        return err;
+
+    tmsg->err = BCM_ERR_IN_PROGRESS;
+    tmsg->tx_count = 1;
+
+    /* Save transmit buffer. It will be released together with transport header */
+    tmsg->tx_buf = *tx_buf;
+
+    tmsg->timestamp = bcmos_timestamp();
+
+    if (bcmolt_buf_get_used(tx_buf) > conn->cfg.max_mtu)
+    {
+        err = _bcmtr_fragment_and_send(conn, tmsg, flags);
+    }
+    else
+    {
+        /* Pack correlation tag, command and length */
+        bcmtr_header_pack(&tmsg->hdr, tmsg->tx_buf.start + conn->cfg.plugin_cfg.headroom);
+
+        /* Send using customer-provided driver */
+        err = conn->driver.send(conn->drv_priv, msg->subch, &tmsg->tx_buf, flags);
+    }
+    BCMTR_CLD_CHECK_NOTIFY(
+        conn->device,
+        &tmsg->hdr,
+        BCMTR_CLD_EV_SEND,
+        tmsg->timestamp,
+        tmsg->tx_buf.start + conn->cfg.plugin_cfg.headroom + BCMTR_HDR_SIZE,
+        tmsg->tx_buf.len - (conn->cfg.plugin_cfg.headroom + BCMTR_HDR_SIZE),
+        msg);
+    if (err != BCM_ERR_OK)
+    {
+        ++conn->stat.msg_comm_err;
+        goto cleanup;
+    }
+
+    tx_buf->start = NULL; /* Ownership passed to tmsg */
+    ++conn->stat.msg_sent;
+
+    if (ptmsg)
+    {
+        *ptmsg = tmsg;
+    }
+    else
+    {
+        _bcmtr_tmsg_free(tmsg, NULL);
+    }
+
+    return BCM_ERR_OK;
+
+    /* error */
+cleanup:
+    tmsg->tx_buf.start = NULL; /* prevent tx buffer de-allocation */
+    _bcmtr_tmsg_free(tmsg, NULL);
+    return err;
+}
+
+
+/* Allocate tx buffer and pack */
+static bcmos_errno _bcmtr_pack(const bcmtr_conn *conn, bcmolt_msg *msg, bcmolt_buf *buf)
+{
+    int32_t len = bcmolt_msg_get_packed_length(msg);
+    uint32_t headroom = conn->cfg.plugin_cfg.headroom;
+    bcmos_errno err;
+
+    if (len < 0)
+        return (bcmos_errno)len;
+
+    /* Reallocate if too big */
+    len += BCMTR_HDR_SIZE + headroom;
+    if (buf->start)
+    {
+        if (buf->len < len)
+        {
+            /* ToDo: reallocate */
+            return BCM_ERR_OVERFLOW;
+        }
+        else
+        {
+            bcmolt_buf_init(buf, len, buf->start, BCMTR_BUF_ENDIAN);
+        }
+    }
+    else
+    {
+        err = bcmolt_buf_alloc(buf, len, BCMTR_BUF_ENDIAN);
+        if (err)
+        {
+            return err;
+        }
+    }
+
+    /* Reserve room for header */
+    buf->curr = buf->start + BCMTR_HDR_SIZE + headroom;
+
+    /* Pack */
+    err = bcmolt_msg_pack(msg, buf);
+
+    return err;
+}
+
+/*
+ * External message interface
+ */
+
+/* Send message. Don't expect response. */
+bcmos_errno bcmtr_send(bcmolt_devid device, bcmolt_msg *msg, bcmtr_send_flags flags)
+{
+    bcmtr_conn *conn;
+    bcmos_errno err;
+    bcmolt_buf tx_buf = {};
+
+    err = _bcmtr_conn_get(device, &conn);
+    if (err)
+        return err;
+
+    /* Allocate transport buffer and pack */
+    err = _bcmtr_pack(conn, msg, &tx_buf);
+    if (err)
+    {
+        bcmolt_buf_free(&tx_buf);
+        return err;
+    }
+
+    bcmos_mutex_lock(&conn->mutex);
+    err = _bcmtr_send(conn, msg, &tx_buf, flags, NULL);
+    bcmos_mutex_unlock(&conn->mutex);
+    if (err)
+    {
+        bcmolt_buf_free(&tx_buf);
+        if (err == BCM_ERR_QUEUE_FULL && conn_info[device].overflow_cb)
+            conn_info[device].overflow_cb(conn->device, flags);
+    }
+
+    return err;
+}
+
+static bcmos_errno bcmtr_call_err(bcmolt_msg *msg, bcmos_errno err, const char *err_text)
+{
+    msg->dir = BCMOLT_MSG_DIR_RESPONSE;
+    msg->err = err;
+    if (err_text != NULL)
+    {
+        strncpy(msg->err_text, err_text, BCMOLT_MAX_ERR_TEXT_LENGTH-1);
+        msg->err_text[BCMOLT_MAX_ERR_TEXT_LENGTH-1] = 0;
+    }
+    return err;
+}
+
+/* Send message and wait for response */
+bcmos_errno bcmtr_call(bcmolt_devid device, bcmolt_msg *msg)
+{
+    static uint32_t corr_tag = 0;
+    bcmos_task *task;
+    bcmtr_msg *tmsg = NULL;
+    bcmtr_conn *conn;
+    bcmolt_buf tx_buf = {};
+    bcmos_errno err;
+    uint8_t instance;
+
+    msg->err = BCM_ERR_OK;
+    msg->dir = BCMOLT_MSG_DIR_REQUEST;
+    msg->corr_tag = ++corr_tag;
+
+    err = _bcmtr_conn_get(device, &conn);
+    if (err)
+    {
+        return bcmtr_call_err(msg, err, NULL);
+    }
+
+    /* prevent sleeping in RX thread (this would cause it to never wake up) */
+    task = bcmos_task_current();
+    if (task == &conn->rx_thread)
+    {
+        return bcmtr_call_err(msg, BCM_ERR_COMM_FAIL, "Cannot call API functions from PCI RX thread");
+    }
+
+    instance = bcmolt_msg_instance(msg);
+    if (instance >= BCMTR_MAX_INSTANCES)
+    {
+        return bcmtr_call_err(msg, BCM_ERR_KEY_RANGE, "Invalid PON index");
+    }
+
+    /* Allocate transport buffer and pack */
+    err = _bcmtr_pack(conn, msg, &tx_buf);
+    if (err)
+    {
+        bcmolt_buf_free(&tx_buf);
+        return bcmtr_call_err(msg, err, NULL);
+    }
+
+    /* transmit request under connection lock */
+    bcmos_mutex_lock(&conn->mutex);
+    err = _bcmtr_send(conn, msg, &tx_buf, BCMTR_SEND_FLAGS_CALL, &tmsg);
+    if (!tmsg)
+    {
+        bcmos_mutex_unlock(&conn->mutex);
+        bcmolt_buf_free(&tx_buf);
+        return bcmtr_call_err(msg, err, NULL);
+    }
+    TAILQ_INSERT_TAIL(&conn->msg_list, tmsg, l);
+    bcmos_mutex_unlock(&conn->mutex);
+
+    /* Wait for response or timeout.
+     * Message timeout is enforced by audit rather than semaphore timeout option
+     */
+    bcmos_sem_wait(&tmsg->sem, BCMOS_WAIT_FOREVER);
+
+    /* Connection could've been killed while we are waiting here.
+     * It is indicated by COMM_FAILURE in msg->err.
+     * In this case transport header (tmsg) is already released
+     */
+    if (msg->err == BCM_ERR_COMM_FAIL)
+    {
+        return bcmtr_call_err(msg, msg->err, NULL);
+    }
+
+    err = tmsg->err;
+    if (!err)
+    {
+        err = _bcmtr_msg_unpack(conn, &tmsg->rx_buf, &tmsg->hdr, tmsg->timestamp, &msg);
+    }
+
+    /* Take connection lock again in order to release transport header safely */
+    bcmos_mutex_lock(&conn->mutex);
+    _bcmtr_tmsg_free(tmsg, NULL);
+    bcmos_mutex_unlock(&conn->mutex);
+
+    return bcmtr_call_err(msg, err ? err : msg->err, NULL);
+}
+
+
+#ifdef BCM_SUBSYSTEM_HOST
+/* Send (un)registration info to the mux */
+static bcmos_errno _bcmtr_send_to_mux(bcmtr_conn *conn, bcmtr_hdr *hdr)
+{
+    bcmolt_buf buf;
+    uint8_t packed_hdr[BCMTR_HDR_SIZE];
+    bcmos_errno err;
+
+    err = bcmolt_buf_alloc(&buf, BCMTR_HDR_SIZE + conn->cfg.plugin_cfg.headroom, BCMTR_BUF_ENDIAN);
+    if (err)
+    {
+        return err;
+    }
+    bcmolt_buf_skip(&buf, conn->cfg.plugin_cfg.headroom);
+    bcmtr_header_pack(hdr, packed_hdr);
+    if (bcmolt_buf_write(&buf, packed_hdr, BCMTR_HDR_SIZE))
+        err = conn->driver.send(conn->drv_priv, 0, &buf, BCMTR_SEND_FLAGS_PRI_NORMAL);
+    else
+        err = BCM_ERR_OVERFLOW;
+    bcmolt_buf_free(&buf);
+    return err;
+}
+#endif
+
+/** Register message handler
+ *
+ * \param[in]   device          OLT device index
+ * \param[in]   parm            Registration parameters
+ * \returns BCM_ERR_OK or error code
+ */
+bcmos_errno bcmtr_msg_handler_register(bcmolt_devid device, const bcmtr_handler_parm *parm)
+{
+    bcmtr_conn *conn;
+    bcmos_errno err = BCM_ERR_OK;
+    bcmolt_group_id msg_id;
+    bcmtr_handler *h;
+
+    if (device >= BCMTR_MAX_OLTS || !parm || !parm->app_cb || parm->instance >= BCMTR_MAX_INSTANCES)
+    {
+        return BCM_ERR_PARM;
+    }
+
+    if ((unsigned)parm->object >= BCMOLT_OBJ_ID__NUM_OF)
+    {
+        bcmtr_handler_parm p1 = *parm;
+
+        for (p1.object = 0; p1.object < BCMOLT_OBJ_ID__NUM_OF && !err; p1.object++)
+        {
+            err = bcmtr_msg_handler_register(device, &p1);
+            /* Ignore RANGE error that indicates that the object being iterated doesn't have this group */
+            /* Ignore ALREADY error that indicates that registration is already present for specific message and was skipped */
+            if ((err == BCM_ERR_RANGE) || (err == BCM_ERR_ALREADY))
+            {
+                err = BCM_ERR_OK;
+            }
+        }
+        return err;
+    }
+
+    if ((unsigned)parm->subgroup == BCMOLT_SUBGROUP_ANY)
+    {
+        bcmtr_handler_parm p1 = *parm;
+
+        for (p1.subgroup = 0;
+            bcmolt_group_id_combine(p1.object, p1.group, p1.subgroup, &msg_id) == BCM_ERR_OK &&
+                (err == BCM_ERR_OK || err == BCM_ERR_ALREADY);
+            p1.subgroup++)
+        {
+            err = bcmtr_msg_handler_register(device, &p1);
+        }
+        if (err == BCM_ERR_ALREADY)
+        {
+            err = BCM_ERR_OK;
+        }
+        return err;
+    }
+
+    /* Specific object/group/subgroup */
+    err = bcmolt_group_id_combine(parm->object, parm->group, parm->subgroup, &msg_id);
+    if (err)
+        return err;
+    h = &conn_info[device].msg_handler[msg_id][parm->instance];
+
+    /* Refuse new registration if already registered */
+    if (h->app_cb != _bcmtr_dft_msg_handler)
+    {
+        return BCM_ERR_ALREADY;
+    }
+
+    h->app_cb = parm->app_cb;
+    h->flags = parm->flags;
+    if ((parm->flags & BCMOLT_AUTO_FLAGS_DISPATCH))
+    {
+        if (parm->module != BCMOS_MODULE_ID_NONE)
+        {
+            h->module = parm->module;
+        }
+        else
+        {
+            h->module = bcmos_module_current();
+        }
+    }
+    else
+    {
+        h->module = BCMOS_MODULE_ID_NONE;
+    }
+
+#ifdef BCM_SUBSYSTEM_HOST
+    /* On the host, automatically connect on message handler registration */
+    err = _bcmtr_conn_get(device, &conn);
+    if (err)
+        return err;
+
+    /* Registration with tr-mux is per device, per-instance, per-object */
+    if (!parm->subgroup)
+    {
+        /* Send registration info to the mux driver. It is just a header */
+        bcmtr_hdr hdr;
+        memset(&hdr, 0, sizeof(hdr));
+        hdr.msg_id = msg_id;
+        hdr.auto_proxy_reg = 1;
+        hdr.instance = parm->instance;
+        err = _bcmtr_send_to_mux(conn, &hdr);
+        if (err)
+        {
+            bcmtr_msg_handler_unregister(device, parm);
+        }
+    }
+#else
+    (void)conn;
+#endif
+
+    return err;
+}
+
+/* Unregister autonomous message handler */
+bcmos_errno bcmtr_msg_handler_unregister(bcmolt_devid device, const bcmtr_handler_parm *parm)
+{
+    bcmtr_conn *conn;
+    bcmos_errno err = BCM_ERR_OK;
+    bcmolt_group_id msg_id;
+    bcmtr_handler *h;
+
+    if (device >= BCMTR_MAX_OLTS || !parm || parm->instance >= BCMTR_MAX_INSTANCES)
+    {
+        return BCM_ERR_PARM;
+    }
+
+    if ((unsigned)parm->object >= BCMOLT_OBJ_ID__NUM_OF)
+    {
+        bcmtr_handler_parm p1 = *parm;
+        for (p1.object = 0; p1.object < BCMOLT_OBJ_ID__NUM_OF && !err; p1.object++)
+        {
+            err = bcmtr_msg_handler_unregister(device, &p1);
+            /* Ignore RANGE error that indicates that the object being iterated doesn't have this group */
+            if (err == BCM_ERR_RANGE)
+            {
+                err = BCM_ERR_OK;
+            }
+        }
+        return err;
+    }
+
+    if ((unsigned)parm->subgroup == BCMOLT_SUBGROUP_ANY)
+    {
+        bcmtr_handler_parm p1 = *parm;
+
+        for (p1.subgroup = 0;
+            bcmolt_group_id_combine(p1.object, p1.group, p1.subgroup, &msg_id) == BCM_ERR_OK && !err;
+            p1.subgroup++)
+        {
+            err = bcmtr_msg_handler_unregister(device, &p1);
+        }
+        return err;
+    }
+
+    err = bcmolt_group_id_combine(parm->object, parm->group, parm->subgroup, &msg_id);
+    if (err)
+        return err;
+
+    h = &conn_info[device].msg_handler[msg_id][parm->instance];
+    h->app_cb = _bcmtr_dft_msg_handler;
+    h->flags = BCMOLT_AUTO_FLAGS_NONE;
+    h->module = BCMOS_MODULE_ID_NONE;
+
+#ifdef BCM_SUBSYSTEM_HOST
+    /* On the host, automatically connect on message handler (de)registration */
+    err = _bcmtr_conn_get(device, &conn);
+    if (err)
+        return err;
+
+    /* Registration with tr-mux is per device, per-instance, per-object */
+    if (!parm->subgroup)
+    {
+        /* Send un-registration info to the mux driver. It is just a header */
+        bcmtr_hdr hdr;
+        memset(&hdr, 0, sizeof(hdr));
+        hdr.msg_id = msg_id;
+        hdr.auto_proxy_unreg = 1;
+        hdr.instance = parm->instance;
+        err = _bcmtr_send_to_mux(conn, &hdr);
+    }
+#else
+    (void)conn;
+#endif
+
+    return err;
+}
+
+/** Get registration info
+ *
+ * \param[in]           device          OLT device index
+ * \param[in,out]       parm            Registration parameters.
+ *                                      instance, group, object, subgroup must be set
+ * \returns BCM_ERR_OK or error code
+ */
+bcmos_errno bcmtr_msg_handler_register_get(bcmolt_devid device, bcmtr_handler_parm *parm)
+{
+    bcmos_errno err;
+    bcmolt_group_id msg_id;
+    bcmtr_handler *h;
+
+    if (device >= BCMTR_MAX_OLTS ||
+        !parm ||
+        parm->instance >= BCMTR_MAX_INSTANCES ||
+        (unsigned)parm->object >= BCMOLT_OBJ_ID__NUM_OF ||
+        (unsigned)parm->subgroup == BCMOLT_SUBGROUP_ANY)
+    {
+        return BCM_ERR_PARM;
+    }
+
+    err = bcmolt_group_id_combine(parm->object, parm->group, parm->subgroup, &msg_id);
+    if (err)
+        return err;
+
+    h = &conn_info[device].msg_handler[msg_id][parm->instance];
+    parm->app_cb = (h->app_cb == _bcmtr_dft_msg_handler) ? NULL : h->app_cb;
+    parm->flags = h->flags;
+    parm->module = h->module;
+
+    return BCM_ERR_OK;
+}
+
+/* Get transport statistics */
+bcmos_errno bcmtr_stat_get(bcmolt_devid device, bcmtr_stat *stat)
+{
+    bcmtr_conn *conn;
+    bcmos_errno err;
+
+    if (!stat)
+    {
+        return BCM_ERR_PARM;
+    }
+    err = _bcmtr_conn_get(device, &conn);
+    if (err)
+    {
+        return err;
+    }
+    bcmos_mutex_lock(&conn->mutex);
+    *stat = conn->stat;
+    memset(&conn->stat, 0, sizeof(conn->stat));
+    bcmos_mutex_unlock(&conn->mutex);
+
+    return BCM_ERR_OK;
+}
+
+#if defined(SIMULATION_BUILD) && defined(LINUX_USER_SPACE) && defined(BCM_SUBSYSTEM_EMBEDDED) && defined(BCMTR_UDP_SUPPORT)
+static int _bcmtr_assign_random_port(void)
+{
+    int port;
+
+    srand(bcmos_timestamp());
+    port = rand() % 50000;
+    if (port < 20000)
+    {
+        port += 20000;
+    }
+
+    return port;
+}
+#endif
+
+/* Connect device in raw mode. Receive task is NOT created */
+bcmos_errno bcmtr_proxy_connect(bcmolt_devid device, uint32_t *headroom)
+{
+    bcmtr_conn *conn;
+    bcmos_errno rc;
+
+    rc = _bcmtr_conn_get_any(device, &conn, BCMOS_TRUE);
+    if (!rc)
+    {
+        *headroom = conn->cfg.plugin_cfg.headroom;
+    }
+    return rc;
+}
+
+/* Send data to device in raw mode */
+bcmos_errno bcmtr_proxy_send(bcmolt_devid device, bcmolt_buf *tx_buf)
+{
+    bcmtr_conn *conn;
+    bcmos_errno rc;
+    rc = _bcmtr_conn_get_any(device, &conn, BCMOS_TRUE);
+    if (rc)
+        return rc;
+    rc = conn->driver.send(conn->drv_priv, 0, tx_buf, BCMTR_SEND_FLAGS_NONE);
+    return rc;
+}
+
+/* Receive data from device in raw mode */
+bcmos_errno bcmtr_proxy_receive(bcmolt_devid device, bcmolt_buf *rx_buf)
+{
+    bcmtr_conn *conn;
+    bcmolt_subchannel subch;
+    bcmos_errno rc;
+    rc = _bcmtr_conn_get_any(device, &conn, BCMOS_TRUE);
+    if (rc)
+        return rc;
+    rc = conn->driver.recv(conn->drv_priv, &subch, rx_buf);
+    return rc;
+}
+
+/** Initialize transport library.
+ * \returns BCM_ERR_OK or error code
+ */
+bcmos_errno bcmtr_init(void)
+{
+    bcmos_errno err = BCM_ERR_OK;
+    bcmolt_devid device;
+
+    bcmos_printf("bcmtr_init: init transport library\n");
+
+#if defined(BCMTR_UDP_SUPPORT)
+
+    /* Set defaults and add configuration command */
+    if (!bcmtr_host_ip)
+        bcmtr_host_ip = BCMTR_TR_UDP_HOST_IP;
+    if (!bcmtr_host_udp_port)
+        bcmtr_host_udp_port = BCMTR_TR_UDP_HOST_PORT;
+    for (device = 0; device < BCMTR_MAX_OLTS; device++)
+    {
+        if (!bcmtr_olt_ip[device])
+            bcmtr_olt_ip[device] = BCMTR_TR_UDP_OLT_IP + device;
+        if (!bcmtr_olt_udp_port[device])
+            bcmtr_olt_udp_port[device] = BCMTR_TR_UDP_OLT_PORT;
+    }
+
+    /* A hack to allow multiple simulations run on the same PC */
+#if defined(SIMULATION_BUILD) && defined(LINUX_USER_SPACE) && defined(BCM_SUBSYSTEM_EMBEDDED)
+    {
+        bcmtr_olt_udp_port[0] = _bcmtr_assign_random_port();
+    }
+#endif
+#endif
+
+    /* Initialize handlers */
+    for (device = 0; device < BCMTR_MAX_OLTS; device++)
+    {
+        bcmolt_group_id group;
+        for (group = 0; group < BCMOLT_GROUP_ID__NUM_OF; group++)
+        {
+            int inst;
+            for (inst = 0; inst < BCMTR_MAX_INSTANCES; inst++)
+            {
+                conn_info[device].msg_handler[group][inst].app_cb = _bcmtr_dft_msg_handler;
+            }
+        }
+    }
+
+    bcmos_mutex_create(&conn_lock, 0, NULL);
+
+    return err;
+}
+
+/** Release resources used by transport library.
+ * \returns BCM_ERR_OK or error code
+ */
+bcmos_errno bcmtr_exit(void)
+{
+    int i;
+
+    for (i = 0; i < BCMTR_MAX_OLTS; i++)
+        bcmtr_disconnect(i);
+
+    bcmos_mutex_destroy(&conn_lock);
+
+    return BCM_ERR_OK;
+}
diff --git a/bcm68620_release/release/host_driver/transport/bcmtr_transport_cli.c b/bcm68620_release/release/host_driver/transport/bcmtr_transport_cli.c
new file mode 100644
index 0000000..e6d007a
--- /dev/null
+++ b/bcm68620_release/release/host_driver/transport/bcmtr_transport_cli.c
@@ -0,0 +1,307 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#include <bcmos_system.h>
+#include <bcmcli.h>
+#include <bcmtr_interface.h>
+#include <bcmtr_internal.h>
+#include <bcmtr_transport_cli.h>
+#include <bcm_api_cli_helpers.h>
+#ifdef BCMTR_PERFTEST
+#include <test/bcmtr_perftest.h>
+#endif
+
+#ifdef BCMTR_PLUGIN_TASK_FORWARDER
+extern uint32_t raw_tx_drop_count;
+#endif
+
+/*
+ * CLI support
+ */
+static bcmcli_entry *trcli_dir;
+
+#ifdef BCMTR_UDP_SUPPORT
+
+/* Display/set host IP+port
+   BCMCLI_MAKE_PARM("ip_addr", "IP address", BCMCLI_PARM_IP, BCMCLI_PARM_FLAG_OPTIONAL),
+   BCMCLI_MAKE_PARM_RANGE("udp_port", "UDP port", BCMCLI_PARM_NUMBER, BCMCLI_PARM_FLAG_OPTIONAL,
+   */
+static bcmos_errno _bcmtr_cli_host_udp(bcmcli_session *session, const bcmcli_cmd_parm parm[], uint16_t nparms)
+{
+    if (!nparms)
+    {
+        bcmcli_session_print(session, "Host Address:port = %d.%d.%d.%d:%d\n",
+            (bcmtr_host_ip >> 24) & 0xff, (bcmtr_host_ip >> 16) & 0xff,
+            (bcmtr_host_ip >> 8) & 0xff, bcmtr_host_ip & 0xff, bcmtr_host_udp_port);
+    }
+    else
+    {
+        if (bcmcli_parm_is_set(session, &parm[0]))
+        {
+            bcmtr_host_ip = parm[0].value.number;
+        }
+        if (bcmcli_parm_is_set(session, &parm[1]))
+        {
+            bcmtr_host_udp_port = parm[1].value.number;
+        }
+    }
+
+    return BCM_ERR_OK;
+}
+
+/* Display/Set OLT IP+port
+   BCMCLI_MAKE_PARM_RANGE("device", "Device index", BCMCLI_PARM_DECIMAL, 0,
+   BCMCLI_MAKE_PARM("ip_addr", "IP address", BCMCLI_PARM_IP, BCMCLI_PARM_FLAG_OPTIONAL),
+   BCMCLI_MAKE_PARM_RANGE("udp_port", "UDP port", BCMCLI_PARM_NUMBER, BCMCLI_PARM_FLAG_OPTIONAL,
+   */
+static bcmos_errno _bcmtr_cli_olt_udp(bcmcli_session *session, const bcmcli_cmd_parm parm[], uint16_t nparms)
+{
+    bcmolt_devid device = (bcmolt_devid)parm[0].value.number;
+
+    if (nparms == 1)
+    {
+        bcmcli_session_print(session, "OLT[%d] Address:port = %d.%d.%d.%d:%d\n",
+            device,
+            (bcmtr_olt_ip[device] >> 24) & 0xff, (bcmtr_olt_ip[device] >> 16) & 0xff,
+            (bcmtr_olt_ip[device] >> 8) & 0xff, bcmtr_olt_ip[device] & 0xff,
+            bcmtr_olt_udp_port[device]);
+    }
+    else
+    {
+        if (bcmcli_parm_is_set(session, &parm[1]))
+        {
+            bcmtr_olt_ip[device] = parm[1].value.number;
+        }
+        if (bcmcli_parm_is_set(session, &parm[2]))
+        {
+            bcmtr_olt_udp_port[device] = parm[2].value.number;
+        }
+    }
+
+    return BCM_ERR_OK;
+}
+
+#endif /* #ifdef BCMTR_UDP_SUPPORT */
+
+/* Connect
+   BCMCLI_MAKE_PARM_RANGE("device", "Device index", BCMCLI_PARM_DECIMAL, 0,
+   */
+static bcmos_errno _bcmtr_cli_connect(bcmcli_session *session, const bcmcli_cmd_parm parm[], uint16_t nparms)
+{
+    bcmolt_devid device = (bcmolt_devid)parm[0].value.number;
+    return bcmtr_connect(device);
+}
+
+/* Disconnect
+   BCMCLI_MAKE_PARM_RANGE("device", "Device index", BCMCLI_PARM_DECIMAL, 0,
+   */
+static bcmos_errno _bcmtr_cli_disconnect(bcmcli_session *session, const bcmcli_cmd_parm parm[], uint16_t nparms)
+{
+    bcmolt_devid device = (bcmolt_devid)parm[0].value.number;
+    return bcmtr_disconnect(device);
+}
+
+/* Reconnect
+   BCMCLI_MAKE_PARM_RANGE("device", "Device index", BCMCLI_PARM_DECIMAL, 0,
+   */
+static bcmos_errno _bcmtr_cli_reconnect(bcmcli_session *session, const bcmcli_cmd_parm parm[], uint16_t nparms)
+{
+    bcmolt_devid device = (bcmolt_devid)parm[0].value.number;
+    return bcmtr_driver_reconnect(device);
+}
+
+/* Stat
+   BCMCLI_MAKE_PARM_RANGE("device", "Device index", BCMCLI_PARM_DECIMAL, 0,
+   */
+static bcmos_errno _bcmtr_cli_stat(bcmcli_session *session, const bcmcli_cmd_parm parm[], uint16_t nparms)
+{
+    bcmolt_devid device = (bcmolt_devid)parm[0].value.number;
+    bcmtr_stat stat;
+    bcmos_errno err;
+#ifdef BCMTR_PLUGIN_TASK_FORWARDER
+    static uint32_t prev_raw_tx_drop_count;
+    uint32_t new_raw_tx_drop_count = raw_tx_drop_count;
+#endif
+
+    err = bcmtr_stat_get(device, &stat);
+    if (err)
+        return err;
+
+    bcmcli_session_print(session, "%-24s : %d\n", "msg_sent", stat.msg_sent);
+    bcmcli_session_print(session, "%-24s : %d\n", "msg_resp_received", stat.msg_resp_received);
+    bcmcli_session_print(session, "%-24s : %d\n", "msg_req_auto_received", stat.msg_req_auto_received);
+    bcmcli_session_print(session, "%-24s : %d\n", "msg_req_timeout", stat.msg_req_timeout);
+    bcmcli_session_print(session, "%-24s : %d\n", "msg_reass_timeout", stat.msg_reass_timeout);
+    bcmcli_session_print(session, "%-24s : %d\n", "msg_no_req", stat.msg_no_req);
+    bcmcli_session_print(session, "%-24s : %d\n", "msg_no_mem", stat.msg_no_mem);
+    bcmcli_session_print(session, "%-24s : %d\n", "msg_comm_err", stat.msg_comm_err);
+    bcmcli_session_print(session, "%-24s : %d\n", "msg_ready_timeout", stat.msg_ready_timeout);
+    bcmcli_session_print(session, "%-24s : %d\n", "msg_too_many_req", stat.msg_too_many_req);
+    bcmcli_session_print(session, "%-24s : %d\n", "msg_too_many_auto", stat.msg_too_many_auto);
+    bcmcli_session_print(session, "%-24s : %d\n", "frag_received", stat.frag_received);
+    bcmcli_session_print(session, "%-24s : %d\n", "frag_invalid", stat.frag_invalid);
+    bcmcli_session_print(session, "%-24s : %d\n", "unpack_errors", stat.unpack_errors);
+    bcmcli_session_print(session, "%-24s : %d\n", "pack_errors", stat.pack_errors);
+    bcmcli_session_print(session, "%-24s : %d\n", "no_rx_handler", stat.no_rx_handler);
+    bcmcli_session_print(session, "%-24s : %d\n", "not_connected", stat.not_connected);
+#ifdef BCMTR_PLUGIN_TASK_FORWARDER
+    bcmcli_session_print(session, "%-24s : %d\n", "raw_tx_drop", new_raw_tx_drop_count - prev_raw_tx_drop_count);
+    prev_raw_tx_drop_count = new_raw_tx_drop_count;
+#endif
+    return BCM_ERR_OK;
+}
+
+/* Register
+   BCMCLI_MAKE_PARM_RANGE("device", "Device index", BCMCLI_PARM_DECIMAL, 0,
+   */
+static bcmos_errno _bcmtr_cli_register_info(bcmcli_session *session, const bcmcli_cmd_parm parm[], uint16_t nparms)
+{
+    bcmolt_devid device = (bcmolt_devid)parm[0].value.number;
+    bcmtr_handler_parm p =
+    {
+        .instance = (uint8_t)parm[1].value.number,
+        .group = (bcmolt_mgt_group)parm[2].value.number,
+    };
+
+    if (p.instance >= BCMTR_MAX_INSTANCES)
+    {
+        return BCM_ERR_PARM;
+    }
+
+    for (p.object = BCMOLT_OBJ_ID_DEVICE; p.object < BCMOLT_OBJ_ID__NUM_OF; p.object++)
+    {
+        bcmolt_group_id group_id;
+        const char *obj_name, *obj_descr;
+        const char *sub_name, *sub_descr;
+
+        if (api_cli_object_name(p.object, &obj_name, &obj_descr) != BCM_ERR_OK)
+            continue;
+
+        for (p.subgroup = 0; bcmtr_msg_handler_register_get(device, &p) == BCM_ERR_OK; p.subgroup++)
+        {
+            bcmolt_group_id_combine(p.object, p.group, p.subgroup, &group_id);
+            api_cli_object_subgroup_name(p.object, p.group, p.subgroup, &sub_name, &sub_descr);
+
+            bcmcli_session_print(session, "%s - %s : msg_id=%u ", obj_name, sub_name, group_id);
+            if (p.app_cb)
+            {
+                bcmcli_session_print(session, "module:%d func:%p\n", p.module, p.app_cb);
+            }
+            else
+            {
+                bcmcli_session_print(session, "NONE\n");
+            }
+        }
+    }
+    return BCM_ERR_OK;
+}
+
+
+bcmos_errno bcmtr_cli_init(void)
+{
+    if ((trcli_dir=bcmcli_dir_find(NULL, "transport")) != NULL)
+        return BCM_ERR_ALREADY;
+    trcli_dir = bcmcli_dir_add(NULL, "transport", "Maple Transport", BCMCLI_ACCESS_GUEST, NULL);
+    if (!trcli_dir)
+    {
+        printf("Can't create transport directory\n");
+        return BCM_ERR_INTERNAL;
+    }
+
+#ifdef BCMTR_UDP_SUPPORT
+
+    BCMCLI_MAKE_CMD(trcli_dir, "host_udp", "Host IP and UDP port parameters", _bcmtr_cli_host_udp,
+        BCMCLI_MAKE_PARM("ip_addr", "IP address", BCMCLI_PARM_IP, BCMCLI_PARM_FLAG_OPTIONAL),
+        BCMCLI_MAKE_PARM_RANGE("udp_port", "UDP port", BCMCLI_PARM_NUMBER, BCMCLI_PARM_FLAG_OPTIONAL,
+        0, 0xffff));
+    BCMCLI_MAKE_CMD(trcli_dir, "olt_udp", "OLT IP and UDP port parameters", _bcmtr_cli_olt_udp,
+        BCMCLI_MAKE_PARM_RANGE("device", "Device index", BCMCLI_PARM_DECIMAL, 0,
+        0, BCMTR_MAX_OLTS-1),
+        BCMCLI_MAKE_PARM("ip_addr", "IP address", BCMCLI_PARM_IP, BCMCLI_PARM_FLAG_OPTIONAL),
+        BCMCLI_MAKE_PARM_RANGE("udp_port", "UDP port", BCMCLI_PARM_NUMBER, BCMCLI_PARM_FLAG_OPTIONAL,
+        0, 0xffff));
+#endif
+
+    BCMCLI_MAKE_CMD(trcli_dir, "connect", "Connect", _bcmtr_cli_connect,
+        BCMCLI_MAKE_PARM_RANGE("device", "Device index", BCMCLI_PARM_DECIMAL, 0,
+        0, BCMTR_MAX_OLTS-1));
+
+    BCMCLI_MAKE_CMD(trcli_dir, "disconnect", "Disconnect", _bcmtr_cli_disconnect,
+        BCMCLI_MAKE_PARM_RANGE("device", "Device index", BCMCLI_PARM_DECIMAL, 0,
+        0, BCMTR_MAX_OLTS-1));
+
+    BCMCLI_MAKE_CMD(trcli_dir, "reconnect", "Reconnect", _bcmtr_cli_reconnect,
+        BCMCLI_MAKE_PARM_RANGE("device", "Device index", BCMCLI_PARM_DECIMAL, 0,
+        0, BCMTR_MAX_OLTS-1));
+
+    BCMCLI_MAKE_CMD(trcli_dir, "stat", "Transport statistics", _bcmtr_cli_stat,
+        BCMCLI_MAKE_PARM_RANGE("device", "Device index", BCMCLI_PARM_DECIMAL, 0,
+        0, BCMTR_MAX_OLTS-1));
+
+    {
+        static bcmcli_enum_val groups[] =
+        {
+#ifdef BCM_SUBSYSTEM_HOST
+            { .name = "auto", .val = BCMOLT_MGT_GROUP_CFG },
+            { .name = "proxy_rx", .val = BCMOLT_MGT_GROUP_PROXY_RX },
+#else
+            { .name = "cfg", .val = BCMOLT_MGT_GROUP_CFG },
+            { .name = "stat", .val = BCMOLT_MGT_GROUP_STAT },
+            { .name = "stat_cfg", .val = BCMOLT_MGT_GROUP_STAT_CFG },
+            { .name = "oper", .val = BCMOLT_MGT_GROUP_OPER },
+            { .name = "auto_cfg", .val = BCMOLT_MGT_GROUP_AUTO_CFG },
+            { .name = "proxy", .val = BCMOLT_MGT_GROUP_PROXY },
+#endif
+            { .name = NULL }
+
+        };
+        BCMCLI_MAKE_CMD(trcli_dir, "registration", "Transport RX registration info", _bcmtr_cli_register_info,
+            BCMCLI_MAKE_PARM_RANGE("device", "Device index", BCMCLI_PARM_DECIMAL, 0,
+            0, BCMTR_MAX_OLTS-1),
+            BCMCLI_MAKE_PARM_RANGE("pon_ni", "PON NI", BCMCLI_PARM_DECIMAL, 0,
+            0, BCMTR_MAX_INSTANCES-1),
+            BCMCLI_MAKE_PARM_ENUM("group", "Management group", groups, 0) );
+    }
+
+    /* Performance testing directory */
+#ifdef BCMTR_PERFTEST
+    bcmtr_test_init();
+#endif
+
+    return BCM_ERR_OK;
+}
+
+void bcmtr_cli_exit(void)
+{
+    if (trcli_dir)
+    {
+        bcmcli_token_destroy(trcli_dir);
+        trcli_dir = NULL;
+    }
+}
diff --git a/bcm68620_release/release/host_driver/transport/bcmtr_transport_cli.h b/bcm68620_release/release/host_driver/transport/bcmtr_transport_cli.h
new file mode 100644
index 0000000..3ebffaa
--- /dev/null
+++ b/bcm68620_release/release/host_driver/transport/bcmtr_transport_cli.h
@@ -0,0 +1,41 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#ifndef BCMTR_TRANSPORT_CLI_H_
+#define BCMTR_TRANSPORT_CLI_H_
+
+#include <bcmos_system.h>
+
+#ifdef ENABLE_CLI
+bcmos_errno bcmtr_cli_init(void);
+void bcmtr_cli_exit(void);
+#endif
+
+#endif
+
diff --git a/bcm68620_release/release/host_driver/transport/inband/Makefile b/bcm68620_release/release/host_driver/transport/inband/Makefile
new file mode 100644
index 0000000..31c6c00
--- /dev/null
+++ b/bcm68620_release/release/host_driver/transport/inband/Makefile
@@ -0,0 +1,10 @@
+# Inband Transport
+#
+
+MOD_NAME = inband_driver
+MOD_TYPE = lib
+MOD_DEFS = -DIN_BAND
+
+USE_LINT = yes
+
+srcs = bcmtr_inband.c
diff --git a/bcm68620_release/release/host_driver/transport/inband/bcmtr_inband.c b/bcm68620_release/release/host_driver/transport/inband/bcmtr_inband.c
new file mode 100644
index 0000000..bab77ca
--- /dev/null
+++ b/bcm68620_release/release/host_driver/transport/inband/bcmtr_inband.c
@@ -0,0 +1,276 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+/*
+ * bcmtr_inband.c - In-band transport driver
+ */
+#include <bcmos_system.h>
+#include <bcmtr_inband.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+
+typedef struct device_info
+{
+    bcmos_ipv4_address remote_ip;
+    uint16_t remote_port;
+    uint8_t channel;
+    int tr_udp_sock;
+} device_info;
+
+static device_info dev_info[BCMTR_MAX_OLTS];
+
+#define DEBUG_ONLY 0
+
+/** Initialize in-band transport driver
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtr_ib_init(void)
+{
+    return BCM_ERR_OK;
+}
+
+/** Cleanup in-band transport driver
+ * \returns: 0 in case of success or error code < 0
+ */
+void bcmtr_ib_exit(void)
+{
+    int i;
+
+    for (i=0; i<BCMTR_MAX_OLTS; i++)
+    {
+        bcmtr_ib_disconnect(i);
+    }
+}
+
+/* Receive packet */
+static bcmos_errno _bcmtr_ib_rx(uint32_t device, int s, bcmos_buf **buf, uint8_t *ch)
+{
+    struct sockaddr_in sa;
+#if 0
+    struct iovec iov = {.iov_len = BCMTR_MAX_MTU_SIZE};
+    struct msghdr msg = {
+        .msg_iov = &iov, .msg_iovlen = 1,
+        .msg_name = &sa, .msg_namelen = sizeof(sa)
+    };
+#endif
+    bcmos_buf *b;
+    ssize_t len;
+
+    b = bcmos_buf_alloc(BCMTR_MAX_MTU_SIZE);
+    if (!b)
+    {
+        bcmos_printf("%s: Failed to allocate buffer\n", __FUNCTION__);
+        return BCM_ERR_NOMEM;
+    }
+#if 0
+    iov.iov_base = bcmos_buf_data(b);
+#endif
+    memset(&sa, 0, sizeof(sa));
+    len = recv(s, bcmos_buf_data(b), BCMTR_MAX_MTU_SIZE, 0);
+    if (len <= 0)
+    {
+        bcmos_printf("%s: recvmsg() --> %d\n", __FUNCTION__, len);
+        bcmos_buf_free(b);
+        return BCM_ERR_COMM_FAIL;
+    }
+
+    *ch = dev_info[device].channel;
+    dev_info[device].channel = 0;
+    bcmos_buf_length_set(b, (int)len);
+    *buf = b;
+
+#if DEBUG_ONLY
+    bcmos_printf("\nReceived to %d bytes from channel %d/%d port", len, *ch, sa.sin_port);
+
+    {
+        int ii = 0;
+        unsigned char *c = bcmos_buf_data(b);
+        int size = (int)len;
+
+        for (ii=0; ii<size; ii++)
+        {
+            if (0==(ii%16)) bcmos_printf("\n");
+            if (0==(ii%8)) bcmos_printf("  ");
+            bcmos_printf(" %02x", *c);
+            c++;
+        }
+        bcmos_printf("\n");
+    }
+#endif
+
+    return BCM_ERR_OK;
+}
+
+/** Connect to maple device */
+bcmos_errno bcmtr_ib_connect(uint8_t device, bcmos_ipv4_address ip_address, uint16_t udp_port)
+{
+    int r = 0;
+    int s = 0;
+    struct sockaddr_in sa;
+
+    /*Check for valid device*/
+    BUG_ON((unsigned)device >= BCMTR_MAX_OLTS);
+
+    if (dev_info[device].tr_udp_sock)
+        return BCM_ERR_ALREADY;
+
+    dev_info[device].remote_ip = ip_address;
+    dev_info[device].remote_port = udp_port;
+
+    /*check that ip address and port have been initialized*/
+    if(dev_info[device].remote_port == 0  || dev_info[device].remote_ip.u32 == 0)
+    {
+        bcmos_printf("%s: IP address and port not initialized. Error %d\n", __FUNCTION__, r);
+        return BCM_ERR_RANGE;
+    }
+
+    /* Create socket */
+    s = socket(AF_INET, SOCK_DGRAM, 0);
+    if (!s)
+    {
+        bcmos_printf("%s: Failed to create socket. Error %d\n", __FUNCTION__, s);
+        return BCM_ERR_COMM_FAIL;
+    }
+
+    /* Connect to remote */
+    memset(&sa, 0, sizeof(sa));
+    sa.sin_family = AF_INET;
+    sa.sin_port = (in_port_t)htons(dev_info[device].remote_port);
+    sa.sin_addr.s_addr = (in_addr_t)htonl(dev_info[device].remote_ip.u32);
+    r = connect(s, (struct sockaddr*)&sa, sizeof(sa));
+    if (r)
+    {
+        bcmos_printf("%s: Failed to connect socket. Error %d\n", __FUNCTION__, r);
+        close(s);
+        return BCM_ERR_COMM_FAIL;
+    }
+
+    {
+        socklen_t slen;
+        if (getsockname(s, (struct sockaddr *)&sa, &slen) < 0)
+        {
+        bcmos_printf("%s: Connected socket invalid. Error %d\n", __FUNCTION__, r);
+        close(s);
+        return BCM_ERR_COMM_FAIL;
+        }
+
+        bcmos_printf("%s: device %d: socket (port %d) connected to %d.%d.%d.%d:%d\n",
+                     __FUNCTION__, device, ntohs((uint16_t)sa.sin_port),
+                     (int)(dev_info[device].remote_ip.u32 >> 24), (int)((dev_info[device].remote_ip.u32 >> 16) & 0xff),
+                     (int)((dev_info[device].remote_ip.u32 >> 8) & 0xff), (int)(dev_info[device].remote_ip.u32 & 0xff),
+                     (int)dev_info[device].remote_port);
+    }
+
+    dev_info[device].tr_udp_sock = s;
+
+    return BCM_ERR_OK;
+}
+
+/** Disconnect. All buffers are released
+ * \param[in]   device          Maple device index
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtr_ib_disconnect(uint8_t device)
+{
+    BUG_ON((unsigned)device >= BCMTR_MAX_OLTS);
+
+    bcmos_printf("%s: disconnecting %d..", __FUNCTION__, device);
+    if (dev_info[device].tr_udp_sock)
+    {
+        int s = dev_info[device].tr_udp_sock;
+        dev_info[device].tr_udp_sock = 0;
+        close(s);
+    }
+    bcmos_printf("done\n");
+    return BCM_ERR_OK;
+}
+
+/** Send packet to device via in-band interface
+ * \param[in]   device  Mapole device index
+ * \param[in]   channel Logical channel
+ * \param[in]   buf     Buffer to be transmitted
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtr_ib_send(uint8_t device, uint8_t channel, bcmos_buf *buf)
+{
+    int buflen = bcmos_buf_length(buf);
+    struct iovec iov = { .iov_base = bcmos_buf_data(buf), .iov_len = buflen };
+    struct msghdr msg = {
+        .msg_iov = &iov, .msg_iovlen = 1, .msg_flags=MSG_DONTWAIT,
+        .msg_name = NULL, .msg_namelen = 0
+    };
+    ssize_t len;
+
+    dev_info[device].channel = channel;
+
+    len = sendmsg(dev_info[device].tr_udp_sock, &msg, 0);
+    if ((int)len < buflen)
+    {
+        bcmos_printf("%s: sendmsg(%u) --> %d\n", __FUNCTION__, buflen, len);
+        bcmos_buf_free(buf);
+        return BCM_ERR_NOT_CONNECTED;
+    }
+
+#if 1
+    {
+        int ii = 0;
+        unsigned char *c = bcmos_buf_data(buf);
+        struct sockaddr_in sa;
+        socklen_t slen;
+
+        for (ii=0; ii<(int)len; ii++)
+        {
+            if (0==(ii%16)) bcmos_printf("\n");
+            if (0==(ii%8)) bcmos_printf("  ");
+            bcmos_printf(" %02x", *c);
+            c++;
+        }
+
+        if (getsockname(dev_info[device].tr_udp_sock, (struct sockaddr *)&sa, &slen) < 0)
+        {
+            bcmos_printf("%s: Connected socket invalid\n", __FUNCTION__);
+            return BCM_ERR_COMM_FAIL;
+        }
+        bcmos_printf("\nSent %d bytes to channel %d from port %d\t", len, channel, sa.sin_port);
+    }
+#endif
+
+    return BCM_ERR_OK;
+}
+
+/* Receive packet from device */
+bcmos_errno bcmtr_ib_receive(uint32_t device, uint8_t *channel, bcmos_buf **buf)
+{
+    if (device >= BCMTR_MAX_OLTS || !  dev_info[device].tr_udp_sock)
+    {
+        return BCM_ERR_PARM;
+    }
+
+    return _bcmtr_ib_rx(device, dev_info[device].tr_udp_sock, buf, channel);
+}
diff --git a/bcm68620_release/release/host_driver/transport/inband/bcmtr_inband.h b/bcm68620_release/release/host_driver/transport/inband/bcmtr_inband.h
new file mode 100644
index 0000000..10f3d7d
--- /dev/null
+++ b/bcm68620_release/release/host_driver/transport/inband/bcmtr_inband.h
@@ -0,0 +1,74 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+/*
+ * bcmtr_inband.h - Inband host-maple communication interface
+ */
+
+#ifndef _BCMTR_INBAND_H_
+#define _BCMTR_INBAND_H_
+
+
+/** Initialize in-band transport driver
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtr_ib_init(void);
+
+
+/** Cleanup in-band transport driver
+ * \returns: 0 in case of success or error code < 0
+ */
+void bcmtr_ib_exit(void);
+
+/** Connect
+ * \param[in]  device          Maple device index
+ * \param[in]  ip_address      Maple IP address
+ * \param[in]  udp_port        Maple UDP port
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtr_ib_connect(uint8_t device, bcmos_ipv4_address ip_address, uint16_t udp_port);
+
+/** Disconnect. All buffers are released
+ * \param[in]   device          Maple device index
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtr_ib_disconnect(uint8_t device);
+
+/** Send packet to device via in-band interface
+ * \param[in]   device  Mapole device index
+ * \param[in]   channel Logical channel
+ * \param[in]   buf     Buffer to be transmitted
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtr_ib_send(uint8_t device, uint8_t channel, bcmos_buf *buf);
+
+/* Receive packet from device */
+bcmos_errno bcmtr_ib_receive(uint32_t device, uint8_t *channel, bcmos_buf **buf);
+
+#endif /* _BCMTR_INBAND_H_ */
diff --git a/bcm68620_release/release/host_driver/transport/mux/Makefile b/bcm68620_release/release/host_driver/transport/mux/Makefile
new file mode 100644
index 0000000..8a45a97
--- /dev/null
+++ b/bcm68620_release/release/host_driver/transport/mux/Makefile
@@ -0,0 +1,35 @@
+# PCIe transport
+# Consists of 2 components
+# - low-level PCIe driver (send/rx functions)
+# - multiplexer
+#
+MOD_NAME = trmux
+MOD_DEPS = transport model pcie pcie_mod ll_pcie fld pcie_sw_queue
+
+ifeq ("$(RELEASE_BUILD)", "y")
+    MOD_DEPS += common_api
+else
+    MOD_DEPS += api
+endif
+
+ifeq ("$(RAW_TRANSPORT_VIA_UDP)", "y")
+MOD_DEPS += trpcie
+endif
+
+ifeq ("$(OS_KERNEL)", "linux")
+MOD_TYPE = linux_lib
+else
+MOD_TYPE = lib
+endif
+
+# If called by linux kernel builder - add include paths manually.
+# It is not elegant, but we'll not have many linux modules
+ifneq ("$(KBUILD_SRC)", "")
+	-include $(OUT_DIR_BASE)/Makefile.config.$(MOD_NAME)
+endif
+
+srcs = bcmolt_tr_mux.c 
+
+USE_LINT = yes
+
+
diff --git a/bcm68620_release/release/host_driver/transport/mux/bcmolt_tr_mux.c b/bcm68620_release/release/host_driver/transport/mux/bcmolt_tr_mux.c
new file mode 100644
index 0000000..b73e650
--- /dev/null
+++ b/bcm68620_release/release/host_driver/transport/mux/bcmolt_tr_mux.c
@@ -0,0 +1,1092 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+/*
+ * bcmtr_mux.c
+ *
+ * Transport Multiplexer
+ * - PCIe/in-band channel multiplexer
+ * - locally/remotely - terminated message multiplexer
+ * - autonomous messages de-multiplexer
+ */
+#include <bcmos_system.h>
+#include <bcmolt_msg.h>
+#include <bcmolt_buf.h>
+#include <bcmolt_msg_pack.h>
+#include <bcmtr_header.h>
+#include <bcmolt_tr_mux.h>
+#ifdef IN_BAND
+#include <bcmtr_inband.h>
+#else
+#include <bcmtr_pcie.h>
+#include <bcmolt_llpcie.h>
+#include <bcmolt_fld.h>
+#include <bcm_fld_common.h>
+#include <bcmtr_pcie_sw_queue.h>
+#endif
+#include <bcmolt_api.h>
+#include <bcmolt_model_types.h>
+#include <bcmolt_model_ids.h>
+
+#define BCMTRMUX_MAX_TX_DELAY   500     /* max transmit delay (us) */
+#define BCMTRMUX_MAX_RX_DELAY   5000    /* max receive delay (us) */
+
+#ifdef __KERNEL__
+#define BCMTRMUX_LOG printk
+#else
+#define BCMTRMUX_LOG BCMOS_TRACE_INFO
+#endif
+
+/* Channel registration info */
+typedef struct
+{
+    f_bcmtr_rx_handler rx;
+    void *data;
+} bcmtrmux_rx_info;
+
+typedef struct
+{
+    f_bcmtr_local_rx_handler rx;
+    void *data;
+} bcmtrmux_local_rx_info;
+
+/* Registration arrays */
+static bcmtrmux_rx_info bcmtrmux_rx_info_array[BCMTR_MAX_OLTS][BCMTRMUX_MAX_CHANNELS];
+static bcmtrmux_local_rx_info bcmtrmux_local_rx_info_array[BCMTR_MAX_OLTS];
+static bcmtrmux_channel bcmtrmux_auto_channels[BCMTR_MAX_OLTS][BCMTR_MAX_INSTANCES][BCMOLT_OBJ_ID__NUM_OF];
+static bcmtrmux_channel bcmtrmux_proxy_channels[BCMTR_MAX_OLTS][BCMTR_MAX_INSTANCES][BCMOLT_OBJ_ID__NUM_OF];
+static bcmos_bool bcmtr_mux_connected[BCMTR_MAX_OLTS];
+static bcmos_bool bcmtr_mux_terminated[BCMTR_MAX_OLTS];
+static bcmos_bool bcmtrmux_dev_ctrl_intercept[BCMTR_MAX_OLTS][BCMOLT_GROUP_ID__NUM_OF];
+
+#ifndef IN_BAND
+
+/* Number of registered high-priority channels */
+static bcmtrmux_channel num_urgent_channels[BCMTR_MAX_OLTS];
+
+/* Receive semaphore */
+static bcmos_sem bcmtrmux_rx_lock[BCMTR_MAX_OLTS];
+
+#endif
+
+/* Statistics */
+static bcmtrmux_stat bcmtrmux_stat_array[BCMTR_MAX_OLTS];
+
+/* Receive tasks */
+static bcmos_task bcmtrmux_rx_task[BCMTR_MAX_OLTS];
+
+/* Registration protection */
+static bcmos_fastlock bcmtrmux_lock;
+
+static void bcmtrmux_rx_auto_proxy(bcmolt_devid device, bcmos_buf *buf, bcmtrmux_channel channel, void *data);
+static void bcmtrmux_rx_local(bcmolt_devid device, bcmos_buf *buf, bcmtrmux_channel channel, void *data);
+
+static bcmtrmux_msg_filter_cb_t bcmtrmux_msg_filter_cb;
+
+/* discard packet for which there is no registration */
+static void bcmtrmux_rx_discard(bcmolt_devid device, bcmos_buf *buf, bcmtrmux_channel channel, void *data)
+{
+    uint32_t *counter = (uint32_t *)data;
+    ++(*counter);
+    bcmos_buf_free(buf);
+}
+
+/* discard unpacked message for which there is no registration */
+static void bcmtrmux_local_rx_discard(bcmolt_devid device, bcmolt_msg *msg, void *data)
+{
+    uint32_t *counter = (uint32_t *)data;
+    ++(*counter);
+    bcmolt_msg_free(msg);
+}
+
+/* Find free channel. returns channel id >= 0 or BCMTRMUX_MAX_CHANNELS if no free channels */
+static int bcmtrmux_channel_get_free(bcmolt_devid device)
+{
+    int i;
+    /* Start from BCMTRMUX_CHANNEL_FIRST_FREE. Channel 0 is reserved for indications/proxy , Channel 1 is for Keep Alive*/
+    for (i=BCMTRMUX_CHANNEL_FIRST_FREE; i<BCMTRMUX_FIRST_URGENT_CHANNEL; i++)
+    {
+        if (bcmtrmux_rx_info_array[device][i].rx == bcmtrmux_rx_discard)
+            break;
+    }
+    return i;
+}
+
+#ifndef IN_BAND
+/* PCIe Receive handler */
+static int _bcmtrmux_pcie_rx_handler(long device)
+{
+    bcmos_errno rc;
+    bcmos_buf *buf;
+    uint32_t nbuf[BCMTR_PCIE_PRTY__NUM_OF] = {};
+    uint8_t ch;
+
+    BUG_ON(device >= BCMTR_MAX_OLTS);
+
+    BCMTRMUX_LOG("rx_task(%ld) - started\n", device);
+
+    /* Enable rx interrupt */
+
+    while (1)
+    {
+        bcmtr_pcie_rxint_enable(device);
+        bcmos_sem_wait(&bcmtrmux_rx_lock[device], BCMTRMUX_MAX_RX_DELAY);
+
+        if (!bcmtr_mux_connected[device])
+        {
+            break;
+        }
+        /* Wait for receive */
+        do
+        {
+            buf = NULL;
+            rc = bcmtr_swq_receive(device, BCMTR_PCIE_PRTY_NORMAL, &ch, &buf);
+            if (rc)
+            {
+                /* If DMA is not shared with urgent service, poll RXQ here,
+                 * don't wait for interrupt
+                 */
+                if (rc == BCM_ERR_QUEUE_EMPTY && !num_urgent_channels[device])
+                {
+                    bcmtr_pcie_rxint_disable(device);
+                    bcmtr_swq_rx_poll(device, nbuf);
+                    bcmtrmux_stat_array[device].rx_poll_normal += nbuf[BCMTR_PCIE_PRTY_NORMAL];
+                }
+                /* Wait for interrupt or semaphore timeout */
+                break;
+            }
+            bcmtrmux_rx_from_line((bcmolt_devid)device, (bcmtrmux_channel)ch, buf);
+        } while (bcmtr_mux_connected[device]);
+    }
+    BCMTRMUX_LOG("rx_task(%ld) - terminated\n", device);
+    bcmtr_mux_terminated[device] = BCMOS_TRUE;
+
+    return 0;
+}
+
+static void bcmtrmux_rx_irq(bcmolt_devid device)
+{
+    bcmos_buf *buf;
+    uint8_t ch;
+    uint32_t nbuf[BCMTR_PCIE_PRTY__NUM_OF] = {};
+
+    bcmtr_pcie_rxint_disable(device);
+    bcmtr_pcie_rxint_clear(device);
+    bcmtr_swq_rx_poll(device, nbuf);
+
+    /* Got some packets. Deliver high priority from interrupt level */
+    if (nbuf[BCMTR_PCIE_PRTY_URGENT])
+    {
+        bcmtrmux_stat_array[device].rx_poll_urgent += nbuf[BCMTR_PCIE_PRTY_URGENT];
+        while (bcmtr_swq_receive(device, BCMTR_PCIE_PRTY_URGENT, &ch, &buf) == BCM_ERR_OK)
+        {
+            bcmtrmux_rx_from_line(device, ch, buf);
+        }
+    }
+
+    /* Check normal priority */
+    if (nbuf[BCMTR_PCIE_PRTY_NORMAL])
+    {
+        bcmtrmux_stat_array[device].rx_poll_normal += nbuf[BCMTR_PCIE_PRTY_NORMAL];
+        bcmos_sem_post(&bcmtrmux_rx_lock[device]);
+    }
+
+    /* Enable rx interrupt */
+    bcmtr_pcie_rxint_enable(device);
+
+    return;
+}
+
+/* Tx confirmation interrupt handler.
+ * Used only if there are urgent channels
+ */
+static void bcmtrmux_tx_irq(bcmolt_devid device)
+{
+    /* Disable and clear transmit completion interrupts */
+    bcmtr_pcie_txint_disable(device);
+    bcmtr_pcie_txint_clear(device);
+    /* Submit buffers pending in sw queue to the h/w queue */
+    bcmtr_swq_tx_submit(device);
+    /* Re-enable tx completion interrupt */
+    bcmtr_pcie_txint_enable(device);
+    return;
+}
+
+/* Init PCIE transport */
+static bcmos_errno bcmtrmux_pcie_init(bcmolt_devid device, uint32_t txq_size, uint32_t rxq_size)
+{
+    uint32_t pcie_cookie[BCMOS_ROUND_UP(PCIE_OPAQUE_DATA_SIZE, sizeof(uint32_t))/sizeof(uint32_t)];
+    bcmtr_pcie_pre_connect_cfg cfg;
+    bcm_ll_dev_info ll_info;
+    int niter = 0;
+    bcmos_errno err;
+    bcmos_bool status;
+
+#ifndef SIMULATION_BUILD
+    err = bcm_ll_pcie_query(device, &ll_info);
+    if (err)
+    {
+        BCMOS_TRACE_RETURN(err, "bcm_ll_pcie_query() failed\n");
+    }
+#endif
+
+    BCMTRMUX_LOG("Waiting for BCM68620 application\n");
+    bcm_fld_set_rings_size(device, txq_size, rxq_size);
+    status = bcm_fld_test_device_bootrecord_flag(device);
+
+    /* Wait for embedded handshake. BCMTR_PCIE_START_TIMEOUT is in ms */
+    for (niter = 0;
+         niter < BCMTR_PCIE_START_TIMEOUT / 10 && !(status = bcm_fld_test_device_bootrecord_flag(device));
+         niter++)
+    {
+        bcmos_usleep(10000);
+    }
+    if (!status)
+    {
+        BCMOS_TRACE_RETURN(BCM_ERR_IO, "BCM68620 application timeout\n");
+    }
+
+    err = bcm_fld_get_device_bootrecord(device, pcie_cookie);
+    if (err != BCM_ERR_OK)
+    {
+        BCMOS_TRACE_RETURN(err, "bcm_fld_get_device_bootrecord() failed\n");
+    }
+
+    /* set host prm bit - indicate host ready to send/receive DMA */
+    bcm_fld_clear_device_bootrecord_flag(device);
+
+    cfg.txq_size = txq_size;             /* Transmit queue size */
+    cfg.rxq_size = rxq_size;             /* Receive queue size */
+    cfg.max_mtu = BCMTR_MAX_MTU_SIZE;    /* Max MTU size */
+    cfg.pcie_reg_base = ll_info.soc_regs_base;
+    cfg.ddr_win_base = ll_info.soc_ddr_base;
+    cfg.rx_irq = ll_info.irq;
+
+    err = bcmtr_pcie_pre_connect(device, &cfg, (bcmtr_pcie_opaque_data *)pcie_cookie);
+    if (err)
+    {
+        BCMOS_TRACE_RETURN(err, "bcmtr_pcie_pre_connect() failed\n");
+    }
+
+    err = bcmtr_pcie_connect(device,(bcmtr_pcie_opaque_data *)pcie_cookie);
+    if (err)
+    {
+        BCMOS_TRACE_RETURN(err, "bcmtr_pcie_connect() failed\n");
+    }
+
+    bcm_fld_set_host_bootrecord_flag(device);
+
+    /* Wait for embedded handshake. BCMTR_PCIE_CONNECT_TIMEOUT is in ms */
+    for (niter = 0;
+         niter < BCMTR_PCIE_CONNECT_TIMEOUT / 10 && (status = bcm_fld_test_host_bootrecord_flag(device));
+         niter++)
+    {
+        bcmos_usleep(10000);
+    }
+    if (status)
+    {
+        BCMOS_TRACE_RETURN(BCM_ERR_IO, "BCM68620 connect timeout\n");
+    }
+
+    BCMTRMUX_LOG("PCI transport: initialized\n");
+
+    return BCM_ERR_OK;
+}
+
+#else /* #ifndef IN_BAND */
+
+/* IN-BAND receive handler */
+static int _bcmtrmux_ib_rx_handler(long device)
+{
+    bcmos_errno rc;
+    bcmos_buf *buf;
+    uint8_t ch;
+
+    BUG_ON(device >= BCMTR_MAX_OLTS);
+
+    BCMTRMUX_LOG("rx_task(%ld) - started\n", device);
+
+    while (bcmtr_mux_connected[device])
+    {
+        /* Wait for receive */
+        buf = NULL;
+        rc = bcmtr_ib_receive(device, &ch, &buf);
+        if (rc == BCM_ERR_OK)
+        {
+            bcmtrmux_rx_from_line((bcmolt_devid)device, (bcmtrmux_channel)ch, buf);
+        }
+    }
+
+    BCMTRMUX_LOG("rx_task(%ld) - terminated\n", device);
+    bcmtr_mux_terminated[device] = BCMOS_TRUE;
+
+    return 0;
+}
+
+static bcmos_errno bcmtrmux_ib_connect(bcmolt_devid device,  bcmos_ipv4_address ip_address, uint16_t udp_port)
+{
+    bcmos_errno rc;
+
+    rc = bcmtr_ib_connect((uint8_t)device, ip_address, udp_port);
+    if (rc)
+    {
+        BCMTRMUX_LOG("%s: Failed to connect. Error %d\n", __FUNCTION__, rc);
+        return rc;
+    }
+    return rc;
+}
+
+#endif /* #ifndef IN_BAND */
+
+
+/** Initialize mux service
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtrmux_init(bcmtrmux_msg_filter_cb_t msg_filter_cb)
+{
+    static bcmos_bool initialized = BCMOS_FALSE;
+    int i, j;
+    bcmos_errno rc;
+
+    bcmtrmux_msg_filter_cb = msg_filter_cb;
+
+    BCMTRMUX_LOG("Initialising transport MUX subsystem\n");
+    if (initialized)
+    {
+        return BCM_ERR_ALREADY;
+    }
+
+    for (i=0; i<BCMTR_MAX_OLTS; i++)
+    {
+        for (j=0; j<BCMTRMUX_MAX_CHANNELS; j++)
+        {
+            bcmtrmux_rx_info_array[i][j].rx = bcmtrmux_rx_discard;
+            bcmtrmux_rx_info_array[i][j].data = &bcmtrmux_stat_array[i].rx_disc_remote;
+        }
+        bcmtrmux_rx_info_array[i][BCMTRMUX_CHANNEL_AUTO_PROXY].rx = bcmtrmux_rx_auto_proxy;
+        bcmtrmux_rx_info_array[i][BCMTRMUX_CHANNEL_AUTO_PROXY].data = NULL;
+        bcmtrmux_rx_info_array[i][BCMTRMUX_CHANNEL_DEV_CONTROL].rx = bcmtrmux_rx_local;
+        bcmtrmux_rx_info_array[i][BCMTRMUX_CHANNEL_DEV_CONTROL].data = NULL;
+        for (j=0; j<BCMTR_MAX_INSTANCES; j++)
+        {
+            bcmolt_obj_id k;
+            for (k=0; k<BCMOLT_OBJ_ID__NUM_OF; k++)
+            {
+                bcmtrmux_auto_channels[i][j][k] = BCMTRMUX_MAX_CHANNELS;
+                bcmtrmux_proxy_channels[i][j][k] = BCMTRMUX_MAX_CHANNELS;
+            }
+        }
+        bcmtrmux_local_rx_info_array[i].rx = bcmtrmux_local_rx_discard;
+        bcmtrmux_local_rx_info_array[i].data = &bcmtrmux_stat_array[i].tx_disc_local;
+    }
+
+    bcmos_fastlock_init(&bcmtrmux_lock, 0);
+
+    /*Don't initialize at this time for User Space dev ctrl,
+      don't have enough information*/
+#ifndef IN_BAND
+    rc = bcmtr_pcie_init(BCMTR_MAX_OLTS);
+    if (rc)
+    {
+        BCMOS_TRACE_RETURN(rc, "bcmtr_pcie_init() failed\n");
+    }
+
+    rc = bcmtr_swq_init();
+    if (rc)
+    {
+        BCMOS_TRACE_RETURN(rc, "bcmtr_swq_init() failed\n");
+    }
+
+    /* Register rx callback in PCIe driver */
+    bcmtr_pcie_rx_irq_cblk_register(bcmtrmux_rx_irq);
+    bcmtr_pcie_tx_irq_cblk_register(bcmtrmux_tx_irq);
+#else
+
+    rc = bcmtr_ib_init();
+    if (rc)
+    {
+        BCMOS_TRACE_RETURN(rc, "bcmtr_ib_init() failed\n");
+    }
+
+#endif /* #ifndef IN_BAND */
+
+    BCMTRMUX_LOG("Transport MUX init done\n");
+
+    return rc;
+}
+
+/** Notify mux driver that low-level transport connection is ready
+ * \returns: 0 in case of success or error code < 0
+ */
+#ifdef IN_BAND
+bcmos_errno bcmtrmux_connect(bcmolt_devid device,  bcmos_ipv4_address ip_address, uint16_t udp_port)
+#else
+bcmos_errno bcmtrmux_connect(bcmolt_devid device, uint32_t txq_size, uint32_t rxq_size)
+#endif
+{
+    static char task_name[BCMTR_MAX_OLTS][16];
+    bcmos_task_parm taskp = {};
+    bcmos_errno rc;
+
+    if (bcmtr_mux_connected[device])
+    {
+        return BCM_ERR_ALREADY;
+    }
+
+    snprintf(task_name[device], sizeof(task_name[device]), "bcmtr_rx%d", device);
+    taskp.data = (long)device;
+    taskp.name = task_name[device];
+
+#ifdef IN_BAND
+    rc = bcmtrmux_ib_connect(device, ip_address, udp_port);
+    if (rc)
+    {
+        BCMTRMUX_LOG("%s: Failed to init inband device. Error %d\n", __FUNCTION__, rc);
+        return rc;
+    }
+    taskp.handler = _bcmtrmux_ib_rx_handler;
+#else
+    rc = bcmos_sem_create(&bcmtrmux_rx_lock[device], 0, 0, NULL);
+    if (rc)
+    {
+        BCMTRMUX_LOG("%s: Failed to create rx lock. Error %d\n", __FUNCTION__, rc);
+        return rc;
+    }
+
+    /* Initialize low-level PCIe transport */
+    rc = bcmtrmux_pcie_init(device, txq_size, rxq_size);
+    if (rc)
+    {
+        bcmos_sem_destroy(&bcmtrmux_rx_lock[device]);
+        BCMTRMUX_LOG("%s: Failed to init low-level PCIe transport. Error %d\n", __FUNCTION__, rc);
+        return rc;
+    }
+    taskp.handler = _bcmtrmux_pcie_rx_handler;
+
+    rc = bcmtr_swq_device_init(device);
+    if (rc)
+    {
+        bcmos_sem_destroy(&bcmtrmux_rx_lock[device]);
+        BCMTRMUX_LOG("%s: Failed to init pcie_swq. Error %d\n", __FUNCTION__, rc);
+        return rc;
+    }
+
+#endif
+    bcmtr_mux_connected[device] = BCMOS_TRUE;
+    bcmtr_mux_terminated[device] = BCMOS_FALSE;
+
+    rc = bcmos_task_create(&bcmtrmux_rx_task[device], &taskp);
+    if (rc)
+    {
+#ifndef IN_BAND
+        bcmos_sem_destroy(&bcmtrmux_rx_lock[device]);
+#endif
+        bcmtr_mux_connected[device] = BCMOS_FALSE;
+        BCMTRMUX_LOG("%s: Failed to create rx task. Error %d\n", __FUNCTION__, rc);
+        return rc;
+    }
+
+    return BCM_ERR_OK;
+}
+
+/** Notify mux driver that low-level transport connection is disconnected
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtrmux_disconnect(bcmolt_devid device)
+{
+    if (!bcmtr_mux_connected[device])
+    {
+        return BCM_ERR_ALREADY;
+    }
+    bcmtr_mux_connected[device] = BCMOS_FALSE;
+#ifdef IN_BAND
+    bcmtr_ib_disconnect((uint8_t)device);
+#else
+    bcmos_sem_post(&bcmtrmux_rx_lock[device]);
+#endif
+    while (!bcmtr_mux_terminated[device])
+    {
+        bcmos_usleep(10000);
+    }
+    bcmos_task_destroy(&bcmtrmux_rx_task[device]);
+#ifndef IN_BAND
+    bcmos_sem_destroy(&bcmtrmux_rx_lock[device]);
+    bcmtr_swq_device_exit(device);
+    bcmtr_pcie_disconnect((uint8_t)device);
+#endif
+    return BCM_ERR_OK;
+}
+
+/** Cleanup and exit
+ */
+void bcmtrmux_exit(void)
+{
+    int i;
+
+    BCMTRMUX_LOG("Cleaning up transport MUX subsystem\n");
+#ifndef IN_BAND
+    bcmtr_swq_exit();
+    bcmtr_pcie_rx_irq_cblk_unregister();
+    bcmtr_pcie_tx_irq_cblk_unregister();
+#endif
+    /* kill receive tasks */
+    for (i=0; i<BCMTR_MAX_OLTS; i++)
+    {
+        bcmtrmux_disconnect((bcmolt_devid)i);
+    }
+#ifdef IN_BAND
+    bcmtr_ib_exit();
+#else
+    bcmtr_pcie_exit();
+#endif
+    BCMTRMUX_LOG("Transport MUX cleanup done\n");
+}
+
+/** Register PCIe channel owner */
+bcmos_errno bcmtrmux_channel_register(bcmolt_devid device, bcmtrmux_channel *channel,
+    f_bcmtr_rx_handler rx, void *data)
+{
+    bcmtrmux_channel ch;
+    long flags;
+
+    if ((unsigned)device >= BCMTR_MAX_OLTS || !channel || !rx)
+    {
+        return BCM_ERR_PARM;
+    }
+    ch = *channel;
+
+    flags = bcmos_fastlock_lock(&bcmtrmux_lock);
+
+    if (ch == BCMTRMUX_CHANNEL_AUTO_ASSIGN)
+    {
+        /* Auto-assign free channel */
+        ch = (bcmtrmux_channel)bcmtrmux_channel_get_free(device);
+        if (ch >= BCMTRMUX_MAX_CHANNELS)
+        {
+            bcmos_fastlock_unlock(&bcmtrmux_lock, flags);
+            return BCM_ERR_NORES;
+        }
+    }
+
+    /* Make sure that channel is valid and not busy */
+    if ((unsigned)ch >= BCMTRMUX_MAX_CHANNELS)
+    {
+        bcmos_fastlock_unlock(&bcmtrmux_lock, flags);
+        return BCM_ERR_PARM;
+    }
+    if (bcmtrmux_rx_info_array[device][ch].rx != bcmtrmux_rx_discard)
+    {
+        bcmos_fastlock_unlock(&bcmtrmux_lock, flags);
+        return BCM_ERR_ALREADY;
+    }
+
+    /* Assign channel */
+    bcmtrmux_rx_info_array[device][ch].rx = rx;
+    bcmtrmux_rx_info_array[device][ch].data = data;
+
+#ifndef IN_BAND
+    /* Urgent channels are not supported for IN-BAND management */
+    if (ch >= BCMTRMUX_FIRST_URGENT_CHANNEL)
+    {
+        /* We use transmit confirmation interrupt to kick transmission
+         * if PCI bus is shared between high and low-priority channels
+         */
+        if (!num_urgent_channels[device])
+            bcmtr_pcie_txint_enable(device);
+        ++num_urgent_channels[device];
+    }
+#endif
+
+    bcmos_fastlock_unlock(&bcmtrmux_lock, flags);
+
+    *channel = ch;
+
+    return BCM_ERR_OK;
+}
+
+
+/** Release PCIe channel allocated by bcmtrmux_channel_register()
+ *
+ * \param[in]   device  Maple device index
+ * \param[in]   channel
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtrmux_channel_unregister(bcmolt_devid device, bcmtrmux_channel channel)
+{
+    long flags;
+
+    if ((unsigned)device >= BCMTR_MAX_OLTS || (unsigned)channel >= BCMTRMUX_MAX_CHANNELS)
+    {
+        return BCM_ERR_PARM;
+    }
+
+    flags = bcmos_fastlock_lock(&bcmtrmux_lock);
+
+    if (bcmtrmux_rx_info_array[device][channel].rx == bcmtrmux_rx_discard)
+    {
+        bcmos_fastlock_unlock(&bcmtrmux_lock, flags);
+        return BCM_ERR_NOENT;
+    }
+
+    bcmtrmux_rx_info_array[device][channel].rx = bcmtrmux_rx_discard;
+    bcmtrmux_rx_info_array[device][channel].data = &bcmtrmux_stat_array[device].rx_disc_remote;
+
+#ifndef IN_BAND
+    /* Urgent channels are not supported for IN-BAND management */
+    if (channel >= BCMTRMUX_FIRST_URGENT_CHANNEL)
+    {
+        --num_urgent_channels[device];
+        /* If PCI bus is not shared between normal and urgent channels,
+         * transmit confirmation mechanism is not needed
+         */
+        if (!num_urgent_channels[device])
+            bcmtr_pcie_txint_disable(device);
+    }
+#endif
+
+    bcmos_fastlock_unlock(&bcmtrmux_lock, flags);
+
+    return BCM_ERR_OK;
+}
+
+/*
+ * Local termination handler
+ */
+
+/* Register local termination handler. */
+bcmos_errno bcmtrmux_local_handler_register(bcmolt_devid device, f_bcmtr_local_rx_handler rx, void *data)
+{
+    long flags;
+
+    if ((unsigned)device >= BCMTR_MAX_OLTS || !rx)
+    {
+        return BCM_ERR_PARM;
+    }
+    flags = bcmos_fastlock_lock(&bcmtrmux_lock);
+    if (bcmtrmux_local_rx_info_array[device].rx != bcmtrmux_local_rx_discard)
+    {
+        bcmos_fastlock_unlock(&bcmtrmux_lock, flags);
+        return BCM_ERR_ALREADY;
+    }
+    bcmtrmux_local_rx_info_array[device].rx = rx;
+    bcmtrmux_local_rx_info_array[device].data = data;
+    bcmos_fastlock_unlock(&bcmtrmux_lock, flags);
+    return BCM_ERR_OK;
+}
+
+
+/* Unregister local termination handler registered by bcmtrmux_local_handler_register() */
+bcmos_errno bcmtrmux_local_handler_unregister(bcmolt_devid device)
+{
+    long flags;
+
+    if ((unsigned)device >= BCMTR_MAX_OLTS)
+    {
+        return BCM_ERR_PARM;
+    }
+    flags = bcmos_fastlock_lock(&bcmtrmux_lock);
+    if (bcmtrmux_local_rx_info_array[device].rx == bcmtrmux_local_rx_discard)
+    {
+        bcmos_fastlock_unlock(&bcmtrmux_lock, flags);
+        return BCM_ERR_NOENT;
+    }
+    bcmtrmux_local_rx_info_array[device].data = &bcmtrmux_stat_array[device].tx_disc_local;
+    bcmtrmux_local_rx_info_array[device].rx = bcmtrmux_local_rx_discard;
+    bcmos_fastlock_unlock(&bcmtrmux_lock, flags);
+    return BCM_ERR_OK;
+}
+
+/* Deliver message to local destination */
+static bcmos_bool bcmtrmux_deliver_to_local(bcmolt_devid device, bcmtrmux_channel channel, bcmos_buf *buf, bcmtr_hdr *hdr)
+{
+    bcmtrmux_local_rx_info *rx_info;
+    bcmolt_msg *msg = NULL;
+    bcmolt_buf ubuf;
+    bcmos_errno err;
+
+    /* Unpack */
+    bcmolt_buf_init(&ubuf, bcmos_buf_length(buf), bcmos_buf_data(buf), BCMTR_BUF_ENDIAN);
+    bcmolt_buf_skip(&ubuf, BCMTR_HDR_SIZE);
+    err = bcmolt_msg_unpack(&ubuf, &msg);
+    bcmos_buf_free(buf);
+    if (err < 0)
+    {
+        BCMOS_TRACE_ERR("Message unpack error %s (%d)\n", bcmos_strerror(err), err);
+        ++bcmtrmux_stat_array[device].tx_disc_local;
+        return BCMOS_TRUE;
+    }
+    msg->corr_tag = hdr->corr_tag;
+    msg->subch = (bcmolt_subchannel)channel;
+    ++bcmtrmux_stat_array[device].tx_local;
+
+    rx_info = &bcmtrmux_local_rx_info_array[device];
+    rx_info->rx(device, msg, rx_info->data);
+    return BCMOS_TRUE;
+}
+
+/* send to line with repetitive attempts if pcie buffer is full */
+static void bcmtrmux_send_to_line(bcmolt_devid device, bcmtrmux_channel channel, bcmos_buf *buf)
+{
+    bcmos_errno rc;
+
+#ifdef IN_BAND
+    rc = bcmtr_ib_send((uint8_t)device, (uint8_t)channel, buf);
+#else
+    rc = bcmtr_swq_send((uint8_t)device, channel, buf);
+#endif
+    if (rc != BCM_ERR_OK)
+    {
+        /* Failed */
+        ++bcmtrmux_stat_array[device].tx_disc_remote;
+        bcmos_buf_free(buf);
+    }
+}
+
+/* Receive message from host application */
+void bcmtrmux_rx_from_host(bcmolt_devid device, bcmtrmux_channel channel, bcmos_buf *buf)
+{
+    bcmtr_hdr hdr;
+    bcmolt_obj_id obj;
+    bcmolt_mgt_group group;
+    uint16_t subgroup;
+    bcmos_errno rc;
+
+    /* Validate parameters */
+    BUG_ON((unsigned)device >= BCMTR_MAX_OLTS);
+    BUG_ON((unsigned)channel >= BCMTRMUX_MAX_CHANNELS);
+
+    /* Peek in transport header. It contains enough info to decide what to do with the message */
+    bcmtr_header_unpack(bcmos_buf_data(buf), &hdr);
+
+    rc = bcmolt_group_id_split(hdr.msg_id, &obj, &group, &subgroup);
+    if (rc)
+    {
+        BCMOS_TRACE_ERR("Can't decode group_id %u. Error %s (%d)\n", hdr.msg_id, bcmos_strerror(rc), rc);
+        ++bcmtrmux_stat_array[device].tx_disc_remote;
+        bcmos_buf_free(buf);
+        return;
+    }
+
+    /* Filter auto/proxy (un)registration.
+     * This message is terminated here.
+     */
+    if (hdr.auto_proxy_reg || hdr.auto_proxy_unreg)
+    {
+        bcmtrmux_channel *p_ch = (group == BCMOLT_MGT_GROUP_AUTO) ?
+            &bcmtrmux_auto_channels[device][hdr.instance][obj] : &bcmtrmux_proxy_channels[device][hdr.instance][obj];
+
+        bcmos_buf_free(buf);
+
+        /* Sanity check */
+        if (hdr.instance >= BCMTR_MAX_INSTANCES || obj >= BCMOLT_OBJ_ID__NUM_OF)
+        {
+            BCMOS_TRACE_ERR("Instance %u or object %d is insane\n", hdr.instance, obj);
+            return;
+        }
+
+        /* Do not override bcmolt_dev_ctrl filters */
+        if (*p_ch != BCMTRMUX_CHANNEL_DEV_CONTROL)
+        {
+            *p_ch = hdr.auto_proxy_reg ? channel : BCMTRMUX_MAX_CHANNELS;
+        }
+
+        return;
+    }
+
+    /* Filter message that should go to local destination (device control) */
+    if (bcmtrmux_msg_filter_cb && bcmtrmux_msg_filter_cb(device, obj, group, subgroup) == BCMTRMUX_DEST_LOCAL)
+    {
+        if (bcmtrmux_deliver_to_local(device, channel, buf, &hdr) == BCMOS_TRUE)
+            return;
+    }
+
+    /* Handle Remote message */
+    ++bcmtrmux_stat_array[device].tx_remote;
+    bcmtrmux_send_to_line(device, channel, buf);
+}
+
+
+/* Receive packet from the line or local control process.
+ * Parameters are expected to be checked beforehand.
+ * The function de-muxes
+ * - replies based on channel
+ * - autonomous/proxy messages based on registration info
+ */
+static void bcmtrmux_rx(bcmolt_devid device, bcmtrmux_channel channel, bcmos_buf *buf)
+{
+    bcmtrmux_rx_info *rx_info;
+    rx_info = &bcmtrmux_rx_info_array[device][channel];
+    rx_info->rx(device, buf, channel, rx_info->data);
+}
+
+
+/* Receive packet from PCIe interface */
+void bcmtrmux_rx_from_line(bcmolt_devid device, bcmtrmux_channel channel, bcmos_buf *buf)
+{
+    BUG_ON((unsigned)device >= BCMTR_MAX_OLTS);
+
+    if ((unsigned)channel >= BCMTRMUX_MAX_CHANNELS)
+    {
+        ++bcmtrmux_stat_array[device].rx_disc_inv_ch;
+        bcmos_buf_free(buf);
+        return;
+    }
+
+    ++bcmtrmux_stat_array[device].rx_remote;
+
+    bcmtrmux_rx(device, channel, buf);
+}
+
+/* Handle message received via Auto/Proxy channel */
+static void bcmtrmux_rx_auto_proxy(bcmolt_devid device, bcmos_buf *buf, bcmtrmux_channel channel, void *data)
+{
+    bcmtr_hdr hdr;
+    bcmolt_obj_id obj;
+    bcmolt_mgt_group group;
+    uint16_t subgroup;
+    bcmos_errno rc;
+
+    /* Peek in transport header. It contains enough info to decide what to do with the message */
+    bcmtr_header_unpack(bcmos_buf_data(buf), &hdr);
+
+    rc = bcmolt_group_id_split(hdr.msg_id, &obj, &group, &subgroup);
+    if (rc)
+    {
+        BCMOS_TRACE_ERR("Can't decode group_id %u. Error %s (%d)\n", hdr.msg_id, bcmos_strerror(rc), rc);
+        ++bcmtrmux_stat_array[device].rx_disc_auto;
+        bcmos_buf_free(buf);
+        return;
+    }
+
+    /* Sanity check */
+    if (hdr.instance >= BCMTR_MAX_INSTANCES || obj >= BCMOLT_OBJ_ID__NUM_OF)
+    {
+        BCMOS_TRACE_ERR("Instance %u or object %d is insane\n", hdr.instance, obj);
+        ++bcmtrmux_stat_array[device].rx_disc_auto;
+        bcmos_buf_free(buf);
+        return;
+    }
+
+    /* Dispatch based on object id */
+    /* Handle dev_ctrl intercept */
+    if (bcmtrmux_dev_ctrl_intercept[device][hdr.msg_id])
+    {
+        channel = BCMTRMUX_CHANNEL_DEV_CONTROL;
+    }
+    else
+    {
+        channel = (group == BCMOLT_MGT_GROUP_AUTO) ?
+            bcmtrmux_auto_channels[device][hdr.instance][obj] : bcmtrmux_proxy_channels[device][hdr.instance][obj];
+    }
+
+    /* If no registration - discard */
+    if (channel >= BCMTRMUX_MAX_CHANNELS)
+    {
+        ++bcmtrmux_stat_array[device].rx_disc_auto;
+        bcmos_buf_free(buf);
+        return;
+    }
+    bcmtrmux_rx(device, channel, buf);
+}
+
+/* Handle message received via DEV_CONTROL channel */
+static void bcmtrmux_rx_local(bcmolt_devid device, bcmos_buf *buf, bcmtrmux_channel channel, void *data)
+{
+    bcmtrmux_local_rx_info *rx_info;
+    bcmtr_hdr hdr;
+    bcmolt_buf ubuf;
+    bcmolt_msg *msg = NULL;
+    bcmos_errno err;
+
+    bcmtr_header_unpack(bcmos_buf_data(buf), &hdr);
+
+    bcmolt_buf_init(&ubuf, bcmos_buf_length(buf), bcmos_buf_data(buf), BCMTR_BUF_ENDIAN);
+    bcmolt_buf_skip(&ubuf, BCMTR_HDR_SIZE);
+    err = bcmolt_msg_unpack(&ubuf, &msg);
+    bcmos_buf_free(buf);
+    if (err < 0)
+    {
+        BCMOS_TRACE_ERR("Message unpack error %s (%d)\n", bcmos_strerror(err), err);
+        ++bcmtrmux_stat_array[device].rx_disc_remote;
+        return;
+    }
+
+    msg->corr_tag = hdr.corr_tag;
+    msg->subch = (bcmolt_subchannel)channel;
+    ++bcmtrmux_stat_array[device].rx_local;
+
+    rx_info = &bcmtrmux_local_rx_info_array[device];
+    rx_info->rx(device, msg, rx_info->data);
+}
+
+static bcmos_errno bcmtrmux_msg_pack(bcmolt_devid device, bcmolt_msg *msg, bcmos_buf **p_buf)
+{
+    int32_t len = bcmolt_msg_get_packed_length(msg);
+    bcmos_buf *buf;
+    bcmolt_buf ubuf;
+    bcmos_errno rc = BCM_ERR_OK;
+    bcmtr_hdr thdr = {};
+
+    if (len < 0)
+    {
+        BCMOS_TRACE_ERR("Can't calculate packet length. Error %s (%d)\n", bcmos_strerror(rc), len);
+        return BCM_ERR_PARM;
+    }
+    rc = bcmtr_header_fill(msg, &thdr);
+    if (rc)
+    {
+        BCMOS_TRACE_ERR("Can't create transport header. Error %s (%d)\n", bcmos_strerror(rc), rc);
+        return BCM_ERR_PARM;
+    }
+
+    len += BCMTR_HDR_SIZE;
+    buf = bcmos_buf_alloc(len);
+    if (!buf)
+    {
+        BCMOS_TRACE_ERR("Can't allocate packet buffer\n");
+        return BCM_ERR_NOMEM;
+    }
+    bcmolt_buf_init(&ubuf, len, bcmos_buf_data(buf), BCMTR_BUF_ENDIAN);
+    bcmolt_buf_skip(&ubuf, BCMTR_HDR_SIZE);
+
+    /* Pack transport header */
+    bcmtr_header_pack(&thdr, ubuf.start);
+
+    /* Pack message */
+    rc = bcmolt_msg_pack(msg, &ubuf);
+    if (rc)
+    {
+        BCMOS_TRACE_ERR("Message pack failed. Error %s (%d)\n", bcmos_strerror(rc), rc);
+        bcmos_buf_free(buf);
+        return BCM_ERR_PARM;
+    }
+    bcmos_buf_length_set(buf, len);
+
+    *p_buf = buf;
+
+    return BCM_ERR_OK;
+}
+
+/* Send packet from local control process to the host application */
+bcmos_errno bcmtrmux_control_to_host(bcmolt_devid device, bcmolt_msg *msg)
+{
+    bcmtrmux_channel channel = (bcmtrmux_channel)msg->subch;
+    bcmos_buf *buf;
+    bcmos_errno rc;
+
+    BUG_ON((unsigned)channel >= BCMTRMUX_MAX_CHANNELS);
+    BUG_ON((unsigned)device >= BCMTR_MAX_OLTS);
+
+    ++bcmtrmux_stat_array[device].control_to_host;
+
+    rc = bcmtrmux_msg_pack(device, msg, &buf);
+    if (rc)
+    {
+        return rc;
+    }
+    bcmtrmux_rx(device, channel, buf);
+    return BCM_ERR_OK;
+}
+
+/* Send packet from local control process to the embedded system */
+bcmos_errno bcmtrmux_control_to_line(bcmolt_devid device, bcmolt_msg *msg)
+{
+    bcmos_buf *buf;
+    bcmos_errno err;
+
+    BUG_ON((unsigned)device >= BCMTR_MAX_OLTS);
+
+    ++bcmtrmux_stat_array[device].control_to_line;
+
+    err = bcmtrmux_msg_pack(device, msg, &buf);
+    if (err)
+    {
+        return err;
+    }
+
+    bcmtrmux_send_to_line(device, BCMTRMUX_CHANNEL_DEV_CONTROL, buf);
+
+    return err;
+}
+
+/* Register message for intercept by bcmolt_dev_ctrl */
+bcmos_errno bcmtrmux_control_auto_intercept_filter(bcmolt_devid device,  bcmolt_obj_id object, uint16_t subgroup)
+{
+    bcmos_errno err;
+    bcmolt_group_id msg_id;
+
+    if ((unsigned)device >= BCMTR_MAX_OLTS)
+    {
+        return BCM_ERR_PARM;
+    }
+    err = bcmolt_group_id_combine(object, BCMOLT_MGT_GROUP_AUTO, subgroup, &msg_id);
+    if (err)
+    {
+        BCMOS_TRACE_ERR("Can't identify operation %d for object %d. Error %s (%d)\n",
+            (int)subgroup, (int)object, bcmos_strerror(err), err);
+        return err;
+    }
+    bcmtrmux_dev_ctrl_intercept[device][msg_id] = BCMOS_TRUE;
+    return BCM_ERR_OK;
+}
+
+
+/** Get transport mux statistics.
+ *
+ * \param[in]   device  Maple device index
+ * \param[out]  stat    Statistics
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtrmux_stat_get(bcmolt_devid device, bcmtrmux_stat *stat)
+{
+    if ((unsigned)device >= BCMTR_MAX_OLTS || !stat)
+    {
+        return BCM_ERR_PARM;
+    }
+    *stat = bcmtrmux_stat_array[device];
+    return BCM_ERR_OK;
+}
+
+#ifdef __KERNEL__
+
+EXPORT_SYMBOL(bcmtrmux_init);
+EXPORT_SYMBOL(bcmtrmux_connect);
+EXPORT_SYMBOL(bcmtrmux_disconnect);
+EXPORT_SYMBOL(bcmtrmux_channel_register);
+EXPORT_SYMBOL(bcmtrmux_channel_unregister);
+EXPORT_SYMBOL(bcmtrmux_local_handler_register);
+EXPORT_SYMBOL(bcmtrmux_local_handler_unregister);
+EXPORT_SYMBOL(bcmtrmux_rx_from_host);
+EXPORT_SYMBOL(bcmtrmux_rx_from_line);
+EXPORT_SYMBOL(bcmtrmux_control_to_host);
+EXPORT_SYMBOL(bcmtrmux_control_to_line);
+EXPORT_SYMBOL(bcmtrmux_control_auto_intercept_filter);
+EXPORT_SYMBOL(bcmtrmux_stat_get);
+
+#endif
diff --git a/bcm68620_release/release/host_driver/transport/mux/bcmolt_tr_mux.h b/bcm68620_release/release/host_driver/transport/mux/bcmolt_tr_mux.h
new file mode 100644
index 0000000..f837375
--- /dev/null
+++ b/bcm68620_release/release/host_driver/transport/mux/bcmolt_tr_mux.h
@@ -0,0 +1,252 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#ifndef BCMOLT_TR_MUX_H_
+#define BCMOLT_TR_MUX_H_
+
+/** \defgroup tr_mux Transport Multiplexer
+ * - PCIe channel multiplexer
+ * - locally/remotely - terminated message multiplexer
+ * - autonomous messages de-multiplexer
+ * @{
+ */
+
+#include <bcmolt_msg.h>
+#ifndef IN_BAND
+#include <bcmtr_pcie_sw_queue.h>
+#endif
+
+
+/* Message destination: local or remote */
+typedef enum
+{
+    BCMTRMUX_DEST_LOCAL,
+    BCMTRMUX_DEST_REMOTE,
+} bcmtrmux_msg_dest;
+
+typedef bcmtrmux_msg_dest (*bcmtrmux_msg_filter_cb_t)(bcmolt_devid, bcmolt_obj_id obj, bcmolt_mgt_group group, uint16_t subgroup);
+
+/** Initialize mux service
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtrmux_init(bcmtrmux_msg_filter_cb_t msg_filter_cb);
+
+/** Notify mux driver that low-level transport connection is ready
+ * \returns: 0 in case of success or error code < 0
+ */
+#ifdef IN_BAND 
+bcmos_errno bcmtrmux_connect(bcmolt_devid device,  bcmos_ipv4_address ip_address, uint16_t udp_port);
+#else
+bcmos_errno bcmtrmux_connect(bcmolt_devid device, uint32_t txq_size, uint32_t rxq_size);
+#endif
+
+/** Notify mux driver that low-level transport connection is disconnected
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtrmux_disconnect(bcmolt_devid device);
+
+/** Cleanup and exit
+ */
+void bcmtrmux_exit(void);
+
+/*
+ * PCIe channel multiplexer
+ */
+
+/** Logical channel id */
+typedef int bcmtrmux_channel;
+
+/** Mux statistics */
+typedef struct bcmtrmux_stat
+{
+    uint32_t tx_remote;         /**< Attempted transmit to device (incuding discards) */
+    uint32_t tx_local;          /**< Attempted "transmit" to device control */
+    uint32_t tx_disc_remote;    /**< Discarded when transmitting to remote device (not ready or queue overflow) */
+    uint32_t tx_disc_local;     /**< Couldn't deliver to device control. No handler */
+    uint32_t rx_remote;         /**< Received from device */
+    uint32_t rx_local;          /**< Message from the line intercepted by device control */
+    uint32_t rx_auto;           /**< Received autonomous messages */
+    uint32_t control_to_host;   /**< Sent by device control to the host */
+    uint32_t control_to_line;   /**< Sent by device control to line */
+    uint32_t rx_disc_remote;    /**< Discarded packets received from device. Can't demux channel */
+    uint32_t rx_disc_auto;      /**< Discarded autonomous messages. Can't demux auto message */
+    uint32_t rx_disc_local;     /**< Discarded packets received from device control. Can't demux channel */
+    uint32_t rx_disc_inv_ch;    /**< Discarded because channel is invalid */
+    uint32_t rx_poll_urgent;    /**< Urgent buffers counted by bcmtr_sw_queue_rx_poll() */
+    uint32_t rx_poll_normal;    /**< Normal buffers counted by bcmtr_sw_queue_rx_poll() */
+} bcmtrmux_stat;
+
+
+/** Max number of channels per device */
+#define BCMTRMUX_MAX_CHANNELS   32
+
+/** First urgent channel */
+#ifndef IN_BAND
+#define BCMTRMUX_FIRST_URGENT_CHANNEL BCMTR_SWQ_FIRST_URGENT_CHANNEL
+#if BCMTRMUX_FIRST_URGENT_CHANNEL >= BCMTRMUX_MAX_CHANNELS
+    #error BCMTRMUX_FIRST_URGENT_CHANNEL and BCMTRMUX_MAX_CHANNELS settings are inconsistent
+#endif
+
+#else
+
+#define BCMTRMUX_FIRST_URGENT_CHANNEL (BCMTRMUX_MAX_CHANNELS - 1)        /* Urgent channel is not supported for INBAND. */
+
+#endif
+
+
+/** Auto-assign channel */
+#define BCMTRMUX_CHANNEL_AUTO_ASSIGN   (-1)
+
+/** Channel id reserved for autonomous/proxy messages */
+#define BCMTRMUX_CHANNEL_AUTO_PROXY     0
+
+/** Channel id reserved for device control */
+#define BCMTRMUX_CHANNEL_DEV_CONTROL    1
+
+/** First channel id that is not reserved */
+#define BCMTRMUX_CHANNEL_FIRST_FREE     (BCMTRMUX_CHANNEL_DEV_CONTROL + 1)
+
+/** Receive message handler */
+typedef void (*f_bcmtr_rx_handler)(bcmolt_devid device, bcmos_buf *buf, bcmtrmux_channel channel, void *data);
+
+/** Local receive message handler */
+typedef void (*f_bcmtr_local_rx_handler)(bcmolt_devid device, bcmolt_msg *msg, void *data);
+
+/** Register PCIe channel owner
+ *
+ * \param[in]           device  Maple device index
+ * \param[in,out]       channel Logical PCIe channel id.
+ *                              If BCMTRMUX_CHANNEL_AUTO_ASSIGN, unused channel is allocated internally.
+ * \param[in]           rx      Receive callback that should be used for packets received over channel
+ * \param[in]           data    Data to be passed to receive callback
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtrmux_channel_register(bcmolt_devid device, bcmtrmux_channel *channel,
+    f_bcmtr_rx_handler rx, void *data);
+
+
+/** Release PCIe channel allocated by bcmtrmux_channel_register()
+ *
+ * \param[in]   device  Maple device index
+ * \param[in]   channel
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtrmux_channel_unregister(bcmolt_devid device, bcmtrmux_channel channel);
+
+
+/** Receive message from host application
+ *
+ * This function is called for messages transmitted from the host.
+ * Message can be locally or remotely terminated
+ * \param[in]   device  Maple device index
+ * \param[in]   channel Logical channel
+ * \param[in]   buf     Buffer to be transmitted
+ */
+void bcmtrmux_rx_from_host(bcmolt_devid device, bcmtrmux_channel channel, bcmos_buf *buf);
+
+/** Receive packet from PCIe interface
+ *
+ * \param[in]   device  Maple device index
+ * \param[in]   channel Logical channel
+ * \param[in]   buf     Buffer to be forwarded to application.
+ *                      It is de-allocated automatically
+ */
+void bcmtrmux_rx_from_line(bcmolt_devid device, bcmtrmux_channel channel, bcmos_buf *buf);
+
+/** Send packet from local control process to the host application
+ *
+ * \param[in]   device  Maple device index
+ * \param[in]   msg     Message to be sent to host application.
+ *                      Attention! It is responsibility of the caller to release the message
+ *                      after return from this function - if necessary.
+ *                      The reason for this is that it is expected that often msg will be allocated on stack.
+ *                      It is also responsibility of the caller to make sure that msg->subch is set correctly
+ *                      - preserved for request/response exchange
+ *                      - set = BCMTRMUX_CHANNEL_AUTO_PROXY for autonomous indications
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtrmux_control_to_host(bcmolt_devid device, bcmolt_msg *msg);
+
+/** Send packet from local control process to the embedded system
+ *
+ * \param[in]   device  Maple device index
+ * \param[in]   msg     Message to be sent to the embedded system.
+ *                      Attention! It is responsibility of the caller to release the message
+ *                      after return from this function - if necessary.
+ *                      The reason for this is that it is expected that often msg will be allocated on stack.
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtrmux_control_to_line(bcmolt_devid device, bcmolt_msg *msg);
+
+/** Register message for intercept by dev_ctrl
+ *
+ * Matched message receive from the line will be intercepted and
+ * delivered to callback registered using bcmtrmux_local_handler_register()
+ *
+ * \param[in]   device   Maple device index
+ * \param[in]   object   Object for which message is to be intercepted
+ * \param[in]   subgroup Message subgroup
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtrmux_control_auto_intercept_filter(bcmolt_devid device,  bcmolt_obj_id object, uint16_t subgroup);
+
+/*
+ * Local termination handler
+ */
+
+/** Register local termination handler.
+ *
+ * This handler is called for messages transmitted by host application
+ * that should be terminated locally by device control driver and
+ * for messages received from the line that match bcmtrmux_control_auto_intercept_filter()
+ *
+ * \param[in]   device  Maple device index
+ * \param[in]   rx      Receive callback that should be used for locally-terminated packets.
+ *                      It must release the buffer when no longer needed
+ * \param[in]   data    Data to be passed to receive callback
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtrmux_local_handler_register(bcmolt_devid device, f_bcmtr_local_rx_handler rx, void *data);
+
+/** Unregister local termination handler registered by bcmtrmux_local_handler_register()
+ *
+ * \param[in]   device  Maple device index
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtrmux_local_handler_unregister(bcmolt_devid device);
+
+/** Get transport mux statistics.
+ *
+ * \param[in]   device  Maple device index
+ * \param[out]  stat    Statistics
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtrmux_stat_get(bcmolt_devid device, bcmtrmux_stat *stat);
+
+#endif
diff --git a/bcm68620_release/release/host_driver/transport/mux/daemon/Makefile b/bcm68620_release/release/host_driver/transport/mux/daemon/Makefile
new file mode 100644
index 0000000..f3f9fc3
--- /dev/null
+++ b/bcm68620_release/release/host_driver/transport/mux/daemon/Makefile
@@ -0,0 +1,27 @@
+# In Band transport
+# Consists of 2 components
+# - low-level driver (send/rx functions)
+# - multiplexer
+#
+ifneq ("$(SIMULATION_BUILD)", "y")
+MOD_NAME = trmux_daemon
+
+MOD_DEPS = transport model trmux inband_driver
+
+MOD_DEFS += -DIN_BAND
+
+ifeq ("$(RELEASE_BUILD)", "y")
+    MOD_DEPS += common_api
+else
+    MOD_DEPS += api
+endif
+
+MOD_TYPE = lib
+
+srcs = ../bcmolt_tr_mux.c 
+
+USE_LINT = yes
+
+endif
+
+
diff --git a/bcm68620_release/release/host_driver/transport/pcie_sw_queue/Makefile b/bcm68620_release/release/host_driver/transport/pcie_sw_queue/Makefile
new file mode 100644
index 0000000..1e36d57
--- /dev/null
+++ b/bcm68620_release/release/host_driver/transport/pcie_sw_queue/Makefile
@@ -0,0 +1,21 @@
+# PCIe Software Queue driver
+# - Software layer on top of low level PCIe driver that adds support
+#   for s/w queue and priority
+#
+MOD_NAME = pcie_sw_queue
+
+MOD_DEPS = pcie
+
+ifeq ("$(OS_KERNEL)", "linux")
+MOD_TYPE = linux_lib
+else
+MOD_TYPE = lib
+endif
+
+ifneq ("$(RAW_TRANSPORT_VIA_UDP)", "y")
+    srcs = bcmtr_pcie_sw_queue.c
+endif
+
+USE_LINT = yes
+
+
diff --git a/bcm68620_release/release/host_driver/transport/pcie_sw_queue/bcmtr_pcie_sw_queue.c b/bcm68620_release/release/host_driver/transport/pcie_sw_queue/bcmtr_pcie_sw_queue.c
new file mode 100644
index 0000000..624101e
--- /dev/null
+++ b/bcm68620_release/release/host_driver/transport/pcie_sw_queue/bcmtr_pcie_sw_queue.c
@@ -0,0 +1,389 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+#include <bcmtr_pcie.h>
+#include <bcmolt_tr_pcie_specific.h>
+#include "bcmtr_pcie_sw_queue.h"
+
+/*
+ * bcm_pcie_sw_queue.c
+ * Software layer on top of low level PCIe driver that adds support
+ * for s/w queue and priority
+ */
+typedef struct
+{
+    bcmos_buf_queue txq;           /* Transmit queue */
+    bcmos_buf_queue rxq;           /* Receive queue */
+    uint32_t max_hwq_size;
+    uint32_t max_swq_size;
+    bcmtr_swq_rx_cb rx_cb;         /* Optional rx_cb for callback-based RX buffer delivery */
+} pcie_swq;
+
+static pcie_swq swq_info[BCMTR_MAX_OLTS][BCMTR_PCIE_PRTY__NUM_OF];
+static uint32_t hwq_occupancy[BCMTR_MAX_OLTS];  /* Number of unacknowledged buffers in hw tx queue */
+static bcmos_bool swq_initialized[BCMTR_MAX_OLTS];
+static bcmos_fastlock tx_lock[BCMTR_MAX_OLTS];
+static bcmos_fastlock rx_lock[BCMTR_MAX_OLTS];
+
+#define BCMTR_SWQ_GET_RETURN_IF_ERROR(device,prty,swq)   \
+    do {                                        \
+        if (device >= BCMTR_MAX_OLTS)           \
+            return BCM_ERR_PARM;                \
+        swq = &swq_info[device][prty];          \
+    } while (0)
+
+static inline long _bcmtr_swq_tx_lock(uint8_t device)
+{
+    return bcmos_fastlock_lock(&tx_lock[device]);
+}
+
+static inline void _bcmtr_swq_tx_unlock(uint8_t device, long flags)
+{
+    bcmos_fastlock_unlock(&tx_lock[device], flags);
+}
+
+static inline long _bcmtr_swq_rx_lock(uint8_t device)
+{
+    return bcmos_fastlock_lock(&rx_lock[device]);
+}
+
+static inline void _bcmtr_swq_rx_unlock(uint8_t device, long flags)
+{
+    bcmos_fastlock_unlock(&rx_lock[device], flags);
+}
+
+/** Tx done callback.
+ * Must be called under tx_lock
+ */
+static void _bcmtr_swq_tx_done_cb(uint8_t device, bcmos_buf *buf)
+{
+    BUG_ON(!hwq_occupancy[device]);
+    --hwq_occupancy[device];
+    bcmos_buf_free(buf);
+}
+
+/* Initialize PCI software queue module */
+bcmos_errno bcmtr_swq_init(void)
+{
+    return bcmtr_pcie_tx_done_cblk_register(_bcmtr_swq_tx_done_cb);
+}
+
+/* Cleanup software queue module
+ */
+void bcmtr_swq_exit(void)
+{
+    int i;
+
+    /* Unregister from bcmtr_pcie driver */
+    bcmtr_pcie_tx_done_cblk_unregister();
+
+    for (i = 0; i < BCMTR_MAX_OLTS; i++)
+        bcmtr_swq_device_exit(i);
+}
+
+/* Initialize PCI software queue module */
+bcmos_errno bcmtr_swq_device_init(uint8_t device)
+{
+    bcmtr_pcie_prty prty;
+
+    if (device >= BCMTR_MAX_OLTS)
+        return BCM_ERR_PARM;
+
+    if (swq_initialized[device])
+        return BCM_ERR_ALREADY;
+
+    bcmos_fastlock_init(&tx_lock[device], 0);
+    bcmos_fastlock_init(&rx_lock[device], 0);
+    for (prty = 0; prty < BCMTR_PCIE_PRTY__NUM_OF; prty++)
+    {
+        pcie_swq *swq = &swq_info[device][prty];
+        bcmos_buf_queue_init(&swq->txq);
+        bcmos_buf_queue_init(&swq->rxq);
+        swq->rx_cb = NULL;
+        swq->max_hwq_size = swq->max_swq_size = 0;
+    }
+    swq_initialized[device] = BCMOS_TRUE;
+
+    return BCM_ERR_OK;
+}
+
+/* Cleanup software queue module */
+void bcmtr_swq_device_exit(uint8_t device)
+{
+    bcmtr_pcie_prty prty;
+
+    if (!swq_initialized[device])
+        return;
+
+    for (prty = 0; prty < BCMTR_PCIE_PRTY__NUM_OF; prty++)
+    {
+        pcie_swq *swq = &swq_info[device][prty];
+        bcmos_buf *buf;
+
+        while ((buf=bcmos_buf_queue_get(&swq->txq)))
+            bcmos_buf_free(buf);
+        while ((buf=bcmos_buf_queue_get(&swq->rxq)))
+            bcmos_buf_free(buf);
+    }
+    swq_initialized[device] = BCMOS_FALSE;
+
+    return;
+}
+
+/** Send buffer to the peer
+ * \param[in]   device    Maple device index
+ * \param[in]   channel   Channel id (opaque to the bcmtr_pcie driver)
+ * \param[in]   buf       Buffer to be transferred
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtr_swq_send(uint8_t device, uint8_t channel, bcmos_buf *buf)
+{
+    bcmtr_pcie_prty prty = (channel >= BCMTR_SWQ_FIRST_URGENT_CHANNEL) ?
+        BCMTR_PCIE_PRTY_URGENT : BCMTR_PCIE_PRTY_NORMAL;
+    pcie_swq *swq;
+    bcmos_bool was_empty;
+    bcmos_bool hw_queue_full;
+    bcmos_errno err;
+    long flags;
+
+    BCMTR_SWQ_GET_RETURN_IF_ERROR(device, prty, swq);
+
+    /* Store channel in the buffer */
+    bcmos_buf_channel_set(buf, channel);
+
+    /* Prevent concurrent access to the queue */
+    flags = _bcmtr_swq_tx_lock(device);
+
+    /* Store q-was-empty status */
+    was_empty = bcmos_buf_queue_is_empty(&swq->txq);
+
+    /* Check if max h/w queue occupancy isn't exceeded. If it isn't and s/w queue is empty
+     * submit directly to the h/w queue.
+     */
+    hw_queue_full = (swq->max_hwq_size && hwq_occupancy[device] >= swq->max_hwq_size);
+    if (was_empty && !hw_queue_full)
+    {
+        ++hwq_occupancy[device];
+        _bcmtr_swq_tx_unlock(device, flags);
+        err = bcmtr_pcie_send(device, channel, buf);
+        if (err)
+        {
+            flags = _bcmtr_swq_tx_lock(device);
+            --hwq_occupancy[device];
+            /* If sw q is enabled, enque the buffer, otherwise, just return */
+            if (swq->max_swq_size || swq->max_hwq_size)
+            {
+                bcmos_buf_queue_put(&swq->txq, buf);
+                err = BCM_ERR_OK;
+            }
+            _bcmtr_swq_tx_unlock(device, flags);
+        }
+    }
+    else
+    {
+        bcmos_buf_queue_put(&swq->txq, buf);
+        _bcmtr_swq_tx_unlock(device, flags);
+        err = BCM_ERR_OK;
+    }
+
+
+    return err;
+}
+
+/** Receive packet from device
+ * \param[in]   device          Maple device index
+ * \param[in]   prty            Priority
+ * \param[out]  channel         message channel from the BD
+ * \param[out]  buf  pointer to network buffer containing the
+ *       received packet
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtr_swq_receive(uint8_t device, bcmtr_pcie_prty prty, uint8_t *channel, bcmos_buf **buf)
+{
+    pcie_swq *swq;
+    long flags;
+    bcmos_errno err;
+
+    BCMTR_SWQ_GET_RETURN_IF_ERROR(device, prty, swq);
+
+    /* Peevent concurent access to the queue */
+    flags = _bcmtr_swq_rx_lock(device);
+    *buf = bcmos_buf_queue_get(&swq->rxq);
+    if (*buf)
+    {
+        *channel = bcmos_buf_channel(*buf);
+        err = BCM_ERR_OK;
+    }
+    else
+    {
+        err = BCM_ERR_QUEUE_EMPTY;
+    }
+    _bcmtr_swq_rx_unlock(device, flags);
+
+    return err;
+}
+
+/** Configure TX queue.
+ */
+bcmos_errno bcmtr_swq_tx_queue_cfg(uint8_t device, bcmtr_pcie_prty prty, uint32_t hardq_size, uint32_t softq_size)
+{
+    pcie_swq *swq;
+
+    BCMTR_SWQ_GET_RETURN_IF_ERROR(device, prty, swq);
+
+    swq->max_hwq_size = hardq_size;
+    swq->max_swq_size = softq_size;
+
+    return BCM_ERR_OK;
+}
+
+/** Register for "data received indication"
+ * \param[in]   device          Maple device index
+ * \param[in]   prty            Priority
+ * \param[in]   cb              Callback pointer
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtr_swq_rx_cb_register(uint8_t device, bcmtr_pcie_prty prty, bcmtr_swq_rx_cb rx_cb)
+{
+    if (device >= BCMTR_MAX_OLTS)
+        return BCM_ERR_PARM;
+    swq_info[device][prty].rx_cb = rx_cb;
+
+    return BCM_ERR_OK;
+}
+
+/** Unregister "data received indication" callback
+ * \param[in]   device          Maple device index
+ * \param[in]   prty            Priority
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtr_swq_rx_cb_unregister(uint8_t device, bcmtr_pcie_prty prty)
+{
+    if (device >= BCMTR_MAX_OLTS)
+        return BCM_ERR_PARM;
+    swq_info[device][prty].rx_cb = NULL;
+
+    return BCM_ERR_OK;
+}
+
+/* Fetch data from the hw to the sw queue. */
+void bcmtr_swq_rx_poll(uint8_t device, uint32_t nbuf[])
+{
+    uint8_t channel;
+    bcmos_buf *buf;
+    int n[BCMTR_PCIE_PRTY__NUM_OF] = {};
+    long flags;
+    bcmos_errno err;
+
+    do
+    {
+        bcmtr_pcie_prty prty;
+        pcie_swq *swq;
+
+        err = bcmtr_pcie_receive(device, &channel, &buf);
+        if (err != BCM_ERR_OK)
+            break;
+        prty = (channel >= BCMTR_SWQ_FIRST_URGENT_CHANNEL) ?
+            BCMTR_PCIE_PRTY_URGENT : BCMTR_PCIE_PRTY_NORMAL;
+        /* If callback based delivery - deliver buffer now, otherwise, place on s/w queue */
+        swq = &swq_info[device][prty];
+        if (swq->rx_cb)
+        {
+            swq->rx_cb(device, channel, buf);
+        }
+        else
+        {
+            bcmos_buf_channel_set(buf, channel);
+            flags = _bcmtr_swq_rx_lock(device);
+            bcmos_buf_queue_put(&swq->rxq, buf);
+            _bcmtr_swq_rx_unlock(device, flags);
+        }
+        ++n[prty];
+    } while (BCMOS_TRUE);
+
+
+    nbuf[0] = n[0];
+    nbuf[1] = n[1];
+}
+
+/* Submit data from the sw TX queue to the h/w */
+static void _bcmtr_swq_tx_submit_prty(uint8_t device, bcmtr_pcie_prty prty)
+{
+    bcmos_errno err = BCM_ERR_OK;
+    pcie_swq *swq;
+    bcmos_buf *buf;
+    uint8_t channel;
+    bcmos_bool hw_queue_full;
+    long flags;
+
+    swq = &swq_info[device][prty];
+    do
+    {
+        flags = _bcmtr_swq_tx_lock(device);
+
+        /* Check if not over limit */
+        hw_queue_full = (swq->max_hwq_size && hwq_occupancy[device] >= swq->max_hwq_size);
+        if (hw_queue_full)
+        {
+            _bcmtr_swq_tx_unlock(device, flags);
+            break;
+        }
+
+        /* Get from s/w queue and submit to the h/w queue */
+        buf = bcmos_buf_queue_peek(&swq->rxq);
+        _bcmtr_swq_tx_unlock(device, flags);
+        if (!buf)
+            break;
+
+        channel = bcmos_buf_channel(buf);
+        err = bcmtr_pcie_send(device, channel, buf);
+        if (err != BCM_ERR_OK)
+            break;
+
+        flags = _bcmtr_swq_tx_lock(device);
+        ++hwq_occupancy[device];
+        bcmos_buf_queue_get(&swq->txq);
+        _bcmtr_swq_tx_unlock(device, flags);
+
+    } while (BCMOS_TRUE);
+}
+
+/* Submit data from the sw TX queue to the h/w */
+void bcmtr_swq_tx_submit(uint8_t device)
+{
+    if (bcmtr_pcie_tx_collect(device) > 0)
+    {
+        _bcmtr_swq_tx_submit_prty(device, BCMTR_PCIE_PRTY_URGENT);
+        _bcmtr_swq_tx_submit_prty(device, BCMTR_PCIE_PRTY_NORMAL);
+    }
+}
+
+#ifdef __KERNEL__
+EXPORT_SYMBOL(bcmtr_swq_tx_queue_cfg);
+EXPORT_SYMBOL(bcmtr_swq_send);
+#endif
diff --git a/bcm68620_release/release/host_driver/transport/pcie_sw_queue/bcmtr_pcie_sw_queue.h b/bcm68620_release/release/host_driver/transport/pcie_sw_queue/bcmtr_pcie_sw_queue.h
new file mode 100644
index 0000000..1cf6c23
--- /dev/null
+++ b/bcm68620_release/release/host_driver/transport/pcie_sw_queue/bcmtr_pcie_sw_queue.h
@@ -0,0 +1,115 @@
+/*
+ * bcm_pcie_sw_queue.h
+ *
+ *  Created on: 31 Jan 2017
+ *      Author: igort
+ */
+
+#ifndef _BCM_PCIE_SW_QUEUE_H_
+#define _BCM_PCIE_SW_QUEUE_H_
+
+#include <bcmos_system.h>
+#include <bcmtr_pcie.h>
+
+/* Message priority */
+typedef enum
+{
+    BCMTR_PCIE_PRTY_URGENT = 0,
+    BCMTR_PCIE_PRTY_NORMAL = 1,
+
+    BCMTR_PCIE_PRTY__NUM_OF
+} bcmtr_pcie_prty;
+
+/* First urgent channel id */
+#define BCMTR_SWQ_FIRST_URGENT_CHANNEL     30
+
+/** Initialize PCI software queue module
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtr_swq_init(void);
+
+/* Cleanup software queue module
+ */
+void bcmtr_swq_exit(void);
+
+/** Initialize PCI software queue module for a device
+ * \param[in]   device    Maple device index
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtr_swq_device_init(uint8_t device);
+
+/* Cleanup software queue module for a device
+ * \param[in]   device    Maple device index
+ */
+void bcmtr_swq_device_exit(uint8_t device);
+
+/** Configure TX queue.
+ * \param[in]   device      Maple device index
+ * \param[in]   prty        Priority
+ * \param[in]   hardq_size  Max number of buffers that can be submitted to the h/w queue.
+ *              0=unlimited.
+ * \param[in]   softq_size  Max number of buffers to be queued. 0=unlimited.
+ * \returns: 0 in case of success or error code < 0
+ * BCM_ERR_OVERFLOW - max_softq_size buffer is waiting to be handling by the receiver
+ */
+bcmos_errno bcmtr_swq_tx_queue_cfg(uint8_t device, bcmtr_pcie_prty prty, uint32_t hardq_size, uint32_t softq_size);
+
+/** Send buffer to the peer
+ * \param[in]   device    Maple device index
+ * \param[in]   prty      Priority
+ * \param[in]   channel   Channel id
+ * \param[in]   buf       Buffer to be transferred
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtr_swq_send(uint8_t device, uint8_t channel, bcmos_buf *buf);
+
+/** Receive packet from device
+ * \param[in]   device          Maple device index
+ * \param[in]   prty            Priority
+ * \param[out]  channel         message channel from the BD
+ * \param[out]  buf  pointer to network buffer containing the
+ *       received packet
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtr_swq_receive(uint8_t device, bcmtr_pcie_prty prty, uint8_t *channel, bcmos_buf **buf);
+
+/** data_received callback enables callback-based receive buffer delivery
+ * instead of / in addition to bcmtr_swq_receive() function.
+ * This callback takes buffer ownership
+ */
+typedef void (*bcmtr_swq_rx_cb)(uint8_t device, uint8_t channel, bcmos_buf *buf);
+
+/** Register for "data received" indication"
+ * \param[in]   device          Maple device index
+ * \param[in]   prty            Priority
+ * \param[in]   cb              Callback pointer
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtr_swq_rx_cb_register(uint8_t device, bcmtr_pcie_prty prty, bcmtr_swq_rx_cb rx_cb);
+
+/** Unregister "data received indication" callback
+ * \param[in]   device          Maple device index
+ * \param[in]   prty            Priority
+ * \returns: 0 in case of success or error code < 0
+ */
+bcmos_errno bcmtr_swq_rx_cb_unregister(uint8_t device, bcmtr_pcie_prty prty);
+
+/** Fetch data from the hw to the sw queue.
+ *
+ * It is expected that this function should be triggered by RX interrupt
+ *
+ * \param[in]   device          Maple device index
+ * \param[out]  nbuf            Per priority array with number of buffers
+ */
+void bcmtr_swq_rx_poll(uint8_t device, uint32_t nbuf[]);
+
+/** Submit data from the sw TX queue to the h/w
+ *
+ * It is expected that this function should be triggered by TX
+ * completion interrupt
+ *
+ * \param[in]   device          Maple device index
+ */
+void bcmtr_swq_tx_submit(uint8_t device);
+
+#endif /* _BCM_PCIE_SW_QUEUE_H_ */
diff --git a/bcm68620_release/release/host_driver/utils/Makefile b/bcm68620_release/release/host_driver/utils/Makefile
new file mode 100644
index 0000000..9c905ec
--- /dev/null
+++ b/bcm68620_release/release/host_driver/utils/Makefile
@@ -0,0 +1,8 @@
+# Common utilities
+#
+MOD_NAME = utils
+MOD_TYPE = lib
+ifeq ("$(OS_KERNEL)", "linux")
+    MOD_DEPS = utils_linux
+endif
+srcs = bcmolt_utils.c bcmolt_buf.c bcmolt_bit_utils.c bcmolt_conv.c bcmolt_string.c
diff --git a/bcm68620_release/release/host_driver/utils/bcmolt_bit_utils.c b/bcm68620_release/release/host_driver/utils/bcmolt_bit_utils.c
new file mode 100644
index 0000000..130c07e
--- /dev/null
+++ b/bcm68620_release/release/host_driver/utils/bcmolt_bit_utils.c
@@ -0,0 +1,370 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+
+#include "bcmos_system.h"
+#include "math.h"
+#include "bcmolt_bit_utils.h"
+
+
+/** dynamically allocate space for an array of `nbits' bits and initalize
+ *  the bits to all be zero.
+ *
+ * \param[out]  bv      pointer to a bit_vector struct.
+ * \param[in]   nbits   number of bits to allocate.
+ * \return      FALSE if space was not available, otherwise TRUE.
+ */
+bcmos_bool bcmolt_bv_new(bit_vector *bv, const uint32_t nbits)
+{
+    uint32_t nwords = BCMOS_DIVIDE_ROUND_UP(nbits, (BITS_SZ));
+
+    bv->nbits  = nbits;
+    bv->vector = (bv_bits *)calloc(nwords, sizeof(bv_bits));
+    return (bv->vector != NULL);
+}
+
+
+/** return the value of the `offset'th bit element of the bit vector.
+ *
+ * \param[in]   bv      pointer to a bit_vector struct.
+ * \param[in]   offset  offset of bit to test.
+ * \return      FALSE if the bit offset is out of range, otherwise TRUE.
+ */
+bcmos_bool bcmolt_bv_get(const bit_vector *bv, const uint32_t offset)
+{
+    bcmos_bool    rv = BCMOS_FALSE;
+
+    if (offset <= bv->nbits)
+    {
+        rv = test_bits_set(bv->vector[(offset / BITS_SZ)],
+                           (1 << (offset % BITS_SZ)));
+    }
+    else
+    {
+        BCMOS_TRACE_ERR("out of range %u\n", offset);
+    }
+    return rv;
+}
+
+
+/** set or clear the bit in position `offset' of the bit vector.
+ *  bv->vector[bit_pos] is to be set (assigned to 1) if value is TRUE,
+ *  otherwise it is to be cleared (assigned to 0).
+ *
+ * \param[in]   bv      pointer to a bit_vector struct.
+ * \param[in]   offset  offset of bit to set or clear.
+ * \param[in]   value   boolean value. TRUE for set, BCMOS_FALSE for clear.
+ * \return      FALSE if the bit offset is out of range, otherwise TRUE.
+ */
+void bcmolt_bv_assign(bit_vector       *bv,
+                      const uint32_t    offset,
+                      const bcmos_bool  value)
+{
+    if (offset <= bv->nbits)
+    {
+        if (value)
+        {
+            bv->vector[offset / BITS_SZ] |= (1 << (offset % BITS_SZ));
+        }
+        else
+        {
+            bv->vector[offset / BITS_SZ] &= ~(1 << (offset % BITS_SZ));
+        }
+    }
+    else
+    {
+        BCMOS_TRACE_ERR("out of range %u\n", offset);
+    }
+}
+
+
+/** toggle the bit in position `offset' of the bit vector.
+ *  i.e. if it was 1 it is 0; if it was 0 it is 1.
+ *
+ * \param[in]   bv      pointer to a bit_vector struct.
+ * \param[in]   offset  offset of bit to toggle.
+ * \return      FALSE if the bit offset is out of range, otherwise TRUE.
+ */
+void bcmolt_bv_toggle(bit_vector *bv, const uint32_t offset)
+{
+    if (offset <= bv->nbits)
+    {
+        bv->vector[offset / BITS_SZ] ^= (1 << (offset % BITS_SZ));
+    }
+    else
+    {
+        BCMOS_TRACE_ERR("out of range %u\n", offset);
+    }
+}
+
+
+/** copy bit vector from 'src' to 'dst'.
+ *
+ * \param[out]  dst     pointer to a bit_vector struct to copy to.
+ * \param[in]   src     pointer to a bit_vector struct to copy from.
+ * \param[in]   nbits   number of bits to copy.
+ * \return      none.
+ */
+void bcmolt_bv_copy(bit_vector        *dst, 
+                    const bit_vector  *src, 
+                    const uint32_t     nbits)
+{
+    uint32_t  i;
+    uint32_t  nwords    = nbits / BITS_SZ;
+    bv_bits   bit_remainder = nbits % BITS_SZ;
+
+    if ((nbits <= dst->nbits) && (nbits <= src->nbits))
+    {
+        for (i = 0; i < nwords; i++)
+        {
+            dst->vector[i] = src->vector[i];
+        }
+
+        if (0 != bit_remainder)
+        {
+            dst->vector[nwords] = (dst->vector[nwords] & ~((2^bit_remainder) - 1)) |
+                (src->vector[nwords] & ((2^bit_remainder) - 1));
+        }
+    }
+    else
+    {
+        BCMOS_TRACE_ERR("out of range %u\n", nbits);
+    }
+}
+
+
+/** Print bit pattern of word FORMATTED to string.
+ *
+ * \param[in]   value   value to transform to bit string.
+ * \param[in]   bitcnt  count of bits to be shown.
+ * \param[out]  outstr  pointer to a output buffer to store the string.
+ * \return      none
+ * \warning     this fn doesn't check the size of 'outstr'.
+ *              the caller should ensure 'outstr' has enough room for the
+ *              bit string, space characters and null terminator.
+ */
+void bcmolt_bit_string(const bv_bits value, const uint32_t bitcnt, char *outstr)
+{
+    uint32_t  offset;
+
+    if (bitcnt <= BITS_SZ)
+    {
+        for (offset = 0; offset < bitcnt; offset++)
+        {
+            *outstr++ = ((value >> offset) & 1) + '0';
+            if ((((offset + 1) % 4) == 0))
+            {
+                *outstr++ = ' ';
+            }
+        }
+    }
+
+    *outstr = '\0';
+}
+
+
+/** Print all bits in the bit vector.
+ *
+ * \param[in]   bv      pointer to a bit_vector struct.
+ * \return      none.
+ */
+void bcmolt_bv_dump(const bit_vector *bv)
+{
+    uint32_t  idx;                        /* word idx */
+    char      outstr[BITS_SZ + 8 + 1];    /* 8 spaces + null */
+
+    for (idx = 0; idx < (bv->nbits / BITS_SZ); idx++)
+    {
+        bcmolt_bit_string(bv->vector[idx], BITS_SZ, outstr);
+        bcmos_printf("%s\n", outstr);
+    }
+
+    if (0 != (bv->nbits % BITS_SZ))
+    {
+        bcmolt_bit_string(bv->vector[idx], (bv->nbits % BITS_SZ), outstr);
+        bcmos_printf("%s\n", outstr);
+    }
+}
+
+
+/** Count the number of bits set in a long integer.
+ *
+ * \param[in]   num     integer value.
+ * \return      number of bits set.
+ */
+uint32_t bcmolt_bit_count(uint32_t num)
+{
+    num = ((num & 0xAAAAAAAAL) >>  1) + (num & 0x55555555L);
+    num = ((num & 0xCCCCCCCCL) >>  2) + (num & 0x33333333L);
+    num = ((num & 0xF0F0F0F0L) >>  4) + (num & 0x0F0F0F0FL);
+    num = ((num & 0xFF00FF00L) >>  8) + (num & 0x00FF00FFL);
+    num = ((num & 0xFFFF0000L) >> 16) + (num & 0x0000FFFFL);
+    return num;
+}
+
+
+/** Count the number of bits set in the whole bit vector.
+ *
+ * \param[in]   bv      pointer to the bit vector struct.
+ * \return      number of bits set.
+ */
+uint32_t bcmolt_bv_bit_count(const bit_vector *bv)
+{
+    uint32_t  nwords = BCMOS_DIVIDE_ROUND_UP(bv->nbits, (BITS_SZ));
+    uint32_t  cnt = 0;
+
+    while (0 != nwords--)
+    {
+        cnt += bcmolt_bit_count(bv->vector[nwords]);
+    }
+
+    return cnt;
+}
+
+
+
+/** Copy bit range from a 32-bit word array to an arbitrary bit position of
+ *  the destination 32-bit word array.
+ *
+ * \param[in]   dst             destination buffer
+ * \param[in]   dst_bytes       destination buffer size in bytes
+ * \param[in]   dst_bit_pos     least bit position to dest
+ * \param[in]   src             source buffer
+ * \param[in]   n_bits          how many bits to copy from source
+ * \note        src is in little endian and dst is in big endian.
+ */
+void bcmos_bit_range_set(uint32_t *dst, uint32_t dst_bytes, uint16_t dst_bit_pos,
+                         uint32_t *src, uint16_t n_bits)
+{
+    uint16_t    bp = dst_bit_pos;
+    uint16_t    len;
+    uint32_t    wp;
+    uint32_t    mask;
+    uint32_t    src_idx;
+    uint32_t    dst_idx;
+
+    wp = bp / 32;
+    bp = bp & (32 - 1);
+    src_idx = 0;
+
+    for (len = n_bits; len > 0; len -= 32)
+    {
+        if (bp != 0)
+        {
+            mask = (len < 32) ? (1 << len) - 1 : 0xFFFFFFFF;
+            dst_idx = wp;
+            dst[dst_idx] &= ~(mask << bp);
+            dst[dst_idx] |= src[src_idx] << bp;
+            wp++;
+            if (len > (32 - bp))
+            {
+                dst_idx = wp;
+                dst[dst_idx] &= ~(mask >> (32 - bp));
+                dst[dst_idx] |= src[src_idx] >> (32 - bp) & ((1 << bp) - 1);
+            }
+        }
+        else
+        {
+            dst_idx = wp;
+            if (len < 32)
+            {
+                mask = (1 << len) - 1;
+                dst[dst_idx] &= ~mask;
+                dst[dst_idx] |= src[src_idx] << bp;
+            }
+            else
+            {
+                dst[dst_idx] = src[src_idx];
+            }
+            wp++;
+        }
+        src_idx++;
+    }
+}
+
+
+/** Get bit range at an arbitrary bit position of a 32-bit word array
+ * 
+ * \param[in]   src             source buffer (e.g. dataport)
+ * \param[in]   src_bytes       source buffer size in bytes
+ * \param[in]   src_bit_pos     least bit position of the source
+ * \param[in]   dst             destination buffer to store the bit value
+ * \param[in]   n_bits          how many bits to copy from srouce
+ * \note        src is in big endian and dst is in little endian.
+ */
+void bcmos_bit_range_get(const uint32_t *src, uint32_t src_bytes,
+                         uint16_t src_bit_pos, uint32_t *dst, uint16_t n_bits)
+{
+    uint16_t    bp = src_bit_pos;   /* for readability */
+    uint16_t    len = n_bits;
+    uint32_t    wp;
+    uint32_t    src_idx;
+    uint32_t    dst_idx;
+
+    if (n_bits == 1)
+    {
+        wp = bp / 32;
+        bp = bp & (32 - 1);
+        src_idx = BCMOS_DIVIDE_ROUND_UP(src_bytes, 4) - 1 - wp;
+        dst[0] = ((src[src_idx] & (1 << bp)) != 0) ? 1: 0;
+        return;
+    }
+
+    wp = bp / 32;
+    bp = bp & (32 - 1);
+    dst_idx = 0;
+
+    for (; len > 0; len -= 32)
+    {
+        if (bp != 0)
+        {
+            src_idx = BCMOS_DIVIDE_ROUND_UP(src_bytes, 4) - 1 - wp;
+            dst[dst_idx] = src[src_idx] >> bp & ((1 << (32 - bp)) - 1);
+            wp++;
+            if (len > (32 - bp))
+            {
+                src_idx = BCMOS_DIVIDE_ROUND_UP(src_bytes, 4) - 1 - wp;
+                dst[dst_idx] |= src[src_idx] << (32 - bp);
+            }
+        }
+        else
+        {
+            src_idx = BCMOS_DIVIDE_ROUND_UP(src_bytes, 4) - 1 - wp;
+            dst[dst_idx] = src[src_idx];
+            wp++;
+        }
+
+        if (len < 32)
+        {
+            dst[dst_idx] &= ((1 << len) - 1);
+        }
+        dst_idx++;
+    }
+}
+
diff --git a/bcm68620_release/release/host_driver/utils/bcmolt_bit_utils.h b/bcm68620_release/release/host_driver/utils/bcmolt_bit_utils.h
new file mode 100644
index 0000000..9971292
--- /dev/null
+++ b/bcm68620_release/release/host_driver/utils/bcmolt_bit_utils.h
@@ -0,0 +1,242 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+/**
+ * bcmolt_bit_utils.h
+ *  Created on: 03/10/2014
+ *      Author: cpark1
+ *
+ * This bit vector implementation is used for the EPON encryption.
+ * There is a certain hardware restriction that the global encryption mode
+ * can not be changed when a link encryption is configured for a different
+ * encryption mode.
+ * Likewise, the link encryption mode can not be changed if the global
+ * encryption mode is set to other mode.
+ * Therefore, when the host tries to change any of them, the OLT needs to
+ * check either the global encryption mode or the link encryption mode
+ * before applying the change.
+ * In the old implementation (like Pioneer), the firmware iterates through
+ * every link records of each PON port and check the encryption mode of each.
+ * This is very inefficient and time consuming.
+ * The host may want to know how many links are enabled for the encryption,
+ * or which link is enabled, etc.
+ * I thought that a bit vector implementation is best satisfies.
+ * Also, this implementation exactly reflects the IC implementation, so we
+ * can use it to mirror the hardware status.
+ *
+ */
+
+#ifndef BCMOLT_BIT_UTILS_H
+#define BCMOLT_BIT_UTILS_H
+
+
+#include "bcmos_system.h"
+
+
+/* the current (draft) design of the ASIC uses 32-bit bitmap data port */
+typedef uint32_t    bv_bits;
+
+typedef struct
+{
+    uint32_t  nbits;
+    bv_bits  *vector;
+} bit_vector;
+
+
+#define BITS_SZ     (sizeof(bv_bits) * CHAR_BIT)
+
+#define BITS_SET(val, mask) (((val) & (mask)) == (mask))
+
+/** Test if all given bits are set in the given data word
+ * \param[in]   word    Given data word to test
+ * \param[in]   mask    Test mask
+ * \return      TRUE if all the bits in the bitMask are set
+ */
+static inline bcmos_bool test_bits_set(uint32_t word, uint32_t mask)
+{
+    return ((word & mask) == mask);
+}
+
+/** Test if all given bits are clear in the given data word
+ * \param       word    Given word to test
+ * \param       mask Test mask
+ * \return      TRUE if all the bits given by bitMask are clear
+ */
+static inline bcmos_bool test_bits_clear(uint32_t word, uint32_t mask)
+{
+    return (word & mask) == 0;
+}
+
+/** Test whether any of the given bits are set in a value
+ * \param[in]   val     The value to test
+ * \param[in]   bits    The bits to test for
+ * \return      TRUE if any of the bits are set in the value, FALSE otherwise
+ */
+static inline bcmos_bool test_bits_any(uint32_t val, uint32_t bits)
+{
+    return (val & bits) != 0;
+}
+
+
+/** return true if only one bit is set for a given integer.
+ */
+static inline bcmos_bool is_one_bit_set(uint32_t number)
+{
+    return (number & (number - 1)) == 0;
+}
+
+
+
+/** dynamically allocate space for an array of `nbits' bits and initalize
+ *  the bits to all be zero.
+ *
+ * \param[out]  bv      pointer to a bit_vector struct.
+ * \param[in]   nbits   number of bits to allocate.
+ * \return      FALSE if space was not available, otherwise TRUE.
+ */
+bcmos_bool bcmolt_bv_new(bit_vector *bv, const uint32_t nbits);
+
+
+/** return the value of the `offset'th bit element of the bit vector.
+ *
+ * \param[in]   bv      pointer to a bit_vector struct.
+ * \param[in]   offset  offset of bit to test.
+ * \return      FALSE if the bit offset is out of range, otherwise TRUE.
+ */
+bcmos_bool bcmolt_bv_get(const bit_vector *bv, const uint32_t offset);
+
+
+/** set or clear the bit in position `offset' of the bit vector.
+ *  bv->vector[bit_pos] is to be set (assigned to 1) if value is TRUE,
+ *  otherwise it is to be cleared (assigned to 0).
+ *
+ * \param[in]   bv      pointer to a bit_vector struct.
+ * \param[in]   offset  offset of bit to set or clear.
+ * \param[in]   value   boolean value. TRUE for set, FALSE for clear.
+ * \return      FALSE if the bit offset is out of range, otherwise TRUE.
+ */
+void bcmolt_bv_assign(bit_vector *bv, const uint32_t offset, const bcmos_bool value);
+
+
+/** set or clear 'nbits' bits of given bit vector.
+ *
+ * \param[in]   bv      pointer to a bit_vector struct.
+ * \param[in]   nbits   number of bits to set or clear.
+ * \param[in]   value   boolean value. TRUE for set, FALSE for clear.
+ * \return      FALSE if the bit offset is out of range, otherwise TRUE.
+ */
+void bv_assign_nbits(bit_vector *bv, const uint32_t nbits,
+                     const bcmos_bool value);
+
+
+/** toggle the bit in position `offset' of the bit vector.
+ *  i.e. if it was 1 it is 0; if it was 0 it is 1.
+ *
+ * \param[in]   bv      pointer to a bit_vector struct.
+ * \param[in]   offset  offset of bit to toggle.
+ * \return      FALSE if the bit offset is out of range, otherwise TRUE.
+ */
+void bcmolt_bv_toggle(bit_vector *bv, const uint32_t offset);
+
+
+/** copy bit vector from 'src' to 'dst'.
+ *
+ * \param[out]  dst     pointer to a bit_vector struct to copy to.
+ * \param[in]   src     pointer to a bit_vector struct to copy from.
+ * \param[in]   nbits   number of bits to copy.
+ * \return      none.
+ */
+void bcmolt_bv_copy(bit_vector *dst, const bit_vector *src, const uint32_t nbits);
+
+
+/** Print bit pattern of word FORMATTED to string.
+ *
+ * \param[in]   value   value to transform to bit string.
+ * \param[in]   bitcnt  count of bits to be shown.
+ * \param[out]  outstr  pointer to a output buffer to store the string.
+ * \return      none
+ * \warning     this fn doesn't check the size of 'outstr'.
+ *              the caller should ensure 'outstr' has enough room for the
+ *              bit string, space characters and null terminator.
+ */
+void bcmolt_bit_string(const bv_bits value, const uint32_t bitcnt, char *outstr);
+
+
+/** Print all bits in the bit vector.
+ *
+ * \param[in]   bv      pointer to a bit_vector struct.
+ * \return      none.
+ */
+void bcmolt_bv_dump(const bit_vector *bv);
+
+
+/** Count the number of bits set in a long integer.
+ *
+ * \param[in]   num     integer value.
+ * \return      number of bits set.
+ */
+uint32_t bcmolt_bit_count(uint32_t num);
+
+
+/** Count the number of bits set in the whole bit vector.
+ *
+ * \param[in]   bv      pointer to the bit vector struct.
+ * \return      number of bits set.
+ */
+uint32_t bcmolt_bv_bit_count(const bit_vector *bv);
+
+
+/** Copy bit range from a 32-bit word array to an arbitrary bit position of
+ *  the destination 32-bit word array.
+ *
+ * \param[in]   dst             destination buffer
+ * \param[in]   dst_bytes       destination buffer size in bytes
+ * \param[in]   dst_bit_pos     least bit position to dest
+ * \param[in]   src             source buffer
+ * \param[in]   src_bits        many bits to copy from source
+ * \note        src is in little endian and dst is in big endian.
+ */
+void bcmos_bit_range_set(uint32_t *dst, uint32_t dst_bytes, uint16_t dst_bit_pos,
+                         uint32_t *src, uint16_t n_bits);
+
+/** Get bit range at an arbitrary bit position of a 32-bit word array
+ *
+ * \param[in]   src             source buffer (e.g. dataport)
+ * \param[in]   src_bytes       source buffer size in bytes
+ * \param[in]   src_bit_pos     least bit position of the source
+ * \param[in]   dst             destination buffer to store the bit value
+ * \param[in]   n_bits          how many bits to copy from srouce
+ * \note        src is in big endian and dst is in little endian.
+ */
+void bcmos_bit_range_get(const uint32_t *src, uint32_t src_bytes,
+                         uint16_t src_bit_pos, uint32_t *dst, uint16_t n_bits);
+
+
+#endif  /* BCMOLT_BIT_UTILS_H */
+
diff --git a/bcm68620_release/release/host_driver/utils/bcmolt_buf.c b/bcm68620_release/release/host_driver/utils/bcmolt_buf.c
new file mode 100644
index 0000000..cb57fe9
--- /dev/null
+++ b/bcm68620_release/release/host_driver/utils/bcmolt_buf.c
@@ -0,0 +1,247 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#include "bcmolt_buf.h"
+#include "bcmos_system.h"
+
+/** Initalize a bcmolt_buf stream
+ *
+ * \param buf 
+ * \param size 
+ * \param start
+ * \param endian Endianness of numbers in the resulting stream
+ */
+void bcmolt_buf_init(bcmolt_buf *buf, uint32_t size, uint8_t *start, bcmos_endian endian)
+{
+    buf->len = size;
+    buf->curr = start;
+    buf->start = start;
+    buf->free = NULL;
+    buf->bh = NULL;
+    /* Currently, we only support reading/writing numbers in a single endianness. */
+    BUG_ON(endian != BCMOLT_BUF_ENDIAN_FIXED);
+}
+
+/** Allocate data buffer and initialize bcmolt_buf stream
+ *
+ * \param buf
+ * \param size
+ * \param endian Endianness of numbers in the resulting stream
+ * \return BCM_ERR_OK or BCM_ERR_NOMEM
+ */
+bcmos_errno bcmolt_buf_alloc(bcmolt_buf *buf, uint32_t size, bcmos_endian endian)
+{
+    buf->start = bcmos_alloc(size);
+    if (buf->start == NULL)
+    {
+        return BCM_ERR_NOMEM;
+    }
+    bcmolt_buf_init(buf, size, buf->start, endian);
+    return BCM_ERR_OK;
+}
+
+/** Release data buffer pointed by bcmolt_buf stream
+ * \param[in,out] buf
+ */
+void bcmolt_buf_free(bcmolt_buf *buf)
+{
+    if (buf->start != NULL)
+    {
+        if (buf->free)
+        {
+            buf->free(buf->bh);
+            buf->free = NULL;
+            buf->bh = NULL;
+        }
+        else
+        {
+            bcmos_free(buf->start);
+        }
+        buf->start = NULL;
+    }
+    buf->len = 0;
+    buf->curr = NULL;
+}
+
+/** Read from the buffer
+ *
+ * \param buf    bcmolt_buf instance
+ * \param to     Where to read to
+ * \param len    Number of bytes to copy
+ *
+ * \return       BCMOS_TRUE if successfully copied
+ */
+bcmos_bool bcmolt_buf_read(bcmolt_buf *buf, void *to, size_t len)
+{
+    if ((buf->start + buf->len) >= (buf->curr + len))
+    {
+        memcpy(to, buf->curr, len);
+        buf->curr += len;
+        return BCMOS_TRUE;
+    }
+
+    return BCMOS_FALSE;
+}
+
+/** Transfer bytes from one buf to another
+ *
+ * \param *from    Source buffer
+ * \param *to      Destination buffer
+ * \param bytes    Number of bytes to transfer
+ * \return         BCMOS_TRUE if successfully transferred
+ */
+bcmos_bool bcmolt_buf_transfer_bytes(bcmolt_buf *from, bcmolt_buf *to, uint32_t bytes)
+{
+    uint8_t tmp[256];
+    uint32_t toRead;
+    while (bytes != 0)
+    {
+        toRead = bytes > sizeof(tmp) ? sizeof(tmp) : bytes;
+        if (!bcmolt_buf_read(from, tmp, toRead) || !bcmolt_buf_write(to, tmp, toRead))
+        {
+            return BCMOS_FALSE;
+        }
+
+        bytes -= toRead;
+    }
+
+    return BCMOS_TRUE;
+}
+
+/** Write to the buffer
+ *
+ * \param buf    bcmolt_buf instance
+ * \param from   Source, to copy from
+ * \param len    Number of bytes to copy
+ *
+ * \return       BCMOS_TRUE if successfully copied
+ */
+bcmos_bool bcmolt_buf_write(bcmolt_buf *buf, const void *from, size_t len)
+{
+    if ((buf->start + buf->len) >= (buf->curr + len))
+    {
+        memcpy(buf->curr, from, len);
+        buf->curr += len;
+        return BCMOS_TRUE;
+    }
+    else
+    {
+        return BCMOS_FALSE;
+    }
+}
+
+/** Move the current pointer to a given position in the buffer
+ *
+ * \param pos    Byte position in the buffer to move the current pointer to
+ *
+ * \param *buf   Input buffer
+ * \return       BCMOS_FALSE if len takes us past the end of buffer
+ */
+bcmos_bool bcmolt_buf_set_pos(bcmolt_buf *buf, uint32_t pos)
+{
+    if (pos <= buf->len)
+    {
+        buf->curr = buf->start + pos;
+        return BCMOS_TRUE;
+    }
+
+    return BCMOS_FALSE;
+}
+
+/** Move the current pointer ahead by given number of bytes
+ *
+ * \param buf    bcmolt_buf instance
+ * \param len    Number of bytes to skip
+ *
+ * \return       BCMOS_FALSE if len takes us past the end of buffer
+ */
+bcmos_bool bcmolt_buf_skip(bcmolt_buf *buf, uint32_t len)
+{
+    if ((buf->start + buf->len) >= (buf->curr + len))
+    {
+        buf->curr += len;
+        return BCMOS_TRUE;
+    }
+
+    return BCMOS_FALSE;
+}
+
+/** Move the current pointer back by given number of bytes
+ *
+ * \param buf    bcmolt_buf instance
+ * \param len    Number of bytes to go back
+ *
+ * \return       BCMOS_FALSE if len takes us past the start of buffer
+ */
+bcmos_bool bcmolt_buf_rewind(bcmolt_buf *buf, uint32_t len)
+{
+    if (buf->curr >= (buf->start + len))
+    {
+        buf->curr -= len;
+        return BCMOS_TRUE;
+    }
+
+    return BCMOS_FALSE;
+}
+
+/** Reads a boolean from a buffer
+ *
+ * \param *buf
+ * \param *val
+ */
+bcmos_bool bcmolt_buf_read_bool(bcmolt_buf *buf, bcmos_bool *val)
+{
+    /* this function isn't inlined like the rest because it's too complex to inline cleanly */
+    uint8_t tmp;
+    if (bcmolt_buf_read_u8(buf, &tmp))
+    {
+        *val = (tmp != 0);
+        return BCMOS_TRUE;
+    }
+    else
+    {
+        return BCMOS_FALSE;
+    }
+}
+
+
+#ifdef __KERNEL__
+EXPORT_SYMBOL(bcmolt_buf_init);
+EXPORT_SYMBOL(bcmolt_buf_alloc);
+EXPORT_SYMBOL(bcmolt_buf_free);
+EXPORT_SYMBOL(bcmolt_buf_read);
+EXPORT_SYMBOL(bcmolt_buf_transfer_bytes);
+EXPORT_SYMBOL(bcmolt_buf_write);
+EXPORT_SYMBOL(bcmolt_buf_set_pos);
+EXPORT_SYMBOL(bcmolt_buf_skip);
+EXPORT_SYMBOL(bcmolt_buf_rewind);
+EXPORT_SYMBOL(bcmolt_buf_read_bool);
+
+MODULE_LICENSE("Dual BSD/GPL");
+#endif
diff --git a/bcm68620_release/release/host_driver/utils/bcmolt_buf.h b/bcm68620_release/release/host_driver/utils/bcmolt_buf.h
new file mode 100644
index 0000000..206337a
--- /dev/null
+++ b/bcm68620_release/release/host_driver/utils/bcmolt_buf.h
@@ -0,0 +1,733 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#ifndef BCMOLT_BUF_H_
+#define BCMOLT_BUF_H_
+
+#include "bcmos_system.h"
+
+/** Generic memory stream object */
+typedef struct bcmolt_buf bcmolt_buf;
+
+struct bcmolt_buf
+{
+    uint8_t *start;  /**< Pointer to the start of the buffer */
+    uint8_t *curr;   /**< Pointer to the current position in the buffer */
+    uint32_t len;    /**< Total Length of buffer */
+    /* The following 2 fields enable foreign buffer encapsulation */
+    void (*free)(void *bh);  /**< Foreign buffer release callback */
+    void *bh;        /**< Foreign buffer handle */
+};
+
+/* Serialization buffer endianness */
+#define BCMOLT_BUF_ENDIAN_FIXED BCMOS_ENDIAN_BIG
+
+#if BCMOLT_BUF_ENDIAN_FIXED == BCMOS_ENDIAN_BIG
+    #define BCMOLT_BUF_ENDIAN_BUF_TO_CPU(size, n) BCMOS_ENDIAN_BIG_TO_CPU_##size(n)
+    #define BCMOLT_BUF_ENDIAN_CPU_TO_BUF(size, n) BCMOS_ENDIAN_CPU_TO_BIG_##size(n)
+#else
+    #define BCMOLT_BUF_ENDIAN_BUF_TO_CPU(size, n) BCMOS_ENDIAN_LITTLE_TO_CPU_##size(n)
+    #define BCMOLT_BUF_ENDIAN_CPU_TO_BUF(size, n) BCMOS_ENDIAN_CPU_TO_LITTLE_##size(n)
+#endif
+
+/** Initalize a bcmolt_buf stream
+ *
+ * \param buf
+ * \param size
+ * \param start
+ * \param endian Endianness of numbers in the resulting stream.
+ *               This parameter is only for sanity check. Buffer endianness is
+ *               set at compile time. Application MUST NOT rely on default buffer endianness
+ *               being Big Endian.
+ *               If Big Endian buffer is required, application must use
+ *               access functions with "_be" designator (bcmolt_buf_read_u16_be(), etc.)
+ */
+void bcmolt_buf_init(bcmolt_buf *buf, uint32_t size, uint8_t *start, bcmos_endian endian);
+
+/** Allocate data buffer and initialize bcmolt_buf stream
+ *
+ * \param buf
+ * \param size
+ * \param endian Endianness of numbers in the resulting stream.
+ *               See explanation in bcmolt_buf_alloc()
+ * \return BCM_ERR_OK or BCM_ERR_NOMEM
+ */
+bcmos_errno bcmolt_buf_alloc(bcmolt_buf *buf, uint32_t size, bcmos_endian endian);
+
+/** Release data buffer pointed by bcmolt_buf stream
+ * \param[in,out] buf
+ */
+void bcmolt_buf_free(bcmolt_buf *buf);
+
+/** Read from the buffer
+ *
+ * \param buf    bcmolt_buf instance
+ * \param to     Where to read to
+ * \param len    Number of bytes to copy
+ *
+ * \return       BCMOS_TRUE if successfully copied
+ */
+bcmos_bool bcmolt_buf_read(bcmolt_buf *buf, void *to, size_t len);
+
+/** Transfer bytes from one buf to another
+ *
+ * \param *from    Source buffer
+ * \param *to      Destination buffer
+ * \param bytes    Number of bytes to transfer
+ * \return         BCMOS_TRUE if successfully transferred
+ */
+bcmos_bool bcmolt_buf_transfer_bytes(bcmolt_buf *from, bcmolt_buf *to, uint32_t bytes);
+
+/** Write to the buffer
+ *
+ * \param buf    bcmolt_buf instance
+ * \param from   Source, to copy from
+ * \param len    Number of bytes to copy
+ *
+ * \return       BCMOS_TRUE if successfully copied
+ */
+bcmos_bool bcmolt_buf_write(bcmolt_buf *buf, const void *from, size_t len);
+
+/** Move the current pointer to a given position in the buffer
+ *
+ * \param pos    Byte position in the buffer to move the current pointer to
+ *
+ * \param *buf   Input buffer
+ * \return       BCMOS_FALSE if len takes us past the end of buffer
+ */
+bcmos_bool bcmolt_buf_set_pos(bcmolt_buf *buf, uint32_t pos);
+
+/** Move the current pointer ahead by given number of bytes
+ *
+ * \param buf    bcmolt_buf instance
+ * \param len    Number of bytes to skip
+ *
+ * \return       BCMOS_FALSE if len takes us past the end of buffer
+ */
+bcmos_bool bcmolt_buf_skip(bcmolt_buf *buf, uint32_t len);
+
+/** Move the current pointer back by given number of bytes
+ *
+ * \param buf    bcmolt_buf instance
+ * \param len    Number of bytes to go back
+ *
+ * \return       BCMOS_FALSE if len takes us past the start of buffer
+ */
+bcmos_bool bcmolt_buf_rewind(bcmolt_buf *buf, uint32_t len);
+
+/** Get the current buffer pointer
+ *
+ * \param buf   bcmolt_buf instance
+ *
+ * \return      the current buffer pointer
+ */
+static inline uint8_t *bcmolt_buf_snap_get(const bcmolt_buf *buf)
+{
+    return buf->curr;
+}
+
+/** Move the current pointer to a snapped location
+ *
+ * \param buf   bcmolt_buf instance
+ * \param snap  snapped location
+ */
+static inline void bcmolt_buf_snap_restore(bcmolt_buf *buf, uint8_t *snap)
+{
+    buf->curr = snap;
+}
+
+/** Get the length of unprocessed bytes in given stream
+ *
+ * \param buf    Input buffer
+ *
+ * \return       The number of remaining bytes in the buffer
+ */
+static inline uint32_t bcmolt_buf_get_remaining_size(const bcmolt_buf *buf)
+{
+    return (uint32_t)((buf->start + buf->len) - buf->curr);
+}
+
+/** Get amount of buf that has been read or written so far
+ *
+ * \param buf     Input buffer
+ * \return        Amount of buffer used
+ */
+static inline uint32_t bcmolt_buf_get_used(const bcmolt_buf *buf)
+{
+    return (uint32_t)(buf->curr - buf->start);
+}
+
+/** Reads a uint8_t from a buffer
+ *
+ * \param buf Buffer to read from
+ * \param val uint8_t to read
+ *
+ * \return BCMOS_TRUE if read successful
+ */
+static inline bcmos_bool bcmolt_buf_read_u8(bcmolt_buf *buf, uint8_t *val)
+{
+    return bcmolt_buf_read(buf, val, sizeof(*val));
+}
+
+/** Writes a uint8_t to a buffer
+ *
+ * \param buf    Buffer to write to
+ * \param val    uint8_t to write
+ *
+ * \return       BCMOS_TRUE if write successful
+ */
+static inline bcmos_bool bcmolt_buf_write_u8(bcmolt_buf *buf, uint8_t val)
+{
+    return bcmolt_buf_write(buf, &val, sizeof(val));
+}
+
+/** Reads a boolean from a buffer
+ *
+ * \param *buf
+ * \param *val
+ */
+bcmos_bool bcmolt_buf_read_bool(bcmolt_buf *buf, bcmos_bool *val);
+
+/** Writes a bcmos_bool to a buffer
+ *
+ * \param buf    Buffer to write to
+ * \param val    uint8_t to write
+ *
+ * \return       BCMOS_TRUE if write successful
+ */
+static inline bcmos_bool bcmolt_buf_write_bool(bcmolt_buf *buf, bcmos_bool val)
+{
+    return bcmolt_buf_write_u8(buf, val ? 1 : 0);
+}
+
+/** Reads a int8_t from a buffer
+ *
+ * \param buf Buffer to read from
+ * \param val int8_t to read
+ *
+ * \return BCMOS_TRUE if read successful
+ */
+static inline bcmos_bool bcmolt_buf_read_s8(bcmolt_buf *buf, int8_t *val)
+{
+    return bcmolt_buf_read_u8(buf, (uint8_t *)val);
+}
+
+/** Writes a int8_t to a buffer
+ *
+ * \param buf    Buffer to write to
+ * \param val    int8_t to write
+ *
+ * \return       BCMOS_TRUE if write successful
+ */
+static inline bcmos_bool bcmolt_buf_write_s8(bcmolt_buf *buf, int8_t val)
+{
+    return bcmolt_buf_write_u8(buf, (uint8_t)val);
+}
+
+/** Reads a uint16_t from a buffer
+ *
+ * \param buf Buffer to read from
+ * \param val uint16_t to read
+ *
+ * \return BCMOS_TRUE if read successful
+ */
+static inline bcmos_bool bcmolt_buf_read_u16(bcmolt_buf *buf, uint16_t *val)
+{
+    bcmos_bool res = bcmolt_buf_read(buf, val, sizeof(*val));
+    *val = BCMOLT_BUF_ENDIAN_BUF_TO_CPU(U16, *val);
+    return res;
+}
+
+/** Reads a uint16_t from a Big Endian buffer
+ *
+ * \param buf Buffer to read from
+ * \param val uint16_t to read
+ *
+ * \return BCMOS_TRUE if read successful
+ */
+static inline bcmos_bool bcmolt_buf_read_u16_be(bcmolt_buf *buf, uint16_t *val)
+{
+    bcmos_bool res = bcmolt_buf_read(buf, val, sizeof(*val));
+    *val = BCMOS_ENDIAN_BIG_TO_CPU_U16(*val);
+    return res;
+}
+
+/** Writes a uint16_t to a buffer
+ *
+ * \param buf    Buffer to write to
+ * \param val    uint16_t to write
+ *
+ * \return       BCMOS_TRUE if write successful
+ */
+static inline bcmos_bool bcmolt_buf_write_u16(bcmolt_buf *buf, uint16_t val)
+{
+    val = BCMOLT_BUF_ENDIAN_CPU_TO_BUF(U16, val);
+    return bcmolt_buf_write(buf, &val, sizeof(val));
+}
+
+/** Writes a uint16_t to a Big Endian buffer
+ *
+ * \param buf    Buffer to write to
+ * \param val    uint16_t to write
+ *
+ * \return       BCMOS_TRUE if write successful
+ */
+static inline bcmos_bool bcmolt_buf_write_u16_be(bcmolt_buf *buf, uint16_t val)
+{
+    val = BCMOS_ENDIAN_CPU_TO_BIG_U16(val);
+    return bcmolt_buf_write(buf, &val, sizeof(val));
+}
+
+/** Reads a int16_t from a buffer
+ *
+ * \param buf Buffer to read from
+ * \param val int16_t to read
+ *
+ * \return BCMOS_TRUE if read successful
+ */
+static inline bcmos_bool bcmolt_buf_read_s16(bcmolt_buf *buf, int16_t *val)
+{
+    return bcmolt_buf_read_u16(buf, (uint16_t *)val);
+}
+
+/** Reads a int16_t from a Big Endian buffer
+ *
+ * \param buf Buffer to read from
+ * \param val int16_t to read
+ *
+ * \return BCMOS_TRUE if read successful
+ */
+static inline bcmos_bool bcmolt_buf_read_s16_be(bcmolt_buf *buf, int16_t *val)
+{
+    return bcmolt_buf_read_u16_be(buf, (uint16_t *)val);
+}
+
+/** Writes int16_t to a buffer
+ *
+ * \param buf    Buffer to write to
+ * \param val    int16_t to write
+ *
+ * \return       BCMOS_TRUE if write successful
+ */
+static inline bcmos_bool bcmolt_buf_write_s16(bcmolt_buf *buf, int16_t val)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t)val);
+}
+
+/** Writes int16_t to a Big Endian buffer
+ *
+ * \param buf    Buffer to write to
+ * \param val    int16_t to write
+ *
+ * \return       BCMOS_TRUE if write successful
+ */
+static inline bcmos_bool bcmolt_buf_write_s16_be(bcmolt_buf *buf, int16_t val)
+{
+    return bcmolt_buf_write_u16_be(buf, (uint16_t)val);
+}
+
+/** Reads a bcmos_u24 from a buffer
+ *
+ * \param buf Buffer to read from
+ * \param val bcmos_u24 to read
+ *
+ * \return BCMOS_TRUE if read successful
+ */
+static inline bcmos_bool bcmolt_buf_read_u24(bcmolt_buf *buf, uint24_t *val)
+{
+    return bcmolt_buf_read_u8(buf, &(val->low_hi.hi)) &&
+           bcmolt_buf_read_u8(buf, &(val->low_hi.mid)) &&
+           bcmolt_buf_read_u8(buf, &(val->low_hi.low));
+}
+
+/** Writes a bcmos_u24 to a buffer
+ *
+ * \param buf    Buffer to write to
+ * \param val    bcmos_u24 to write
+ *
+ * \return       BCMOS_TRUE if write successful
+ */
+static inline bcmos_bool bcmolt_buf_write_u24(bcmolt_buf *buf, uint24_t val)
+{
+    return bcmolt_buf_write_u8(buf, val.low_hi.hi) &&
+           bcmolt_buf_write_u8(buf, val.low_hi.mid) &&
+           bcmolt_buf_write_u8(buf, val.low_hi.low);
+}
+
+/** Reads a uint32_t from a buffer
+ *
+ * \param buf Buffer to read from
+ * \param val uint32_t to read
+ *
+ * \return BCMOS_TRUE if read successful
+ */
+static inline bcmos_bool bcmolt_buf_read_u32(bcmolt_buf *buf, uint32_t *val)
+{
+    bcmos_bool res = bcmolt_buf_read(buf, val, sizeof(*val));
+    *val = BCMOLT_BUF_ENDIAN_BUF_TO_CPU(U32, *val);
+    return res;
+}
+
+/** Reads a uint32_t from a Big Endian buffer
+ *
+ * \param buf Buffer to read from
+ * \param val uint32_t to read
+ *
+ * \return BCMOS_TRUE if read successful
+ */
+static inline bcmos_bool bcmolt_buf_read_u32_be(bcmolt_buf *buf, uint32_t *val)
+{
+    bcmos_bool res = bcmolt_buf_read(buf, val, sizeof(*val));
+    *val = BCMOS_ENDIAN_BIG_TO_CPU_U32(*val);
+    return res;
+}
+
+/** Writes a uint32_t to a buffer
+ *
+ * \param buf    Buffer to write to
+ * \param val    uint32_t to write
+ *
+ * \return       BCMOS_TRUE if write successful
+ */
+static inline bcmos_bool bcmolt_buf_write_u32(bcmolt_buf *buf, uint32_t val)
+{
+    val = BCMOLT_BUF_ENDIAN_CPU_TO_BUF(U32, val);
+    return bcmolt_buf_write(buf, &val, sizeof(val));
+}
+
+/** Writes a uint32_t to a Big Endian buffer
+ *
+ * \param buf    Buffer to write to
+ * \param val    uint32_t to write
+ *
+ * \return       BCMOS_TRUE if write successful
+ */
+static inline bcmos_bool bcmolt_buf_write_u32_be(bcmolt_buf *buf, uint32_t val)
+{
+    val = BCMOS_ENDIAN_CPU_TO_BIG_U32(val);
+    return bcmolt_buf_write(buf, &val, sizeof(val));
+}
+
+/** Reads a int32_t from a buffer
+ *
+ * \param buf Buffer to read from
+ * \param val int32_t to read
+ *
+ * \return BCMOS_TRUE if read successful
+ */
+static inline bcmos_bool bcmolt_buf_read_s32(bcmolt_buf *buf, int32_t *val)
+{
+    return bcmolt_buf_read_u32(buf, (uint32_t *)val);
+}
+
+/** Reads a int32_t from a big endian buffer
+ *
+ * \param buf Buffer to read from
+ * \param val int32_t to read
+ *
+ * \return BCMOS_TRUE if read successful
+ */
+static inline bcmos_bool bcmolt_buf_read_s32_be(bcmolt_buf *buf, int32_t *val)
+{
+    return bcmolt_buf_read_u32_be(buf, (uint32_t *)val);
+}
+
+/** Writes a int32_t to a buffer
+ *
+ * \param buf    Buffer to write to
+ * \param val    int32_t to write
+ *
+ * \return       BCMOS_TRUE if write successful
+ */
+static inline bcmos_bool bcmolt_buf_write_s32(bcmolt_buf *buf, int32_t val)
+{
+    return bcmolt_buf_write_u32(buf, (uint32_t)val);
+}
+
+/** Writes a int32_t to a Big Endian buffer
+ *
+ * \param buf    Buffer to write to
+ * \param val    int32_t to write
+ *
+ * \return       BCMOS_TRUE if write successful
+ */
+static inline bcmos_bool bcmolt_buf_write_s32_be(bcmolt_buf *buf, int32_t val)
+{
+    return bcmolt_buf_write_u32_be(buf, (uint32_t)val);
+}
+
+/** Reads a uint64_t from a buffer
+ *
+ * \param buf Buffer to read from
+ * \param val uint64_t to read
+ *
+ * \return BCMOS_TRUE if read successful
+ */
+static inline bcmos_bool bcmolt_buf_read_u64(bcmolt_buf *buf, uint64_t *val)
+{
+    bcmos_bool res = bcmolt_buf_read(buf, val, sizeof(*val));
+    *val = BCMOLT_BUF_ENDIAN_BUF_TO_CPU(U64, *val);
+    return res;
+}
+
+/** Reads a uint64_t from a Big Endian buffer
+ *
+ * \param buf Buffer to read from
+ * \param val uint64_t to read
+ *
+ * \return BCMOS_TRUE if read successful
+ */
+static inline bcmos_bool bcmolt_buf_read_u64_be(bcmolt_buf *buf, uint64_t *val)
+{
+    bcmos_bool res = bcmolt_buf_read(buf, val, sizeof(*val));
+    *val = BCMOS_ENDIAN_BIG_TO_CPU_U64(*val);
+    return res;
+}
+
+/** Writes a uint64_t to a buffer
+ *
+ * \param buf    Buffer to write to
+ * \param val    uint64_t to write
+ *
+ * \return       BCMOS_TRUE if write successful
+ */
+static inline bcmos_bool bcmolt_buf_write_u64(bcmolt_buf *buf, uint64_t val)
+{
+    val = BCMOLT_BUF_ENDIAN_CPU_TO_BUF(U64, val);
+    return bcmolt_buf_write(buf, &val, sizeof(val));
+}
+
+/** Writes a uint64_t to a Big Endian buffer
+ *
+ * \param buf    Buffer to write to
+ * \param val    uint64_t to write
+ *
+ * \return       BCMOS_TRUE if write successful
+ */
+static inline bcmos_bool bcmolt_buf_write_u64_be(bcmolt_buf *buf, uint64_t val)
+{
+    val = BCMOS_ENDIAN_CPU_TO_BIG_U64(val);
+    return bcmolt_buf_write(buf, &val, sizeof(val));
+}
+
+/** Reads a int64_t from a buffer
+ *
+ * \param buf Buffer to read from
+ * \param val int64_t to read
+ *
+ * \return BCMOS_TRUE if read successful
+ */
+static inline bcmos_bool bcmolt_buf_read_s64(bcmolt_buf *buf, int64_t *val)
+{
+    return bcmolt_buf_read_u64(buf, (uint64_t *)val);
+}
+
+/** Reads a int64_t from a Big Endian buffer
+ *
+ * \param buf Buffer to read from
+ * \param val int64_t to read
+ *
+ * \return BCMOS_TRUE if read successful
+ */
+static inline bcmos_bool bcmolt_buf_read_s64_be(bcmolt_buf *buf, int64_t *val)
+{
+    return bcmolt_buf_read_u64_be(buf, (uint64_t *)val);
+}
+
+/** Writes a int64_t to a buffer
+ *
+ * \param buf    Buffer to write to
+ * \param val    int64_t to write
+ *
+ * \return       BCMOS_TRUE if write successful
+ */
+static inline bcmos_bool bcmolt_buf_write_s64(bcmolt_buf *buf, int64_t val)
+{
+    return bcmolt_buf_write_u64(buf, (uint64_t)val);
+}
+
+/** Writes a int64_t to a Big Endian buffer
+ *
+ * \param buf    Buffer to write to
+ * \param val    int64_t to write
+ *
+ * \return       BCMOS_TRUE if write successful
+ */
+static inline bcmos_bool bcmolt_buf_write_s64_be(bcmolt_buf *buf, int64_t val)
+{
+    return bcmolt_buf_write_u64_be(buf, (uint64_t)val);
+}
+
+/** Reads a float from a buffer
+ *
+ * \param buf Buffer to read from
+ * \param val float to read
+ *
+ * \return BCMOS_TRUE if read successful
+ */
+static inline bcmos_bool bcmolt_buf_read_float(bcmolt_buf *buf, float *val)
+{
+    return bcmolt_buf_read_u32(buf, (uint32_t *)val);
+}
+
+/** Writes a float to a buffer
+ *
+ * \param buf    Buffer to write to
+ * \param val    float to write
+ *
+ * \return       BCMOS_TRUE if write successful
+ */
+static inline bcmos_bool bcmolt_buf_write_float(bcmolt_buf *buf, float val)
+{
+    uint32_t *num = (uint32_t *)&val;
+    return bcmolt_buf_write_u32(buf, *num);
+}
+
+/** Reads a double from a buffer
+ *
+ * \param buf Buffer to read from
+ * \param val double to read
+ *
+ * \return BCMOS_TRUE if read successful
+ */
+static inline bcmos_bool bcmolt_buf_read_double(bcmolt_buf *buf, double *val)
+{
+    return bcmolt_buf_read_u64(buf, (uint64_t *)val);
+}
+
+/** Writes a double to a buffer
+ *
+ * \param buf    Buffer to write to
+ * \param val    double to write
+ *
+ * \return       BCMOS_TRUE if write successful
+ */
+static inline bcmos_bool bcmolt_buf_write_double(bcmolt_buf *buf, double val)
+{
+    uint64_t *num = (uint64_t *)&val;
+    return bcmolt_buf_write_u64(buf, *num);
+}
+
+/** Reads a bcmos_vlan_tag from a buffer
+ *
+ * \param buf Buffer to read from
+ * \param val bcmos_vlan_tag to read
+ *
+ * \return BCMOS_TRUE if read successful
+ */
+static inline bcmos_bool bcmolt_buf_read_vlan_tag(bcmolt_buf *buf, bcmos_vlan_tag *val)
+{
+    return bcmolt_buf_read_u16(buf, (uint16_t *)val);
+}
+
+/** Writes a bcmos_vlan_tag to a buffer
+ *
+ * \param buf Buffer to write to
+ * \param val bcmos_vlan_tag to write
+ *
+ * \return BCMOS_TRUE if write successful
+ */
+static inline bcmos_bool bcmolt_buf_write_vlan_tag(bcmolt_buf *buf, bcmos_vlan_tag val)
+{
+    return bcmolt_buf_write_u16(buf, (uint16_t)val);
+}
+
+/** Reads a bcmos_mac_address from a buffer
+ *
+ * \param buf Buffer to read from
+ * \param val bcmos_mac_address to read
+ *
+ * \return BCMOS_TRUE if read successful
+ */
+static inline bcmos_bool bcmolt_buf_read_mac_address(bcmolt_buf *buf, bcmos_mac_address *val)
+{
+    return bcmolt_buf_read(buf, val, sizeof(bcmos_mac_address));
+}
+
+/** Writes a bcmos_mac_address to a buffer
+ *
+ * \param buf Buffer to write to
+ * \param val bcmos_mac_address to write
+ *
+ * \return BCMOS_TRUE if write successful
+ */
+static inline bcmos_bool bcmolt_buf_write_mac_address(bcmolt_buf *buf, bcmos_mac_address val)
+{
+    return bcmolt_buf_write(buf, &val, sizeof(bcmos_mac_address));
+}
+
+/** Reads a bcmos_ipv4_address from a buffer
+ *
+ * \param buf Buffer to read from
+ * \param val bcmos_ipv4_address to read
+ *
+ * \return BCMOS_TRUE if read successful
+ */
+static inline bcmos_bool bcmolt_buf_read_ipv4_address(bcmolt_buf *buf, bcmos_ipv4_address *val)
+{
+    return bcmolt_buf_read(buf, val->u8, sizeof(bcmos_ipv4_address));
+}
+
+/** Writes a bcmos_ipv4_address to a buffer
+ *
+ * \param buf Buffer to write to
+ * \param val bcmos_ipv4_address to write
+ *
+ * \return BCMOS_TRUE if write successful
+ */
+static inline bcmos_bool bcmolt_buf_write_ipv4_address(bcmolt_buf *buf, bcmos_ipv4_address val)
+{
+    return bcmolt_buf_write(buf, val.u8, sizeof(bcmos_ipv4_address));
+}
+
+/** Reads a bcmos_ipv6_address from a buffer
+ *
+ * \param buf Buffer to read from
+ * \param val bcmos_ipv6_address to read
+ *
+ * \return BCMOS_TRUE if read successful
+ */
+static inline bcmos_bool bcmolt_buf_read_ipv6_address(bcmolt_buf *buf, bcmos_ipv6_address *val)
+{
+    return bcmolt_buf_read(buf, *val, sizeof(bcmos_ipv6_address));
+}
+
+/** Writes a bcmos_ipv6_address to a buffer
+ *
+ * \param buf Buffer to write to
+ * \param val bcmos_ipv6_address to write
+ *
+ * \return BCMOS_TRUE if write successful
+ */
+static inline bcmos_bool bcmolt_buf_write_ipv6_address(bcmolt_buf *buf, bcmos_ipv6_address val)
+{
+    return bcmolt_buf_write(buf, val, sizeof(bcmos_ipv6_address));
+}
+
+#endif /* BCMOLT_BUF_H_ */
diff --git a/bcm68620_release/release/host_driver/utils/bcmolt_conv.c b/bcm68620_release/release/host_driver/utils/bcmolt_conv.c
new file mode 100644
index 0000000..7472c21
--- /dev/null
+++ b/bcm68620_release/release/host_driver/utils/bcmolt_conv.c
@@ -0,0 +1,59 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#include <bcmos_system.h>
+#include <bcmolt_utils.h>
+#include "bcmolt_conv.h"
+
+char *bcmolt_strftime(char *time_str, time_t t, const char *timezone_str)
+{
+    struct tm ts;
+    int32_t tz_hour;
+    uint32_t tz_min;
+    
+    ts = *localtime(&t);
+    if (timezone_str && *timezone_str)
+    {
+        if (sscanf(timezone_str, "%03d:%02u", &tz_hour, &tz_min) < 2)
+        {
+            tz_hour = 0;
+            tz_min = 0;
+        }
+        else
+        {
+            ts.tm_hour += tz_hour;
+            ts.tm_min += tz_min;
+        }
+    }
+
+    strftime(time_str, BCMOLT_TIME_STR_MAX_LEN, "%a %Y-%m-%d %H:%M:%S", &ts);
+
+    return time_str;
+}
+
diff --git a/bcm68620_release/release/host_driver/utils/bcmolt_conv.h b/bcm68620_release/release/host_driver/utils/bcmolt_conv.h
new file mode 100644
index 0000000..50c8a0b
--- /dev/null
+++ b/bcm68620_release/release/host_driver/utils/bcmolt_conv.h
@@ -0,0 +1,186 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#ifndef _BCMOLT_CONV_H_
+#define _BCMOLT_CONV_H_
+
+#ifndef CFE_BUILD
+#include <bcmolt_utils.h>
+#endif
+
+/* Macro for generating a generic conversion from type A to type B.
+ * Example:
+ *
+ *      BCMOLT_TYPE2TYPE(bws_dba_control_id, bws_dba_control_cb, static)
+ *
+ * will expand to:
+ *
+ *     typedef struct
+ *     {
+ *         bws_dba_control_id from;
+ *         bws_dba_control_cb to;
+ *     }
+ *     bws_dba_control_id2bws_dba_control_cb_t;
+ *     
+ *     static bws_dba_control_id2bws_dba_control_cb_t bws_dba_control_id2bws_dba_control_cb[];
+ *     
+ *     static inline bws_dba_control_cb bws_dba_control_id2bws_dba_control_cb_conv(bws_dba_control_id from)
+ *     {
+ *         const bws_dba_control_id2bws_dba_control_cb_t *arr = bws_dba_control_id2bws_dba_control_cb;
+ *         for (; arr->from != (bws_dba_control_id)-1 && arr->from != from; arr++);
+ *         return arr->to;
+ *     }
+ */
+#define BCMOLT_TYPE2TYPE(from_type, to_type, scope) \
+    typedef struct \
+    { \
+        from_type from; \
+        to_type to; \
+    } \
+    from_type##2##to_type##_t; \
+    scope from_type##2##to_type##_t from_type##2##to_type[]; \
+    static inline to_type from_type##2##to_type##_conv(from_type from) \
+    { \
+        const from_type##2##to_type##_t *arr = from_type##2##to_type; \
+        for (; arr->from != (from_type)-1 && arr->from != from; arr++); \
+        return arr->to; \
+    }
+
+/* Macro for generating a generic conversion from type A to a constant string.
+ * Example:
+ *
+ *      BCMOLT_TYPE2STR(pon_mode, extern)
+ *
+ * will expand to:
+ *
+ *     typedef struct
+ *     {
+ *         pon_mode from;
+ *         const char *to;
+ *     }
+ *     pon_mode2str_t;
+ *
+ *     extern pon_mode2str_t pon_mode2str[];
+ *
+ *     static inline const char *pon_mode2str_conv(pon_mode from)
+ *     {
+ *         const pon_mode2str_t *arr = pon_mode2str;
+ *         for (; arr->from != (pon_mode)-1 && arr->from != from; arr++);
+ *         return arr->to;
+ *     }
+ */
+#define BCMOLT_TYPE2STR(from_type, scope) \
+    typedef struct \
+    { \
+        from_type from; \
+        const char *to; \
+    } \
+    from_type##2str_t; \
+    scope from_type##2str_t from_type##2str[]; \
+    static inline const char *from_type##2str_conv(from_type from) \
+    { \
+        const from_type##2str_t *arr = from_type##2str; \
+        for (; arr->from != (from_type)-1 && arr->from != from; arr++); \
+        return arr->to; \
+    }
+
+/* Macro for generating a generic conversion from type A to an integer.
+ * Example:
+ *
+ *      BCMOLT_TYPE2INT(ploam_ds_gpon_message_id, repetitions, extern)
+ *
+ * will expand to:
+ * 
+ *     typedef struct
+ *     {
+ *         ploam_ds_gpon_message_id from;
+ *         int to;
+ *     }
+ *     ploam_ds_gpon_message_id2repetitions_t;
+ *
+ *     extern ploam_ds_gpon_message_id2repetitions_t ploam_ds_gpon_message_id2repetitions[];
+ *
+ *     static inline int ploam_ds_gpon_message_id2repetitions_conv(ploam_ds_gpon_message_id from)
+ *     {
+ *         const ploam_ds_gpon_message_id2repetitions_t *arr = ploam_ds_gpon_message_id2repetitions;
+ *         for (; arr->from != (ploam_ds_gpon_message_id)-1 && arr->from != from; arr++);
+ *         return arr->to;
+ *     }
+ */
+#define BCMOLT_TYPE2INT(from_type, to_name, scope) \
+    typedef struct \
+    { \
+        from_type from; \
+        int to; \
+    } \
+    from_type##2##to_name##_t; \
+    scope from_type##2##to_name##_t from_type##2##to_name[]; \
+    static inline int from_type##2##to_name##_conv(from_type from) \
+    { \
+        const from_type##2##to_name##_t *arr = from_type##2##to_name; \
+        for (; arr->from != (from_type)-1 && arr->from != from; arr++); \
+        return arr->to; \
+    }
+
+/* Although we have BCMOLT_TYPE2STR, int2str_t is still required when the same generic pointer needs to point to 2 different types (e.g: one specific for GPON and
+ * the other specific for XGPON). */
+typedef struct
+{
+    int from;
+    const char *to;
+}
+int2str_t;
+
+static inline const char *int2str(const int2str_t *arr, int from)
+{
+    for (; arr->from != -1 && arr->from != from; arr++);
+    return arr->to;
+}
+
+/* Although we have BCMOLT_TYPE2INT, int2int_t is still required when the same generic pointer needs to point to 2 different types (e.g: one specific for GPON and
+ * the other specific for XGPON). */
+typedef struct
+{
+    int from;
+    int to;
+}
+int2int_t;
+
+static inline int int2int(const int2int_t *arr, int from)
+{
+    for (; arr->from != -1 && arr->from != from; arr++);
+    return arr->to;
+}
+
+#ifndef CFE_BUILD
+char *bcmolt_strftime(char *time_str, time_t t, const char *timezone_str);
+#endif
+
+#endif
+
diff --git a/bcm68620_release/release/host_driver/utils/bcmolt_firmware_envelope.h b/bcm68620_release/release/host_driver/utils/bcmolt_firmware_envelope.h
new file mode 100644
index 0000000..fd4d6d0
--- /dev/null
+++ b/bcm68620_release/release/host_driver/utils/bcmolt_firmware_envelope.h
@@ -0,0 +1,95 @@
+/*
+<:copyright-BRCM:2016:proprietary:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+This program is the proprietary software of Broadcom Corporation and/or its
+licensors, and may only be used, duplicated, modified or distributed pursuant
+to the terms and conditions of a separate, written license agreement executed
+between you and Broadcom (an "Authorized License").  Except as set forth in
+an Authorized License, Broadcom grants no license (express or implied), right
+to use, or waiver of any kind with respect to the Software, and Broadcom
+expressly reserves all rights in and to the Software and all intellectual
+property rights therein.  IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU HAVE
+NO RIGHT TO USE THIS SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY
+BROADCOM AND DISCONTINUE ALL USE OF THE SOFTWARE.
+
+Except as expressly set forth in the Authorized License,
+
+1. This program, including its structure, sequence and organization,
+    constitutes the valuable trade secrets of Broadcom, and you shall use
+    all reasonable efforts to protect the confidentiality thereof, and to
+    use this information only in connection with your use of Broadcom
+    integrated circuit products.
+
+2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
+    AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, REPRESENTATIONS OR
+    WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH
+    RESPECT TO THE SOFTWARE.  BROADCOM SPECIFICALLY DISCLAIMS ANY AND
+    ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, NONINFRINGEMENT,
+    FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, ACCURACY OR
+    COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR CORRESPONDENCE
+    TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT OF USE OR
+    PERFORMANCE OF THE SOFTWARE.
+
+3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR
+    ITS LICENSORS BE LIABLE FOR (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL,
+    INDIRECT, OR EXEMPLARY DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY
+    WAY RELATING TO YOUR USE OF OR INABILITY TO USE THE SOFTWARE EVEN
+    IF BROADCOM HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES;
+    OR (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT ACTUALLY PAID FOR THE
+    SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE LIMITATIONS
+    SHALL APPLY NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF ANY
+    LIMITED REMEDY.
+:>
+*/
+#ifndef _BCMOLT_FIRMWARE_ENVELOPE_H_
+#define _BCMOLT_FIRMWARE_ENVELOPE_H_
+
+#include <bcmos_system.h>
+
+#define BCMOLT_FIRMWARE_ENVELOPE_DESC_MAX_SIZE 128
+#define BCMOLT_FIRMWARE_ENVELOPE_TIME_ZONE_SIZE 7
+#define BCMOLT_FIRMWARE_ENVELOPE_MD5_CHECKSUM_SIZE 16
+
+/* Normalized form of a firmware revision for comparison purposes. */
+#define DEVICE_MGMT_REVISION_RELEASE_MAJOR_ID_SHIFT 24
+#define DEVICE_MGMT_REVISION_RELEASE_MINOR_ID_SHIFT 16
+#define DEVICE_MGMT_REVISION_RELEASE_REVISION_ID_SHIFT 8
+#define DEVICE_MGMT_REVISION_MODEL_ID_SHIFT 0
+
+#define BCMOLT_FIRMWARE_ENVELOPE_NORMALIZE(rev_a) \
+    (((rev_a)->release_major_id << DEVICE_MGMT_REVISION_RELEASE_MAJOR_ID_SHIFT) | \
+    ((rev_a)->release_minor_id << DEVICE_MGMT_REVISION_RELEASE_MINOR_ID_SHIFT) | \
+    ((rev_a)->release_revision_id << DEVICE_MGMT_REVISION_RELEASE_REVISION_ID_SHIFT) | \
+    ((rev_a)->model_id << DEVICE_MGMT_REVISION_MODEL_ID_SHIFT))
+
+typedef struct __PACKED_ATTR_START__
+{
+    uint8_t release_major_id;
+    uint8_t release_minor_id;
+    uint8_t release_revision_id;
+    uint32_t model_id;
+} __PACKED_ATTR_END__ bcmolt_firmware_envelope_revision;
+
+typedef struct __PACKED_ATTR_START__
+{
+    uint8_t envelope_revision; /* The envelope itself can be changed over time, so this explains why we need an envelope revision field. */
+    bcmolt_firmware_envelope_revision revision; /* Revision information */
+    uint32_t block_issu_enforce; /* Every time a change in the code cannot be supported in ISSU and requires a regular upgrade (e.g.: SGB/SERDES firmware upgrade), this integer number will 
+                                  * be incremented. If revision validation function detects a change in this integer between two revisions, then it will block ISSU. */
+    uint32_t p4_change_set; /* This is purely informative field that should have no impact on validation. */
+    uint32_t build_time; /* This is purely informative field that should have no impact on validation. It contains the date/time of the image itself, expressed as seconds since the EPOCH. */
+    char build_time_zone[BCMOLT_FIRMWARE_ENVELOPE_TIME_ZONE_SIZE]; /* This is purely informative field that should have no impact on validation. It goes along with build time option and
+                                                                    * provides time zone information, as the embedded side does not know anything about time zone (without that, the build
+                                                                    * time converted to a string will always yield GMT time, not local time). */
+    uint8_t desc[BCMOLT_FIRMWARE_ENVELOPE_DESC_MAX_SIZE]; /* This is purely informative field that should have no impact on validation. */
+    uint8_t md5_checksum[BCMOLT_FIRMWARE_ENVELOPE_MD5_CHECKSUM_SIZE]; /* The MD5 checksum should be applied on the image itself, not on the envelope. This may be redundant because we
+                                                                       * automatically do CRC inherently as part of image transfer mechanism. However, this may have some future use. */
+    uint32_t image_len; /* The size in bytes of the image itself, not with the envelope. 4 bytes should be big enough to accommodate image length up to 4GB, which is far beyond what we
+                         * really need. */
+} __PACKED_ATTR_END__ bcmolt_firmware_envelope;
+
+#endif
+
diff --git a/bcm68620_release/release/host_driver/utils/bcmolt_math.h b/bcm68620_release/release/host_driver/utils/bcmolt_math.h
new file mode 100644
index 0000000..fb52a00
--- /dev/null
+++ b/bcm68620_release/release/host_driver/utils/bcmolt_math.h
@@ -0,0 +1,71 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#ifndef _BCMOLT_MATH_H_
+#define _BCMOLT_MATH_H_
+
+#include <math.h>
+
+#define ROUND_U32(size_in_bytes) ((uint32_t)((size_in_bytes) + 0.5))
+#define CEIL_U32(size_in_bytes) (((size_in_bytes)-(uint32_t)(size_in_bytes)) > 0 ? ((uint32_t)(size_in_bytes)+1) : (uint32_t)(size_in_bytes))
+#define SQUARE(x) ((x) * (x))
+#define PERCENT(percent, x) (((float)(percent) * (x)) / 100)
+
+/*
+ * Unit Conversion
+ */
+#define BITS_TO_BYTES(bits) ((bits) >> 3)
+#define BYTES_TO_BITS(bytes) ((bytes) << 3)
+
+/* Quantization */
+
+/*
+ * VAL_TO_BIN classifies the value of val to the proper bin
+ * val - a value in the range [0, maxval]
+ * bin - a value in the range [0, bins-1] (result of macro)
+ */
+#define VAL_TO_BIN(val, maxval, bins) ((val) < (maxval) ? ((val) * (bins)) / (maxval) : (bins) - 1)
+
+/* If a value is in a certain bin, it is in the range [min_bin_val, max_bin_val]
+ * min_bin_val - minimum value that belongs to bin
+ * max_bin_val - maximum value that belongs to bin
+ */
+#define BIN_TO_MIN_BIN_VAL(bin, maxval, bins) ((bin) * ((double)(maxval) / (bins)))
+#define BIN_TO_MAX_BIN_VAL(bin, maxval, bins) (((bin) + 1) * ((double)(maxval) / (bins)))
+
+#define GET_MASK(width)             ((1 << (width)) - 1)
+
+#define MAX(a, b) ((a) > (b) ? (a) : (b))
+#define MIN(a, b) ((a) < (b) ? (a) : (b))
+#define MAX3(a, b, c) MAX(MAX(a, b), c)
+#define MIN3(a, b, c) MIN(MIN(a, b), c)
+
+#define CEILING(a, b)   (((a) + ((b) - 1)) / (b))
+
+#endif /* _BCMOLT_MATH_H_ */
diff --git a/bcm68620_release/release/host_driver/utils/bcmolt_module.h b/bcm68620_release/release/host_driver/utils/bcmolt_module.h
new file mode 100644
index 0000000..ad513e9
--- /dev/null
+++ b/bcm68620_release/release/host_driver/utils/bcmolt_module.h
@@ -0,0 +1,52 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#ifndef _BCMOLT_MODULE_H_
+#define _BCMOLT_MODULE_H_
+
+#include <bcmos_system.h>
+#include <bcmolt_model_types.h>
+#include <bcm_dev_log.h>
+
+/* The following structure can be used by probably all modules in our system. */
+typedef struct
+{
+    bcmos_task task;
+    bcmos_bool is_enabled;
+    char task_name[MAX_TASK_NAME_SIZE];
+    dev_log_id log_id;
+    bcmolt_pon_ni pon_id;
+    char msg_queue_name[MAX_MSG_QUEUE_NAME_SIZE];
+    bcmos_msg_pool msg_pool;
+    bcmos_module_id module_id;
+    void *context;
+} bcmolt_module_gen_params;
+
+#endif
+
diff --git a/bcm68620_release/release/host_driver/utils/bcmolt_string.c b/bcm68620_release/release/host_driver/utils/bcmolt_string.c
new file mode 100644
index 0000000..a10fa20
--- /dev/null
+++ b/bcm68620_release/release/host_driver/utils/bcmolt_string.c
@@ -0,0 +1,102 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#include "bcmolt_string.h"
+#include "bcmolt_math.h"
+
+struct bcmolt_string
+{
+    char *str;
+    uint32_t max_len;
+    char *curr;
+    int32_t remaining;
+};
+
+int bcmolt_string_copy(bcmolt_string *str, const char *buf, uint32_t size)
+{
+    int to_copy = MIN(size, str->remaining);
+    memcpy(str->curr, buf, to_copy);
+    str->remaining -= to_copy;
+    str->curr += to_copy;
+    str->curr[0] = '\0';
+    return to_copy;
+}
+
+int bcmolt_string_append(bcmolt_string *str, const char *fmt, ...)
+{
+    int n;
+    va_list args;
+
+    va_start(args, fmt);
+    n = vsnprintf(str->curr, str->remaining, fmt, args);
+    va_end(args);
+    if (n > 0)
+    {
+        if (n > str->remaining)
+        {
+            n = str->remaining;
+        }
+        str->remaining -= n;
+        str->curr += n;
+    }
+
+    return n;
+}
+
+const char *bcmolt_string_get(bcmolt_string *str)
+{
+    return str->str;
+}
+
+void bcmolt_string_reset(bcmolt_string *str)
+{
+    str->str[0] = '\0';
+    str->curr = str->str;
+    str->remaining = str->max_len;
+}
+
+bcmos_errno bcmolt_string_create(bcmolt_string **str, uint32_t max_len)
+{
+    *str = bcmos_calloc(sizeof(bcmolt_string) + max_len + 1);
+    if (*str != NULL)
+    {
+        (*str)->str = (char*)((*str) + 1);
+        (*str)->max_len = max_len;
+        bcmolt_string_reset(*str);
+        return BCM_ERR_OK;
+    }
+
+    return BCM_ERR_NOMEM;
+}
+
+void bcmolt_string_destroy(bcmolt_string *str)
+{
+    bcmos_free(str);
+}
+
diff --git a/bcm68620_release/release/host_driver/utils/bcmolt_string.h b/bcm68620_release/release/host_driver/utils/bcmolt_string.h
new file mode 100644
index 0000000..01fcaa2
--- /dev/null
+++ b/bcm68620_release/release/host_driver/utils/bcmolt_string.h
@@ -0,0 +1,49 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#ifndef _BCMOLT_STRING_H_
+#define _BCMOLT_STRING_H_
+
+#include "bcmos_system.h"
+
+typedef struct bcmolt_string bcmolt_string;
+
+int bcmolt_string_copy(bcmolt_string *str, const char *buf, uint32_t size);
+
+int bcmolt_string_append(bcmolt_string *str, const char *fmt, ...);
+
+const char *bcmolt_string_get(bcmolt_string *str);
+
+void bcmolt_string_reset(bcmolt_string *str);
+
+bcmos_errno bcmolt_string_create(bcmolt_string **str, uint32_t max_len);
+
+void bcmolt_string_destroy(bcmolt_string *str);
+
+#endif /* _BCMOLT_STRING_H_ */
diff --git a/bcm68620_release/release/host_driver/utils/bcmolt_utils.c b/bcm68620_release/release/host_driver/utils/bcmolt_utils.c
new file mode 100644
index 0000000..b8a8994
--- /dev/null
+++ b/bcm68620_release/release/host_driver/utils/bcmolt_utils.c
@@ -0,0 +1,204 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#include "bcmolt_utils.h"
+
+/* HexPrint a single line */
+#define BYTES_IN_LINE 16
+
+#define b2a(c)  (isprint(c)?c:'.')
+
+static void _hexprint1(bcmos_msg_print_cb print_cb, void *context, uint16_t o, const uint8_t *p_data, uint16_t count, const char *indent)
+{
+    int i;
+
+    if (indent)
+        print_cb(context, "%s", indent);
+
+    print_cb(context, "%04x: ", o);
+    for (i=0; i<count; i++)
+    {
+        print_cb(context, "%02x", p_data[i]);
+        if (!((i+1)%4))
+            print_cb(context, " ");
+    }
+    for (; i<BYTES_IN_LINE; i++)
+    {
+        if (!((i+1)%4))
+            print_cb(context, "   ");
+        else
+            print_cb(context, "  ");
+    }
+    for (i=0; i<count; i++)
+        print_cb(context, "%c", b2a(p_data[i]));
+    print_cb(context, "\n");
+}
+
+void bcmos_hexdump(bcmos_msg_print_cb print_cb, void *context, const void *buffer, uint32_t offset, uint32_t count, const char *indent)
+{
+    const uint8_t *p_data = buffer;
+    uint16_t n;
+
+    while (count)
+    {
+        n = (count > BYTES_IN_LINE) ? BYTES_IN_LINE : count;
+        _hexprint1(print_cb, context, offset, p_data, n, indent);
+        count -= n;
+        p_data += n;
+        offset += n;
+    }
+}
+
+void bcmos_hexdump_one_line(const char *funcname,     /* __FUNCTION__ */
+    uint32_t lineno,       /* __LINE__ */
+    bcmos_msg_print_cb print_cb,
+    void *context,
+    const void *buffer, /* start of memory region to dump */
+    uint32_t start_offset, /* start offset into the region */
+    uint32_t byte_count, /* number of bytes in region to dump */
+    const char *prefix, /* optional prefix string */
+    const char *suffix) /* optional suffix string */
+{
+    const uint8_t *p_data = buffer;
+    uint32_t data_offset = start_offset;
+    size_t max_buf_size = 8000; /* room enough to dump ~2600 bytes with shortish prefixes/suffixes */
+    char *out_buf = bcmos_calloc(max_buf_size);
+    size_t out_buf_offset = 0;
+    uint32_t tmp_num_chars = 0;
+
+    BUG_UNLESS(out_buf);
+
+    memset(out_buf, 0, max_buf_size);
+
+    if (prefix)
+    {
+        tmp_num_chars = snprintf(out_buf + out_buf_offset, /* out_buf start offset */
+            max_buf_size - out_buf_offset, /* remaining space in out_buf */
+            "\n%40s:%-5u  %s", funcname, lineno, prefix);
+    }
+    else
+    {
+        tmp_num_chars = snprintf(out_buf + out_buf_offset, /* out_buf start offset */
+            max_buf_size - out_buf_offset, /* remaining space in out_buf */
+            "\n");
+    }
+    out_buf_offset += tmp_num_chars;
+
+    while ((data_offset < (start_offset + byte_count)) && (out_buf_offset < max_buf_size))
+    {
+        tmp_num_chars = snprintf(out_buf + out_buf_offset, /* out_buf start offset */
+            max_buf_size - out_buf_offset, /* remaining space in out_buf */
+            "%02x ",
+            p_data[data_offset++]); /* byte to dump */
+        BUG_UNLESS(3 == tmp_num_chars);
+        out_buf_offset += tmp_num_chars;
+    }
+
+    if (tmp_num_chars < max_buf_size)
+    {
+        if (suffix)
+        {
+            tmp_num_chars = snprintf(out_buf + out_buf_offset, /* out_buf start offset */
+                max_buf_size - out_buf_offset, /* remaining space in out_buf */
+                "%s", suffix);
+        }
+        else
+        {
+            tmp_num_chars = snprintf(out_buf + out_buf_offset, /* out_buf start offset */
+                max_buf_size - out_buf_offset, /* remaining space in out_buf */
+                "\n");
+        }
+        out_buf_offset += tmp_num_chars;
+        BUG_UNLESS(out_buf_offset < max_buf_size);
+    }
+
+    print_cb(context, "%s", out_buf);
+    bcmos_free(out_buf);
+}
+
+static uint32_t eth_crc32_tab[] =
+{
+    0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f,
+    0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
+    0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2,
+    0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7,
+    0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9,
+    0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172,
+    0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c,
+    0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59,
+    0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423,
+    0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
+    0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x01db7106,
+    0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433,
+    0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d,
+    0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e,
+    0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950,
+    0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65,
+    0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7,
+    0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0,
+    0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa,
+    0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
+    0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81,
+    0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a,
+    0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, 0xe3630b12, 0x94643b84,
+    0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1,
+    0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb,
+    0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc,
+    0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e,
+    0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b,
+    0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55,
+    0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
+    0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28,
+    0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d,
+    0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f,
+    0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38,
+    0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242,
+    0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777,
+    0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69,
+    0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2,
+    0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc,
+    0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
+    0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693,
+    0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94,
+    0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d
+};
+
+uint32_t eth_calc_crc32(uint32_t crc, const void *buf, size_t size)
+{
+    const uint8_t *p;
+
+    p = buf;
+    crc = crc ^ ~0U;
+
+    while (size--)
+        crc = eth_crc32_tab[(crc ^ *p++) & 0xFF] ^ (crc >> 8);
+
+    return crc ^ ~0U;
+}
+
diff --git a/bcm68620_release/release/host_driver/utils/bcmolt_utils.h b/bcm68620_release/release/host_driver/utils/bcmolt_utils.h
new file mode 100644
index 0000000..b8a5a2d
--- /dev/null
+++ b/bcm68620_release/release/host_driver/utils/bcmolt_utils.h
@@ -0,0 +1,134 @@
+/*
+<:copyright-BRCM:2016:DUAL/GPL:standard
+
+   Broadcom Proprietary and Confidential.(c) 2016 Broadcom
+   All Rights Reserved
+
+Unless you and Broadcom execute a separate written software license
+agreement governing use of this software, this software is licensed
+to you under the terms of the GNU General Public License version 2
+(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+with the following added to such license:
+
+   As a special exception, the copyright holders of this software give
+   you permission to link this software with independent modules, and
+   to copy and distribute the resulting executable under terms of your
+   choice, provided that you also meet, for each linked independent
+   module, the terms and conditions of the license of that module.
+   An independent module is a module which is not derived from this
+   software.  The special exception does not apply to any modifications
+   of the software.
+
+Not withstanding the above, under no circumstances may you combine
+this software in any way with any other Broadcom software provided
+under a license other than the GPL, without Broadcom's express prior
+written consent.
+
+:>
+ */
+
+#ifndef _BCMOLT_UTILS_H_
+#define _BCMOLT_UTILS_H_
+
+#include "bcmos_system.h"
+
+#define BCMOS_MACADDR_FMT_STR "%02X:%02X:%02X:%02X:%02X:%02X"
+#define BCMOS_MACADDR_PARAMS(mac) (mac)->u8[0],(mac)->u8[1],(mac)->u8[2],(mac)->u8[3],(mac)->u8[4],(mac)->u8[5]
+
+#define MAC_STR_LEN 18
+
+#define BYTES_IN_MEGABYTE(bytes) ((bytes) / (1024 * 1024))
+
+static inline char *bcmos_mac_2_str(const bcmos_mac_address *mac, char *buf)
+{
+    snprintf(buf, MAC_STR_LEN, BCMOS_MACADDR_FMT_STR, BCMOS_MACADDR_PARAMS(mac));
+    return buf;
+}
+
+/** Swap a byte string of any length.
+ *
+ * \param[in]   ptr     pointer to a memory space.
+ * \param[in]   len     length
+ * \note
+ *      {0, 1, 2, 3} becomes {3, 2, 1, 0}
+ */
+static inline void bcmos_swap_bytes_in_place(uint8_t *ptr, uint32_t len)
+{
+    int  ii;
+    char tmp;
+
+    for (ii = 0; ii < (len / 2); ii++)
+    {
+        tmp = ptr[len - ii - 1];
+        ptr[len - ii - 1] = ptr[ii];
+        ptr[ii] = tmp;
+    }
+}
+
+/** Swap a byte string of any length.
+ *
+ * \param[out]      dst     pointer to a memory space for the swapped bytes.
+ * \param[in]       src     pointer to a memory space for bytes to be swapped.
+ * \param[in]       len     length in bytes
+ * \note
+ *      {0, 1, 2, 3} becomes {3, 2, 1, 0}
+ */
+static inline void bcmos_swap_bytes(uint8_t *dst, const uint8_t *src, const uint32_t len)
+{
+    int  ii;
+
+    for (ii = 0; ii < len; ii++)
+    {
+        dst[ii] = src[len - ii - 1];
+    }
+}
+
+/** Copy bits from a given range of the source to a different range of the
+ *  destination
+ *
+ * \param[in]   dst         destination value to be merged to
+ * \param[in]   dst_hi      high bit position
+ * \param[in]   dst_lo      low bit position
+ * \param[in]   src         source value to copy the bits from
+ * \param[in]   src_hi      high bit position
+ * \param[in]   src_lo      low bit position
+ *
+ * \return      destination value
+ */
+static inline uint32_t bcmos_bits_copy_u32(uint32_t dst, uint8_t dst_hi, uint8_t dst_lo,
+    uint32_t src, uint8_t src_hi, uint8_t src_lo)
+{
+    dst &= (~(((1 << ((dst_hi - dst_lo) + 1)) - 1) << dst_lo));
+    src &= (((1 << ((src_hi - src_lo) + 1)) - 1) << src_lo);
+    dst |= ((dst_lo >= src_lo)? (src << (dst_lo - src_lo)): (src >> (src_lo - dst_lo)));
+    return dst;
+}
+
+/* network to host on unaligned array of uint32_t elements. Treat pointer p as a pointer to an array of uint32_t elements. Get element i.  */
+#define N2H32(p, i) ((((const uint8_t *)(p))[(i) * 4]<<24) | (((const uint8_t *)(p))[(i) * 4+1]<<16) | (((const uint8_t *)(p))[(i) * 4+2]<<8) | (((const uint8_t *)(p))[(i) * 4+3]))
+/* network to host on unaligned array of uint16_t elements. Treat pointer p as a pointer to an array of uint16_t elements. Get element i. */
+#define N2H16(p, i) ((((const uint8_t *)(p))[(i) * 2]<<8) | (((const uint8_t *)(p))[(i) * 2+1]))
+/* network to host on unaligned array of uint8_t elements. Treat pointer p as a pointer to an array of uint8_t elements. Get element i. */
+#define N2H8(p, i) (((const uint8_t *)(p))[(i)])
+
+/* For internal use by the following H2N* macros */
+#define H2N8(p, v)   *((uint8_t *)p) = (uint8_t)(v)
+/* host to network conversion of a uint16_t with support for non 16 bit aligned destination address. p is a (uint8_t *) destination pointer. v is a uint16_t value. v can be written to p even if p is unaligned to 16 bits. */
+#define H2N16(p, v)  (H2N8((p), (v) >> 8), H2N8(((uint8_t *)(p) + 1), (v)))
+/* host to network conversion of a uint32_t with support for non 32 bit aligned destination address. p is a (uint8_t *) destination pointer. v is a uint32_t value. v can be written to p even if p is unaligned to 32 bits. */
+#define H2N32(p, v)  (H2N16((p), (v) >> 16), H2N16(((uint8_t *)(p) + 2), (v)))
+
+#define NUM_ELEM(array)     (sizeof(array) / sizeof((array)[0]))
+
+typedef void (*bcmos_msg_print_cb)(void *context, const char *fmt, ...);
+
+void bcmos_hexdump(bcmos_msg_print_cb print_cb, void *context, const void *buffer, uint32_t offset, uint32_t count, const char *indent);
+void bcmos_hexdump_one_line(const char *funcname, uint32_t lineno, bcmos_msg_print_cb print_cb, void *context, const void *buffer, uint32_t offset, uint32_t count, const char *prefix,
+    const char *suffix);
+
+uint32_t eth_calc_crc32(uint32_t crc, const void *buf, size_t size);
+
+#define BCMOLT_TIME_STR_MAX_LEN 80
+
+#endif /* BCMOLT_UTILS_H */
+
